Green development

I have just read a great article on code reuse. I always thought that the term DRY, as in Don’t Repeat Yourself, was missing something – that it didn’t quite capture all of the nasty habits that some developers xzibit. Well, the afore mentioned article has a much better term: Reduce, Reuse, Recycle. The refuse recycling metaphor is a perfect fit, I like it a lot – it even allows for the fact that sometimes we don’t recycle stuff like bottle lids, because it is not efficient to.

So I guess this makes what I would consider “good code”, to be part of something that I am going to call Green Development. Lightweight, low on resources, re-useable and recyclable. Author’s note: Does this make Microsoft global warming?

Now, if only there were some way to tag developers “wheelie bins” to see how much “non-recyclable” code they were producing and sending to the code base “land fill”. They’re just creating a problem for future generations you know.

One thought on “Green development

  1. Unfortunately, the recycling metaphor is easily misinterpreted so probably won’t help those programmers who have yet to see the light (including me!).

    ‘Reduce’ isn’t an an excuse to write cleverer, more complicated and compact code at the expense of clarity. It is the complexity and functionality that should be reduced (which will probably lead to fewer lines of code, but that’s pretty irrelevant).

    ‘Reuse’ isn’t about all-powerful code, with any number of functionality hooks and clever Object Oriented stuff. It’s more about good design, with modules of clearly defined purpose that are intuitive to use. If no one can understand what the code does, or how to use it, it won’t get reused regardless of its potential power.

    ‘Recycling’ is about how easy the code is to understand, so that it can be easily modified by others for their own purposes quicker than developing something new from scratch. Of course the code also has to be available for others to use…

    Going Green in software terms is about writing as little new code as possible by using and improving others’ code and sharing some of your own. I think the kudos earned from doing this far outweighs any perceived benefit of being precious or proprietary about your code.

Leave a Reply

Your email address will not be published. Required fields are marked *