«    »

Most Disturbing Code

One question I often ask when giving job interviews is "What do you find most disturbing when reviewing code?" The answers I receive are especially interesting when compared to the interviewee's results doing an actual code review: it is rare for them to identify the problems they consider the most disturbing. This lack of congruence between what people say they do and what they actually do is not unusual - it is a common problem, for example, when using market focus groups.

This chain of thought then prompted me to ask myself this same question. What do I find most disturbing when reviewing code? My instinctive reaction was to answer "defects", but upon a little reflection I realized this was not true - I expect to find defects as a fundamental principle of quality. So it usually does not bother me to find a few during a review.

There are times when I am very disappointed when reviewing code - what am I finding at those times? Here are some specific occurrences:

  • Code riddled with defects reflecting a fundamental lack of understanding about the requirements.
  • Code very difficult to understand due to poor names and overly complicated logic that seemed repetitive or unnecessary.
  • A large amount of non-GUI code written without any supporting tests.
  • Code with inconsistent formatting and style.

What is the common theme here? After further reflection, I realized that the common element underlying these situations that I find most disturbing is a lack of professionalism / craftsmanship. This can manifest in a number of ways as indicated by the above list. The key criteria is whether a developer is helping achieve or is hindering our mission as software developers, based on what they produce for code. My evaluation of what is most disturbing is at its essence based on my core values and beliefs concerning software development.

If you find this article helpful, please make a donation.

«    »