BeginnerWorked program
Make threshold logic physically meaningful
Console streams and complete-line input/output · Finite double arithmetic, precision and round-off · Branch order, validated domains and early returns
Physics · Classification · UnitsStudy this program →BeginnerWorked program
Units, return objects and a physical boundary
Console streams and complete-line input/output · Finite double arithmetic, precision and round-off · Parameters, cohesive calculation functions and return values
Units · ThermodynamicsStudy this program →BeginnerWorked program
Finite loops on a floating-point grid
Console streams and complete-line input/output · Finite double arithmetic, precision and round-off · Finite iteration domains and termination conditions
Geometry · Numerical computation · TablesStudy this program →IntermediateWorked program
Domain checks before geometry
Fixed-size collections, initialized elements and indexed access · Named value records and grouped state · Aliases for mutable or read-only existing objects
Geometry · Trigonometry · Data modelingStudy this program →BeginnerWorked program
Prove a loop boundary, then reduce the work
Integer domains, truncation and arithmetic limits · Branch order, validated domains and early returns · Finite iteration domains and termination conditions
Algorithms · Number theoryStudy this program →BeginnerWorked program
Turn row geometry into precise loop bounds
Integer domains, truncation and arithmetic limits · Finite iteration domains and termination conditions · Dependent and independent iteration bounds
Loops · PatternsStudy this program →BeginnerWorked program
Keep electrical topology separate from input and display
Finite double arithmetic, precision and round-off · Parameters, cohesive calculation functions and return values · Named value records and grouped state
Electronics · CircuitsStudy this program →IntermediateWorked program
Map a first-order physical model to a finite table
Finite double arithmetic, precision and round-off · Parameters, cohesive calculation functions and return values · Value parameters, caller inputs and calculation contracts
Electronics · Differential equations · Exponential responseStudy this program →IntermediateWorked program
Lookup tables need unit semantics and evidence labels
Fixed-size collections, initialized elements and indexed access · Named value records and grouped state · Aliases for mutable or read-only existing objects
Materials · Lookup tables · Dimensional changeStudy this program →BeginnerWorked program
A threshold marker is an explicit policy
Finite double arithmetic, precision and round-off · Parameters, cohesive calculation functions and return values · Finite iteration domains and termination conditions
Materials · Thermal expansion · TablesStudy this program →IntermediateWorked program
Functions return a related set of physical predictions
Parameters, cohesive calculation functions and return values · Named value records and grouped state · Finite double arithmetic, precision and round-off
Mechanics · Trigonometry · Simulation modelsStudy this program →BeginnerWorked program
Equality can be correct when the domain is deliberate
Parameters, cohesive calculation functions and return values · Value parameters, caller inputs and calculation contracts · Finite double arithmetic, precision and round-off
Functions · Piecewise math · Numerical domainsStudy this program →IntermediateWorked program
Explicit moves, invalid input and testable state
Owned strings, byte normalization and complete lines · Scoped finite value domains · Parse success or failure as distinct states
Games · State · RandomnessStudy this program →IntermediateWorked program
A new class example with a real invariant
Objects with interfaces and protected invariants · Automatic lifetime, construction and resource destruction · Dynamic collections with size, capacity and ownership
Data · Files · ClassesStudy this program →IntermediateRefactoring case study
A runnable refactoring slice of a 1,017-line RPG
Named value records and grouped state · Aliases for mutable or read-only existing objects · Scoped finite value domains
Refactoring · State · ArchitectureStudy this case →BeginnerDebugging autopsy
From a confirmed heap overflow to checked access
Dynamic collections with size, capacity and ownership · Fixed-size collections, initialized elements and indexed access · Zero-based indices and checked access
Debugging · Memory · ContainersStudy this case →AdvancedArchitecture case study
A blocked graphical build with instructive state and collision structure
Dynamic collections with size, capacity and ownership · Named value records and grouped state · Aliases for mutable or read-only existing objects
Graphics · External libraries · Real timeStudy this case →