01 June 2010

Leave No Trace Programming

I just finished listening to the recording of Robert C. Martin's talk at QCon 2010 London. Martin offers a fresh look at code maintenance as a parallel to the Boy Scout's "Leave things better than you found them" motto: every time you added functionality to your code-base, you also do a small bit of refactoring and leave it slightly better than it was before your change.

I looked up the Boy Scouts of America's Leave No Trace training module and found some other interesting parallels when I substituted "camping" and "the outdoors" with "coding" and "your code-base". For example, here is a paragraph I have modified from the original text:

Leave No Trace Programming principles are not about restrictions; they are about responsible enjoyment of our code-base. Leave No Trace is not a simple program for coding; it is a way of life —- and learning Leave No Trace concepts begins with our own subject matter areas. The principles apply in our own area of ownership and our team's area of ownership as much as in the entire code-base. We should all practice Leave No Trace in our design and implementation, whatever area of the code-base we touch.

What exactly the tenets of Leave No Trace Programming are, I have yet to decide and may leave for another post.

All the same, I would recommend you check out his talk. There are a few areas that I find unnecessary (he spends some time throwing out numbers for "good lengths" of functions and classes which I wish had been edited out), but overall I found it to be worth the hour of my time.

No comments: