Lesson 273 of 296
Teamwork: pull requests, code review and Agile
What you will learn
- How professional teams get code from idea to production
- Good pull requests: size, description, commits
- Giving and receiving code reviews
- Agile, Scrum and Kanban in plain words
- Estimation, definition of done and technical debt
- Working well in a team (including remotely)
On this page
The everyday flow
- A ticket (user story or bug) describes the need and acceptance criteria.
- You create a branch from
main(Lesson 92), implement in small commits, and write tests. - You open a pull request (PR); CI runs automatically (Lesson 251).
- Teammates review; you respond and update.
- The PR is merged, deployed, and verified in production.
Good pull requests
| Practice | Why |
|---|---|
| Small (often under about 400 changed lines) | Reviewers find more problems in small PRs and review them faster; big PRs get rubber-stamped |
| One purpose | Do not mix a refactor, a feature and a formatting change |
| Clear description | What and why, how to test, screenshots for UI, risks, links to the ticket |
| Self-review first | Read your own diff before asking others; remove debug code |
| Tests and passing CI | Reviewers should not find what CI could |
| Meaningful commits | Add VAT rounding per invoice line rather than fix stuff; many teams use Conventional Commits (feat:, fix:, refactor:) |
| Feature flags for unfinished work | Merge small pieces early without exposing them (Lesson 251) |
Large features become a series of small PRs (database migration, then API, then UI behind a flag).
Code review
Goals: catch bugs and security problems, keep the code consistent and maintainable, share knowledge across the team, and mentor.
As a reviewer:
- Review promptly; a PR waiting days blocks a teammate.
- Look first at the important things: correctness, edge cases, security (Part 20), data integrity, tests, naming and design. Leave style to the formatter and linter.
- Be kind and specific; comment on the code, not the person. Ask questions: "What happens if the list is empty?" rather than "This is wrong."
- Label comments: blocking vs nit (minor, optional) vs question vs praise for good work.
- Suggest concrete alternatives; approve when it is good enough, not perfect.
As an author:
- Assume good intent; reviews are about the code.
- Respond to every comment: change it, or explain why not.
- Discuss large disagreements in a call rather than long comment threads, then record the decision.
Agile in plain words
Agile is a way of working that delivers software in small increments, gets feedback early and often, and adapts to change instead of following a fixed long plan (the opposite of "waterfall"). The 2001 Agile Manifesto values individuals and interactions, working software, customer collaboration and responding to change.
Scrum, the most common Agile framework:
| Element | Meaning |
|---|---|
| Sprint | A fixed time box, often two weeks, producing a usable increment |
| Product backlog | Ordered list of work, owned by the Product Owner |
| Sprint planning | The team chooses backlog items for the sprint and plans how |
| Daily stand-up (daily scrum) | 15 minutes: progress, plan for today, blockers |
| Sprint review | Demonstrate the increment to stakeholders; gather feedback |
| Retrospective | The team discusses how to work better: keep, stop, start |
| Scrum Master | Facilitates the process and removes impediments |
Kanban: a continuous flow instead of sprints; work moves across columns on a board (To do, In progress, Review, Done) with work-in-progress (WIP) limits to avoid starting too much and finishing little. Common for support, operations and small teams. Many teams use a hybrid.
User stories, estimation and done
- User story: "As a customer, I want to save my card so that checkout is faster", with acceptance criteria (often Given/When/Then, Lesson 272).
- Estimation: story points (relative size and complexity, often Fibonacci numbers 1, 2, 3, 5, 8) or simply counting small items; planning poker gathers estimates from everyone to surface different assumptions. Estimates are for planning, not promises.
- Definition of Done: a shared checklist: code reviewed, tests written and passing, documentation updated, deployed to staging, acceptance criteria met, monitoring in place.
Technical debt
Technical debt is the future cost of shortcuts and outdated code: like financial debt, small amounts can be sensible to ship quickly, but the "interest" (slower changes, more bugs) grows if never repaid. Good practice: make debt visible (tickets), pay it down continuously (a share of each sprint, the Boy Scout rule), and explain it to non-technical people in terms of risk and speed.
Working well in a team
- Communicate early, especially about blockers and risks; "I'm stuck on X, I've tried Y" after a reasonable time, not after three days.
- Write things down: decisions (architecture decision records), how-to guides, PR descriptions.
- In remote and hybrid teams: clear asynchronous messages with context, overlapping hours for pairing, cameras on for important discussions, written summaries after calls.
- Pair programming and mob programming spread knowledge and are common for onboarding and tricky problems.
- Blameless post-mortems after incidents focus on fixing systems, not blaming people.
How to say it in an interview
"I work ticket by ticket on short-lived branches, opening small, single-purpose pull requests with a clear description of what and why, tests and passing CI, and I self-review before asking others. When reviewing I respond quickly, focus on correctness, security, tests and design rather than style, which tools handle, and give kind, specific comments marked as blocking or nits. I have worked in Agile teams with Scrum sprints, stand-ups, reviews and retrospectives, and with Kanban boards and WIP limits; I write user stories with acceptance criteria, follow a definition of done, keep technical debt visible and communicate blockers early."
Key words
| Word | Meaning |
|---|---|
| Pull request | A proposed change reviewed before merging |
| Code review | Teammates checking code before it is merged |
| Nit | A minor, optional review comment |
| Agile | Delivering in small increments with frequent feedback |
| Scrum / sprint | A framework with fixed time boxes / one such time box |
| Stand-up / retrospective | Daily sync / reflection on how to improve |
| Kanban / WIP limit | Continuous flow board / cap on work in progress |
| User story / acceptance criteria | A need from a user's view / conditions for done |
| Definition of Done | Shared checklist for finished work |
| Technical debt | Future cost of shortcuts |
Now prove it
This lesson is complete when you pass the quiz and all three practice levels.