Conservation of Fragility
In boning up on design patterns, I keep encountering claims that the proper use of design patterns reduces an application's fragility (or increases code reuse, or enhances its rubustness in the face of changes, or some such equivalent wording). I don't think that this is sttrictly true. Fragility is conserved; the more code you have, the more fragile it is. That's unavoidable; it's like gravity (more mass, more weight).
What design patterns give you, though, is a means of pushing that inevitable fragility away from an application's core, out towards its outer fringes, where the *consequences* of that fragility are lower. When code breaks at the core, it's expensive to fix, becuase the break affects all of the other code; but when code breaks at the fringe, it's cheap to fix, because only nearby fringe code is affected.
What design patterns give you, though, is a means of pushing that inevitable fragility away from an application's core, out towards its outer fringes, where the *consequences* of that fragility are lower. When code breaks at the core, it's expensive to fix, becuase the break affects all of the other code; but when code breaks at the fringe, it's cheap to fix, because only nearby fringe code is affected.
Labels: programming


0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home