Write code for the next developer….Because it might be you. {Or worse, your boss}
There are many philosophies to writing software, XP, Agile, RAD, SCRUM etc. Having studied many of them and practicing a few there is one universal methodology that should be adhered to no matter how inconvenient it may seem at the time:
Always write code for the next developer.
Usually this means simple things like leaving good comments as to what was to be accomplished, maybe even why it was needed such as a special case that came up in testing or use. Just as important is following a style or technique guide. When we work in teams it is very beneficial if we all follow the same patterns and coding techniques. It is especially important to avoid bad code habits.
It is surprising how much test code winds up in production because it’s convenient. Why let your bad habits reflect poorly on you and frustrate those who come through your code after you. It really might be you again months later or worse you boss!
{I wish I could disable the ability in T-SQL to use the SELECT INTO directive to create a new table based on the results of a query. ARRRGH!! There are readers of this blog, who shall rename nameless but know who they are that that gripe was directed.}