Filter by source
All sources GoCardless 6194 PubNub: 2474 Vercel 1664 Ariya Hidayat 849 Serverless 849 Jake Trent 816 Drew DeVault 784 Nic Raboy 734 SitePoint 629 Neon 504 Supabase 435 Shopify 432 Soundcloud 409 Databricks 396 Real Python 394 Johannes Brodwall 378 Jeremy Kun 327 Laravel 296 PostHog 294 Twilio 259 Graham King 257 MapTiler 257 Carlos Becker 252 Scott Johnson 250 Cloudflare 244 Lea Verou 244 Matt Aimonetti 231 Atomic Object 218 Andrew Bancroft 214 Nvidia 210 Stanko Tadić 189 Lerner Consulting 188 Stack Overflow 183 Freek Van der Herten 182 The Daily WTF 168 Raymond Chen 165 Trivago 159 GitHub Old 155 Discord 140 Dan Luu 137 WyeWorks 134 Swizec Teller 133 Una Kravets 132 Auth0 129 Codrops 126 OCTO Technology 123 Reginald Braithwaite 121 Android 119 Jane Street 119 Hostinger 118 Radek Pazdera 118 Warp 114 AWS 110 Antirez 110 Thoughtbot 105 Cerner 103 AdRoll 102 Changelog 101 Jake Wharton 101 Nelson Elhage 98 Martin Fowler 96 dbt Labs 95 Ilija Eftimov 94 Marek Majkowski 94 Docker 87 .NET 86 Finn.no 86 Nick Desaulniers 86 Hayden James 84 Marcelo Rinesi 84 Nordic APIs 82 Timescale 82 Toptal 82 Luciano Mammino 80 Sentry 79 Wingify 78 Jessie Frazelle 77 Monica Dinculescu 77 Matt Warren 76 Drivy 75 Jan Lelis 75 T.J. Maher 74 Paweł Chudzik 73 Kotlin 69 Ebay 68 Mykhailo Kozik 68 Axel Rauschmayer 64 Mozilla Release 64 Evil Martians 63 Confluent 62 Tania Rascia 60 0xADADA 59 Jake Yesbeck 59 Khan Academy 59 Tailscale 59 Dean Hume 57 RoseHosting 56 SurveyMonkey 53 jOOQ 53 Sam Saffron 51 Facebook AI Research 48 Monstermuffin 48 Huon Wilson 45 Philip Walton 45 Dennis Felsing 44 HackerEarth 44 Rust 44 The Pragmatic Engineer 44 Fly.io 43 Josh Sherman 42 Stripe 42 Gleb Bahmutov 41 Robin Ward 41 Philipp Oppermann 40 Armin Ronacher 36 Daniel Doubrovkine (dB.) 36 Alex Russell 35 Grab 35 Addy Osmani 34 Airbnb 34 Pinterest 34 Tumblr 33 8th Light 32 Joe Nelson 32 Brandwatch 31 Palantir 31 Bartlomiej Filipek 30 Domenico Luciani 30 Lazarus Lazaridis 30 Pamela Fox 30 Evan Miller 29 IPFS 29 Vanilla Java 29 Evan Hahn 28 Jonathan Snook 28 PagerDuty 28 Ruslan Spivak 28 Dereuromark 27 Okta 27 Petr Mitrichev 27 Red 27 GitHub 26 Julia Evans 26 Mozilla Hacks 26 Bad Concurrency 25 CSC - IT Center For Science - Cloud Team 25 GameChanger 25 Guido van Rossum 25 Jay Fields 25 Jeff Preshing 25 Life Plus Linux 25 Mark Seaborn 25 Oona Räisänen 25 Srinivas Tamada 25 Stephen Colebourne 25 Steve Yegge 25 Criteo 24 Eli Bendersky 24 Kogan.com 24 Squarespace 24 Dropbox 23 Crystal 22 Elegant Code 22 Babbel 21 Blundell's Android Tutorials 21 Gusto 21 HomeAway 21 Netflix 21 Dave Cheney 20 David Walsh 20 Erlang Solutions 20 Guardian 20 Justin Weiss 20 Michael Herman 20 Miguel Quinones 20 Mike Ash 20 Ole Begemann 20 Paul Irish 20 Robert C. Martin 20 Stefan Parker 20 Target 20 Wilfred Hughes 20 Yahoo 20 Instacart 19 Jeff Atwood 19 Spotify 19 Thumbtack 19 Aaron Patterson 18 Arkency 18 Nikola Brežnjak 18 The Coded Self 18 Chris Wellons 17 Jerry Gamblin 17 Matthew Green 17 Wealthfront 17 Filippo Valsorda 16 Medium 16 Postmark 16 RocksDB 16 Stack Abuse 16 Yegor Bugayenko 16 Zach Holman 16 Amit Merchant 15 Bigcommerce 15 Blender 15 Edward Faulkner 15 High Scalability 15 Housing.com 15 Hypriot 15 Jacopo Tarantino 15 John Wittenauer 15 Lambda the Ultimate 15 Localytics 15 Microsoft Python 15 Robin Wilson 15 Slack 15 Advanced Web Machinery 14 Grofers 14 Helpshift 14 HubSpot 14 OLX 14 REA Group 14 Rob Allen 14 Vlad Mihalcea 14 Bootstrap.com 13 Feedzai 13 Grafana 13 Indeed 13 Lyft 13 Michael Crump 13 Nextdoor 13 Scott Hanselman 13 Strava 13 Bazaarvoice 12 Canva 12 Henrik Warne 12 Jon Skeet 12 Mary Rose Cook 12 Nicolas Liochon 12 Novoda 12 Steve Bellovin 12 Abu Ashraf Masnun 11 Badoo 11 Deliveroo 11 Eric Lippert 11 Haptik 11 Hashrocket 11 JobTeaser 11 Kevin Burke 11 Marco Pivetta 11 New York Times 11 OpenDNS 11 Paypal 11 Ramon Fried 11 RisingStack 11 Small Improvements 11 VNGRS 11 Vinted 11 Zendesk 11 Alan Storm 10 Appnexus 10 Artsy 10 BBC 10 Benchling 10 Bill the Lizard 10 Bohops 10 Brendan Eich 10 Brendan Gregg 10 Brujo Benavides 10 Clever 10 Curalate 10 Daily JS 10 Daily Tech Video 10 Daniel Schmidt 10 Dot Dev (.dev) 10 Dragan Djuric 10 Eddie Smith 10 Eric Elliot 10 Erik Runyon 10 Evan Jones 10 Federico Cargnelutti 10 Findmypast 10 Flickr 10 Freeletics 10 GoSquared 10 Groupon 10 Harry's 10 Henrik Lau Eriksson 10 High Scalability 10 Hootsuite 10 Idontgetoutmuch's Weblog 10 Itamar Turner-Trauring 10 Jamis Buck 10 Jesal Gadhia 10 Joel Spolsky 10 Juan Treminio 10 Junior Grossi 10 Kirill Shevchenko 10 Larry Land 10 Matt Cutts 10 Matt Might 10 Mesosphere 10 Miro Cupak 10 Miro 10 NSHipster 10 Nick Craver 10 Ofer Zelig 10 Panorama Education 10 Pat Shaughnessy 10 Piotr Pasich 10 Pony Foo 10 Postman 10 ReactJS News 10 Regular Geek 10 Remind 10 RetailMeNot 10 Riot Games 10 Schakko 10 Skyscanner 10 Stitch Fix 10 Teamwork 10 Tikhon Jelvis 10 Tinder 10 Transferwise 10 TrueCar 10 Undocumented Matlab 10 Universe 10 UpGrad 10 VTS 10 Wojtek Gawroński 10 XING 10 Yammer 10 Yifan Lu 10 Zolmeister 10 eFounders 10 Josh Haberman 9 Nate Berkopec 9 Wemake.services 9 Mike Fogus 8 Ian Hummel 7 Ilya Grigorik 6 K. Harrison 6 Sensible 6 James Long 5 Thomas Young 5 Edgar Aroutiounian 4 Avenue Code 3 Bandcamp 3 James Hague 3 Raymond Hettinger 3 Algolia Anders Aarvik Ariejan de Vroom Asana Atlassian Bjørn Johansen Blake Erickson Bryan Cantrill Capgemini Chen Hui Jing Chien Tran Cloudera Cloudsmith CockroachDB Code with style! CodeName One Codelitt Codeship Commercetools Credit Karma Crowdfire Deezer DoorDash Dragan Gaic Engine Yard Entelo Envato Envoy Eventbrite Federico Tomassetti Figma GIPHY Galois Go GoDaddy Guilherme Rodrigues Hashnode Heroku Honeybadger Honeycomb IMVU Ievgen Kuzminov Instagram Jobandtalent John Resig Jonathan Dekhtiar Just Eat Kinvolk Kolosek Kyle Kingsbury LINE Linear LiveRamp Liveblocks Made Tech Marc Plano-Lesay Microsoft Edge Moove-it Mozilla Automation Team NPR Apps Nicolai Parlog (CodeFX) Oursky Oxide Computer Paul Lewis Peter Norvig Peter Steinberger Peteris Krumins PicCollage PlanetScale Prezi PullReview Rachel Kroll Radim Řehůřek Ray Wenderlich React Native Render Retool Schibsted Tech Polska Sharethis Sketch Sky Betting & Gaming Soshace Speedledger Sqreen Square Stackshare Swift Swiggy Takipi Temporal Turso Vena Solutions VersionEye Wayfair William Kennedy Zed Zendesk(old) theScore
816 articles Visit blog →

