Working Like an Engineer: Git, PRs & Code Review · Lesson 3 of 6 · Bonus module

Reading Code You Didn't Write

The line between "automation tester" and "SDET" in most interviews: can you find your way in a codebase nobody explains to you.

By Shahriyar · Updated

Entry points first

Before reading any logic, answer one question: how does this start? The README's run command, package.json scripts, main/index/server files. Every codebase is a tree; find the trunk before the branches.

Then follow one flow

Pick a behaviour you can see — a button label, a URL, an error message — and grep for its text. That string is a rope: pull it and walk inward one layer at a time, writing the file path down as you go.

▸ The rope trick
git grep -n "Place order"        # where the visible thing lives
git grep -n "placeOrder"         # the function behind it
git log -p --follow -- src/checkout.js   # how it got this way

Grep, debugger, or ask?

Grounded in how engineers actually navigate unfamiliar repos

All lessons in Working Like an Engineer: Git, PRs & Code Review

  1. The Loop: Branch, Commit, PR, Merge
  2. Your First Merge Conflict
  3. Reading Code You Didn't Write
  4. Receiving a Review Without Taking It Personally
  5. Giving a Review as the Quality Person
  6. Commits and PRs an Interviewer Will Read