Your workbench

Session 2 · Fri Oct 2 · Book sections 1.2–1.5, 1.9

🧰

Today’s question

If your laptop died tonight, could tomorrow-you rerun today’s analysis and get today’s numbers?

Readings: 1.21.5 · Lab: 1.9 workbench setup

This lecture in the literature

Nature asked 1,576 researchers: most had failed to reproduce another lab’s experiment — many, their own.

Baker, M. (2016). 1,500 scientists lift the lid on reproducibility. Nature, 533, 452–454.

📖 The handbook: environments, version control, and licensing as ordinary research practice, not extra credit.

The Turing Way Community (2022). The Turing Way: A handbook for reproducible, ethical and collaborative research. Zenodo. doi:10.5281/zenodo.6909298.

The reproducibility problem is measured, not hypothetical. The fix is mechanical, and today you install it.

The environment is part of the result

1 lockfile every package, exact version, hashed — rebuilt identically anywhere

3 machines laptop, Hyak, cloud instance — same environment, same numbers

Unpinned environments drift: this book runs numpy 2.5 and pandas 3.0; last year’s defaults do not. Same script, different numbers, no error message.

A result is code + data + environment. pixi pins the third, and pixi run uses it — nothing to activate, nothing to forget.

git is the lab notebook of code

  • Every commit: a dated, attributed entry — what changed, and why
  • The history answers “which version made this figure?”
  • Committed work is recoverable; uncommitted work is not
  • HW1 is graded from your commit history — it is the evidence

Field notebooks are sacred in this department. This one is for code, and it syncs to GitHub.

AI writes code; you sign the history

  • Review every AI diff before committing — nothing enters the history unread
  • Disclose substantial AI drafts in the commit message
  • Team work flows through pull requests: an AI can open one; only a person merges one

If you cannot explain a line, it does not get committed under your name.

The workbench, in one table

Habit What it prevents Example
pinned environment “works on my machine” the same GNSS trend on laptop, Hyak, or cloud
small commits, real messages mystery figures the figure in your paper regenerates next year
review + disclose AI diffs unread code in your name an agent-drafted data loader, read line by line
pull request before merge unreviewed changes on main leaderboard entries arrive as PRs

Four habits, installed today, graded all quarter.

The lab: build your workbench — open 1.9

  1. Follow 1.9 steps 1–6: pixi → git + GitHub → your MLGEO2026_UWNETID repo → book environment (pixi install) → smoke-test a notebook → push a commit
  2. Then the pull-request dry run at the end of 1.5: branch, edit, gh pr create, review your own diff, merge
  3. Verify each step — every 1.9 step has a “success looks like” line
  4. Stuck ten minutes? Raise a hand. The install clinic continues in office hours

HW1 due Mon Oct 12 · Ch 1 quiz opens Tue Oct 6 · Windows: WSL2 or Codespaces — top of 1.9