Home > Articles > Programming

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

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.

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

  2. 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?

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

  • + Share This
  • 🔖 Save To Your Account