Team Lead Mindset

Estimates, Code Review and Priorities

Honest ranges with named unknowns, missed deadlines, quick fix versus proper fix, reviewing for better-not-perfect, and saying no with an option.

Lesson 0315 min read#estimates#code-review#priorities

On this page

  1. Words used in this lesson
  2. Thinking about size and speed: estimates
  3. Reviewing code like a lead
  4. Interview questions
  5. Key takeaways
  6. What's next

In one line: a lead needs three things from you every week: an honest estimate with the unknowns named, a review that makes the code better without slowing people down, and a clear call on what comes first and when to say no.

These are the daily questions: "How long will it take?", "Is this PR ok?", "What should we do first?", "Can we skip the tests this once?". They test your judgement more than your syntax. This lesson gives small habits for each, and model answers.

Read Lesson 0 first for the six-step answer shape. For the experience-round version of these topics see Experience round, Full-Stack Lesson 14; for Git and pull-request workflow see Full-Stack Lesson 24.

Everything here is common practice and opinion, not law. Teams differ. Use the ideas, not the exact words, and always use your own true examples.

What I checked. I read directly (raw text on GitHub) four pages of Google's eng-practices code review guide: the standard of code review, the speed of reviews, how to write review comments, and small changes. (The repository was archived in November 2025, but the pages remain.) The estimation ideas come from the planning section of charlax/engineering-management (about 8.3k stars in the snapshot I found); I know them from the list's one-line descriptions, not from the articles. The rest is common practice and opinion. Google calls a pull request a "CL" (change list); I write "change" or "pull request".

Words used in this lesson

  • Technical debt is a shortcut that saves time now and costs time later, like a loan with interest.
  • A spike is a short, time-limited experiment to learn something ("one afternoon to try this library on a real page"). You throw the code away afterwards if needed.
  • A proof of concept (PoC) is a small version that shows an idea can work. It is not production code.
  • A reversible decision is one you can undo cheaply (change a variable name, try a library on one page). A hard-to-reverse decision is one that is expensive to undo (database choice, public API shape, a language for the whole backend). Spend more thinking on the second kind.

Thinking about size and speed: estimates

A lead needs dates for planning, and you need to protect yourself. A few honest habits:

  • Give a range, and name the unknowns. "Three to five days. The two days of risk are the payment provider's test account, which I have not used yet."
  • Break work into small pieces. If a piece is longer than two or three days, it is still too vague to estimate well. Split it.
  • Include the invisible work: tests, review, deploy, docs, and fixing what you find on the way.
  • Update early. If the estimate changes, tell the lead the same day. Early bad news is cheap; late bad news is not.
  • Do a spike for big unknowns. "I need a half day to learn whether this library can do X. Then I can give a real estimate."

For more on estimates as a story see Lesson 38 (coming soon).

Four words that are easy to mix up. One article in the planning list ("Hacks for engineering estimates") separates an estimate (what you think will happen), a target (what someone wants), a commitment (a promise) and a plan (the steps). Many fights about estimates are really one person saying "target" and the other hearing "commitment". Say which one you mean.

Reviewing code like a lead

If you review other people's code, you are already doing a lead's job. Google's public code review guide is the most widely copied example, so here are its main rules in simple words.

The standard: better, not perfect.

  • Reviewers should lean towards approving a change once it definitely improves the overall health of the code, even if it is not perfect. The guide says there is no perfect code, only better code.
  • Nothing justifies approving a change that clearly makes the code health worse, except an emergency.
  • It is always fine to leave comments that help the author learn something. If it is not critical, mark it "Nit:".
  • Do not let a change sit because the author and the reviewer cannot agree.

When two people disagree, use this order (the guide's own order):

  1. Facts and data beat opinions and personal preference.
  2. The style guide is the final word on style. For style points it does not cover, accept the author's choice.
  3. Design is almost never "just style". Judge it on principles. If the author shows that several approaches are equally good, accept the author's preference.
  4. If nothing else applies, ask for consistency with the current codebase, as long as code health does not get worse.

Speed is part of quality.

  • Reply fast. The guide says the maximum is one business day to respond. It also says speed of each reply matters more than how long the whole review takes.
  • Slow reviews slow the whole team, frustrate people, and push them to accept weaker code. The guide says most complaints about review are really solved by making it faster.
  • Do not lower your standards to be fast. Stay strict on substance and quick in reply.
  • If you are busy, send a quick holding reply with a time, or suggest another reviewer. If the changes are minor, you can approve "with comments" and say which comments are optional.

Keep changes small.

  • A small change is reviewed faster and more carefully, has fewer bugs, merges more easily and is simpler to roll back.
  • There is no hard rule. The guide says about 100 lines is usually fine and about 1,000 lines is usually too large, and the number of files matters too (200 lines in one file is easier than 200 lines in 50 files).
  • Keep refactoring separate from a feature or a bug fix. Put the tests in the same change as the code.
  • If a change is too big, ask the author to split it (for example one small change first, then the next one on top of it).

Write comments that help.

  • Be kind. Comment on the code, not the person. For example, say "this adds concurrency complexity without a measured benefit", not "why did you do this?".
  • Explain why (the principle or the benefit), not only what to change.
  • Point out the problem and let the author choose the fix, unless a direct suggestion is more helpful.
  • Label the weight of a comment: Nit (small, will not matter much), Optional / Consider (a good idea, not required), FYI (for later, not this change).
  • If code is confusing, ask the author to make the code clearer, not only to explain it in the review tool.
  • Say what is good too. People learn from that.

A good review comment has three parts: what you see, why it matters, and an option. "This query runs inside a loop, so it will run 100 times for 100 users. Could we fetch all rows at once with IN (...)?"

Interview questions

How do you estimate a task? (Must know)

I break it into small pieces. For each piece I think about the known work and the unknowns. I give a range and name the biggest risk. I include tests, review, deploy and fixing. For big unknowns, I ask for a short spike first. I update my estimate as soon as I learn something that changes it, and I tell the lead the same day.

You find out you will miss a deadline. What do you do? (Must know)

I tell the lead as early as I can, with facts: what is done, what is left, why it grew, and a new range. I bring options: cut scope, move the date, add help, or ship in two steps. I do not hide it and hope. Early honesty gives the team room to choose; late honesty only gives them a problem.

How do you decide between a quick fix and a proper fix? (Senior signal)

I ask how bad the damage is now, how often it happens, and how risky the proper fix is. If users are hurt now, I do the quick, safe fix first (a rollback or a flag) and I create a ticket for the proper fix with an owner and a date. Quick fixes without a follow-up become permanent technical debt. I tell the team clearly which one this is, so nobody thinks the shortcut is the final design.

How do you decide when to refactor? (Senior signal)

I refactor when the old shape slows down work I need to do now, or when it causes bugs. I do it in small steps, with tests, near the code I am already changing. I avoid a big "rewrite everything" project unless there is a strong, measured reason, because rewrites take longer than expected and stop new features. I can explain the benefit in team terms: "This change makes the next three features about half the work."

How do you review a pull request? (Must know)

First I read the description to understand the goal. Then I check the design (is this the right place and approach?), then correctness and edge cases, tests, security, and readability. I leave comments that explain why and offer an option. I mark small things as "nit" so the author knows they are optional. I aim to approve when the change makes the code better, even if it is not perfect. I reply quickly, because waiting is a cost for the author.

Follow-up: "What do you do if the PR is too big?" I ask the author to split it, or I ask for a short call to walk through it. Big PRs get shallow reviews, and bugs hide in them.

How do you decide what to work on when everything is a priority? (Must know)

I ask the product owner or lead to rank them, since priorities are their call. I bring information to help: effort, risk, user impact, and what depends on what. I show a short list: "If I do A first, B moves a week. Which matters more?" I do not silently pick one and hide the others.

A manager asks for a risky shortcut. What do you say? (Trap)

I do not just say yes or no. I explain the risk in business words: "If we skip this test, a bug in billing could charge people twice." Then I offer options: a smaller scope, a feature flag, a quick manual check, or a later date. If the choice is still to take the risk, I ask to write down that it was a decision, with a follow-up to pay it back. Real safety or legal problems (security, data protection) I do not trade away, and I say so politely and clearly.

How do you say "no" to a feature request? (Senior signal)

I say it with respect, a reason, and a way forward: "We can't ship this safely by Friday. The risk is X. We could ship a smaller version, or move the date. What helps you more?" I link it to the goal behind the request, because the request is sometimes a guess at a solution, and there may be a smaller way to reach the same goal.

Key takeaways

  • Give estimates as ranges, name the unknowns, and include tests, review, deploy and fixing.
  • Split work until each piece is a few days or less. Use a spike for big unknowns.
  • Tell the lead about a slipping deadline the same day, with facts and options.
  • Quick fix first when users are hurt now, then a ticket with an owner and a date for the proper fix.
  • Refactor in small steps, near the code you are changing, when it slows real work.
  • Review for "better, not perfect", label small remarks as nits, explain why, and reply fast.
  • When everything is urgent, ask the owner to rank, and show what moves if A goes first.
  • Say "no" with a reason and an option. Do not trade away real safety or legal problems.
  • This is common practice and opinion. Adapt it to your team.

What's next

Next: Incidents, team health and growing as a lead, Lesson 4. Practise: take your last three tasks and write the estimate you would give now, as a range with the biggest risk.

Published by Jainik · Last updated · How these lessons are made

Keep learning

Related lessons

Part of the study guide

Related series