Chapter 01 · Debugging

Understand why your code breaks, then fix it.

We work through your own assignments on a shared screen, one problem at a time, so you learn how a bug is found instead of being handed the answer. Sessions follow your module's teaching order.

Open the syllabus

Start with the module you are on now. Bring the code that is failing.

Fig. 1 — How one debugging habit builds on the last

Syllabus

The path from first error to final project

Syllabus
  1. Python for first-year modules

    Beginner5 weeks5 lessons

    A ground-up pass through the Python you meet in first-year modules: types, control flow, functions and files. Each lesson ends with a small program written on the call, not a worked example to copy.

  2. Java and object-oriented coursework

    Intermediate6 weeks5 lessons

    Java coursework usually fails on design rather than syntax. We work through classes, interfaces and inheritance using the brief you already have, then break the code on purpose to see what the tests catch.

  3. Data structures and algorithms

    Intermediate6 weeks5 lessons

    Big-O notation is easier once you have counted the steps yourself. We implement lists, trees and hash tables in the language your module uses, then compare what each one costs.

  4. Debugging and exam preparation

    Intermediate4 weeks5 lessons

    Written exams ask you to find faults in code you have never seen. We practise reproduction, breakpoints and timed papers, using questions from your own course wherever you have them.

Walkthrough

How a bug is tracked down

  1. Reproduce it

    Make the fault happen the same way twice so you know what you are chasing.

  2. Narrow the field

    Print or breakpoint the values around the failure until one line looks wrong.

  3. State the cause

    Say out loud what the line does and what you expected instead.

  4. Fix and retest

    Change one thing, run the same reproduction, then add a test that would have caught it.

Fig. 2 — From a repeated fault to a guarded fix

Glossary

Words that come up in sessions

Explore all terms

Explainers

Short reads on why code misbehaves

Explainers
  1. Fig.

    6 min read

  2. Fig.

    5 min read

  3. Fig.

    7 min read

  4. Fig.

    6 min read

  5. Fig.

    8 min read

Booking requested

Thanks, we have your request and will confirm the time shortly.

We could not send this

Please try again. Your details are still here.