Reference
The Catalogues
Named catalogues, worked one entry at a time. Gamma and company's design patterns, Hohpe and Woolf's integration patterns, the data structures underneath them, and the problems that need several at once. Each post takes one entry: what the mechanism actually is, where the cost goes, the shape of problem it fits, when to reach for something else, and the Go to write it.
These are written to be returned to rather than read through. Sister surfaces: Under the Hood explains how one thing works, and The Exam Room is certification scenarios. The Workshop's facilitator playbooks are reference too, and have no landing page of their own yet.
Data Structures
0 of 22 published
What a Go Slice Actually Is
A Go slice is three words: a pointer to a backing array, a length and a capacity. Append writes into spare capacity when there is some and reallocates when there is not, so whether your caller sees the write depends on a number the caller cannot see. That is where a lot of real Go bugs come from, and it is a consequence of the header being a value while the array is shared.
First of 22Patterns
0 of 28 published
What a Design Pattern Is, and Is Not
The Gang of Four wrote down what C++ and Smalltalk programmers kept building in 1994. It is a description of practice at a moment, not a prescription, and several of its entries are workarounds for a language feature that did not exist yet: a first-class function dissolves Strategy and Command, implicit interfaces dissolve much of Adapter, a range loop is Iterator. Several others describe structural decisions no syntax removes. Which is which, and why the vocabulary is still worth having.
First of 28Integration
0 of 30 published
Choosing an Integration Style
Four ways to join two systems, and each one decides what breaks later. File transfer asks nothing of either system and sets a latency floor. A shared database removes the lag and makes the schema a contract nobody can change. Remote calls couple availability, so the caller fails when the callee does. Messaging decouples time and hands you duplicates, reordering and a much harder debugging story.
First of 30Applied Patterns
0 of 10 published
The Same File Twice
A supplier's scheduler fired twice on the night the clocks went back, the same stock file landed twice, and 340 lines were credited with 9,840 kg that arrived once. Nobody found it for twenty-three days, by which time the automatic reorder had gone out short three Mondays running and a caterer and a restaurant had been let down. The hard half of the fix is not spotting the repeat; it is telling a repeat from a correction.
First of 10Algorithms
0 of 28 published
What Makes an Algorithm Fast
Big-O counts one operation and discards everything else, which is why two O(1) reads from the same array measured 0.66 and 193 nanoseconds: the same order, 294 times apart. This opens the Algorithms group by setting out what the notation claims and what it leaves to the machine, with the constant factor, the cache hierarchy, branch prediction and allocation measured rather than guessed. Amortised analysis gets the dynamic array as its worked case: a million pushes copy 1,048,575 elements under doubling and 499,999,500,000 under growth by one, and moving the shrink threshold from a quarter of the capacity to half turns a 29 nanosecond push-and-pop into 9.4 microseconds. Every figure here came out of Go's testing.B on one machine.
First of 28