As a developer that's just made the plunge into freelance work, I've realised that I'm going to be running into some quite horrifying pieces of code and that's got me thinking. After 3 years of full time employment (at just one company), I myself have left behind a lot of code that I'm quite honestly downright embarrassed by.
The following 2 points can be viewed as my justification for what I left behind, what I need to constantly remind myself of in my new venture, or just a plain old reality check for anyone that comes across someone else's code and is mortified by what they see.
Oh, and please note that I write this as much to myself as anyone else.
There's probably a reason for it
... most of the time.
There are obvious exceptions to this rule, but for the most part, whoever wrote that code got to that end point for a reason. Believe it or not, it could very well have been as painful for them to write as it was for you to have to witness. If you've ever had to deal with clients, have a difficult boss, or have a not-so-clued-up designer, you should have an idea of where that sentiment stems from.
Everyone's on a journey
Yep, that's right, even you.
We all need to have a (sobering) look at code we wrote more than 6 months ago every once in a while. Not only does this make you appreciate how far you've come, it reminds you that "old you" was rubbish at what "current you" considers trivial.
Drop me a comment with your thoughts!