A deck in chapters

One file per chapter, ordered by file name.

House rules

  • Interrupt whenever something is unclear
  • Slides and the handout go out afterwards
  • Exercises are in pairs

Why chapters

  • A commit touches one chapter, so the diff is readable
  • Reordering is renaming
  • A shared slide lives in one file and is included where it is needed

Chapter two: reading code together

foreach ($orders as $order) {
    $customer = $this->Customers->get($order->customer_id);
    $order->customer_name = $customer->name;
}

$orders = $this->Orders->find()
    ->contain(['Customers'])
    ->all();

One query per row above, one query below. The fence walks the audience through it.

What it costs

RowsQueries beforeQueries after
50511
5005011
500050011

Checkpoint

No query inside a loop.

Chapter three: what the tooling gives you

  • reveal-carve lint catches a mistyped directive before the room sees it
  • reveal-carve handout turns this deck into a document with the spoken notes
  • reveal-carve watch rebuilds and reloads while you write

Thanks

Questions welcome afterwards too.