Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

Programming

Write correct programs from nothing: values and types, decisions and loops, functions and data structures, and how to find what you got wrong.

01

Values, names and types

What a program computes with, how a type decides what an operator means, and why 0.1 + 0.2 does not equal 0.3 on any machine you own.

02

Making decisions

How comparison turns values into booleans, how booleans combine, and how if turns one into a fork that makes a program behave differently on different input.

03

Loops and invariants

How to say something once and have the machine do it many times, and the two arguments that show a loop gives the right answer and stops.

04

Functions

Naming a computation so it is written once and used anywhere, and the contract that says what goes in, what comes out, and what else it touches.

05

Arrays

One name holding many values in order, reachable by index, and the loop over them that turns a program into something that can handle real data.

06

Map, filter and reduce

The three walks over an array that cover most of the loops you will ever write, and how naming them in the first word makes a program say what it is for.

07

Objects and nested data

Storing values under names instead of positions, the shape real data actually arrives in, and the first problem that needs a function to call itself.

08

References and mutation

Why two names can reach one array, why const does not stop it changing, and how to choose between altering a value and returning a new one.

09

Errors and exceptions

The three grades of being wrong, how to read a stack trace, and why a program that stops loudly is worth far more than one that carries on quietly.

10

Debugging

The method for finding a bug that reports nothing: reproduce it, cut it down, predict before you look, and halve the search space until only one thing is left.

11

Tests, and building a program

Writing the check down so the machine repeats it, choosing the cases worth checking, and building a working program from nothing one tested piece at a time.

Final Test

The whole subject