Best practices

goto

xkcd.com/292

 

There’s essentially two definitions of best practices that I’ve come across:

1) Commercial or professional procedures that are accepted or prescribed as being correct or most effectiveOxford

2) A best practice is a method or technique that has consistently shown results superior to those achieved with other means, and that is used as a benchmarkWikipedia

The problem with #1 is that just being accepted or prescribed as being correct or most effective does not make something a best practice.

If you are following no practices whatsoever, whether it’s software development or some other field, and then you introduce some reasonably sensible conventions, you’re almost always going to get superior results compared to before. The problem is when the natural improvement that comes from following conventions is used as evidence to describe those conventions as best practices.

Take something really general like code formatting. We know that following a convention about using only one of either tabs or spaces does matter, but it also doesn’t matter which one you choose, so long as you consistently follow a convention. However, if a team were to switch to a “tabs only” convention from no convention, they might incorrectly conclude that tabs are best.

As much as my lizard brain may want to smash pro-tab rhetoric into oblivion, there’s no good reason. The argument might be fun to have, but as near as we can tell, it doesn’t matter. And yet you see people hawking conventions as best practices all the time. I guess if the value is there… but still…

Establishing and implementing what are the truly best practices is a fairly arduous, highly contextual process. This leads to effective conventions being described as best practices as a short cut / misnomer. And many times it works because often the best practice is just having a practice at all.

 

Kevin Browne

Editor of Software Hamilton.