English for developers · Code review

Code review phrases for polite, clear comments

Quick answer

These are 275 code review phrases from the Devlingo app: suggesting a change, pointing out a bug, asking for context, praising and approving. Each one comes with when to use it and the audio. In a review the tone matters as much as the content, so many are polite ways to disagree.

Updated

In a review comment, a question lands better than an order: What do you think about…? and Could we…? open a conversation; nit: marks a detail that does not block the merge.

Easy phrases (70)

  1. Could you add some unit tests for this?

    When to use it: Requesting test coverage during code review

  2. Looks good to me. Approved!

    When to use it: Approving a pull request after review

  3. Can you rename this variable to something more descriptive?

    When to use it: Suggesting a better variable name for clarity

  4. Nice refactoring! The code is much cleaner now.

    When to use it: Praising a well-done refactoring effort

  5. What happens if this value is nil?

    When to use it: Asking about null safety and edge cases

  6. Let's use a constant instead of this magic number.

    When to use it: Suggesting replacing a hardcoded value with a named constant

  7. Please resolve the merge conflicts before I review.

    When to use it: Asking the author to fix conflicts before proceeding with review

  8. Have you tested this on older iOS versions?

    When to use it: Asking about backward compatibility testing

  9. Can you move this logic to the view model?

    When to use it: Asking to separate business logic from the view layer

  10. I left a few minor comments, but overall this is great work.

    When to use it: Giving positive feedback with small suggestions

  11. The naming convention here doesn't match the rest of the codebase.

    When to use it: Pointing out inconsistent naming style

  12. This code path is unreachable — we should remove it to keep the codebase clean.

    When to use it: When dead code exists that can never be executed

  13. Let's avoid abbreviations in variable names — spell out the full word for clarity.

    When to use it: When variable names use unclear abbreviations like 'usr', 'cnt', 'tmp'

  14. I think we should add unit tests for this logic.

    When to use it: Requesting test coverage for new or changed business logic

  15. The error message here isn't helpful for debugging.

    When to use it: When a catch block or error handler provides a vague error message

  16. Could you add a TODO here so we remember to revisit this before launch?

    When to use it: Marking incomplete or temporary solutions that need future attention

  17. Looks good overall, just a few style nits.

    When to use it: General approval with minor formatting suggestions

  18. Please remove the commented-out code before merging.

    When to use it: When old code is left commented out instead of being deleted

  19. This hardcoded URL should come from the config.

    When to use it: When a URL or endpoint is hardcoded instead of being configurable

  20. The commit messages could be more descriptive.

    When to use it: When commit messages are vague like 'fix stuff' or 'update'

  21. Did you run the linter before pushing?

    When to use it: When code has formatting issues that a linter would catch

  22. I appreciate the thorough test coverage here.

    When to use it: Complimenting well-written tests in a code review

  23. The PR description is missing — can you add context about what this changes?

    When to use it: When a PR lacks a description explaining the purpose of the changes

  24. This log statement should use a proper log level instead of print.

    When to use it: When console.log or print is used instead of a structured logging framework

  25. The access modifier on this method should be private.

    When to use it: When a method is public but only used internally

  26. This switch statement is missing a default case.

    When to use it: When a switch doesn't handle all possible values

  27. This conditional could be simplified with a ternary expression.

    When to use it: When an if-else block assigns a simple value and could be shortened

  28. Can you add the ticket number to the PR title for traceability?

    When to use it: When a PR doesn't reference the associated Jira/Linear ticket

  29. This import is unused — please clean it up.

    When to use it: When a module import is no longer needed in the file

  30. Can we move this configuration to environment variables?

    When to use it: When config values are hardcoded that should be environment-specific

  31. This file has gotten too large — let's split it up.

    When to use it: When a single file contains too many classes or too much code

  32. Can we add integration tests for this workflow?

    When to use it: When a complex feature path only has unit tests

  33. This comparison should be case-insensitive.

    When to use it: When string comparison doesn't account for different casing

  34. The indentation is inconsistent — tabs and spaces are mixed.

    When to use it: When code formatting mixes tab and space indentation

  35. This placeholder text was left in — should be replaced with actual content.

    When to use it: When Lorem Ipsum or test data is accidentally left in production code

  36. The spacing and formatting here don't match our style guide.

    When to use it: When code formatting deviates from the team's style conventions

  37. This constant should be uppercase by convention.

    When to use it: When a constant uses lowercase naming against coding conventions

  38. The indentation is inconsistent in this block — some lines use tabs and others use spaces.

    When to use it: Noting coding style inconsistency in whitespace usage

  39. The response body should use camelCase to be consistent with the rest of our API.

    When to use it: Commenting on inconsistent naming conventions in API response fields

  40. The variable name 'data' is too generic — can we rename it to something more descriptive like 'userProfiles'?

    When to use it: Suggesting better naming for improved code readability

  41. Good catch on the boundary condition — what about negative numbers though?

    When to use it: Acknowledging a fix while pointing out another edge case not yet handled

  42. The spacing and formatting in this file are inconsistent — let's run the linter before we merge.

    When to use it: Asking to apply consistent code formatting before merging a pull request

  43. This entire module would benefit from a comprehensive README explaining the architecture and data flow.

    When to use it: Requesting high-level documentation for a complex module to help future developers

  44. LGTM! The separation of concerns here is really clean.

    When to use it: Approving a PR that demonstrates good architectural separation

  45. Nice use of generics here. This makes the component much more reusable.

    When to use it: Praising effective use of generic types in a PR

  46. Great job adding structured logging. The correlation ID will really help with debugging in production.

    When to use it: Praising good observability practices

  47. Approved! This is a solid refactor. The tests give me confidence nothing is broken.

    When to use it: Approving a refactoring PR that includes good test coverage

  48. I like the trade-off you chose here. Slightly more code but much easier to test and maintain.

    When to use it: Acknowledging a thoughtful design decision

  49. Clean implementation! I especially like how you handled the edge cases.

    When to use it: Praising thorough handling of edge cases

  50. Can we add a comment explaining why we chose this approach over the simpler alternative?

    When to use it: Requesting documentation for a non-obvious design decision

  51. Looks good to me. Just one minor nit: this variable name could be more descriptive.

    When to use it: Approving with a small naming suggestion

  52. Love the use of early returns here. It makes the happy path much easier to follow.

    When to use it: Praising guard clauses and early return pattern

  53. Excellent test coverage on this module. These tests will save us a lot of regression debugging later.

    When to use it: Praising comprehensive test coverage

  54. This looks like a feature flag that was left behind. Can we check if it is still needed?

    When to use it: Identifying potentially stale feature flag code

  55. Ship it! This is exactly what we discussed in the design review.

    When to use it: Enthusiastically approving a well-aligned implementation

  56. This configuration is hardcoded. Can we move it to an environment variable or a config file?

    When to use it: Suggesting externalization of configuration values

  57. The error messages are being shown to the user in English only. These should be localized.

    When to use it: Noting missing localization in error handling

  58. Good catch adding the timeout. Without it, a slow downstream call could hang the entire request.

    When to use it: Acknowledging a good defensive coding practice

  59. We should add a total count to the paginated response so the client knows how many pages there are.

    When to use it: Requesting metadata in a pagination response

  60. I appreciate the documentation you added here. It will help the next person who touches this code.

    When to use it: Praising good inline documentation

  61. Why are we using a string literal here instead of the constant we defined in the config module?

    When to use it: Pointing out use of magic strings instead of constants

  62. Nice work extracting this into a shared component. It was duplicated in four places before.

    When to use it: Praising DRY refactoring to a shared component

  63. The page size should be configurable rather than hardcoded to 50. Different clients may need different page sizes.

    When to use it: Suggesting configurable pagination parameters

  64. The naming is much better in this version. It reads almost like natural language now.

    When to use it: Praising improved naming after a revision

  65. I think we can simplify this by using a map and filter chain instead of the manual for loop.

    When to use it: Suggesting a more functional programming style

  66. Solid work overall. My only suggestion would be to add integration tests covering the happy path and the main failure scenario.

    When to use it: Mostly approving but requesting additional test coverage

  67. Approving with one suggestion: let us add a doc comment explaining when this method should and should not be called.

    When to use it: Approving with a request for usage documentation

  68. The unit tests are great, but they all test the same happy path. Can we add tests for the error and edge cases?

    When to use it: Requesting broader test coverage beyond happy path

  69. This is a really elegant solution. I learned something new from reviewing this PR.

    When to use it: Expressing genuine appreciation and learning from a PR

  70. Overall this is a well-structured PR. I left a few minor suggestions but nothing blocking. Approve.

    When to use it: Giving a final approving summary with minor non-blocking suggestions

