Found in 1 comment on Hacker News
elviejo · 2011-02-05 · Original thread
This contracts refer to the concept of "Design by Contract."

http://en.wikipedia.org/wiki/Design_by_contract

The poster child of design by contract is the Eiffel Programming language.

http://www.eiffel.com/developers/design_by_contract.html

IMO Contracts help you te really reduce the number of unit test you need to write.

And the tests that you DO write are more intersting in the BDD kind of way.

I highly recommend to study design by contract. Is one of those things that will make you a better developer in any language you use.

A good book with examples in Java and Eiffel is this: Design by Contract, by Example http://www.amazon.com/Design-Contract-Example-Richard-Mitche...

Fresh book recommendations delivered straight to your inbox every Thursday.