Migration night
The whole of track twelve before midnight: the rename with the handbook link kept, the ids moved up by 1000 with \=submatch(0)+1000, and the docs cleaned with :g and a ranged :sort u. Then the release.
Thursday, 11:00 p.m. Migration night. The release window opens at midnight: every rider in the code becomes courier, the courier ids move up by 1000 to make room for the new system's, and the docs get tidied. One hour, three files, and no one else awake.
Every slip you write tonight goes out to every line it names. Write them carefully.
Warm-up from earlier chapters
Two from earlier chapters, from memory, before the new idea. Two wrong tries show the answer.
Every slip, at a glance
Which lines: ., $, %, .,+3, a highlight, :g/pattern/ and :v/pattern/. What to do: d, s/old/new/ with its small print (g, c, i; &, \1, \u in the replacement), normal, t, m, sort. And the last slip again: &, :&&↵, g&.
Work it out, again
At 11 a.m. you turned minutes into seconds with \=, work it out: the replacement is a calculation, done for each match, and submatch(0) is the text that matched. Tonight it's ids: :%s/id: \zs\d\+/\=submatch(0)+1000/ finds each id's number (\zs starts the match at the number) and puts back the number plus 1000.
{ id: 7, zone: "Wynwood" }, { id: 12, zone: "Brickell" }, { id: 1007, zone: "Wynwood" }, { id: 1012, zone: "Brickell" },Stage 1 · The code
11:10. riders.ts: every rider becomes courier (riders, riderId, riderReport included), and every Rider becomes Courier. One line must not change: the handbook link, because the wiki still lives at /riders/handbook. Two slips, or three.
Stuck? Show a hint
:v/https/s/rider/courier/g<CR> (or :%s/rider/courier/gc<CR> and n for the link), then :%s/Rider/Courier/g<CR>This exercise needs a keyboard. Read on, and play it at your computer.
Stage 2 · The ids
11:30. couriers.ts: every id moves up by 1000; the radius numbers stay as they are. One slip that works the new number out from the old one.
Stuck? Show a hint
The first exercise of every lesson is free. Pro unlocks the rest, every track, for good.
See ProThis exercise needs a keyboard. Read on, and play it at your computer.
Stage 3 · The docs
11:45. zones.md: the TODO(rider) lines go, and the zones between the heading and the footer are sorted, each one once. The heading, the blank lines and the footer stay exactly where they are, so choose the sort's lines with care. Two slips.
Stuck? Show a hint
The first exercise of every lesson is free. Pro unlocks the rest, every track, for good.
See ProThis exercise needs a keyboard. Read on, and play it at your computer.
The whole track, from memory
Eight slips from today.
Extra practice optional
The chapter is done. These rounds keep going as long as you like: stop whenever it stops being useful.
Slips, endlessly
Endless Ex jobs: renames, purges, sorts and semicolons.
The first exercise of every lesson is free. Pro unlocks the rest, every track, for good.
See ProThis exercise needs a keyboard. Read on, and play it at your computer.