Thought of the day: For any significant chunk of code, if you look back at it a month later and can’t think of any way to improve it, your response shouldn’t be “Damn that was good code I wrote”. Instead, it should be “WTF have I been doing for the past month?”


I must be missing something, what’s the correlation between not feeling the need to edit previously written code and wondering what you’ve been doing for the last month?
Ahhh ok looking again this post was very cryptic.
s/doing/learning should fix it.
The implication is that if you can’t improve anything about a sizable chunk of your old code, you haven’t grown as a developer since you last wrote it.
Now you’re making a whole lot more sense.
I think it is pretty much true as well, I find that you write the best code you can at the time given whatever constraints are imposed on you. The next time you revisit that same code, you’ve either learned a better way of accomplishing the same thing or there are different constraints on you – which allows you to improve it without necessarily ‘learning’ more.
Hey Al,
Glad the correction made sense, and thanks for bringing it up instead of leaving my original post sitting there inscrutably.
Interesting point about the constraints. For time constraints, when I know I’m not writing my best code at that point of time, I’ll be sprinkling TODOs liberally, so such code would be more excusable in any evaluation later.
But in the cases where more business objectives/logic have been made apparent, I agree—it’s possible to improve the code due to an increased knowledge of functionality instead of self-improvement.