A site devoted to discussing techniques that promote quality and ethical practices in software development.

Sunday, March 13, 2011

Definition of a "Bad Design" in software

I came across this succinct definition of what constitutes a "Bad Design" in software:
  1. It is hard to change because every change affects too many other parts of the system. (Rigidity)
  2. When you make a change, unexpected parts of the system break. (Fragility)
  3. It is hard to reuse in another application because it cannot be disentangled from the current application. (Immobility).
Surprisingly, software having these traits are very difficult or even impossible to be unit tested. Hence unit test is often used to a gauge of these bad traits. Don't believe, try it.

1 comment:

Craig said...

Actually, I don't consider it surprising at all that software with such traits is difficult to test.

Points 1 & 2 already imply that a 'small' test will have many side-effects meaning it's not so small any more.

Continuing with 3, you can't disentangle a small piece to be tested. If you try make some changes to obtain a testable piece, you suffer the consequences of 1 & 2.

Blog Archive