Hacker News new | ask | show | jobs
by elliekelly 1147 days ago
Sometimes I’ll revisit code I’ve written and think “wow, so dumb, I could’ve just done xyz” only to implement my obviously far-superior method and recall that I’ve already learned this lesson and there was a good reason I hadn’t done xyz the first time.
2 comments

Yes!

I am humbled every time I look at my old code. I'm always disappointed by it. This is because I've grown since I wrote it, so that's a good thing. I don't want my best work to be behind me.

At the same time, I also have to recognize that the brilliant code I'm writing right now will look disappointing in five years.

I try to leave comments for myself and others when I’ve had to write code that looks less than ideal. It’s nice to know something was hacked in for convenience or because it was the best solution at the time. :)
Yes, when you're knowingly writing less than ideal code.

But we're talking about writing code that you thought was great when you wrote it, but when you come back to it a few years later, you can see how far from great it really was.

Which, for me, accounts for about 80% of everything I've written.