Why reading legacy code feels messier than rewriting from scratch
Description
The meme has a white background with a large block of black text at the top that reads: “There’s a reason that programmers always want to throw away old code and start over: they think the old code is a mess. They are probably wrong. The reason that they think the old code is a mess is because of a cardinal, fundamental law of programming: It’s harder to read code than to write it.” Beneath the quote is a blurred image of a person’s face (identity not discernible), overlaid on a light-gray panel. In the bottom-left corner, a small white caption says “joelonsoftware,” referencing Joel Spolsky’s famous blog post about rewriting code, and a tiny share icon appears at the bottom-right. The visual emphasizes the cognitive burden of deciphering unfamiliar codebases versus the seductive ease of starting anew, highlighting themes of legacy systems, refactoring decisions, and the ongoing struggle for code quality in software engineering
Comments
22Comment deleted
Reading the 200 KLOC monolith feels like archaeology with grep and hope, but rewriting it just guarantees future interns inherit two monoliths - and Joel Spolsky’s ghost at every stand-up
After 20 years in the industry, I've learned that 'legacy code' is just code written by someone who understood the business requirements better than you do, but documented them worse than you would have
Every rewrite starts with 'the old code is unreadable' and ends with new code that's unreadable plus the old bugs, reimplemented from scratch
Ah yes, the classic Joel Spolsky wisdom hitting different after you've been the architect of your third 'temporary' system that's now running critical infrastructure for 8 years. Every senior engineer eventually learns this the hard way: that 'spaghetti code' you inherited isn't actually worse than what you'd write - you just don't have the 10,000 hours of context about why that seemingly insane conditional exists. Spoiler: it's handling the edge case from the client who threatened to leave in 2015, and yes, they're still your biggest customer
Joel's law decoded: You're a genius writing it, an idiot reading it - both the same dev, months apart
"Let's rewrite it" is dev-speak for "reading is hard; let's delete the undocumented invariants and let prod teach them back to us."
“Let’s rewrite it” is architect-speak for “let’s delete a decade of encoded edge cases and call it velocity.”
Where the meme Comment deleted
The meme's in your commits Comment deleted
disagee Comment deleted
Just make much comments in code so everyone can understand your code. It's good to comment at least what a block of code do. And it's superb to comment almost every line of code. That's what I do. I also mark ifs and cycles start and finish with comments. Code must look like a book, not like a puzzle. Comment deleted
Overcommenting is as bad, as no comments at all imo. Comment deleted
ideally, code should not have comments and be self-explanatory Comment deleted
Bruh... Comment deleted
the code is said to be genius, not necessarily good Comment deleted
>it's superb to comment almost every line of code jesus christ Comment deleted
Oh yes, famous Function SquareRoot Comment: returns square root Comment deleted
Oh, seems like you kind of forget to comment parameters of that function Comment deleted
My internal monkey says that code is hard to read only if this code was written by another monkeys. Comment deleted
If it was hard to write it should be hard to read Comment deleted
Those who have ever wanted to rewrite complex projects or their parts never ACTUALLY had experience rewriting tons of legacy code Comment deleted
And comments can lie Comment deleted