Grade 10 Computer Science
The year one writes a system and not a program
A fourth year, in which the question stops being what the program does and starts being who is responsible for what. We open with objects — tying data to its operations — and from there to the question of what really happens when a value is given a name, and why a change in one place appears in another. We learn to treat an error as a path one plans rather than an accident, meet three structures differing in the order they release and the shape they arrange, and remove the single-parent rule to get the graph — the shape describing nearly every connection in reality. We then remove an assumption that has been with you since the first lesson, that lines run in order, and see what breaks; understand how information passing through a place with no trust can be trusted; and close with an approach reversing the direction of writing — examples producing a rule, with everything it gives and everything it takes. The year ends with a final exam over the whole of it.
State, change and copying
- A name is not a box
- Two kinds of copy
- Values that cannot be changed
- A function that changes nothing
- Shared state and hard-to-find bugs
- Common mistakes with state and copying
- Summary practice — state and change
Errors as a designed path
- Failure is an outcome, not an accident
- Catching exactly what you can handle
- Failing early and in the right place
- A message that can be acted on
- Cleanup that happens either way
- Common mistakes in error handling
- Summary practice — errors
Stacks, queues and trees
- The order in which things leave
- The stack you have already met
- A queue, waiting and fairness
- A tree — one parent for everything
- Two ways to walk a tree
- Common mistakes with these structures
- Summary practice — stacks, queues and trees
Concurrency and time
- When more than one thing happens
- A race on the same value
- A lock, and what it costs
- Deadlock — when everyone waits
- Avoiding the problem instead of solving it
- Common mistakes with concurrency
- Summary practice — concurrency
How a machine learns
- Examples instead of rules
- Training, testing, and the cheat between them
- What the model actually learned
- Bias enters through the data
- When not to use learning
- Common mistakes with learning
- Summary practice — learning
Final exam — Grade 10 Computer Science
- Final exam — Grade 10 Computer Science