July 31, 2026

Code review comments like “Why?” are not useful

A code review comment should help the author understand a concern and move the code forward. A comment containing only “Why?” usually does neither.

At first glance, “Why?” looks like a reasonable question. Perhaps the reviewer wants to understand a design decision. Perhaps there is important context missing from the pull request. Perhaps the author overlooked something.

But the author does not know which of these possibilities the reviewer means.

Is the reviewer confused?

Does the reviewer think the code is incorrect?

Is there a performance problem?

Is the reviewer expecting a different architecture?

Or is “Why?” simply a polite way of saying: “I do not like this”?

A vague question transfers the communication work to the author. The author must guess the hidden concern, explain several possible interpretations and wait for another review round before learning what the reviewer actually wanted.

This becomes especially problematic when the comment comes from a senior engineer. Senior comments carry additional weight. A junior or less experienced engineer may assume that a serious mistake has been made, even when the reviewer was only asking for context.

Note

This article is not arguing that reviewers should never ask why. The problem is the context-free, one-word comment. A useful question explains what the reviewer sees, what is unclear and what concern may be hiding behind the question.

codereviewcomment

“Why?” is not as neutral as it looks


Imagine that you open your pull request and find this comment:

Why?

It is attached to the following line:

std::shared_ptr<Connection> connection_;

What exactly should the author explain?

  • Why is the connection stored?
  • Why is it dynamically allocated?
  • Why is shared ownership necessary?
  • Why is the member not a value?
  • Why is the connection owned by this class?
  • Why is the type not an interface?

The reviewer probably has one specific concern. But instead of communicating it, the reviewer asks the author to discover it.

A more useful comment would be:

Better review comment

Is shared ownership required here? I only see this class using the connection. If ownership is exclusive, std::unique_ptr would communicate the lifetime more clearly and avoid the shared ownership overhead.

Now the author knows what to investigate. The concern is ownership. The reviewer has explained the observation, the possible problem and a potential direction.

The author may still disagree. There may be another owner outside the visible part of the patch. But the discussion can start at the actual technical question instead of spending another round discovering what the reviewer meant.

Code review is not an oral examination


Some code reviews feel less like collaboration and more like an examination.

The reviewer already knows the answer but asks a vague question:

  • “Why?”
  • “Really?”
  • “Are you sure?”
  • “What happens here?”
  • “Do we need this?”

These questions may be appropriate during mentoring when the goal is to guide someone through a problem interactively. In an asynchronous code review, however, the author cannot see the reviewer’s expression, hear the tone or immediately ask for clarification.

The comment remains in the review without that context.

If the reviewer already knows the concrete problem, the reviewer should explain it.

Instead of:

Are you sure?

Write:

Better review comment

This callback captures this, but it may execute after the object has been destroyed. Could we cancel the operation during destruction or capture an object with an explicit lifetime?

The second comment teaches something. It identifies the lifetime risk and provides two possible directions.

The goal of review is not to prove that the reviewer noticed something the author did not. The goal is to improve the code and spread understanding across the team.

Common failure mode

When a reviewer knows the concern but hides it behind a vague question, the review becomes a guessing game. That increases review time without improving technical quality.

A good comment explains the concern


A practical review comment usually needs some combination of four elements:

  1. Observation — what the reviewer sees in the code.
  2. Concern — what might go wrong or what is difficult to understand.
  3. Importance — whether the comment is blocking, a suggestion, a question or a minor improvement.
  4. Direction — what change, explanation or alternative would resolve the concern.

Not every comment needs four formal sentences. A small comment can still contain the necessary context.

For example:

Useful comment structure

Observation: This function logs the parsing error and returns std::nullopt.

Concern: The caller cannot distinguish invalid input from an unavailable file.

Importance: Blocking, because the caller needs different recovery behavior.

Direction: Please return a result type containing the failure reason, for example std::expected<Config, ConfigError>.

This comment does not merely state a preference. It explains how the current API affects the caller.

4points

Explain the risk, not only your preferred solution


Another common review problem is requesting a specific change without explaining why it is needed.

For example:

Use std::unique_ptr here.

This is more direct than “Why?”, but it still hides the reasoning.

Does the reviewer want to prevent copying?

Does the reviewer believe ownership should be exclusive?

Is there a project rule?

Is the existing pointer leaking?

Is the reviewer simply expressing a personal preference?

A stronger comment explains the design property being protected:

