Skip to main content
Enterprise Agile Planning icon with arrows

This post is from the CollabNet VersionOne blog and has not been updated since the original publish date.

Last Updated Jul 21, 2010 — Enterprise Agile Planning expert

Keeping in Tune

Enterprise Agile Planning


I was discussing refactoring the other day with a friend of mine.  As is usually the case, the concept of code Smells came up.  Once again, I thought about how amazingly uncomfortable I am with that nomenclature.  I have had too many programmers come up to me and say that some other programmer’s code “stinks” or has a lot of bad smells.  Its just too personal.  It also implies something that is inherently wrong, possibly with the person who wrote the code.  Rather than saying there is something here that feels just not quite right, we get something of a personal indictment of a person’s programming.  Since agile development is all about valuing people, and fostering better communications and team work, it just feels wrong.  This is along the same lines as my earlier post on why I don’t like the Scrum concept of Pigs and Chickens.

So how do we refer to code that is a good target for refactoring?  I thought about other things that bring out the same ideas.  What is there that, while you are experiencing it, feels just not quite right?  Sometimes it is so out of whack that it is glaring, and sometimes it is more of a subliminal thing.  The metaphor that works for me is music.  The code doesn’t smell, its just slightly out of tune somewhere.

Now, I’m a musician.  Worse than that, I’m a trombonist.  This means I am intimately familiar with being out of tune!  One thing about tuning is that it can be very simple, say one member of the orchestra is slightly flat, to extraordinarily complex.  Say some members of the first violin section are sharp but others are flat, with the concertmaster the only one on pitch. 

I see code the same way.  You are in the code, and as you are working on it you find that something is not quite right.  The first thing you do is look for the more obvious areas that are out of tune.  Maybe an overly complex set of if..then..else statements.  You write your tests and fix the tuning of this one area.  Your tests become your “tuning note,” a common note that all instruments play and adjust toward.  In orchestras that note is the concert “A”.  You run your tests, and they all pass.  But something is still out of tune.  You go to the next section and find out who is out of tune.

Now there are all kinds of analogies we can use to totally abuse this metaphor, and I plan on exploring as many of them as I can in the future.  For instance, you may decide that you are “in tune enough”.  I wouldn’t choose to do this too often, but it can indeed happen.  If enough of the code is out of tune, you may describe the design as cacophonous, which is always fun to say.  Every musician gets out of tune.  Good musicians are continuously tuning, even while they are going about the business of making music.  It becomes a part of the fabric of her music making.  Note that when you go to a concert you will never see a separate section on the program for “tuning”.  That doesn’t mean it isn’t done, it just means it isn’t something special that is added to the list of works that will be played.

So let’s be nice to each other.  Let’s think of code refactoring, whether we are doing extreme programming, scrum development, or any other software development process, as a way to tune our code, thus making it that much more pleasing to the end recipient.

The post Keeping in Tune appeared first on VersionOne Blog.


More from the Blog

View more Government Cloud
Apr 12, 2022 Government Cloud receives FedRAMP Authorization through sponsorship from the United States Department of Veterans Affairs

Enterprise Agile Planning
Flagship Agility solutions can effectively scale agile deve ...
Read More
Nov 22, 2021

What are the qualities of highly effective agile teams?

Enterprise Agile Planning
A team is the core unit of productivity in an agile organization. Wher ...
Read More
Nov 15, 2021

How an open-first attitude revolutionized government tech development

Enterprise Agile Planning
Public perception of government is often that it is slow-moving, reluc ...
Read More
cross functional
Nov 08, 2021

6 best practices for building resilient cross-functional teams

Enterprise Agile Planning
Agile frameworks prize the quality of resilience within every facet of ...
Read More
Contact Us