Archive for the ‘Rants’ Category

How to incur technical debt

Saturday, May 10th, 2008

I guess you’re worried that when your project has no bugs, or when maintenance becomes too easy, someone is going to start wondering what they’re paying you for. What you need is technical debt. Here my top 10 ways to sneak some in your codebase. As well as plenty of future bugs, this will ensure that any maintenance or expansion tasks take as long as possible.

  1. Create lots of overloaded versions of the same function. Only use one.
  2. Copy and paste code. For bonus points, change the pasted versions slightly.
  3. Leave chunks of commented out code (”Green Code”) lying around.
  4. Don’t use existing core logic. Reimplement it within the user interface using your own strange methodology. Make sure it behaves subtly differently. No need to check that, it will.
  5. Check several unrelated changes in at once. Only mention one in the check-in comment.
  6. Never use 5 lines of code where 50 will do.
  7. Never use 50 lines of code where several classes that almost resemble a GOF pattern you misunderstood will do.
  8. Invent your own naming conventions.
  9. Never fix a bug - hide it. For example, deal with null reference problems by simply sticking an if-not-null around the offending code. This saves you having to look for the real source of the problem, and also ensures the bug will come round again in a more subtle and interesting manner.
  10. Leaving out documentation is too obvious. Much better to document it, but make sure the code doesn’t do what the documentation claims.

Don’t Do This

Wednesday, November 14th, 2007

It should be basic common sense, but this issue is coming up again and again. Service X asks for your login details for service Y. Two things:

  • Don’t provide them
  • Walk away from service X

(more…)

Dear Microsoft

Friday, January 12th, 2007

Several hundred times today, you’ve asked me if I want to restart my computer to complete the installation of your security updates. Each time, the answer has been no. I’m sitting behind a firewall, and I wouldn’t dream of using your poxy web-browser. I’ll reboot when I’m good and ready. Thanks for listening.