Better review comment

This object has one clear owner and is transferred into Session. Using std::unique_ptr would make the exclusive ownership visible and prevent accidental sharing.

Once the risk is visible, the author may find an even better solution. Perhaps the object does not need dynamic allocation at all. Perhaps it can be stored by value. Perhaps ownership is actually shared, but the pull request failed to make that relationship visible.

Review the engineering property, not only the syntax you personally expect.

Different comments have different levels of importance


Authors often struggle to determine whether every review comment must be implemented.

A reviewer may write ten comments. Two describe correctness problems. Three are maintainability suggestions. Four are small naming preferences. One is a genuine question.

Without clear labels, all ten comments can look equally important.

A simple classification helps:

Comment typeMeaningExpected author response
BlockingThe code should not be merged until the concern is resolvedChange the code or reach agreement with the reviewer
SuggestionThe reviewer sees a possible improvement, but the current code may still be acceptableConsider it and either apply it or explain the trade-off
QuestionThe reviewer needs information before deciding whether a change is requiredProvide context or update the code if the question exposes a problem
NitA small readability or style improvementOptional unless team rules say otherwise

The exact labels do not matter as much as the shared understanding behind them.

For example:

[blocking] This reference is stored after the function returns, but the
caller may pass a temporary. We need an owning value or a documented
lifetime guarantee.

[suggestion] This branch could return early and reduce the nesting.

[question] Can this callback run concurrently with stop()? I am checking
whether access to state_ requires synchronization.

[nit] `retryDelay` may be clearer than `timeout` here.

These labels reduce unnecessary tension. The author knows which comments represent defects and which represent optional improvements.

Note

Not every team needs formal prefixes. Git hosting platforms may already support suggestions, tasks and approval states. The important part is that authors can understand the severity of a comment without guessing.

Examples of weak and useful review comments


The difference becomes clearer when we compare real comment shapes.

Weak commentMore useful comment
Why?What requires shared ownership here? I only see one owner in this change, so std::unique_ptr may express the lifetime more clearly.
Wrong.This route selection checks the metric before the prefix length. Linux chooses the longest matching prefix first, so this can select the wrong route.
Use a map.This lookup runs for every incoming packet and currently scans the entire vector. Is the collection large enough that keyed lookup would be useful? If so, an unordered map may reduce lookup cost.
Do we need this?This retry timer appears to duplicate the reconnect timer in ConnectionManager. Could we reuse that mechanism to avoid two independent retry paths?
Bad name.data contains a serialized CAN frame, not arbitrary bytes. Would serializedFrame make the representation clearer?
This is too complex.This function validates input, updates state and sends the response. Splitting validation from state mutation would make the failure paths easier to test.
Why not constexpr?This table is fixed at compile time. Making it constexpr would prevent runtime initialization and make that invariant explicit.
Are you sure this is thread-safe?onMessage() and stop() can both access connection_. What prevents them from running concurrently? I do not see synchronization or an event-loop confinement guarantee.

The improved comments are longer, but not unnecessarily long. Each one contains enough information to begin a useful technical discussion.

Senior engineers should provide context, not puzzles


The more senior the reviewer is, the more important this becomes.

A senior engineer often has information that the author does not have:

  • knowledge of earlier production failures,
  • understanding of architectural decisions made years ago,
  • experience with hidden platform constraints,
  • knowledge of another component affected by the change,
  • experience with similar implementations that failed,
  • awareness of performance, security or lifetime risks that are not obvious locally.

That context should be shared, not used as a hidden test.

Consider this comment:

Why are you creating another thread?

The author may read it as an accusation. But perhaps the senior reviewer remembers that the target device has strict memory limits and each thread reserves a large stack. Perhaps the component must run entirely on an existing event loop. Perhaps shutdown ordering becomes unsafe when the component owns a thread.

The reviewer should make that context visible:

Better senior review comment

This component currently runs on the platform event loop. Adding a dedicated thread introduces another stack allocation and complicates shutdown ordering. Could this work be scheduled through the existing executor instead? A separate thread may still be justified, but we should document why it is required.

This comment gives the author information that can be reused in future work.

That is an important part of seniority. A senior reviewer should not only detect defects. A senior reviewer should improve the team’s ability to make good decisions without requiring the same review comment next time.

seniorreview

Do not use seniority as the argument


Sometimes a review discussion ends with a comment such as:

  • “We have always done it this way.”
  • “Trust me, this will not work.”
  • “I have more experience with this component.”
  • “This is the standard approach.”

