I am reading Cristopher Alexander's "Notes on the Synthesis of Form", and he is describing a solution to a problem as having good fit, when there is an absence of bad fit; we can't describe all of the qualities of good fit because it's too complex, but we can identify the bad qualities that stick out.

The complexity of software means that we can't understand all the possible relationships - the qualities of good fit, but we can identify when code isn't doing what it's supposed to - the bad fit.

I'm wondering then, is the purpose of unit tests to identify a "bad fit" in the solution?

  • If I understand your question correctly, the notion of 'fit' applies to how the software solves the problem. Testing addresses how well the software meets the specification, which only indirectly describes the problem. Apr 12, 2013 at 14:57

1 Answer 1


Not exactly. They can but generally I would say no.

The tests show that certain functionality is in the solution. They do not show how well the solution has been written but only that the functionality works. As an example, tests do not show how maintainable your code is.

Some of the tests, that overall requirements (also called functional tests) would help demonstrate that the solution is a "good fit" to the problem. However, there are other aspects of the solution that the tests do not cover (maintainability, extensibility, etc).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.