You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I never, ever want to open audio files in Apple Music again
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sad Sunday: The great JavaScript day-of-week confusion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How do you deploy new code continuously into a system that needs to support stateful, uninterruptible computations?
Some workloads are inherently stateful
As web developers, we're used to valuing stateless computation, for good reason – reducing state makes everything easier. Servers (or cloud instances) hold no essential state, delegating any important data to databases like Postgres and Redis. This is a great architecture. Among other benefits, it makes zero-downtime deployments a breeze: to deploy a new code version, you simply spin up a set of new instances with the new git sha, add them to the load balancer, and kill the old instances after draining them of traffic (perhaps after 60 s).
However, some workloads don't fit this "short-duration request & response" mold. As an example, consider connecting OpenAI Realtime to Twilio's API, which requires you to:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There are many reasons why people like Object-Oriented Programming, but personally, my main reason for the use of classes in TypeScript is making dependencies explicit and replaceable. For example, suppose you have a module, Calendar, which depends on another module, GCalClient - i.e. Calendar uses the functionality from GCalClient but not vice versa. The most straightforward way to write that code is by simply using the functionality from GCalClient when needed:
// calendar.ts
import {bookAppointment} from "google-calendar-client"
function createMeeting() {
While this detailed post is about the Amazon's so-called Leadership Principles, the general approach can be used
when interviewing for any company in talking about your experience.
This guide helps me set up my macOS laptop in a fairly simple manner. I'll need to go back to this guide
roughly every 2–3 years. Maybe it'll help you, too!
Smart Caps Lock
Use Karabiner Elements
Map Caps Lock to Ctrl (when long-pressed) or Escape (when tapped). See this guide
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters