Inside the Go Compiler: Optimizations That Make Your Code Faster

Most Go developers know how to write efficient Go code. But very few know what happens to that code after go build. Consider: func add(a, b int) int { return a + b } func main() { x := add(10, 20) fmt.Println(x) } How many function calls happen here? The obvious answer is one. But … Continue reading Inside the Go Compiler: Optimizations That Make Your Code Faster

What I learned putting my own text editor into production

A follow-up to "The 5.2 kB editor I had to write because nothing else fit." Shipping a package to npm is one thing. Actually using it in the production app it was built for is a different exercise entirely. You find the edge cases nobody would catch in unit tests, because they only show up … Continue reading What I learned putting my own text editor into production

When Your Zod Schema Lives in the Database: A Builder Pattern Story

This is a story about a form that validated itself, not because the schema was hardcoded, but because we built it at runtime. I was working on a feature where admins could spin up their own forms. Drag a field in, mark it required, set a max length, save, ship. By the time an end-user … Continue reading When Your Zod Schema Lives in the Database: A Builder Pattern Story