← Learning notesFly-in live demoMade by Claude (Anthropic) to teach me while I built Fly-in. Code shown is from that stage of the project.

Fly-in, explained visually

Five short pages that take you from "I don't know where to start" to "I know exactly what my first file contains". Read them in order: each one builds on the one before.

PageQuestion it answersRead before you write…
1 · Big pictureWhat are the parts of the program, and what does each one do?anything
2 · ModelsWhich classes do I need, with which fields, and why?flyin/models.py
3 · The graphWhat is a "graph" without a library? What is an adjacency list?flyin/graph.py
4 · Time & bookingsWhy is a normal shortest path not enough? What is a booking calendar?pathfinder.py, scheduler.py
5 · Movement rulesThe tricky rules (restricted zones, freed space, link capacity) as pictures.simulation.py

The one-sentence version

Fly-in in one sentence Read a map into objects, then give every drone a route where each zone and connection has a calendar, and a drone may only use a slot that still has room at that turn.

If that sentence doesn't make sense yet, it will after page 4. Pages 1–3 are the part you build first and they involve no time at all.

Your build order

  1. Models: ZoneType, Zone, Connection in flyin/models.py. (page 2)
  2. Network: zones + adjacency list in flyin/graph.py. (page 3)
  3. Hand-built test: create the easy/01 map in code, check neighbours and capacities.
  4. Parser: the same objects, but filled from the text file. Then every error case.
  5. Plain BFS: one drone, shortest route, ignoring capacity.
  6. Bookings: many drones, capacities, waiting. (page 4)
  7. Output + colours: the D1-zone lines. (page 5)

Run make lint after every step. Commit after every step.

1 · Big picture →