Friday, February 24, 2006

Habitability and Piecemeal Growth

I have started reading Richard Gabriel's Pattern of Software : Tales from the Software Community for the third time - this post is going to be a reflection of this enlightening experience.

Gabriel talks about the characteristics of a software (source code) that enables programmers, coders, bug-fixers, and people coming to the code later in its life to understand its construction and intentions and to change it comfortably and confidently. This he calls Habitability, and relates this to the concept of organic order of Christopher Alexander.

Organic Order:... the kind of order that is achieved when there is a perfect balance between the needs of the parts and the needs of the whole. (Alexander, 1975)

It is this Organic Order within the piece of software which makes its inhabitants (the programmers) feel at home, which gives the particular software The Quality Without A Name (QWAN), so earnestly professed by the saint himself. The needs of the parts refers to the changes that take place in the software in course of its lifetime, which if done adaptively satisfy the needs of the whole, leading to a grand architecture of the entire system.

The other quality which Gabriel speaks about is Piecemeal Growth, which, as opposed to large lump development, makes software extensible, malleable and compliant with the changing and growing environment. Once again he quotes Alexander:

Large lump development hinges on a view of the environment which is static and discontinuous; piecemeal growth hinges on a view of the environment which is dynamic and continuous ... (Alexander 1975)

The essence of the piecemeal growth principle have been captured in some of the essential tenets of OOP as well, the design patterns which promote reusable class hierarchies and encourage an incremental development without invasive changes. The Bridge design pattern which separates interface and implementation and lead to parallel hierarchies, the Strategy pattern which allows pluggable algorithms, the State pattern which handles changing behavior when the state changes are some of the examples.

For everybody who strives to foster uncompromised beauty in programs which they develop, this book is a must read. Gabriel leads us to the road to believe that a good program is not a Superdome of New Orleans - one should be proud to make the software a habitable New England farmhouse.

No comments: