Skip to content

Beware the Golden Hammer!

The ‘Golden Hammer‘ is a very common anti-pattern, which can be best summed up by the phrase “if all you have is a hammer, everything looks like a nail“.  This anti-pattern occurs when the perpetrator has typically learned a particularly powerful technique or design (the hammer),  which they then go on to apply blindly to all problems (the nails) they encounter whether it is a suitable solution or not.

This can be especially evident amongst beginner programmers, who are learning new techniques almost constantly, but it only seems to become a dangerous anti-pattern if the individual becomes overly fixated on a particular technique.

Interestingly this anti-pattern can apply to more than just individuals, in my experience it can also apply to teams or even entire organisations.  One of the ways I have seen this manifest at a team or organisational level is with attempts to solve social problems with technology solutions.  This trait seems to be especially strong in software development organisations: perhaps because technology is their usual solution to problems.

Such social issues faced by development teams and organisations can include things like not breaking the build, lack of communication or lack of testing.  These problems really are not technology problems, they are social (people) problems, yet time and again I have witnessed technology solutions to these problems.  For example, more elaborate and sophisticated check-in systems being introduced in response to constantly broken builds, where a much simpler social solution such as peer pressure to not break the build would be much more effective.

Avoiding the Golden Hammer when programming is achievable with some self awarness and honesty: are you using your current technique for the right reasons?  However, identifying and interveening when a team or organisation is about to use the Golden Hammer is much more challenging as it can involve going against the solution favoured by the majority along with the polical implications that brings…

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*