Files
curriculum/1.solar-system/1.welcome/03.first-repo/review/general.md

1.4 KiB
Raw Blame History

First Repo — Extended Notes

Not rendered yet. For instructors and a future "learn more" surface.

Purpose

The first paired exercise of the program. Cadets have just finished the bash basics; this introduces them to the battle pattern (defender writes, attacker reviews, then swap) using a tiny but real Git workflow: init, commit, log.

Skills Demonstrated

  • Composing learned commands (git init, git config, git add, git commit) into a single script
  • Reading another cadet's script to verify behavior
  • Filling out the review checklist constructively

Common Pitfalls

  • Skipping git config — the commit either fails or uses a fallback identity that's not the cadet's. Reviewer should run git config --local user.name to confirm.
  • Wrong file contentecho "hello world" (lowercase) doesn't match Hello, World. Reviewer must cat hello-world.txt and check byte-for-byte.
  • Wrong commit messageadd hello world (no dash) is not add hello-world. Reviewer should run git log --format=%s.
  • Multiple commits — sometimes a cadet stages files twice and ends up with two commits. The spec asks for exactly one.

Discussion Prompts (post-battle)

After both rounds, pair discusses for 23 minutes:

  1. Whose script was easier to read? Why?
  2. What did you check first when reviewing? Why?
  3. If this script ran on a server, what could go wrong?