Tuesday, October 28, 2008

Don’t use this – it may not be supported in future versions – lessons from the field

“Avoid using this feature in new development work…“– I am sure this sounds familiar to all software developers out there. I am also sure (based on real life examples that I have encountered over the many years of experience) that a lot of developers simply ignore those warnings. Take for example my latest “encounter” – recently written T-SQL queries that still use the old *= outer join syntax! And how long has it been since Microsoft recommended not using it? At least 10 years!

Why do programmers do this?

  • resistance to change - the way you are used to doing things makes sense the new way usually doesn’t (to you that is);
  • forgetting that your objective as a software developer is not just to “get it done” but to “get it done right”;
  • not giving enough consideration to the potential future costs of the short-cuts you take today.

I would like to remind all developers out there (especially those that do take unnecessary, easily avoidable “short-cuts”):

  • it may be you who will have to go back and spend a portion of your life doing the most annoying and boring job of all – that of tweaking your own code to make it compliant instead of spending the time creating new and exciting things;
  • the costs associated with those kind of changes can be staggering for the company and if such costs could have been avoided, but for your negligence, then you really did not do right by the company. Or, to put it in simpler terms: you did not do your job and did not deserve the compensation you received, let alone any praise that your superiors lavished on you.

What’s the lesson? If it says “avoid using it” you better not use it, take the time and change your “ways” – it is not fair to the recipient of your work and it may come to haunt you!

No comments: