DRY: Do repeat yourself

When I was at school learning computer science, the first thing that I recall learning was that good "componentized" design was THE THING and that we should do it always, aiming for re usability. That's what functions and object oriented design was good for. Then, as I started working on the field I became obsessed with it, until I learned that I was seriously wrong.

I'm not ranting against good design (whatever that is), but when you find yourself spending too much on component design rather than building, then you should be worried.

We are taught to anticipate problems we might not have, to build something that can be applied to another solution later, we tend to fit problems into patterns rather than doing the opposite.

At Mural.ly we are going trough the process of (re)designing our applications, it's a great feeling and one of the best parts of our job. We are trying to build a core codebase that can be blended into different platforms (thanks to our friends at Xamarin) but with a different approach.

As software engineers (or lazy human beings) we'll try to re use the most, but not yet. This time we are taking a copy/paste based approach. Why? Mostly because I believe that in order to re use a solution we need to verify it, at least, twice.

It's not about the bike (code)

Lance Armstrong has a book called like that, and I'll borrow the title as a refernece. When you code, design or build a solution you acquire knowledge that will stay with you, inside your brain. The code is typing, it is the mean not the end. As an example, we built the latest (private beta) Mural.ly app in just two weeks, after 2 months of starting over every week or so.

We suck when trying to design for the unknown but our brain is awesome to extract patterns of things that are already there, it's a shame that's usually too late for using it.

So next time you think about reusing, copy, paste, and modify it to meet your current (NOT FUTURE) needs.

Each project should feel as a blank canvas and you must have the confidence that you are always doing the right thing for the current job.

You already have the knowledge at your disposal so use it wisely, just take a step back, observe and the "reusable architecture" will talk to you. Great design sits really close to the soul.

This post has been inspired by Juli Racca, one of the greatest minds behind Mural.ly and one of the most talented, and bright young engineers I have opportunity to work with.


Johnny Halife

Chief Architect of @mural. Bostero. Runner. Speaker & Web Guy. Past-Life: Southworks / MSFT Vendor / DigBang!

comments powered by Disqus