Hurray, we have a blog!
Currently I’m not really taking part in the conversation online. There’s thoughts I would like to share. Code things I would like to show. And when I have such a moment. I either try to cram it in a tweet or let the moment pass.
The specific occasion now was this tweet and ensuing discussion a couple of days ago:
if you look back at your code 3 months later & don't feel bad about it, you haven't learn enough. Be proud instead of feeling bad #arrrrcamp— Yves Hanoulle (@YvesHanoulle) October 2, 2015
So, on this topic
I get where @YvesHanoulle is coming from. But feeling bad almost never happens to me with old code.
It’s true that any problem I’ve solved in the past, I would probably solve different today. But my aim is not to write perfect code. I aim to write maintainable code. So when I see old code I want to find something that is
- easy to understand
- easy to adapt
- didn’t try to predict the future or is too clever in any other way
When those criteria are met, I feel pretty good about that code. No matter which technique I know now, that could have solved the problem better.
As long as the code was written for maintainability, applying a new technique when changing circumstances require it, should be painless.