1.10 Things to Do
In later chapters, we invite you to download (or rewrite) code and try using contracts for yourself, but this chapter did not present a complete example. However, we do have some suggestions for things you might do.
Start work on obtaining a programming environment in which you can try out contracts (download and install an Eiffel compiler, or seek a design by contract preprocessor for another language). This book makes a whole lot more sense if you play with contracts.
Choose an API (such as those you find in class libraries) and ask yourself what questions you cannot answer with certainty from the signatures and comments in the API. Where do you have to go for the answers? Would you like to get future libraries from a supplier who writes contracts? Would you pay extra for such libraries?
Browse the Web for information on design by contract. Quite a lot is out there. (See the bibliography for some Web sites that might help.)
We've deliberately built in lots of repetition of the concepts throughout the book. If you don't get an idea straight off, don't worry. It'll almost certainly come around again soon, and maybe its explanation will click then.