121. Make a Lowercase Enum in Absinthe (jaketrent.com)

Absinthe is an Elixir library that allows you to specify a graphql schema in Elixir. Here's how to make a lowercase enum in Absinthe.By default an enum in Absinthe will be exposed as all-uppercase values. Here's the enum:enum :salty_slug do value(:foaming) value(:nasty) endThen when queried:query my...

122. Writing a Subquery in Ecto (jaketrent.com)

Here's how to write a subquery in Ecto using the in operator.Subqueries allow you to embed a query inside of another query. This is helpful for building up data for the purpose of your main/outer query. A classic example is, "Select me objects that match the object ids in this subquery," where that ...

123. Run an Ecto Query in an Ash Manual Action (jaketrent.com)

Not getting the data you want from your Ash action? Try a manual action, in Ecto, hombre!After Many AttemptsI had tried many things. Ash makes things so nice and tidy with its cool, terse macros for everything. But filter(expr()) was failing me. Manual calculations were working, but then I couldn't ...

124. Create a Custom Commitlint Pattern (jaketrent.com)

How to create a custom rule for for a git commit log formatYou can read about how to setup commitlint to enforce your log format. And you can choose a pre-existing format, such as "Conventional Commit".But in this case, we want to create our own custom format. We want each of our git commit log titl...

