Sunday, July 22, 2007

Old Code

As I have posted previously, I am modifying some old Delphi code I maintain. It is usually a yearly thing. The client has some requests I procrastinate and do it at the 11th hour. I am not a procrastinator as a rule, but going back to Delphi from C# is very very painful, and something I don't like doing.

Looking through my old code is painful too. Most of the stuff I did between 5 and 7 years ago. I thought I was good in those days, but well I wasn't as good as I thought that is for sure. It seems looking back, that I didn't fully grasp OO. Also I seem to put code in utility type files - just source code files with procedures and functions that don't tie in together. I see now that most of the code should have been wrapped up in classes but for some reason I didn't.

Would have made my life a lot easier now that is for sure.

It's a worthwhile and humbling experience to go through some old code. It makes you realise that there is always room for improvement and learning. I bet in 5 years the code you did yesterday that you thought was awesome will look just as bad 5 year old code does today.

A little reminder that taking a step back from your code and thinking about what you are doing is always a good thing...

No comments: