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)
Could you add some unit tests for this?
When to use it: Requesting test coverage during code review
Looks good to me. Approved!
When to use it: Approving a pull request after review
Can you rename this variable to something more descriptive?
When to use it: Suggesting a better variable name for clarity
Nice refactoring! The code is much cleaner now.
When to use it: Praising a well-done refactoring effort
What happens if this value is nil?
When to use it: Asking about null safety and edge cases
Let's use a constant instead of this magic number.
When to use it: Suggesting replacing a hardcoded value with a named constant
Please resolve the merge conflicts before I review.
When to use it: Asking the author to fix conflicts before proceeding with review
Have you tested this on older iOS versions?
When to use it: Asking about backward compatibility testing
Can you move this logic to the view model?
When to use it: Asking to separate business logic from the view layer
I left a few minor comments, but overall this is great work.
When to use it: Giving positive feedback with small suggestions
The naming convention here doesn't match the rest of the codebase.
When to use it: Pointing out inconsistent naming style
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
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'
I think we should add unit tests for this logic.
When to use it: Requesting test coverage for new or changed business logic
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
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
Looks good overall, just a few style nits.
When to use it: General approval with minor formatting suggestions
Please remove the commented-out code before merging.
When to use it: When old code is left commented out instead of being deleted
This hardcoded URL should come from the config.
When to use it: When a URL or endpoint is hardcoded instead of being configurable
The commit messages could be more descriptive.
When to use it: When commit messages are vague like 'fix stuff' or 'update'
Did you run the linter before pushing?
When to use it: When code has formatting issues that a linter would catch
I appreciate the thorough test coverage here.
When to use it: Complimenting well-written tests in a code review
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
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
The access modifier on this method should be private.
When to use it: When a method is public but only used internally
This switch statement is missing a default case.
When to use it: When a switch doesn't handle all possible values
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
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
This import is unused — please clean it up.
When to use it: When a module import is no longer needed in the file
Can we move this configuration to environment variables?
When to use it: When config values are hardcoded that should be environment-specific
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
Can we add integration tests for this workflow?
When to use it: When a complex feature path only has unit tests
This comparison should be case-insensitive.
When to use it: When string comparison doesn't account for different casing
The indentation is inconsistent — tabs and spaces are mixed.
When to use it: When code formatting mixes tab and space indentation
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
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
This constant should be uppercase by convention.
When to use it: When a constant uses lowercase naming against coding conventions
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
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
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
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
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
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
LGTM! The separation of concerns here is really clean.
When to use it: Approving a PR that demonstrates good architectural separation
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
Great job adding structured logging. The correlation ID will really help with debugging in production.
When to use it: Praising good observability practices
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
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
Clean implementation! I especially like how you handled the edge cases.
When to use it: Praising thorough handling of edge cases
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
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
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
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
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
Ship it! This is exactly what we discussed in the design review.
When to use it: Enthusiastically approving a well-aligned implementation
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
This logic could be simplified with a guard statement.
When to use it: Suggesting a code simplification using early return
I think we should extract this into a separate function.
When to use it: Suggesting extraction of repeated or complex logic
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
Could you add a comment explaining why this workaround is necessary?
When to use it: Requesting documentation for non-obvious code
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
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
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
This file is getting quite long. Should we split it into smaller modules?
When to use it: Suggesting file decomposition for maintainability
Great use of the builder pattern here. Very clean.
When to use it: Complimenting a well-implemented design pattern
We should add input validation before passing this data to the API.
When to use it: Requesting data validation at the boundary layer
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
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
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
This endpoint is missing input validation.
When to use it: When an API endpoint doesn't validate request parameters
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
Approved with minor comments — nothing blocking.
When to use it: Approving a PR while leaving optional improvement suggestions
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
This magic number should be extracted into a named constant.
When to use it: When a raw number appears in code without explanation
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
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
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
Can you walk me through the thought process behind this design decision?
When to use it: Asking the author to explain their architectural choice
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
Let's not mix refactoring with feature work in the same PR.
When to use it: Requesting separation of concerns in pull requests
Can we use an enum here instead of string comparisons?
When to use it: Suggesting type-safe enums over raw string matching
Could you bump up the test coverage for this module?
When to use it: Requesting more tests for a module that lacks sufficient coverage
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
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
The happy path works, but what about error handling?
When to use it: When code only handles the success case and ignores failures
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
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
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
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
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
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
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
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
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
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
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
The error handling here follows our established patterns nicely.
When to use it: Praising consistent error handling that matches team standards
We should validate the response schema before parsing it.
When to use it: When API response data is used without validating its structure
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
This date formatting should respect the user's locale.
When to use it: When dates are formatted with a hardcoded format string
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
Nice use of generics here — very clean and reusable.
When to use it: Complimenting good use of generic types for reusability
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
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
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
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
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
This fallthrough in the switch is intentional, right?
When to use it: When a switch case falls through without a break or explicit annotation
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
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
This would be cleaner using destructuring assignment.
When to use it: When properties are accessed one by one instead of using destructuring
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
This callback hell can be cleaned up with async/await.
When to use it: When nested callbacks make code difficult to follow
The tests pass but they're not actually asserting anything meaningful.
When to use it: When tests exist but don't verify important behavior
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
This data structure choice is perfect for this use case.
When to use it: Praising a well-chosen data structure for a specific problem
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
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
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
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
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
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
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
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
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
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
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
Could we use dependency injection here instead of directly instantiating the service?
When to use it: Suggesting DI to improve testability and decoupling
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
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
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
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
This protocol has too many requirements. Consider splitting it into smaller, composable protocols.
When to use it: Suggesting protocol decomposition for better design
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
I noticed a potential memory leak here.
When to use it: Flagging a memory management issue in the code
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
I would prefer using a protocol here to make this more testable.
When to use it: Suggesting dependency injection via protocol for better testability
This closure should capture self weakly to avoid a retain cycle.
When to use it: Pointing out a potential retain cycle in a closure
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
Consider using async/await instead of completion handlers for better readability.
When to use it: Suggesting modernization of asynchronous code style
The race condition here could cause intermittent bugs in production.
When to use it: Identifying a concurrency issue that may cause unpredictable behavior
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
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
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
This looks like it could be a race condition.
When to use it: When identifying potential concurrency issues in multithreaded code
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
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
This violates the single responsibility principle.
When to use it: When a class or function is doing too many unrelated things
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
This catch block is swallowing the exception silently.
When to use it: When an error is caught but not logged or re-thrown
This coupling between modules is going to bite us later.
When to use it: Warning about tight coupling that will cause maintenance problems
We should sanitize this user input to prevent SQL injection.
When to use it: Identifying a security vulnerability with unsanitized input
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
I'm not sure this abstraction is earning its keep.
When to use it: When an abstraction layer adds complexity without clear benefit
This is a classic N+1 query problem.
When to use it: When code triggers individual database queries for each item in a collection
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
I would avoid mutating state directly — use a reducer pattern instead.
When to use it: Suggesting immutable state management patterns
I see potential for a memory leak here with this strong reference cycle.
When to use it: When closures or delegates create retain cycles
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
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
This would be a good candidate for the strategy pattern.
When to use it: When suggesting a design pattern to replace conditional logic
The dependency injection here makes this much easier to test.
When to use it: Complimenting good use of dependency injection for testability
I'd recommend wrapping this third-party dependency behind an interface.
When to use it: When external libraries are used directly without abstraction
This would benefit from being wrapped in a transaction.
When to use it: When multiple database operations should be atomic
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
We should debounce this event handler to prevent excessive calls.
When to use it: When a UI event fires too frequently without throttling
I'm concerned about the thread safety of this shared mutable state.
When to use it: When a shared variable is modified without synchronization
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
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
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
The complexity of this function exceeds our threshold — let's refactor.
When to use it: When cyclomatic complexity is too high on a function
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
The retry logic here doesn't have exponential backoff.
When to use it: When retry mechanisms don't increase wait times between attempts
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
This map/filter chain could be simplified with a single reduce.
When to use it: When multiple array operations could be combined into one
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
We're leaking implementation details through the public API.
When to use it: When internal types or structures are exposed in the public interface
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
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
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
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
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
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
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
Are we logging PII here? That could be a compliance issue.
When to use it: When personally identifiable information might be written to logs
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
This shared mutable state between threads needs a proper synchronization mechanism.
When to use it: Flagging unsafe concurrent access to shared state
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
- Daily standup280 phrases
- Pull requests300 phrases
- Bug reports300 phrases
- Meetings300 phrases
- Job interviews300 phrases
- Slack and chat300 phrases
- Email298 phrases
- Technical discussions299 phrases
- Polite phrases300 phrases
- Pair programming300 phrases
- Documentation300 phrases
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.