125. Set up Multiple Jest Configs (jaketrent.com)

Here's how to set up multiple Jest configs for different test suites.Different needsWe have different kinds of tests that we might put in different test suites. Here are potentially two categories:Unit testsIntegration testsWe want to run them separately, at different times. Let's say that we coloca...

126. Load .env File in Jest (jaketrent.com)

Here's how to load .env file in Jest tests..env FileA test suite that relies on real systems, say external APIs, might require sensitive information like API keys in order to interact with them. But as with the source code, we don't want to commit sensitive information to the test code. So, we'll re...

127. Dependencies Show Cleanliness (jaketrent.com)

Getting your code organized is challenging. But when it feels as clean as your room after organizing it Saturday morning, it'll feel worth it, and you can go watch cartoons. A key to clean code is clean dependencies.Modules and dependenciesA module knows stuff and does stuff. Getting the contents of...

128. See TODOs in a Branch (jaketrent.com)

Here's how to see all the TODOs introduced in a branch.See TODO contentsTwo steps: Diff your PR branch compared to the master branch and then grep for TODOs. For instance:git diff master..my-branch | rg TODO -// TODO: use formatPrimaryErrorMessage in constructors -// TODO: move errors into own modul...

129. Run RabbitMQ Locally (jaketrent.com)

Here's how to run RabbitMQ in a local dev environment.First, install Docker Desktop.Then start dockersystemctl --user start docker-desktopThen get the RabbitMQ image from Docker Hub:docker pull rabbitmq:3-managementThen create a container:docker run -d --name some-rabbit -e RABBITMQ_DEFAULT_USER=gue...

