Jeremy Miller recently posted a ”Best of…” compendium that included the following post:
This post takes a simple code example and applies a series of refactoring steps to make it easier to read and maintain. The comments point out a bug in the initial example (transferred to the final snippet) that is made more obvious by the refactoring (I won’t point it out in case you want to find it yourself :)).