Intermediate phrases (109)

  1. This logic could be simplified with a guard statement.

    When to use it: Suggesting a code simplification using early return

  2. I think we should extract this into a separate function.

    When to use it: Suggesting extraction of repeated or complex logic

  3. This function is doing too many things. Can we break it down?

    When to use it: Pointing out a violation of the single responsibility principle

  4. Could you add a comment explaining why this workaround is necessary?

    When to use it: Requesting documentation for non-obvious code

  5. This error handling is too generic. We should catch specific errors.

    When to use it: Suggesting more precise error handling instead of a catch-all

  6. Is there a reason you chose a class instead of a struct here?

    When to use it: Questioning the choice of reference type vs value type

  7. I see some duplicated code between these two files. Can we create a shared utility?

    When to use it: Identifying code duplication and suggesting DRY improvement

  8. This file is getting quite long. Should we split it into smaller modules?

    When to use it: Suggesting file decomposition for maintainability

  9. Great use of the builder pattern here. Very clean.

    When to use it: Complimenting a well-implemented design pattern

  10. We should add input validation before passing this data to the API.

    When to use it: Requesting data validation at the boundary layer

  11. Can you add a comment explaining why this edge case is handled differently?

    When to use it: When code handles a special case but the reasoning isn't obvious

  12. I think self-documenting code would be better here than adding comments.

    When to use it: Suggesting that clear naming and structure are preferable to explanatory comments

  13. Let's define custom error types instead of throwing generic exceptions.

    When to use it: When error handling uses generic errors instead of domain-specific ones

  14. This endpoint is missing input validation.

    When to use it: When an API endpoint doesn't validate request parameters

  15. This PR is too large — can we break it into smaller, focused changes?

    When to use it: When a pull request touches too many files and is hard to review

  16. Approved with minor comments — nothing blocking.

    When to use it: Approving a PR while leaving optional improvement suggestions

  17. We should use an enum here instead of passing raw string literals around.

    When to use it: When string literals are used where a type-safe enum would be more appropriate

  18. This magic number should be extracted into a named constant.

    When to use it: When a raw number appears in code without explanation

  19. This should be lazy loaded — there's no need to initialize it until it's actually used.

    When to use it: When an expensive object is created eagerly but only needed conditionally

  20. I'd recommend adding guard clauses at the top to fail fast on invalid input.

    When to use it: Suggesting defensive programming with early validation

  21. We need to add tests specifically for the edge cases — empty input, boundary values, and timeouts.

    When to use it: When test coverage exists but doesn't cover critical edge cases

  22. Can you walk me through the thought process behind this design decision?

    When to use it: Asking the author to explain their architectural choice

  23. I left a few comments but nothing that should block the merge.

    When to use it: Indicating that review feedback is optional and PR can proceed

  24. Let's not mix refactoring with feature work in the same PR.

    When to use it: Requesting separation of concerns in pull requests

  25. Can we use an enum here instead of string comparisons?

    When to use it: Suggesting type-safe enums over raw string matching

  26. Could you bump up the test coverage for this module?

    When to use it: Requesting more tests for a module that lacks sufficient coverage

  27. Is there a reason we're not using the existing utility for this?

    When to use it: When someone writes custom code for something that already exists in the codebase

  28. This timeout value seems too aggressive for production.

    When to use it: When a network or operation timeout is set too low for real-world conditions

  29. The happy path works, but what about error handling?

    When to use it: When code only handles the success case and ignores failures

  30. We need to think about how this scales with a large dataset.

    When to use it: When code works fine with small data but may have performance issues at scale

  31. This is a breaking change — we need to coordinate with the mobile team.

    When to use it: When an API or interface change will affect other teams or clients

  32. I think we should handle the case where the API returns a 429.

    When to use it: When rate limiting from external APIs isn't handled

  33. This regex is unreadable — can we add a comment or break it up?

    When to use it: When a complex regular expression has no documentation

  34. We should add an index on this column to speed up the query.

    When to use it: When a database query is slow due to missing indexes

  35. This API response should be cached to reduce unnecessary network calls.

    When to use it: When the same API data is fetched repeatedly without caching

  36. Let's make sure we're not exposing any sensitive data in this response.

    When to use it: When reviewing API responses that might leak private information

  37. Can we avoid the force unwrap here? It's a crash waiting to happen.

    When to use it: When a force unwrap (!) is used in Swift or similar patterns in other languages

  38. Can we add a guard clause at the top instead of wrapping everything in an if?

    When to use it: Suggesting guard-style early exit over deep nesting

  39. Good catch handling the edge case — I wouldn't have thought of that.

    When to use it: Praising a developer for anticipating an unusual scenario

  40. This would read better as a computed property instead of a method.

    When to use it: When a no-argument method that returns a value could be a property

  41. The error handling here follows our established patterns nicely.

    When to use it: Praising consistent error handling that matches team standards

  42. We should validate the response schema before parsing it.

    When to use it: When API response data is used without validating its structure

  43. I'd rather see an explicit type annotation here for readability.

    When to use it: When type inference makes the code harder to understand at a glance

  44. This date formatting should respect the user's locale.

    When to use it: When dates are formatted with a hardcoded format string

  45. Consider using a protocol here to make this more flexible.

    When to use it: When concrete types are used where protocols/interfaces would be better

  46. Nice use of generics here — very clean and reusable.

    When to use it: Complimenting good use of generic types for reusability

  47. We should discuss this architectural decision in a design doc first.

    When to use it: When a PR introduces a major architectural change without prior discussion

  48. We need to handle the loading state in the UI while this request is in flight.

    When to use it: When async operations don't show loading indicators to the user

  49. This pagination implementation doesn't handle the last page correctly.

    When to use it: When pagination logic has edge cases around the final page of results

  50. The API contract changed but the documentation wasn't updated.

    When to use it: When API docs are out of sync with the actual implementation

  51. Could we use a more specific exception type here?

    When to use it: When a generic Exception is thrown instead of a domain-specific one

  52. This fallthrough in the switch is intentional, right?

    When to use it: When a switch case falls through without a break or explicit annotation

  53. I'd add a timeout to this network request to avoid hanging indefinitely.

    When to use it: When a network call has no timeout configured

  54. This is over-engineered for what we need right now.

    When to use it: When a solution is more complex than what the current requirements demand

  55. This would be cleaner using destructuring assignment.

    When to use it: When properties are accessed one by one instead of using destructuring

  56. The method signature changed but the callers weren't updated.

    When to use it: When a function's parameters change but all call sites aren't fixed

  57. This callback hell can be cleaned up with async/await.

    When to use it: When nested callbacks make code difficult to follow

  58. The tests pass but they're not actually asserting anything meaningful.

    When to use it: When tests exist but don't verify important behavior

  59. Please squash these commits before merging to keep the history clean.

    When to use it: When a PR has too many small/messy commits that should be combined

  60. This data structure choice is perfect for this use case.

    When to use it: Praising a well-chosen data structure for a specific problem

  61. This endpoint returns way too much data — can we paginate the response?

    When to use it: Commenting on an API design issue where too much data is returned at once

  62. Will this change break backwards compatibility with older API clients?

    When to use it: Asking whether a modification will cause issues for existing consumers of an API

  63. We should add JSDoc comments to this public API so consumers know what each parameter expects.

    When to use it: Requesting documentation for a public-facing API function

  64. This catch block silently swallows the exception — at minimum we should log it.

    When to use it: Pointing out that errors are being caught but not handled or logged

  65. Instead of these nested if-else blocks, a guard clause at the top would make this much cleaner.

    When to use it: Suggesting early returns to improve code readability and reduce nesting

  66. This force unwrap could crash in production — let's use optional binding with a fallback instead.

    When to use it: Flagging unsafe force unwrapping that should use safe unwrapping patterns

  67. We could simplify this by using a map and filter chain instead of the manual for loop with conditionals.

    When to use it: Suggesting functional programming approach over imperative looping

  68. Let's add a rate limiter to this endpoint to prevent abuse.

    When to use it: Suggesting security hardening for a public-facing API endpoint

  69. This function is doing too many things. Can we break it into smaller, focused helpers?

    When to use it: Requesting changes when a function has grown too complex

  70. We should add input validation before passing this data to the service layer.

    When to use it: Noting missing validation at the boundary of a module

  71. The error is being swallowed here. We should at least log it before returning a default value.

    When to use it: Noting that error information is being silently discarded

  72. Could we use dependency injection here instead of directly instantiating the service?

    When to use it: Suggesting DI to improve testability and decoupling

  73. This feature flag has been enabled for three months. Should we clean up the dead code path?

    When to use it: Suggesting removal of stale feature flag logic

  74. Have we considered caching this API response? It rarely changes and we call it on every page load.

    When to use it: Suggesting a caching strategy for frequently accessed, slowly changing data

  75. The cognitive load of this method is quite high. I had to re-read it several times to understand the flow.

    When to use it: Commenting on code that is difficult to understand due to complexity

  76. These button labels are not accessible. Screen readers will just read "button" without any context.

    When to use it: Flagging accessibility issues in UI code

  77. This protocol has too many requirements. Consider splitting it into smaller, composable protocols.

    When to use it: Suggesting protocol decomposition for better design

  78. We are missing proper error propagation here. The caller has no way to know why the operation failed.

    When to use it: Identifying that errors are not being communicated back to callers properly

  79. The UI looks great, but the color contrast ratio does not meet WCAG AA standards for body text.

    When to use it: Flagging accessibility color contrast issue

  80. This query is missing an index. Without it, we will do a full table scan on every request.

    When to use it: Identifying missing database index for performance

  81. I would prefer we use a protocol here so we can swap the implementation in tests.

    When to use it: Suggesting abstraction for better testability

  82. Instead of returning null here, can we use the Result type to make the error case explicit?

    When to use it: Suggesting typed error handling instead of nullable returns

  83. The business logic is leaking into the view layer. Let us move this calculation to the view model.

    When to use it: Identifying violation of separation of concerns

  84. Consider using a type alias here to improve readability of this complex generic signature.

    When to use it: Suggesting readability improvement for complex generic types

  85. The deep nesting makes this hard to reason about. Can we flatten it with guard clauses or extract methods?

    When to use it: Requesting simplification of deeply nested conditional logic

  86. I noticed the focus order of these form fields does not match the visual layout. This will confuse keyboard users.

    When to use it: Identifying an accessibility issue with tab/focus order

  87. Why are we creating a new database connection for each request instead of using a connection pool?

    When to use it: Questioning inefficient database connection management

  88. I am concerned about the coupling between these two modules. They should not need to know about each other's internals.

    When to use it: Raising concerns about tight coupling between modules

  89. This catch block is too broad. We should handle specific error types instead of catching everything.

    When to use it: Requesting more granular error handling

  90. The data layer should not know about UIKit. This import creates an unnecessary dependency on the UI framework.

    When to use it: Flagging an architecture boundary violation

  91. This is a nice abstraction, but make sure it does not become a leaky abstraction as requirements evolve.

    When to use it: Cautioning about abstraction sustainability

  92. We are not validating the email format before saving it to the database. This could lead to corrupted data.

    When to use it: Noting missing input validation before persistence

  93. The logging level here should be warn, not info. We want to be alerted if this code path is hit in production.

    When to use it: Correcting log severity level for an important condition

  94. This is a great example of composition over inheritance. The flexibility this provides is well worth the slightly more verbose code.

    When to use it: Praising a design pattern choice

  95. I see we are using force unwrap here. Can we use a guard let or optional binding to handle the nil case gracefully?

    When to use it: Flagging unsafe force unwrap in Swift or similar patterns

  96. This feature flag is being checked in the view, the view model, and the service. Can we centralize the check to one place?

    When to use it: Identifying scattered feature flag checks

  97. The image alt text is missing on these product thumbnails. Visually impaired users will not know what they show.

    When to use it: Flagging missing accessibility attributes for images

  98. We need to add metrics around this operation so we can set up alerts if the latency degrades.

    When to use it: Requesting monitoring and alerting instrumentation

  99. This SELECT * should be replaced with explicit column names. It will break if someone adds a column later.

    When to use it: Flagging fragile SQL query pattern

  100. If we cache this, we also need to think about cache invalidation. When does this data become stale?

    When to use it: Raising cache invalidation concerns

  101. This view controller is over 500 lines. We should extract the table view data source methods into a separate class.

    When to use it: Suggesting decomposition of a large view controller

  102. This switch statement should have an exhaustive check. Adding a default case hides the compiler warning when new enum values are added.

    When to use it: Recommending exhaustive pattern matching over default cases

  103. I would add a TTL to this cache entry. Stale configuration data could cause unexpected behavior in production.

    When to use it: Suggesting time-to-live for cached configuration data

  104. Using a computed property here instead of a stored one would avoid the stale data issue entirely.

    When to use it: Suggesting a computed property to prevent stale cached values

  105. This closure is capturing self strongly and could cause a memory leak. Consider using [weak self] here.

    When to use it: Identifying a potential retain cycle in closure-based code

  106. I think the trade-off here leans too far toward performance at the expense of readability. This code will be hard to maintain.

    When to use it: Pushing back on premature optimization that hurts readability

  107. The debug log statements are fine for development, but we should gate them behind a log level check to avoid overhead in production.

    When to use it: Suggesting log level gating for production performance

  108. The keyboard navigation for this modal is broken. Users cannot tab to the close button or press Escape to dismiss it.

    When to use it: Flagging broken keyboard accessibility in a modal dialog

  109. The graceful degradation approach here is spot on. If the third-party service is unavailable, the user still gets a usable experience.

    When to use it: Praising resilient design that handles service failures gracefully

