The best code is no code
Before writing a function, search for a library that does it. Before adopting a library, ask if you need it at all.
I've watched engineers spend two days building a custom date formatting utility when Intl.DateTimeFormat exists in every browser. I've seen teams add a 50KB library to format a single timestamp. Both are wrong.
The evaluation order should be:
- Can I remove the requirement entirely?
- Can a built-in API handle it?
- Can a well-maintained library handle it?
- Do I need to write this myself?
Most code exists to solve problems that shouldn't exist in the first place. A feature that requires 500 lines of custom parsing might indicate the data model is wrong. A utility that transforms between two formats might mean one format should be eliminated.
Every line of code is a liability. It needs to be tested, maintained, understood by future readers, and debugged when it breaks. The best code is the code you didn't write because you solved the problem at a higher level.
More in Thoughts
Remote work is a skill
Working across Japan, USA, and India taught me that async communication is everything.
Model size is a vanity metric
Ran Kokoro-82M on my MacBook for TTS. 337MB. Broadcast-quality speech. Zero cost.
AI won't replace engineers
It'll replace engineers who can't use AI. Different thing.