2025-08-31
#5 Developer Mindset | Code is Read More Than It's Written
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." — John Woods Hi Reader, Here's another one of those unwritten laws of software engineering that feels very important but we don't consciously think about: your code will be read far more often than it's written. Think about it. You write a function once, maybe spend an hour getting it just right. But over the next year, that code gets read during code reviews, debugged when something breaks, modified when requirements change, and puzzled over by new team members trying to understand how the system works. The 10:1 RuleI read somewhere that code is read about 10 times more than it's written. Honestly, that feels low to me. Last month, I was debugging a payment issue late at night (because, of course, payment bugs only happen at night). I found myself staring at a function which was written six months earlier. It was technically correct, but I had no idea what it was doing without reading every single line. The statements were cryptic. The logic was nested three levels deep. There were clever one-liners that saved space but required effort to understand. I was paying the price in reading comprehension. That's when I thought: every line of code is communication, not just computation. Writing for Your Future SelfThe most senior developers I know have learned this lesson the hard way. They've all had that experience of coming back to their own "clever" code and having no clue what they were thinking. Now they write code differently, not for the computer (it'll run either way), but for the human who comes next. They choose variable names that explain intent, not just content. Instead of userData, they write authenticatedUser or profileData. Instead of process(), they write validateAndSaveOrder(). They break up complex functions not because they have to, but because smaller functions are easier to understand at a glance. They write code that tells a story. This Week's ChallengePick one function in your codebase that makes you pause when you read it. You know the one - it works, but you have to trace through the logic to remember what it does. Rewrite it for readability:
Don't change what it does. Just make it obvious what it does. Dev Tip: The Newspaper TestGood code should read like a well-written newspaper article. The most important information is at the top (function name, clear parameters). Supporting details come next (the main logic). Edge cases and cleanup are at the bottom. If someone can understand what your function does by reading just the first few lines, you're on the right track. What I'm BuildingThis principle has been huge in Build With Me. When we're coding live with an audience, there's no hiding behind clever shortcuts. Everything has to be readable in real-time. It's forced us to write clearer variable names, break things into smaller functions, and explain our thinking as we go. The result? Code that's not just working, but actually understandable. We've now finished building PureSignal, and we're getting ready to launch the beta version! If you want to be among the first to try it out, join the waitlist at puresignal.app The first 100 members will be our founding users and get lifetime access at 50% off. Pretty excited to see how people use what we built together. Here's my question for you: when was the last time you had to decode your own code? Reply and tell me about it. We've all been there, and honestly, these stories are some of my favourites because they're so relatable and teach us all something. Remember: you're not just writing code for the computer. You're writing it for every human who comes after you - including future-you. Code your way forward. 🚀 |
Every Sunday
Enjoyed this edition?
Subscribe to get the next one straight to your inbox ~ free, every Sunday.
Subscribe →
