This site will look much better in a browser that supports web standards, but is accessible to any browser or Internet device.

Anomaly ~ G. Wade Johnson Anomaly Home G. Wade Home

September 19, 2014

Best Practices Gone Bad

Most professional fields develop a set of best practices that help people in the field produce consistent solutions to similar problems. Any given problem has an infinite number of potential solutions, some of those will actually work. Fewer still will work well.

Best practices tend to prune some of the bad solutions by pointing out approaches that have been shown to work consistently. Software development has been around long enough for a number of best practices to become available.

If someone applies a practice without understanding it, there is the possibility that they will misuse that practice. This post begins an intermittent series that will touch on best practices that I've seen misused.

Themes

Many of the best practice problems I will describe fall victim to similar problems. As time goes on, you should recognize some themes.

Unexpected Interactions
No code exists in a vacuum. Some best practices fail miserably when applied in a code base with certain other practices. Sometimes best practices from two different fields collide. Sometimes the side effects of one practice impedes the use of another.

Unintended Consequences

The Law of Unintended Consequences applies to every action or process people have every devised. Best practices are no different. The only way to avoid the problems is to be aware of any consequences. You should be prepared to revert changes where the consequences are worse than what the practice was designed to prevent.

Overuse of a Practice

Any practice can be overused. Less experienced individuals have a tendency to pick their favorite hammer ... uh, best practice and apply it indiscriminately until it cannot be applied any more.

Fanatical Application

The previous two problems can be combined into the worst case where the best practice becomes more important than any possible consequence. At this point, the coder becomes a fanatic.

Conclusion

Hopefully, this series will be interesting, thought-provoking, and amusing (in a train-wreck sort of way). The posts on this subject can be found at Best Practices Gone Bad Series.

Posted by GWade at September 19, 2014 05:40 PM. Email comments