Skip to content

Programming from First Principles Notes ​

This folder contains a Python-based study guide for the subject Programming from First Principles across Modules 1 to 14. It is written as exam-ready revision notes with one page per module plus supporting revision resources.

Each module follows three learning layers:

  1. Simple idea: plain language and a familiar analogy.
  2. Worked example: small Python code traced step by step.
  3. Technical meaning: correct definitions, notation, types, and exam points.

Finish the memory rules and self-check before reading the answers.

Module-wise study method ​

  1. Review the prerequisites and complete one study block at a time.
  2. Type each Python example into the interpreter or notebook and predict the result before running it.
  3. Read errors as feedback about syntax, types, or missing definitions.
  4. Complete the mini quiz and practice ladder before revealing solutions.
  5. Mark the module Mastered after writing and tracing a fresh example unaided.

Module Index ​

ModuleTopicFile
1Standard constructsModule 1
2Standard data typesModule 2
3CalculusModule 3
4First-class-nessModule 4
5Higher-order functionsModule 5
6LazinessModule 6
7Type disciplineModule 7
8PolymorphismModule 8
9InferenceModule 9
10User-defined typesModule 10
11Concrete typesModule 11
12RecursionModule 12
13Operational semanticsModule 13
14Type classesModule 14

Support Material ​

How to Use This Folder ​

  1. Read the module note for the topic you are studying.
  2. Check the matching support pages for revision and memory aid.
  3. Use the web resources when you want a second explanation from an external source.
  4. Revisit the glossary before exams to fix terminology.

Suggested Study Order ​

  1. Module 1
  2. Module 2
  3. Module 3
  4. Module 4
  5. Module 5
  6. Module 6
  7. Module 7
  8. Module 8
  9. Module 9
  10. Module 10
  11. Module 11
  12. Module 12
  13. Module 13
  14. Module 14

Built from Markdown with VitePress.