Your Code isn't Correct
There is a common trap that we fall into as developers, and it is believing that because some code “worked” that the code was written “correctly”. In reality, for most technical problems, a good developer can likely point out several different solutions. Any of those solutions might be perfectly reasonable, while none of them is the single “correct way”.
Different solutions optimize for different things
You can only optimize for a few things at once, and there are always tradeoffs. Bloated memory consumption often makes way for faster computation speed. Simple syntax often leads to a lack of control or configurability. Different solutions to the same problem often optimize for slightly different things. I’m personally a fan of optimizing for simplicity first, but “simple” means different things to different people.
In some cases, short variable names might be simple. In some cases, a longer name with 4 or 5 words might be simpler.
Firestore as a storage engine might be simple because it’s “basically just persisted JSON”, but leads to data duplication. It might make reading data simple, but adds complexity at “create”, “delete” and “update” time.
Vanilla JavaScript is “simpler” than a giant React framework at first. Once your app grows so large that you begin rewriting reactive libraries into your code, React would likely be “simpler”.
In short, when you’re reviewing someone else’s code, and it looks different from how you would have done it, try to see if they’re making improvements in areas where your solution wouldn’t have. Just because your solution does one thing “better”, doesn’t mean it’s better overall.
Your code can always be better
I really don’t agree with the conclusion of this somewhat popular meme, and I cringe a bit when I see newer developers sharing it.

If you need to maintain your code in the future, as most of us do, please revisit it and update it! Tech debt is real debt.
- Keep dependencies up to date
- Refactor API contracts to keep them sensical as business rules change
- Upgrade to newer infrastructure and technologies as it makes sense to do so
- Keep your team knowledgeable on the older parts of the system, legacy code can be scary
Just because code can be better, doesn’t mean it’s a priority
There is some truth to the “1st rule of programming” meme though, don’t get me wrong. There are cases where you don’t want to waste precious time updating or refactoring code. For example:
- You just need a prototype because product-market fit hasn’t been found yet
- You know whatever code you wrote won’t be needed for long because a more robust solution is being purchased or built
- You just need a proof of concept
- The client is unwilling to pay for maintenance (in a service-based business)
Be smart. Your solution isn’t perfect, and that’s okay. Continue to iterate and everything will be fine.
Related Articles
Beautiful Language and Beautiful Code
Jun 30, 2021
“Dead Poet’s Society” is a classic film, and has become a recent favorite of mine. There’s a scene in particular that I enjoy, where Robin William’s character explains that it’s bad practice to use terms like “very tired” or “very sad”, instead we should use descriptive words like “exhausted” or “morose”!
Intro to the One-Time Pad Cipher
Jun 28, 2021 by Lane Wagner - Boot.dev co-founder and backend engineer
In cryptography, the one-time pad, or OTP is a way of encrypting information so securely that it’s impossible to be cracked. That said, OTP has a major drawback in that it requires both parties to have access to the same key before a message is encrypted.
Check for Standards Before Creating a New One
Jun 07, 2021 by Lane Wagner - Boot.dev co-founder and backend engineer
I recently had a ticket opened on my team’s backlog board requesting the ability to bypass our API’s caching system. For context, our front-end team uses my team’s API to make fairly heavy requests to ElasticSearch, and one of the features of our API gateway is to cache the results of heavy aggregations for ~30 seconds. It turns out, every once in a while they need to run two of the same query within the ~30-second caching window and want an updated result set.
Advanced Algorithms Course Released on Boot.dev
Apr 05, 2021 by Lane Wagner - Boot.dev co-founder and backend engineer
Sorry it took so long for me to get this one out! Data Structures and Algorithms 2 was just released, and I’m excited to let you all get your hands on it, even if you’re just auditing it for free! The more advanced material takes quite a bit longer to produce, I wanted to triple-check to make sure I got everything correct and that I’ve presented it in a way that makes it easy to understand.