In the previous article, we discussed systematic data design: a test, example, and documentation-driven approach to designing functions using the HtDP methodology.
In this three-part series, we are covering systematic design as it applies to:
Let’s now turn our attention to the design of worlds.
What is a world?
A world is simply the program your functions and data live in. In larger programs, it could also refer to a particular module or package.
This aspect of systematic design has nothing to do with code and it should precede data and function design. When thinking about the design of a world, we must think of:
- What data in my world will not change? In other words, what is constant?
- What data in my world will change?
- What functions will I need to bring about those changes?
- Illustrate or describe the possible states.
Constants and configuration
What about my program doesn’t change? What will be constant? List those things.
What changes in my program? What kinds of changes?