A long time ago, this repository held a handful of cheatsheets I found useful for doing programming competitions. Nowadays, I'm using it to collect examples and techniques for learning disciplined programming.
Following a collection of texts by Edsger W. Dijkstra, development of a program can be said to proceed in a disciplined manner if we are mindful of each decision taken to develop the program and we are confident that each decision is correct and natural.
Dijkstra documents several techniques to achieve this goal:
- stepwise refinement to break down a problem into smaller subproblems
- predicates defined via weakest-precondition semantics and used judiciously to guide the development of the solution
- development of larger systems as a series of layers (cf 'THE' 1968)
My interest is to illustrate these skills on a collection of problems and gradually extend their application beyond small algorithmic programs. Longer-term, this work may lead to the development of new tools to support disciplined programming.
Reading list:
- Dijkstra, EWD 227: 'Stepwise program construction'
- Dijkstra, EWD 1300: 'The notational conventions I adopted, and why'
- Dijkstra, A Discipline of Programming (out of print, probably best to search on libgen.rs)
- Gries, The Science of Programming