Simple Design
Revision r1.1 - 28 Apr 2004 - 19:46 GMT - PhlIpI'd like to consider some possible ways of building a system:
- Design it as well as possible up front, then build to the design.
- Design it as you go, using refactoring to keep the design clean.
- Build it in an ad hoc fashion, from whatever starting design one has. Do not improve the design.
Method 1 will deliver its first feature later than 2 or 3. This has
some reduction of 1's value compared to 2 or 3, which might or might
not be brought back later.
Method 2 and 3 will start shipping features early. Method 3, however,
will likely bog down fairly soon, as the inadequacies of the design
begin to impact the ability to grow the product. Therefore method 2
will pull ahead of method 3, probably fairly early on.
The design for method 1 is not perfect, as it is not given to us to be
perfect. If method 1 builds to the design, i.e. not refactoring, it
will ultimately slow down compared to 2, since 2 always has a good
design for its current state. However, method 1, once it starts
delivering features, might deliver them faster than method 2 --
although it might not, since it is carrying a heavy design burden in
times when the features do not need heavy design.
On the other hand, if in method 1 we decide to refactor to keep the
speed up, we begin to entail the same sort of costs as method 2, as
soon as we begin to refactor.
Each of these approaches has a different cost profile, and a different
benefit profile. It is far from obvious which one works better. Here's
what my experience teaches me. YMMV.
If one has a good sense of design, the important design matters are
readily settled early on, and the details can be left until later.
If one is not a good designer, design up front is fruitless in any
case.
At any point in time up until the end, a simpler design is easier to
build to than a more complex one. Therefore the instantaneous value of
features per unit time is maximized, not with the full design
approach, but with the incremental design approach. (But the
incremental design approach is carrying a refactoring burdern, which
might reduce this value.)
An up front design approach, on the other hand, spends some amount of
time spinning its wheels before it starts building anything of direct
value. Then it may, or may not, go faster than the simple design plus
refactoring approach.
My experience suggests to me that simple design plus refactoring is
better, over a wide range of problems. I think it's worth building up
the necessary skills, to learn for oneself.
--
Ron Jeffries ( from news:comp.software.extreme-programming ) |
|
|