130. Remove Parens in Elixir Formatter (jaketrent.com)

Here's how to make the elixir formatter not add parens to certain functions.Run formatterCode formatting in Elixir can be accomplished with:mix formatCustomize formatTo control how the formatter works, you can edit a .formatter.exs file. This file usually goes in the root of your project.There aren'...

131. Query System Specs in Linux (jaketrent.com)

Here are some ways to find the specs for your system via the Linux terminal.High LevelCheck out all the high-level stuff at once.sudo apt install neofetchAnd then run neofetch and get something like this:❯ neofetch ///////////// jaketrent@pop-os ///////////////////// ---------------- ///////*767////...

132. Type a Declared Function in TypeScript (jaketrent.com)

Here's how to define a type for a declared function.Declare a functionIt's straightforward to type a function signature -- that is, its parameters and return value. For example, string in, number out:function parseItBoom(input: string): number { return parseInt(input, 10); }Define a function typeBut...

133. Sculpting Software to Create Beauty (jaketrent.com)

We're often called Software Engineers. But sometimes creating software feels more like artistry than engineering.Forming the MalleableWhen Michaelangelo created his David statue, he revealed the image of David in the stone. From a block of nothing, he chiseled away until he was satisfied that he had...

134. Redirect in Middleware in Next.js 14 (jaketrent.com)

Here's how to redirect in middleware in Next.js 14.Redirect exampleHere's a simple example of src/middleware.ts that does a redirect:import { NextRequest, NextResponse } from 'next/server' export default function middleware(req: NextRequest) { return requireLogin() ?? NextResponse.next() } function ...

135. Encode Base64 in Node.js (jaketrent.com)