Advanced phrases (96)

  1. I noticed a potential memory leak here.

    When to use it: Flagging a memory management issue in the code

  2. This approach won't scale well. Have you considered using a dictionary instead?

    When to use it: Raising scalability concerns and suggesting an alternative data structure

  3. I would prefer using a protocol here to make this more testable.

    When to use it: Suggesting dependency injection via protocol for better testability

  4. This closure should capture self weakly to avoid a retain cycle.

    When to use it: Pointing out a potential retain cycle in a closure

  5. This API call should be on a background thread to avoid blocking the main thread.

    When to use it: Flagging a threading issue with network calls

  6. Consider using async/await instead of completion handlers for better readability.

    When to use it: Suggesting modernization of asynchronous code style

  7. The race condition here could cause intermittent bugs in production.

    When to use it: Identifying a concurrency issue that may cause unpredictable behavior

  8. The performance implications of using filter followed by map here are worth considering. A single compactMap would be more efficient.

    When to use it: Suggesting a performance optimization for chained higher-order functions

  9. This force unwrap will crash the app if the value is nil. Can you handle the optional safely?

    When to use it: Flagging a dangerous force unwrap that could cause a runtime crash

  10. The cyclomatic complexity of this function is too high — can we simplify the branching?

    When to use it: When a function has too many conditional paths making it hard to test and maintain

  11. This looks like it could be a race condition.

    When to use it: When identifying potential concurrency issues in multithreaded code

  12. This is a DRY violation — the same logic exists in the user service.

    When to use it: When duplicate code is found across different parts of the codebase

  13. Have you considered the performance implications of this query inside a loop?

    When to use it: When a database query or API call is made inside a loop, causing N+1 issues

  14. This violates the single responsibility principle.

    When to use it: When a class or function is doing too many unrelated things

  15. I'd suggest using a more defensive approach here with proper error boundaries.

    When to use it: Recommending safer error handling patterns in critical code paths

  16. This catch block is swallowing the exception silently.

    When to use it: When an error is caught but not logged or re-thrown

  17. This coupling between modules is going to bite us later.

    When to use it: Warning about tight coupling that will cause maintenance problems

  18. We should sanitize this user input to prevent SQL injection.

    When to use it: Identifying a security vulnerability with unsanitized input

  19. This needs a migration script for the database schema change.

    When to use it: When a DB schema change is made without a corresponding migration

  20. I'm not sure this abstraction is earning its keep.

    When to use it: When an abstraction layer adds complexity without clear benefit

  21. This is a classic N+1 query problem.

    When to use it: When code triggers individual database queries for each item in a collection

  22. This test is testing implementation details rather than behavior.

    When to use it: When a test is brittle because it's tightly coupled to internal code structure

  23. I would avoid mutating state directly — use a reducer pattern instead.

    When to use it: Suggesting immutable state management patterns

  24. I see potential for a memory leak here with this strong reference cycle.

    When to use it: When closures or delegates create retain cycles

  25. This boolean parameter is a code smell — consider using separate methods.

    When to use it: When a function takes a boolean that toggles different behavior

  26. The type assertion here is unsafe — can we use a type guard instead?

    When to use it: When a forced type cast could crash at runtime

  27. This would be a good candidate for the strategy pattern.

    When to use it: When suggesting a design pattern to replace conditional logic

  28. The dependency injection here makes this much easier to test.

    When to use it: Complimenting good use of dependency injection for testability

  29. I'd recommend wrapping this third-party dependency behind an interface.

    When to use it: When external libraries are used directly without abstraction

  30. This would benefit from being wrapped in a transaction.

    When to use it: When multiple database operations should be atomic

  31. Have you considered using the strategy pattern here to make this more extensible?

    When to use it: Suggesting a design pattern to improve code flexibility and maintainability

  32. We should debounce this event handler to prevent excessive calls.

    When to use it: When a UI event fires too frequently without throttling

  33. I'm concerned about the thread safety of this shared mutable state.

    When to use it: When a shared variable is modified without synchronization

  34. This looks like premature optimization — let's keep it simple for now.

    When to use it: When code is over-engineered for performance without evidence of a bottleneck

  35. This optional chaining is getting out of hand — maybe restructure the data model.

    When to use it: When deeply nested optional chaining indicates a design problem

  36. Let's use a builder pattern here to handle all these constructor parameters.

    When to use it: When a constructor has too many parameters making it unwieldy

  37. The complexity of this function exceeds our threshold — let's refactor.

    When to use it: When cyclomatic complexity is too high on a function

  38. This feature flag check should be at the entry point, not deep in the logic.

    When to use it: When a feature flag is checked too deep in the call chain

  39. The retry logic here doesn't have exponential backoff.

    When to use it: When retry mechanisms don't increase wait times between attempts

  40. This string concatenation in a loop is going to be slow — use a string builder.

    When to use it: When strings are concatenated repeatedly inside a loop causing performance issues

  41. This map/filter chain could be simplified with a single reduce.

    When to use it: When multiple array operations could be combined into one

  42. This assertion will fail in production — use a proper validation instead.

    When to use it: When debug assertions are used where production-safe validation is needed

  43. We're leaking implementation details through the public API.

    When to use it: When internal types or structures are exposed in the public interface

  44. This sorting algorithm choice might not be optimal for our data characteristics.

    When to use it: When the sorting approach doesn't match the typical data patterns

  45. We should add rate limiting to this endpoint before it goes live.

    When to use it: When a public-facing endpoint has no protection against abuse

  46. The error boundary here will catch errors from child components too.

    When to use it: When an error boundary's scope is broader than intended

  47. This recursive function needs a maximum depth guard to prevent stack overflow.

    When to use it: When recursion has no depth limit and could crash with deep inputs

  48. I'd suggest adding a circuit breaker for this external service call.

    When to use it: When calls to external services have no fallback mechanism

  49. This is a perfect use case for lazy initialization.

    When to use it: When an expensive object is created eagerly but may not always be needed

  50. This PR addresses the issue, but I think there's a deeper root cause we're missing.

    When to use it: When a fix treats the symptom rather than the underlying problem

  51. Are we logging PII here? That could be a compliance issue.

    When to use it: When personally identifiable information might be written to logs

  52. The observer isn't being removed on deallocation — this will cause issues.

    When to use it: When notification observers or event listeners aren't properly cleaned up

  53. Let's use a factory method instead of this complex constructor.

    When to use it: When object creation logic is complex and should be encapsulated

  54. This loop creates a new database connection on every iteration — that's going to be a performance bottleneck.

    When to use it: Flagging a performance issue where resources are wastefully allocated inside a loop

  55. This user input is being concatenated directly into the SQL query — that's a SQL injection vulnerability.

    When to use it: Flagging a critical security issue where user input is unsafely used in database queries

  56. This optional chain is getting really deep — we should guard against nil earlier in the flow.

    When to use it: Pointing out excessive optional chaining that makes code fragile and hard to read

  57. I notice we're rendering user-submitted HTML without sanitization — that opens us up to XSS attacks.

    When to use it: Flagging a cross-site scripting vulnerability in user content rendering

  58. We should wrap this database transaction in a try-finally block to ensure the connection is always released.

    When to use it: Noting missing resource cleanup in error handling for database operations

  59. This N+1 query inside the loop is going to kill performance — we should batch the database calls.

    When to use it: Identifying a classic N+1 query problem in a data access pattern

  60. A Factory method would clean this up nicely instead of having all these constructor variants scattered around.

    When to use it: Suggesting the Factory pattern to centralize object creation logic

  61. Have we considered what happens when two users try to update the same record simultaneously?

    When to use it: Asking about race condition edge cases in concurrent data access

  62. The test is asserting implementation details rather than behavior — this will break every time we refactor.

    When to use it: Critiquing a test that is too tightly coupled to implementation

  63. This class has too many responsibilities — it handles parsing, validation, and persistence all at once.

    When to use it: Noting a violation of the Single Responsibility Principle

  64. Using string interpolation inside this query makes it vulnerable to injection — please use parameterized queries.

    When to use it: Flagging an injection vulnerability and suggesting the safe alternative

  65. I see a potential race condition here. What happens if two threads access this map concurrently?

    When to use it: Flagging thread safety issues in concurrent code

  66. Is this operation idempotent? If the request is retried, will we end up with duplicate records?

    When to use it: Asking about idempotency when reviewing an API endpoint or data mutation

  67. This N+1 query will be a performance bottleneck once we have more data. Can we use a join or batch fetch?

    When to use it: Identifying an N+1 query problem in database access code

  68. This async/await chain looks good, but we need a cancellation handler for when the user navigates away.

    When to use it: Reviewing async code that should handle task cancellation

  69. The pagination looks correct, but what happens when new items are inserted while the user is scrolling?

    When to use it: Questioning edge cases in a pagination implementation

  70. What is the migration strategy for existing users when we deploy this breaking change?

    When to use it: Asking about backward compatibility and migration plans

  71. Could you add aria-live regions to announce these dynamic content updates to assistive technologies?

    When to use it: Requesting accessibility improvements for dynamic content

  72. This cache has no eviction policy. It will grow unbounded over time and eventually cause memory issues.

    When to use it: Identifying a memory leak risk in a caching implementation

  73. We should use cursor-based pagination instead of offset-based. Offset pagination is unreliable with frequently changing datasets.

    When to use it: Recommending a better pagination approach

  74. This shared mutable state between threads needs a proper synchronization mechanism.

    When to use it: Flagging unsafe concurrent access to shared state

  75. This log message includes user PII. We need to redact or hash sensitive fields before logging.

    When to use it: Flagging privacy concerns in logging statements

  76. This endpoint accepts user input but does not sanitize it. We are vulnerable to injection attacks here.

    When to use it: Flagging a security vulnerability from unsanitized input

  77. This await call is inside a for loop. Can we use Promise.all or TaskGroup to parallelize these requests?

    When to use it: Suggesting parallel execution instead of sequential async calls

  78. This retry logic has no exponential backoff. Rapid retries could overwhelm the downstream service.

    When to use it: Suggesting resilience patterns for network retry logic

  79. We need to handle the case where the API returns a 429 status. Without rate-limit handling, we will keep hammering the server.

    When to use it: Identifying missing rate-limiting response handling

  80. The approach is sound, but I think we should add a database migration script to handle the schema change safely.

    When to use it: Requesting a migration strategy for database changes

  81. This extension adds a lot of methods to a system type. Can we scope these to a custom namespace to avoid collisions?

    When to use it: Suggesting namespacing to avoid conflicts with system extensions

  82. The structured concurrency here is well done. Using a task group keeps the lifetime of child tasks well-scoped.

    When to use it: Praising proper use of structured concurrency patterns

  83. We should add request tracing spans here so we can see where the latency is coming from in the distributed trace.

    When to use it: Requesting better observability with distributed tracing

  84. The pagination cursor should be opaque to the client. Exposing internal IDs leaks implementation details.

    When to use it: Suggesting better API design for pagination cursors

  85. The generic constraint here is too restrictive. Using a protocol conformance instead of a concrete type would make this more flexible.

    When to use it: Suggesting a more flexible generic constraint

  86. We need to make sure this write operation and the subsequent read are within the same transaction to avoid inconsistencies.

    When to use it: Flagging potential data consistency issues without transaction boundaries

  87. This mutation is not atomic. If the process crashes between these two writes, we will have inconsistent state.

    When to use it: Identifying atomicity concerns in data mutation

  88. Can we add a circuit breaker pattern here? If the external service goes down, we should fail fast instead of queuing up requests.

    When to use it: Suggesting resilience pattern for external service calls

  89. Since this API is consumed by mobile clients, we should version it now before it becomes a breaking change later.

    When to use it: Suggesting API versioning for forward compatibility

  90. The actor isolation here prevents data races, but we should verify that the async let does not capture self strongly and cause a retain cycle.

    When to use it: Reviewing actor-based concurrency for memory safety

  91. Have we verified this endpoint is idempotent? The client SDK retries on network timeout, so we could get duplicate calls.

    When to use it: Verifying idempotency for an endpoint with retry logic

  92. The dependency graph here is circular. Module A depends on Module B which depends on Module A. We need to introduce a protocol to break the cycle.

    When to use it: Identifying circular dependency and suggesting a solution

  93. This WHERE clause is building a raw SQL string from user input. We need parameterized queries to prevent SQL injection.

    When to use it: Flagging a SQL injection vulnerability

  94. The Sendable conformance is missing on this struct that crosses actor boundaries. The compiler will flag this in strict concurrency mode.

    When to use it: Noting missing Sendable conformance for actor isolation safety

  95. The offset-based pagination will return wrong results if items are deleted between page requests. Let us handle that edge case.

    When to use it: Identifying a data consistency bug in pagination

  96. This composite index covers three columns, but the query only uses two of them. The third column adds write overhead without benefiting reads.

    When to use it: Optimizing database indexes for actual query patterns

Other everyday developer situations

← English for developers

Guides with more context

Take it to your phone

In the Devlingo app you get 10 new phrases a day, each with real-world context, pronunciation and examples, and the widget shows the phrase of the day on your iPhone Home Screen.

Frequently asked questions

What people ask most about this, answered with the source.

What does nit mean in code review?
Nit (from nitpick) marks a small, style-level comment that does not block approval, e.g. nit: could we rename this variable? More in nit meaning in code review.
How do you suggest a change without sounding rude?
Swap the imperative for a question or a suggestion: Have you considered…?, What if we…?, I'd suggest….
DevlingoLearn tech phrases & speaking
Use without installingGet