Experience can be a useful signal. It is not a substitute for an explanation.

A senior engineer may be correct because of experience that is difficult to summarize completely. But even then, the reviewer should explain the most important constraint or failure mode.

Instead of:

Trust me, we tried this before.

Write:

Better review comment

We used a similar cache in the previous implementation. It became stale when devices reconnected through another interface, because invalidation only happened on the normal disconnect path. If we add the cache here, we also need invalidation for timeout, interface failover and service restart.

This explanation allows the team to verify whether the old failure still applies. Perhaps the new design handles all three cases. Perhaps the cache is still risky. Either way, the decision is based on engineering reasoning rather than hierarchy.

Review the code, not the author


Code review feedback should describe the code, behavior or design. It should not describe the author.

Avoid comments such as:

  • “You did not understand the requirement.”
  • “You always overcomplicate this.”
  • “You should know this already.”
  • “You clearly did not test it.”
  • “A senior developer should not write code like this.”

Even when the reviewer is frustrated, these comments do not help resolve the change. They turn a technical discussion into a judgement about competence.

Describe the observable problem instead:

Personal commentCode-focused comment
You did not understand the requirement.The requirement says the operation must remain available during a backend restart. This implementation returns an error immediately instead of retrying.
You always overcomplicate this.This introduces three abstractions for a flow used in one place. Keeping the state transition directly in ConnectionManager may be easier to maintain.
You should know this already.This object is accessed from both the D-Bus callback and the worker thread, so it needs synchronization or explicit thread confinement.
You clearly did not test it.I do not see coverage for an empty response or a connection timeout. Please add tests for those paths.

The second column may still contain firm feedback. Respectful does not mean vague or soft. It means focusing on something the author can verify and change.

Avoid words that add judgement but no information


Some words make review comments feel dismissive without making them more precise.

  • obviously,
  • simply,
  • just,
  • clearly,
  • trivial,
  • basic,
  • nonsense.

For example:

Just use the existing executor. This is obviously overengineered.

The words “just” and “obviously” add no technical value. They mainly tell the author that the reviewer considers the answer easy.

This is better:

Better review comment

The existing executor already provides serialization and shutdown handling. Reusing it would avoid introducing another queue and worker lifecycle.

The technical message is now stronger because the judgement has been removed.

Do not turn preferences into blocking rules


Not every difference in implementation is a defect.

Two engineers may prefer different names, different helper function boundaries or different control-flow styles. A reviewer should distinguish between:

  • a correctness problem,
  • a violation of an agreed team rule,
  • a maintainability concern,
  • and a personal preference.

For example, the reviewer may prefer an early return:

if (connection) {
    sendRequest(*connection);
}

The alternative may be:

if (!connection) {
    return;
}

sendRequest(*connection);

The second form may reduce nesting, especially in a larger function. But in a small function, both may be perfectly understandable.

A useful comment acknowledges that:

Suggestion

Consider returning early when connection is empty. It would reduce nesting if more logic is added below. Not blocking for the current function.

When every preference becomes blocking, code review becomes exhausting. Authors spend time satisfying individual reviewer styles instead of improving shared engineering quality.

Common trap

If the same style discussion appears repeatedly, it probably belongs in a documented team convention or an automated formatting rule, not in every pull request.

Ask genuine questions when context is missing


Questions are still an important part of code review.

The reviewer does not always know the complete context. Requirements may be missing. Another component may impose a constraint that is not visible in the patch. The author may have tested alternatives that are not documented.

But a genuine question should explain what information is missing.

Instead of:

Why are we using UDP?

Write:

Better question

What led us to choose UDP here? The protocol appears to require ordered delivery, and I do not see retransmission or sequence handling in this change. Is that provided by another layer?

The reviewer is not pretending to know the answer. The comment explains why the decision is surprising and what information would resolve the uncertainty.

That is very different from using a question as a disguised command.

If you already believe a change is required, say so and explain why.

One comment should identify one main concern


Long review comments can also become difficult to act on.

A reviewer may write a large paragraph containing:

  • a naming issue,
  • a lifetime concern,
  • a testing request,
  • an architectural alternative,
  • and a question about requirements.

The author fixes two items, answers one question and accidentally misses the rest.

Separate independent concerns when they require separate decisions. Keep them together only when they describe the same underlying problem.

