Live data from Hacker News

Good code is like a love letter to the next developer who will maintain it

addyosmani.com

11–20 of 274 posts

Re: Good code is like a love letter to the next developer who will maintain it

#15
In my opinion, good code is like a Brita filter. It does its job, will one day need to be replaced, and it should be easy to replace.

More importantly: metaphors are not a healthy way to understand an idea. Ideas are more nuanced than a metaphor could possibly account for. Abstaining from metaphors might not make for a catchy headline though.

Re: Good code is like a love letter to the next developer who will maintain it

#16
post #12

Sorry next developer, I'm on a tight deadline, used to love this craft, now I just do what the product people tell me to get a nice paycheck.

Yep. Yesterday I ran into a job opening asking for "Java developer who delivers 3x faster than the other developers" in one of the bullet points. It's such a weird point to emphasize that you want speed with no concern to trade-offs, and the maintainability and scalability of the codebase will be the first victims sooner or later.

Re: Good code is like a love letter to the next developer who will maintain it

#17
post #3

And remember, the next maintainer could very well be you.

Yeah, it's humbling enough when you are reviewing some old code and thinking "what idiot wrote this" only to git blame and realize it was you. What's even more jarring when you find some code, surprised the capability/feature even exists, then git blame and realize again it was you (this time hopefully with a pat on your own back because of how well it's written). Yes this has happened to me.

All of the code I wrote more than a year or two before the time I look at it strikes me as being embarrassing. I hope this is always true, because I think it says that I have grown as a programmer over that time.

Re: Good code is like a love letter to the next developer who will maintain it

#18
fuck the guy after me. I write good code for my own sanity and so my OCD doesn't make me want to refactor it all later. it's like saying save the trees for your grandchildren or the future generations. fuck them, I want a clean environment for myself gosh darn it!!

Re: Good code is like a love letter to the next developer who will maintain it

#20
post #15

In my opinion, good code is like a Brita filter. It does its job, will one day need to be replaced, and it should be easy to replace. More importantly: metaphors are not a healthy way to understand an idea. Ideas are more nuanced than a metaphor could possibly account for. Abstaining from metaphors might not make for a catchy headline though.

Little pushback here - metaphors are great tool to understand something, and can convey some meaning more efficiently than other means.

But "the map is not the territory"!

Post reply on HN