Kayavak / Recaps / Senior Engineering Craft
Recaps · Volume 24
Senior Engineering Craft
The revision sheet of every chapter, on one page: the key ideas, the numbers worth knowing, the pitfalls and the words. Use it before an interview, after a chapter, or to find which chapter to reread. Each title opens its chapter; below each sheet are its exercises, companion and TiffinBox stage, and the misconceptions the companion corrects.
01
Key ideas
- Design docs exist to think, to get cheap early feedback from the right people, to align, and to record why.
- Write one when work is large, cross-team, risky or hard to reverse; otherwise use a PR description or ticket.
- Kinds: one-pager, design doc, RFC, ADR, strategy doc.
- Sections: header, context with evidence, measurable goals and non-goals, proposal with diagrams and failure paths, honest alternatives, cross-cutting concerns, risks, rollout and rollback, open questions with owners, decision log.
- Answer first, be specific, keep it short, write for the busy skeptic.
- Review: deliberate reviewers (approvers vs consulted), share early, timebox, resolve every comment, record the decision.
- When reviewing: ask about the problem, the simplest alternative, failures, irreversibility, scale, operations; mark blocking vs suggestions.
- Failure modes: justification docs, novels, design by committee, bikeshedding, stale docs.
Numbers to remember
- 3–10 pages for most design docs; about a week for comments.
- Lab: draft 1 missed all 8 sections; draft 2 missed none.
Glossary
- RFC: request for comments, a proposal open to wide review.
- ADR: architecture decision record.
- Non-goal: something deliberately out of scope.
- Approver / consulted: reviewers who must agree / who give input.
- Shadow mode: running new code alongside the old without using its output.
- Bikeshedding: spending review time on trivial details.
02
Key ideas
- Review finds defects but mainly builds shared understanding, maintainability and skills.
- Small changes get better, faster reviews; making them small is the author's job (separate refactors, stack changes, flags).
- Fast reviews (within a business day) keep changes small and flow high.
- Authors: description with why, self-review, green CI, point to risk, answer every comment.
- Reviewers: context → design → correctness → tests → readability → details; stop at a wrong design.
- Comments: specific, with reasons, severity-labelled, about the code, with alternatives and praise.
- Approve when the change improves code health with no blocking issues.
- Automate formatting and mechanical checks; authors own AI-generated code fully.
- Measure size, latency, rounds and reviewer spread to improve the process, not to rank people.
Numbers to remember
- Flask: median PR 8 lines; p90 167; 500+ lines → median 13 files.
- Cisco/SmartBear (2006): effectiveness drops beyond 200–400 lines per review and above ~500 lines/hour.
Glossary
- Stacked changes: a series of dependent small PRs.
- Conventional Comments: labels such as
issue:, suggestion:, nit:, praise:.
- Review latency: time until a change gets its first review or approval.
- Rubber-stamping: approving without real review.
- Code health: how easy the codebase is to understand and change safely.
03
Key ideas
- Estimates inform decisions; keep estimates, targets and commitments separate.
- Error sources: right-skewed durations, the planning fallacy, forgotten work, early uncertainty (the cone).
- Techniques: decomposition plus a forgotten-work checklist, ranges/three-point, reference classes, spikes, relative sizing as conversation, throughput forecasting with Monte Carlo.
- Plans: a stated confidence for commitments, project-level buffers, milestones as working software, dependencies first, riskiest work first, fixed date with variable scope, rolling-wave detail.
- Track finished work (burn-up), re-forecast, raise slips early, calibrate against actuals.
- Communicate ranges, confidence and assumptions; answer "faster?" with options.
Numbers to remember
- Lab: sum of 29 days met only 22% (unbiased) or 5% (20% optimistic) of the time.
- Throughput forecast: 40 items → p50 11, p85 13 weeks.
- Capacity for planned work is often 50–70% of nominal time.
Glossary
- Planning fallacy: optimism about one's own durations.
- Reference class forecasting: estimating from outcomes of similar past projects.
- PERT estimate: (O + 4M + P) / 6.
- Spike: a time-boxed investigation.
- Throughput: items finished per period.
- Burn-up chart: cumulative finished work against total scope.
- Brooks's law: adding people to a late project makes it later.
- MoSCoW: must, should, could, won't.
04
Key ideas
- Reversibility sets the process: decide two-way doors quickly; take care with one-way doors; make decisions more reversible.
- Frame: precise question, constraints, three or more options including "do nothing", criteria, decider and deadline.
- Trade-offs between quality attributes are the substance; state them plainly.
- Decision matrices need agreed weights, evidence and a sensitivity check; report the hinge.
- Pre-mortems, second-order effects and experiments reduce risk and uncertainty.
- Build vs buy vs adopt by total cost of ownership and differentiation; choose boring technology; plan exits.
- ADRs record context, decision and consequences; superseded, never edited.
- Explicit decision rights (RACI/DACI); consult early; disagree and commit; escalate with a joint summary.
- Technical debt: interest vs principal; Fowler's quadrant; register, prioritise by interest, pay down continuously, migrate with the strangler fig.
Numbers to remember
- Lab: CDC won 93% of random weight variations; halving freshness left a 0.03 margin.
Glossary
- One-way / two-way door: irreversible / reversible decision.
- Cost of delay: value lost by deciding later.
- Sensitivity analysis: testing how results change with inputs.
- Pre-mortem: imagining failure in advance.
- TCO: total cost of ownership.
- ADR: architecture decision record.
- DACI / RACI: decision-rights frameworks.
- Strangler fig: incremental replacement of a system.
05
Key ideas
- Growing others multiplies a senior engineer's impact; mentoring (advice), coaching (questions), sponsoring (opportunity), managing (formal).
- Learning: deliberate practice, the zone of proximal development with scaffolding, worked examples for novices, retrieval, reflection.
- Onboarding: working setup on day 1, a production change in week 1, growing ownership over 90 days; buddy, reading list, good first tasks.
- One-to-ones owned by the mentee, with follow-up.
- Teach through review, pairing (they drive), design reviews, incidents and your own mistakes.
- Delegate problems with agreed check-ins; accept different approaches; credit publicly.
- Feedback: SBI, timely, specific, private for criticism, balanced, two-way.
- Psychological safety plus high standards; seniors set the tone.
- Raise the bus factor: rotation, pairing, docs, cross-area review, talks, measurement.
Numbers to remember
- Flask
src: top author 50.6% of current lines; 17 of 24 files over 50% one author; simplified truck factor 1.
Glossary
- Sponsorship: using influence to create opportunities for someone.
- Deliberate practice: focused practice on weaknesses with feedback.
- Zone of proximal development: tasks achievable with support.
- Scaffolding: temporary support removed as skill grows.
- SBI: situation, behaviour, impact.
- Psychological safety: belief that it's safe to take interpersonal risks.
- Truck (bus) factor: people who'd have to leave before a project stalls.
06
Key ideas
- Answer first (pyramid principle, BLUF): conclusion or request, then grouped reasons, then details.
- Know the reader and the decision; layer for different readers.
- Plain language: short sentences, concrete numbers, active voice, one idea per paragraph, no filler, structure for scanning, define terms.
- Status: against plan, risks, asks, on one screen. Bad news: early, plain, owned, with options and a next-update time.
- Non-engineers: start from their goal, translate to impact, careful analogies, decisions not lectures.
- Async: one complete message, threads and channels, decisions recorded outside chat, overlap hours across zones.
- Meetings: purpose, agenda, pre-reading, right people, facilitator, written outcomes.
- Influence: credibility, others' goals, evidence and prototypes, pre-wiring, listening, persistence.
- Disagree: steelman, problem not person, find the crux, agree how to decide, commit.
- Say no with the goal acknowledged, trade-offs in their terms, and options.
Numbers to remember
- Lab: 86 vs 1 words before the point; 123 vs 9.8 words per sentence; Flesch −73 vs 73.
- India–New Jersey: 9.5–10.5 hours apart.
Glossary
- Pyramid principle: answer first, then supporting arguments.
- BLUF: bottom line up front.
- Flesch reading ease: a formula based on sentence and word length.
- Pre-wiring: consulting key people before a decision meeting.
- Steelman: the strongest version of an opposing argument.
- Async-first: defaulting to written, non-real-time communication.
07
Key ideas
- A tech lead owns the team's technical outcome: direction, planning, flow, quality, coordination, people.
- Break work into thin vertical slices; riskiest and most dependent first; demonstrable every week or two.
- Little's law: WIP = throughput × cycle time. Limit WIP; finish before starting; track cycle time and ageing items.
- Prioritise with cost of delay (CD3), value vs effort and explicit capacity allocation, jointly with product.
- Cross-team: early interface contracts, tracked dependencies, one owner, short syncs, shared definition of done.
- Quality in the plan: definition of done, SLOs and error budgets, launch readiness, operational load.
- Incident commanders coordinate; blameless postmortems with finished actions.
- DORA metrics and SPACE for the system, never individual targets (Goodhart's law).
- Retros with a few owned changes; sustainable pace; protect focus time; keep a work log.
Numbers to remember
- Lab: WIP 1 → 0.62 items/day, 6-day median cycle; WIP 5 → 0.32 items/day, 51-day median.
- DORA: deployment frequency, lead time, change failure rate, time to restore.
Glossary
- WIP: work in progress.
- Cycle time: start to finish for one item.
- Throughput: items finished per period.
- Little's law: L = λW.
- Cost of delay / CD3: value lost per unit time / cost of delay divided by duration.
- Vertical slice: an end-to-end increment of value.
- Error budget: allowed unreliability under an SLO.
- Goodhart's law: targets distort measures.