For example, a lifetime issue and the test that exposes it belong together:

Blocking

The callback may execute after Session is destroyed because it captures a raw this. Please make the lifetime explicit and add a test that destroys the session while the request is pending.

But renaming the callback parameter is a separate, non-blocking comment.

Some discussions should leave the review tool


Not every disagreement can be resolved efficiently through comment threads.

A short conversation may be better when:

  • the same point has produced several rounds of comments,
  • the disagreement affects the architecture rather than one line,
  • the author and reviewer interpret the requirement differently,
  • the tone of the conversation is becoming defensive,
  • several reviewers are proposing incompatible directions.

A ten-minute call or a whiteboard discussion can replace twenty asynchronous messages.

However, the conclusion should return to the review.

Good practice

After a verbal discussion, add a short summary to the pull request: what was decided, why it was decided and whether any follow-up work remains.

Otherwise, future readers only see that a discussion disappeared and the code changed.

How to receive review comments without taking them personally


The reviewer is responsible for communicating respectfully and clearly. But the author also influences whether the review becomes productive.

Code is not only text. Engineers invest time, judgement and creativity into it. When someone questions the implementation, it can feel as if they are questioning the engineer.

That reaction is understandable, especially when:

  • the implementation required several days of difficult work,
  • the reviewer comments without understanding the full problem,
  • the comments are vague or dismissive,
  • the pull request is already late,
  • the author feels pressure to prove seniority or competence.

Still, treating every comment as a personal attack makes review difficult for everyone.

A practical first step is to translate the comment into a technical question.

Instead of hearing:

Your solution is bad.

Try to identify:

  • What behavior is the reviewer worried about?
  • What assumption may be missing from the pull request?
  • Is the comment blocking or optional?
  • What evidence could resolve the disagreement?

If the comment is vague, ask for precision without becoming defensive:

Useful author response

Could you clarify which risk you are concerned about here? Is it the allocation, the shared ownership or the object lifetime? I want to make sure I address the right issue.

This response does not accept that the code is wrong. It asks the reviewer to make the concern actionable.

receivingfeedback

Do not defend every line automatically


Some authors reply to every comment by explaining why the current implementation is already correct.

Sometimes that explanation is necessary. But if the code repeatedly requires a long explanation, the code or pull request description may not communicate the decision clearly enough.

Consider three possible responses to a review comment:

  1. The reviewer found a real issue. Fix it and mention what changed.
  2. The implementation is correct, but the intent is unclear. Improve the name, structure, comment, test or pull request description.
  3. The reviewer proposes a different trade-off. Discuss the trade-off using requirements, measurements or team conventions.

“It works” is not always enough. The reviewer may be questioning maintainability, ownership, failure behavior, testability or future extension.

At the same time, authors should not implement every suggestion silently. If a proposed change makes the design worse, explain why.

Respectful disagreement

I considered storing this by value, but Connection is non-movable because it owns an event-loop registration. Keeping it behind std::unique_ptr allows Session to remain movable. I added a comment explaining that constraint.

This is not resistance to feedback. It is an engineering explanation.

Review comments can be wrong


A review comment is not automatically correct because it came from a reviewer, a senior engineer or an architect.

Reviewers may:

  • miss important context,
  • remember an outdated constraint,
  • misread the code,
  • prefer a familiar solution without considering the trade-offs,
  • focus on local style while missing the larger design.

The author should be able to disagree. A healthy review process is not based on automatic obedience.

But disagreement should be supported by something stronger than personal preference:

  • a requirement,
  • a documented architecture decision,
  • a test,
  • a benchmark,
  • a platform limitation,
  • a clear explanation of the trade-off.

The goal is not for the author to win or for the reviewer to win. The goal is to make the decision understandable and defensible.

Do not resolve disrespect by pretending it is technical feedback


Engineers are often told not to take comments personally. That advice is useful only up to a point.

There is a difference between receiving uncomfortable technical feedback and receiving disrespectful feedback.

Examples of legitimate technical feedback:

  • “This change introduces a data race between these callbacks.”
  • “The error information is lost at this API boundary.”
  • “This allocation occurs in the real-time processing path.”
  • “The tests do not cover shutdown while the operation is pending.”

Examples of disrespect:

  • mocking the author,
  • questioning intelligence or competence,
  • using sarcasm repeatedly,
  • applying different standards depending on who wrote the code,
  • turning reviews into public humiliation.

