Clever code is probably the worst code you could write
Engineer’s Codex is a free publication about real-world software engineering. I write about real-world technical case studies, outages, and interesting stories from the industry. When I was an undergrad, Leetcode broke my brain. I would see top solutions of esoteric one-liners and wrongly think “how do I ever get this good?” This is commonly called “code golfing”. It’s a fun hobby, but very far from “good code.” Everybody (including those on Leetcode) knows this isn’t good code. In the industry, it’s the worst code one could write. However, on the other end of the spectrum, I realized eventually that the clearest code was actually the hardest to write. It made sense retrospectively. Reviewing the code of a senior staff software engineer was much easier to follow and review compared to the code of an entry-level L3 engineer. The “power” of clear code, for better or for worse, was made fully clear to me after a certain incident at work. I once wrote a data enrichment module in C++, a lan
Engineer’s Codex is a free publication about real-world software engineering. I write about real-world technical case studies, outages, and interesting stories from the industry. When I was an undergrad, Leetcode broke my brain. I would see top solutions of esoteric one-liners and wrongly think “how do I ever get this good?” This is commonly called “code golfing”. It’s a fun hobby, but very far from “good code.” Everybody (including those on Leetcode) knows this isn’t good code. In the industry, it’s the worst code one could write. Okay, I admit - this is a pretty bad example of clever…
related reading
- Cognitive load is what mattersminds.md
- Don't Call Yourself A Programmer, And Other Career Advice | Kalzumeus Softwarekalzumeus.com
- On Leetcodeplanetbanatt.net
- claude code is not making your product betterethanding.substack.com
- Write code that is easy to delete, not easy to... — programming is terribleprogrammingisterrible.com
- It's hard to write code for computers, but it's even harder to write code for humans · Erik Bernhardssonerikbern.com
- AI is removing the middle class of software engineeringblog.florianherrengt.com
- Mistakes I see engineers making in their code reviewsseangoedecke.com
- Mistakes engineers make in large established codebasesseangoedecke.com
- New Junior Developers Can’t Actually Code | N’s Blognmn.gl
- Everyone is a Staff Engineer Nowread.engineerscodex.com
- Tips for Reading Codeuptointerpretation.com