Why I stopped optimizing too early — a story in three builds
Build one: over-engineered and late. Build two: naive and fine. Build three: actually measured, actually fast where it mattered.
By Nzubechukwu Cyprian · Pharmacy student at UNN, full-stack developer
Three builds taught me the difference between performance and the performance of feeling fast.
Build one had caching layers, a message queue, and a database abstraction that could swap engines — for an app with twelve users. I shipped three weeks late, and the complexity outlived the app.
Build two was my correction: dead simple, no abstractions, direct queries. I braced for the performance cliff. It never came. At a thousand users, everything was fine. The cliff I feared was imaginary; the complexity I'd avoid was real.
Build three is where I learned the actual craft: I measured. Real traffic showed exactly two slow endpoints — one N+1 query and one missing index. Two afternoon fixes. The rest of the "optimizations" I'd been tempted to add would have been decoration.
What measuring taught me
- my guesses about slow code were wrong more often than right
- the real bottlenecks lived in two or three places, not everywhere
- simple code is easier to optimize later, because there's less of it to profile
The rule I keep now
Write the simple version. Put it in front of reality. Measure. Optimize the measured thing. In that order, always. The fog of premature optimization feels like engineering. Measurement is engineering.
Keep reading
- Software engineering
Naming things is the whole job, sometimes
Most codebases don't have a naming problem — they have a thinking problem that shows up in their identifiers.
- Software engineering
Your README is your first interview
Before anyone judges your code, they judge your README. What a good one actually contains, from someone who reads a lot of them.
- Software engineering
The bug that taught me to read error messages properly
A three-line error sat in my logs for a week. It told me exactly what was wrong. I just never read past the first line.