Consistency is the Hobgoblin of Little Minds

We’re now nominating a code-quality theme each month, to help us focus on good practises and undo some of our code debt. Our first theme was Don’t Repeat Yourself or DRY. We found lots of examples in our code, both good and bad, on our Fame and Shame board devoted to the theme, including:

  1. two pieces of code that compute the same value – with different algorithms;
  2. two screen-layout files that are identical except for a few lines at the bottom; and
  3. some clever use of function composition to remove duplication and shorten a lengthy and confusing class.

We also had a number of 5-minute lightning talks on the topic throughout the month.

Developers came up with pictures and slogans for some demotivational posters on the theme that you may find amusing:

Two identical signs
Traffic-light Christmas tree
Two confusing lift-button labels

2 thoughts on “Consistency is the Hobgoblin of Little Minds”

  1. Nothing more fun than spending hours trying to figure out which version of the truth is right…

    (And the quote is a “a *foolish* consistency…”, but I actually think quoting it the same every time is against its own spirit.)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.