📺 Count Cathode’s Night School
Build Terminal of Terror from nothing, in 31 nights
“Good evening, students of the strange. You’ve watched the Creature Feature. Tonight, you’ll learn how the picture gets made. Thirty-one nights, one lesson each, and by Halloween you’ll have built the whole thing yourself. Pencils sharp, garlic close.”
This is a course in writing a real Go command-line application, taught by building Terminal of Terror from an empty folder to a released program. Every night adds one idea and leaves you with code that runs. Along the way you’ll meet the standard library, Cobra for commands, Lip Gloss for style and Bubble Tea for interactive screens, and you’ll learn how to test, ship and release the lot.
Who it’s for: anyone who can open a terminal and has written a little code in any language. No Go experience is needed; Go is taught as we go. If you already know Go, skip to Night 11, where the interactive terminal starts.
How it works: each night takes 30 to 60 minutes. Nights 1 to 14 are build-along: type the code, run it, see it work. From Night 15 the app gets big, so those nights teach the ideas with the key code, and point at the finished files in this repository for the rest. Every night ends with an exercise (“Before dawn”) and a Go fact (“Terrifying fact”).
Use the same module name as this repository, github.com/hungovercoders/terminal-of-terror, so the code in the lessons matches yours line for line. You can rename it on the last night.
📅 The programme
Week 1 · The Vault — foundations
| Night | Lesson | You’ll learn |
|---|---|---|
| 1 | It’s Alive! | Installing Go, modules, main, go run and go build |
| 2 | The Skeleton Crew | Cobra: a root command, --help, --version |
| 3 | Meet the Monsters | Structs, slices, loops, and a list command |
| 4 | A Random Terror | math/rand, seeds, functions that return two values |
| 5 | Data in the Coffin | JSON, struct tags, //go:embed |
| 6 | Packs of Monsters | One file per monster, embed.FS, maps and sorting |
| 7 | Check Under the Bed | go test, table tests, testing with a fake filesystem |
Week 2 · The Séance — finding and styling
| Night | Lesson | You’ll learn |
|---|---|---|
| 8 | Speak Its Name | Fuzzy lookup, aliases, command arguments, helpful errors |
| 9 | A Splash of Blood | Lip Gloss styles, colours and borders; terminal width |
| 10 | Every Monster in Its Colours | Themes per monster, a reusable fact card |
| 11 | The Séance Begins | Bubble Tea: Model, Update, View; your first explorer |
| 12 | Fitting the Screen | Window size, wrapping, side-by-side layout, scrolling |
| 13 | Friday the 13th: Turn the Page | Tabs and sections, number keys, header and footer |
| 14 | Whispers in the Dark | Search mode: text input, matching, snippets |
Week 3 · The Double Feature — atmosphere and games
| Night | Lesson | You’ll learn |
|---|---|---|
| 15 | Your Host, Count Cathode | A host package, timers with tea.Tick, TV static, typewriter text |
| 16 | Silent Picture | Palettes, title cards, film grain, animating only when needed |
| 17 | The Gallery | A list view with a cursor and preview, keeping the selection visible |
| 18 | Writing the Questions | Generating quiz questions from data, hiding the answer, distractors |
| 19 | The Midnight Quiz | A second Bubble Tea program, feedback, ranks, wiring a command |
| 20 | Who Lurks in the Fog | Grids of runes, random reveal order, stages and points |
| 21 | What the Crypt Remembers | Saving progress: config dirs, JSON, atomic writes, t.Setenv |
Week 4 · The Finale — rituals, packs and release
| Night | Lesson | You’ll learn |
|---|---|---|
| 22 | Captures and Badges | Outcomes, unlock rules, small predicate helpers |
| 23 | Monster Mash | Dice, best of three, narration templates |
| 24 | By the Light of the Moon | Moon-phase maths, countdowns, pure functions of time |
| 25 | Nightly Rituals | Daily seeds, tickets, block-letter digits |
| 26 | Speaking to Machines | --json, persistent flags, reproducible runs |
| 27 | Open the Doors | Community packs from disk, validation, defaults, scaffolding |
| 28 | Haunting the Tests | Testing Bubble Tea models, size sweeps, driving a real terminal |
| 29 | The Night Watch | CI with GitHub Actions on three operating systems |
| 30 | Lights, Camera | Recording demo GIFs, the README |
| 31 | Halloween: Sign Off | Versions from build info, GoReleaser, tagging a release |
Before Night 1
You’ll need:
- A terminal. On macOS or Linux, the one you have. On Windows, Windows Terminal with PowerShell works well.
- A text editor. VS Code with the Go extension is a fine choice.
- Go 1.25 or newer. Night 1 walks you through installing it.
- Git, so you can save your progress and look at the finished code.
The finished program is in this repository. Whenever a lesson says “the full file in the repo”, it means the file at the same path here, for example cmd/list.go. Reading ahead is allowed. Copying is encouraged. Understanding is the point.
📺 “Channel 13 will now begin its broadcast. Night 1 is this way.”