

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer

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?

share|improve this question

migrated from Apr 12 '13 at 6:45

This question came from our site for professional and enthusiast programmers.

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. – Dan Pichelman Apr 12 '13 at 14:57

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).

share|improve this answer

Your Answer


