Design Requirements
Always design first before continuing with coding, and review your design if needed. See Design Descriptions in the Resources.
- Design the solution to each function/method in the Python module, guided by what you’ve learned about the function/method from writing and running the test cases.
- Write the design in a new DESIGN.md file. It uses Markdown language. Become familiar with basic Markdown tags.
- Start by copying the function header from the Python modules into DESIGN.md file using the Markdown code highlighting tags, ```.
- Write your description of the computational steps that represent the logic of your solution. Use Markdown tags:
- list tag * to itemize the computational steps
- syntax highlighting tag ` for variable names
- emphasis tags for bold and italics when you want to point to certain important ideas
- The description of the computational steps must:
- Be written in English (not Python or pseudocode).
- Guide your coding by using problem-solving patterns, such as the accumulation pattern.
- Answer the question, “Why?”, you include a particular computational step.
- Introduce suggestive names for local variables that computational steps need to use.
- If a computational step is too complex:
- first say what it will do,
- then break it down into simpler computational steps.
- This development step MUST happen BEFORE you implement the function.
Version control
- When the implementation runs correctly, commit changes associated with this unit of development.
Note:
- Test-driven development is not linear.
- You might come back here and correct or update your design.