Eliminating Duplication

Build an App, Episode 4

Corey Haines
50 minutes • 0.86GB • Aug 2013

"Duplication is the root of all evil!"

This is a phrase we certainly hear a lot in software development. It's a bit harsh and over-the-top, of course, but it definitely is something we want to keep watch on. Eliminating duplication when we find it early on in our lifecycle is a good technique to master. It makes our software more accepting to change in the future, especially change we aren't able to anticipate.

Through our previous episodes, we allowed a bit of duplication to spread regarding the states that a coderetreat can be in. If we let this go on for much longer, it will become much more difficult later to change them. It is time to put our foot down and remove this duplication. When working on a new system, timing is the key and we won't wait any long to address this cleanup task.

In this episode, we'll take a break from adding new features and focus our attention at the concept of duplication, specifically the duplication of knowledge around the statuses of the coderetreats. We'll discuss the different types, and then investigate two different methods for eliminating it by isolating the knowledge it represents: an outside-in, wishful-thinking approach; and an inside-out, pull-down approach. By the end of the episode, we'll have a central location in our system that contains this information.

And, of course, there is a lot of coding. The results of this episode's coding is in the git repo on Github.

Corey Haines

Corey Haines

Co-creator of the Coderetreat and co-founder of Hearken (a platform for journalism), Corey has nearly 20 years of software development experience, and has authored the book Understanding the Four Rules of Simple Design.

View Series:
Build an App