The purpose of this course
When I teach C++, I am not training students for a lifetime of typing program code into a computer. AI can now do a fair amount of that typing. This is useful, but typing was never the difficult part. The programmer must understand what the computation is actually doing. Where has the data gone? Why has the state changed? Is the answer correct, or merely convincing? Someone must decide what the program should do, inspect what it actually does and challenge it when it does something else. That someone is the programmer. If you think you are a programmer but do not accept this responsibility, then you are not an appropriate computer programmer. You are merely someone who can produce program code, and that is something quite different.
Static Carnival
C++ Programming
A complete 24-lesson sequence that asks what the language, compiler and running program are actually doing.
Lessons 01–15
Instructions, states and flow
Begin with the programmer, then examine instructions, state, functions and control flow.
The Appropriate Computer Programmer
Programming culture
Open lesson → LESSON 02The Variable
An introduction to how a state is represented in programming
Open lesson → LESSON 03Declaring & Assigning Variables
Consideration of the basic state manipulation
Open lesson → LESSON 04The Function
How to alter the flow of a program through jumps
Open lesson → LESSON 05The Main Function
Telling the compiler where your program starts from
Open lesson → LESSON 06Calling and Returning with Functions
Appropriate use of a function
Open lesson → LESSON 07Header Files
Structuring your source code
Open lesson → LESSON 08Namespaces
Avoiding naming conflicts in your programs
Open lesson → LESSON 09"Hello, World", (good night Vienna)
Well, we had to put this in!
Open lesson → LESSON 10The For Loop
Repeating code with conditions a known number of times
Open lesson → LESSON 11The While (and Do) Loops
Altering the control variable during iteration logic
Open lesson → LESSON 12The IF Statement
Creating program traces based on conditions
Open lesson → LESSON 13The Conditional Operator
A safer way to “IF”
Open lesson → LESSON 14Manipulating Memory
Using pointers and references
Open lesson → LESSON 15Heap Memory
Creating memory when required
Open lesson →Lessons 16–21
Structure, methodology and optimisation
Continue through scope, storage, classes, inheritance and runtime polymorphism.
Scope and Extent
Managing the availability of identifiers
Open lesson → LESSON 17The Array
Understanding the most popular data structure
Open lesson → LESSON 18Classes and Objects
Constructing object-oriented solutions
Open lesson → LESSON 19Inheritance
Achieving code reuse through inheritance
Open lesson → LESSON 20The Friend Function
Ignoring object-orientation when required
Open lesson → LESSON 21Polymorphism
Understanding the cost and benefit of polymorphism
Open lesson →Lessons 22–24
Solutions, evaluation and advanced features
Finish with operator design, templates and deterministic resource management.