An engineer should learn to accept direct technical criticism. An engineer should not be expected to accept toxic behavior as part of the job.

If disrespect becomes a pattern, the answer is not only to become less sensitive. The team lead or manager should address how reviews are conducted.

The pull request description is part of the review


Authors can prevent many vague questions by providing enough context before the review begins.

A useful pull request description explains:

  • what problem is being solved,
  • what behavior changes,
  • which alternatives were considered,
  • which important trade-offs were made,
  • how the change was tested,
  • which parts deserve special reviewer attention.

For example:

This change moves reconnection onto the existing event-loop scheduler.

A dedicated worker thread was considered, but rejected because it would
require additional shutdown synchronization and reserve another thread stack
on the target device.

Please review:
- cancellation during service shutdown,
- retry timing after interface failover,
- ownership of the pending connection operation.

This description answers several likely “Why?” comments before they are written.

Good review communication is a shared responsibility. The reviewer should express concerns clearly. The author should expose important decisions and context.

Automate what should not require human debate


Some review comments should not be written by humans repeatedly.

Formatting, include ordering, naming patterns, static-analysis findings and simple test requirements can often be checked automatically.

When reviewers spend time commenting on issues that a tool could detect, less attention remains for:

  • ownership,
  • concurrency,
  • failure behavior,
  • API contracts,
  • architecture,
  • maintainability,
  • missing requirements.

Human review is most valuable where judgement is required.

Rule of thumb

If the same objective comment appears in many pull requests, document the rule or automate it. Keep reviewer attention for problems that require engineering judgement.

A practical review comment template


Review comments do not need to follow a rigid format, but this template is a useful starting point:

Review comment template

[Importance] I see [observation]. This may cause [risk or consequence]. Could we [requested change], or document [missing context] if the current approach is required?

Examples:

[blocking] `buffer` is captured by reference, but the callback runs
asynchronously. The local buffer may be destroyed before the callback executes.
Please transfer ownership into the operation or store it in an object that
outlives the callback.

[suggestion] This function performs parsing, validation and state mutation.
Extracting the parsing step would make the failure cases easier to test.

[question] The new timer uses CLOCK_REALTIME. Should system clock adjustments
affect this timeout, or would a monotonic clock better match the requirement?

[nit] `result` represents the selected network interface. `selectedInterface`
would make the later conditions easier to follow.

The template forces the reviewer to reveal the technical concern instead of hiding it behind a one-word question.

A practical checklist for reviewers


Before submitting a review comment, ask:

  • Does the author know what specific concern I am raising?
  • Have I explained the possible consequence?
  • Is this blocking, a suggestion, a question or a minor preference?
  • Am I reviewing an engineering property or enforcing my personal style?
  • Am I sharing context that the author may not have?
  • Is the comment about the code rather than the person?
  • Could an automated tool enforce this instead?
  • Would a short conversation resolve this faster?
  • Will the author learn something reusable from this comment?

A practical checklist for authors


When receiving review feedback, ask:

  • What technical risk is the reviewer pointing to?
  • Is the comment clear enough to act on?
  • Should I fix the code, clarify the intent or explain a trade-off?
  • Does the code require too much explanation to be understandable?
  • Can I support my decision with a requirement, test, measurement or documented constraint?
  • Am I defending the solution because it is best, or because I already invested time in it?
  • Would a direct conversation be more productive?
  • Is the feedback direct but professional, or has it become personal and disrespectful?

The key idea


If you remember only one thing, remember this:

Tip

A useful code review comment should reduce uncertainty, not create more of it. Explain what you see, what concerns you, why it matters and what would resolve the concern.

“Why?” may look concise, but it is often incomplete. It forces the author to guess whether the reviewer is questioning correctness, ownership, performance, architecture, readability or personal preference.

Good reviewers do not make authors discover the hidden objection. They make the concern visible.

Senior engineers have an additional responsibility. Their comments carry more weight, and they often possess context that other engineers do not have. That context should be transferred to the team, not hidden behind authority or vague questions.

Authors also need to separate their identity from the current implementation. Code can be questioned, changed or rejected without reducing the value of the engineer who wrote it. At the same time, accepting feedback does not mean implementing every suggestion without discussion.

The best code reviews are not battles between an author and a reviewer. They are collaborative attempts to make risks, assumptions and trade-offs visible before the code reaches production.

A good review should leave the code better, the decision clearer and both engineers more informed than before.