Too much code

Published on 2015-04-14 by John Collins.

I have two basic rules of thumb for determining if a solution is too complex:

  1. The responsible developer is struggling to explain their solution in plain English. Granted, not many developers are good at communicating, hence the need for the second check:
  2. If the solution has way too much new code in relation to the size of the new feature or fix being added.

At this stage in my career, I consider too much code to be a major bad code smell 1. I am more content with simple, elegant solutions, than overly complex ones. While it does not always hold true, I have also found that more experienced developers tend to write less code than their junior counterparts, and by being more efficient they deliver more feature throughput with less new bugs, as the more complex solutions lead to a greater likelihood of bugs.