2013-09-29
Embrace Workarounds

Word “workaround” has had somewhat bad reputation in my books. Lately, however, I’ve started to appreciate the merits of workarounds in various shapes and forms.

What is a workaround? Google gives a definition of “a method for overcoming a problem or limitation in a program or system” while Merriam-Webster says “a plan or method to circumvent a problem without eliminating it”.

I say a workaround is a fix that gets the essentials done in the shortest amount of time possible, and we should embrace them.

Workarounds Will Get You Anyway

In one of my past software projects, I got a huge list of requirements to enhance an existing product. Most of the requirements made perfect sense and added value to the customer.

Usually these requirements had a common theme called convenience. The sentence I often heard was “We can already do x, but doing it is too painful”.

Okay”, I thought. They were our customers, and we had an obligation to serve them. We specified, implemented and tested the new functionalities until our fingers bled… but we were too slow.

While we were working and polishing the new features into a usable state, customers had bent the earlier implementation to cope with the cases they had in mind. As it turned out, the issues weren’t so painful that they absolutely couldn’t be performed with the earlier product. They were just inconvenient, and work just wasn’t as fun as it could have been!

Eventually, our work was rendered obsolete. Workarounds got us.

Software is a Workaround Magnet

When we start writing our first line of code, we might imagine our work as a river flowing nicely from A to B in an efficient manner. Sometimes our project conforms to this idea, bending the flow of water just slightly.

However in other cases, and especially in the next revisions of the product, situation changes. Our earlier project flatland grows mountains, the destination of water is changed, and our customers ask us to route river uphill.

Horseshoe Bend

In those cases, our speed is limited by our team’s capabilities, amount of dependencies and conflicting requirements. All of them add resistance to our work, and exactly this resistance forces us to resort on workarounds.

How common workarounds then really are in software? Ohloh Code search has a story to tell. As the time of writing, there are 857971 results for term “workaround”. Sure, some of these probably are just short visits in the codebase, but there is also a large amount of “permanent workarounds”.

I bet you have heard the sentence “We make this fix now, and revisit it later”, and then you have noticed that this “later” never comes. Later was already too late to make that change, and temporary workaround turned into a permanent one!

Did you know that most of the text we read in the Web is using both clever and permanent workaround called UTF-8? See this excellent video for explanation:

Purity vs Practicality

In many cases, proper fix for the problem at hand is really needed, and there are no big obstacles in the way. At those times, we must overcome our laziness, reject shortcuts and do the right thing.

In other cases, where the solution usefulness is in doubt, or when we encounter serious obstacles while trying to solve the problem, the practicality - and workarounds - should win.