— Ashley Towers

DROP: Don’t Repeat Other People

I quite enjoyed this post by Vu Tran at Framebase  about the quickest programmers being the quickest to break out their search engine. It got me thinking; the principle of DRY – Don’t Repeat Yourself is well known. Only have one representation of any rule or truth in your code. Don’t copy and paste. If the world changes, and it frequently does, you only have to update this in one place. Good practice, bordering on basic common sense, and pretty much followed by every programmer worth his salt.

However, there’s a tendency amongst (some – not all!) programmers to reinvent the wheel; to write their own solution to already solved problems. This is also bad. Who knows, maybe even worse? To my knowledge this doesn’t have a pithy acronym. So, I propose for your delectation: DROP. Don’t Repeat Other People.

Don’t reinvent the wheel. Use pre-existing libraries; ideally use open source. There are often situations where an existing library doesn’t quite do what you want, but surely it’s better to add this functionality to an existing, battle hardened, code base than it is to start again? After all, you’ll have to re-implement the basics before you even get as far as writing your “special” bit. Use the hard won experience and lessons of the library developers to your advantage, then stand your special case on top of that.

0 comments
Submit comment