Here's how to encode and decode base64 in Node.js.Encode and decode functionsThis is reliable in Node.js. I've read that you can use atob and btoa now, because they're native in later versions of node. But in my experience, I didn't get them working correctly.function encode(data) { return Buffer.fr...

136. Store JSON Secret in Vault (jaketrent.com)

Here's how to store a JSON secret in Vault and parse it out.JSON SecretsSome secrets have more than a single value. An example would be a service account for Google Cloud. They give you a JSON file with a private key, client email, and other value.The pkey.json looks something like this:{ "type": "s...

137. Create a File on Google Drive using Promises (jaketrent.com)

Here's how to create a file on Google Drive using Promises in TypeScript.Upload a FileMy goal is to upload a file to Google Drive using the JavaScript lib googleapis. I'm on Next.js 14, in TypeScript.ClientOn the client, we've created a file drop zone. On file drop, we're capturing the file and pass...

138. Test Localhost on Mobile Device (jaketrent.com)

Here's how to test localhost on your mobile device via ngrok.ScenarioYou have a website that you've been developing on your desktop, and it looks great. And you've been using the device toolbar in browser devtools to test on mobile-sized screens. But it's just not the same. You want to flick the gla...

139. Logging to DataDog from Next.js (jaketrent.com)

Here's how to log to DataDog from Next.js.You could use this approach to do most any JSON logging from Next.js, but some of the tips here are specific to DataDog.Why JSON LogYou want logging on your app for visibility when debugging. You want JSON logging because it provides more structure to your l...

140. Block Websites with /etc/hosts File (jaketrent.com)

Here's how to block websites by editing your /etc/hosts file./etc/hosts is a file where you can make custom DNS (domain name server) entries. In other words, point this name (domain/url) to this IP address. Without a functioning DNS server, typing a url into a browser address bar won't connect to th...

141. Format an NTFS Drive in Linux (jaketrent.com)

Here's how to format an NTFS Drive in Linux.Use caseYou have a new HDD or SSD, and you want to be able to share it amongst some Linux, Windows or MacOs hosts.You might choose to format it with the NTFS filesystem. It is probably one of the better options for cross-platform support.To make this happe...

142. Play Playlist with mpv (jaketrent.com)

Here's how to play a list of songs with mpv.Make Your PlaylistCreate a file with the path of each track on a separate line. You can create your playlist with cmus.It'll look something like this:/mnt/mynas/music/Whitney Houston - Singles/01 I Wanna Dance With Somebody (Who Loves Me).m4a /mnt/mynas/mu...

143. Generate Validator and Type Def with AJV (jaketrent.com)

Here's how to generate both a TypeScript interface and a validator function with a schema with a tool called ajv.Importance of ValidationTypeScript is going to provide type definitions that allow build-time static analysis of your code. It helps you detect if you've written code-level errors.After y...

144. Strong Type Checks with AJV Additional Properties (jaketrent.com)

It's tricky to make a forgiving validator and a unforgiving type definition with AJV's JTDDataType. Here's a method to the madness.I've previously gone over the happy path to generate typedefs from AJV schemas. Let's build off of that example.Additional PropertiesLet's say that we have person REST e...

145. Error Handling with Result Type (jaketrent.com)

Error handling with Result types is an improvement upon error throwing.Failures in the Real WorldWriting code that only considers the happy path is relatively easy. But what happens when things go wrong? How do we react? How do we recover? How do we avoid inconsistent state with reverts or retries? ...

146. Use Vault for Local Dev Secrets (jaketrent.com)

This is a way to use Vault to provide app secrets for local dev.Why Use Vault LocallyYou want to use Vault in your local dev environment for a couple main reasons:You'll have a secure way to share secrets.It'll be easier to keep secrets up to date.It'll make your local env match your production envi...

147. Dev Silver Bullets Still Don't Exist (jaketrent.com)

It's a losing proposition to think one can make the final, best decision for all development going forward.To centralize all dev decisions in time and space is folly. 3 main factors are too variable: devs, time and products.Different DevsThe quip is that if you ask 2 devs a question, you'll get 2 di...

148. Trigger Caps Lock From Linux Terminal (jaketrent.com)

Here's a way to trigger caps lock on or off using a command in the terminal.Why on EarthBecause I have the caps lock key remapped usually. But there's some rando key combination that I hit periodically that turns it back on. Some weird keyboard or OS thing, I'm really not sure. But when it happens, ...

149. Connect to AWS VPN from i3 (jaketrent.com)

Here's how to connect to the AWS VPN from i3, or other non-desktop Linux environments.The ProblemAWS has a VPN client for connecting to AWS VPNs. And they have a build for Linux. ...Good. But it can only be run from a desktop environment, like Gnome. What's an i3 user to do?One option: Patch a versi...

150. It's People Behind The Curtain (jaketrent.com)

Don't worry, everyone else is making it up too.Magic or Marketing?When you're younger, you look at some of the feats we've accomplished as a human race, and it sometimes feels fantastic. These people become idols, and their accomplishments become world wonders!Then you get a peek behind the curtain:...
Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open