10 August 2012

"Right" vs "Simple"

Compare these two Software Design philosophies:

MIT

Simplicity
The design must be simple, both in implementation and interface. It is more important for the interface to be simple than the implementation.
Correctness
Correctness-the design must be correct in all observable aspects. Incorrectness is simply not allowed.
Consistency
The design must not be inconsistent. A design is allowed to be slightly less simple and less complete to avoid inconsistency. Consistency is as important as correctness.
Completeness
The design must cover as many important situations as is practical. All reasonably expected cases must be covered. Simplicity is not allowed to overly reduce completeness.

New Jersey

Simplicity
The design must be simple, both in implementation and interface. It is more important for the implementation to be simple than the interface. Simplicity is the most important consideration in a design.
Correctness
The design must be correct in all observable aspects. It is slightly better to be simple than correct.
Consistency
The design must not be overly inconsistent. Consistency can be sacrificed for simplicity in some cases, but it is better to drop those parts of the design that deal with less common circumstances than to introduce either implementational complexity or inconsistency.
Completeness
The design must cover as many important situations as is practical. All reasonably expected cases should be covered. Completeness can be sacrificed in favor of any other quality. In fact, completeness must sacrificed whenever implementation simplicity is jeopardized. Consistency can be sacrificed to achieve completeness if simplicity is retained; especially worthless is consistency of interface.
These philosophies are formulated by Richard Gabriel in "Worse is Better". Please read his article. I followed the first philosophy for many years before I learned the hard way the the second philosophy has a much higher success rate and if you programmed the right thing it will improve incrementally until it is much more right than anything designed with the first philosophy in mind. One last quote: "The right thing takes forever to design, but it is quite small at every point along the way. To implement it to run fast is either impossible or beyond the capabilities of most implementors."