Systematic Program Design (SPD) is a structured approach to writing programs that emphasizes planning, clarity, and correctness before coding. It is especially associated with the How to Design Programs (HtDP) methodology developed by Matthias Felleisen and others
Key ideas behind SPD:
- Start with the problem, not the code
- Follow a step-by-step process
HtDF (How to Design Functions)
- Signature, purpose and stub
- Define examples
- … Totally 5 steps
HtDD (How to Design Data)
Where HtDF helps you design functions, HtDD is about designing the data structures that functions operate on. It’s step 0 in the Systematic Program Design process — because if your data is badly defined, your functions will be too.
While learning this concept from Edx course, it reminds me TDD, feel similar, and here is the comparison:
- HtDF is educational: It’s meant to teach people how to design functions clearly and systematically. It’s used in universities (e.g., Northeastern, UBC) to teach programming fundamentals.
- TDD is professional practice: Used in real-world software development to ensure code is reliable and testable.
- HtDF focuses more on data-driven design, while TDD focuses more on behavior-driven development.
TDD didn’t come from HtDF, but they both promote writing tests before full code, and thinking before coding. They’re philosophically similar but come from different origins — one academic and pedagogical, the other industrial and pragmatic.