Inglês para devs · Code review

Frases em inglês para code review

Resposta rápida

Estas são 275 frases em inglês para code review do app Devlingo: sugerir uma mudança, apontar um bug, pedir contexto, elogiar e aprovar. Cada uma vem com tradução, quando usar e áudio. Em revisão o tom importa tanto quanto o conteúdo, então várias são formas educadas de discordar.

Atualizado em

Em comentário de revisão, pergunta soa melhor que ordem: What do you think about…? e Could we…? abrem conversa; nit: marca um detalhe que não bloqueia o merge.

Frases fáceis (70)

  1. Could you add some unit tests for this?

    Você poderia adicionar alguns testes unitários para isso?

    Quando usar: Requesting test coverage during code review

  2. Looks good to me. Approved!

    Parece bom para mim. Aprovado!

    Quando usar: Approving a pull request after review

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

    Você pode renomear essa variável para algo mais descritivo?

    Quando usar: Suggesting a better variable name for clarity

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

    Bela refatoração! O código está muito mais limpo agora.

    Quando usar: Praising a well-done refactoring effort

  5. What happens if this value is nil?

    O que acontece se esse valor for nil?

    Quando usar: Asking about null safety and edge cases

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

    Vamos usar uma constante em vez desse número mágico.

    Quando usar: Suggesting replacing a hardcoded value with a named constant

  7. Please resolve the merge conflicts before I review.

    Por favor, resolva os conflitos de merge antes de eu revisar.

    Quando usar: Asking the author to fix conflicts before proceeding with review

  8. Have you tested this on older iOS versions?

    Você testou isso em versões mais antigas do iOS?

    Quando usar: Asking about backward compatibility testing

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

    Você pode mover essa lógica para o view model?

    Quando usar: Asking to separate business logic from the view layer

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

    Deixei alguns comentários menores, mas no geral é um ótimo trabalho.

    Quando usar: Giving positive feedback with small suggestions

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

    A convenção de nomenclatura aqui não corresponde ao restante do código.

    Quando usar: Pointing out inconsistent naming style

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

    Este caminho de código é inalcançável — devemos removê-lo para manter a base de código limpa.

    Quando usar: When dead code exists that can never be executed

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

    Vamos evitar abreviações nos nomes de variáveis — escreva a palavra completa para maior clareza.

    Quando usar: When variable names use unclear abbreviations like 'usr', 'cnt', 'tmp'

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

    Acho que devemos adicionar testes unitários para essa lógica.

    Quando usar: Requesting test coverage for new or changed business logic

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

    A mensagem de erro aqui não é útil para depuração.

    Quando usar: 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?

    Você poderia adicionar um TODO aqui para lembrarmos de revisitar isso antes do lançamento?

    Quando usar: Marking incomplete or temporary solutions that need future attention

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

    Parece bom no geral, apenas alguns detalhes de estilo.

    Quando usar: General approval with minor formatting suggestions

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

    Por favor, remova o código comentado antes de fazer o merge.

    Quando usar: When old code is left commented out instead of being deleted

  19. This hardcoded URL should come from the config.

    Esta URL fixa deveria vir da configuração.

    Quando usar: When a URL or endpoint is hardcoded instead of being configurable

  20. The commit messages could be more descriptive.

    As mensagens de commit poderiam ser mais descritivas.

    Quando usar: When commit messages are vague like 'fix stuff' or 'update'

  21. Did you run the linter before pushing?

    Você rodou o linter antes de fazer o push?

    Quando usar: When code has formatting issues that a linter would catch

  22. I appreciate the thorough test coverage here.

    Agradeço a cobertura de testes completa aqui.

    Quando usar: Complimenting well-written tests in a code review

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

    A descrição do PR está faltando — pode adicionar contexto sobre o que isso muda?

    Quando usar: 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.

    Esta instrução de log deveria usar um nível de log adequado em vez de print.

    Quando usar: When console.log or print is used instead of a structured logging framework

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

    O modificador de acesso deste método deveria ser privado.

    Quando usar: When a method is public but only used internally

  26. This switch statement is missing a default case.

    Este switch está sem um caso padrão.

    Quando usar: When a switch doesn't handle all possible values

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

    Este condicional poderia ser simplificado com uma expressão ternária.

    Quando usar: 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?

    Você pode adicionar o número do ticket ao título do PR para rastreabilidade?

    Quando usar: When a PR doesn't reference the associated Jira/Linear ticket

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

    Este import não é usado — por favor, remova.

    Quando usar: When a module import is no longer needed in the file

  30. Can we move this configuration to environment variables?

    Podemos mover esta configuração para variáveis de ambiente?

    Quando usar: When config values are hardcoded that should be environment-specific

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

    Este arquivo ficou grande demais — vamos dividi-lo.

    Quando usar: When a single file contains too many classes or too much code

  32. Can we add integration tests for this workflow?

    Podemos adicionar testes de integração para este fluxo?

    Quando usar: When a complex feature path only has unit tests

  33. This comparison should be case-insensitive.

    Esta comparação deveria ser insensível a maiúsculas e minúsculas.

    Quando usar: When string comparison doesn't account for different casing

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

    A indentação está inconsistente — tabs e espaços estão misturados.

    Quando usar: When code formatting mixes tab and space indentation

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

    Este texto placeholder foi deixado — deve ser substituído por conteúdo real.

    Quando usar: When Lorem Ipsum or test data is accidentally left in production code

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

    O espaçamento e formatação aqui não correspondem ao nosso guia de estilo.

    Quando usar: When code formatting deviates from the team's style conventions

  37. This constant should be uppercase by convention.

    Esta constante deveria ser em maiúsculas por convenção.

    Quando usar: 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.

    A indentacao esta inconsistente neste bloco — algumas linhas usam tabs e outras usam espacos.

    Quando usar: Noting coding style inconsistency in whitespace usage

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

    O corpo da resposta deveria usar camelCase para ser consistente com o restante da nossa API.

    Quando usar: 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'?

    O nome da variavel 'data' e muito generico — podemos renomea-la para algo mais descritivo como 'userProfiles'?

    Quando usar: Suggesting better naming for improved code readability

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

    Boa sacada na condicao de limite — mas e quanto a numeros negativos?

    Quando usar: 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.

    O espacamento e formatacao neste arquivo estao inconsistentes — vamos rodar o linter antes de fazer merge.

    Quando usar: 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.

    Este modulo inteiro se beneficiaria de um README abrangente explicando a arquitetura e o fluxo de dados.

    Quando usar: Requesting high-level documentation for a complex module to help future developers

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

    LGTM! A separação de responsabilidades aqui está realmente limpa.

    Quando usar: Approving a PR that demonstrates good architectural separation

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

    Bom uso de genéricos aqui. Isso torna o componente muito mais reutilizável.

    Quando usar: 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.

    Ótimo trabalho adicionando logging estruturado. O ID de correlação vai realmente ajudar na depuração em produção.

    Quando usar: Praising good observability practices

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

    Aprovado! Este é um refator sólido. Os testes me dão confiança de que nada está quebrado.

    Quando usar: 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.

    Gostei do trade-off que você escolheu aqui. Um pouco mais de código, mas muito mais fácil de testar e manter.

    Quando usar: Acknowledging a thoughtful design decision

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

    Implementação limpa! Gostei especialmente de como você tratou os casos de borda.

    Quando usar: Praising thorough handling of edge cases

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

    Podemos adicionar um comentário explicando por que escolhemos esta abordagem em vez da alternativa mais simples?

    Quando usar: Requesting documentation for a non-obvious design decision

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

    Está bom para mim. Só uma observação pequena: esse nome de variável poderia ser mais descritivo.

    Quando usar: Approving with a small naming suggestion

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

    Adorei o uso de retornos antecipados aqui. Torna o caminho feliz muito mais fácil de seguir.

    Quando usar: 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.

    Excelente cobertura de testes neste módulo. Esses testes vão nos poupar muita depuração de regressão depois.

    Quando usar: Praising comprehensive test coverage

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

    Isso parece uma feature flag que ficou para trás. Podemos verificar se ainda é necessária?

    Quando usar: Identifying potentially stale feature flag code

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

    Manda ver! Isso é exatamente o que discutimos na revisão de design.

    Quando usar: Enthusiastically approving a well-aligned implementation

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

    Essa configuração está hardcoded. Podemos movê-la para uma variável de ambiente ou arquivo de configuração?

    Quando usar: Suggesting externalization of configuration values

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

    As mensagens de erro estão sendo mostradas ao usuário apenas em inglês. Estas deveriam ser localizadas.

    Quando usar: Noting missing localization in error handling

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

    Boa sacada adicionar o timeout. Sem ele, uma chamada lenta downstream poderia travar toda a requisição.

    Quando usar: 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.

    Devemos adicionar uma contagem total na resposta paginada para que o cliente saiba quantas páginas existem.

    Quando usar: Requesting metadata in a pagination response

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

    Agradeço a documentação que você adicionou aqui. Vai ajudar a próxima pessoa que mexer neste código.

    Quando usar: Praising good inline documentation

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

    Por que estamos usando um literal de string aqui em vez da constante que definimos no módulo de configuração?

    Quando usar: 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.

    Bom trabalho extraindo isso para um componente compartilhado. Estava duplicado em quatro lugares antes.

    Quando usar: 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.

    O tamanho da página deveria ser configurável em vez de hardcoded como 50. Diferentes clientes podem precisar de tamanhos diferentes.

    Quando usar: Suggesting configurable pagination parameters

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

    A nomenclatura está muito melhor nesta versão. Agora se lê quase como linguagem natural.

    Quando usar: 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.

    Acho que podemos simplificar isso usando uma cadeia de map e filter em vez do for loop manual.

    Quando usar: 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.

    Trabalho sólido no geral. Minha única sugestão seria adicionar testes de integração cobrindo o caminho feliz e o principal cenário de falha.

    Quando usar: 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.

    Aprovando com uma sugestão: vamos adicionar um comentário de documentação explicando quando este método deve e não deve ser chamado.

    Quando usar: 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?

    Os testes unitários são ótimos, mas todos testam o mesmo caminho feliz. Podemos adicionar testes para os casos de erro e borda?

    Quando usar: Requesting broader test coverage beyond happy path

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

    Esta é uma solução realmente elegante. Aprendi algo novo revisando este PR.

    Quando usar: 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.

    No geral este é um PR bem estruturado. Deixei algumas sugestões menores mas nada bloqueante. Aprovado.

    Quando usar: Giving a final approving summary with minor non-blocking suggestions

Frases intermediárias (109)

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

    Essa lógica poderia ser simplificada com uma instrução guard.

    Quando usar: Suggesting a code simplification using early return

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

    Acho que deveríamos extrair isso para uma função separada.

    Quando usar: Suggesting extraction of repeated or complex logic

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

    Essa função está fazendo muitas coisas. Podemos dividi-la?

    Quando usar: Pointing out a violation of the single responsibility principle

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

    Você poderia adicionar um comentário explicando por que essa solução alternativa é necessária?

    Quando usar: Requesting documentation for non-obvious code

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

    Esse tratamento de erro é muito genérico. Deveríamos capturar erros específicos.

    Quando usar: Suggesting more precise error handling instead of a catch-all

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

    Há algum motivo para você ter escolhido uma classe em vez de uma struct aqui?

    Quando usar: 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?

    Vejo código duplicado entre esses dois arquivos. Podemos criar um utilitário compartilhado?

    Quando usar: Identifying code duplication and suggesting DRY improvement

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

    Esse arquivo está ficando bem longo. Deveríamos dividi-lo em módulos menores?

    Quando usar: Suggesting file decomposition for maintainability

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

    Ótimo uso do padrão builder aqui. Muito limpo.

    Quando usar: Complimenting a well-implemented design pattern

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

    Deveríamos adicionar validação de entrada antes de enviar esses dados para a API.

    Quando usar: Requesting data validation at the boundary layer

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

    Você pode adicionar um comentário explicando por que esse caso especial é tratado de forma diferente?

    Quando usar: 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.

    Acho que código autodocumentado seria melhor aqui do que adicionar comentários.

    Quando usar: Suggesting that clear naming and structure are preferable to explanatory comments

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

    Vamos definir tipos de erro personalizados em vez de lançar exceções genéricas.

    Quando usar: When error handling uses generic errors instead of domain-specific ones

  14. This endpoint is missing input validation.

    Este endpoint está sem validação de entrada.

    Quando usar: When an API endpoint doesn't validate request parameters

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

    Este PR é muito grande — podemos dividir em mudanças menores e focadas?

    Quando usar: When a pull request touches too many files and is hard to review

  16. Approved with minor comments — nothing blocking.

    Aprovado com comentários menores — nada bloqueante.

    Quando usar: Approving a PR while leaving optional improvement suggestions

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

    Deveríamos usar um enum aqui em vez de passar strings literais soltas.

    Quando usar: 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.

    Este número mágico deveria ser extraído para uma constante nomeada.

    Quando usar: 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.

    Isso deveria ser carregado de forma lazy — não há necessidade de inicializar até que seja realmente usado.

    Quando usar: 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.

    Eu recomendaria adicionar cláusulas guard no início para falhar rapidamente com entrada inválida.

    Quando usar: Suggesting defensive programming with early validation

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

    Precisamos adicionar testes especificamente para os casos extremos — entrada vazia, valores limítrofes e timeouts.

    Quando usar: When test coverage exists but doesn't cover critical edge cases

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

    Você pode me explicar o raciocínio por trás dessa decisão de design?

    Quando usar: Asking the author to explain their architectural choice

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

    Deixei alguns comentários mas nada que deva bloquear o merge.

    Quando usar: Indicating that review feedback is optional and PR can proceed

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

    Vamos não misturar refatoração com trabalho de feature no mesmo PR.

    Quando usar: Requesting separation of concerns in pull requests

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

    Podemos usar um enum aqui em vez de comparações de strings?

    Quando usar: Suggesting type-safe enums over raw string matching

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

    Você poderia aumentar a cobertura de testes deste módulo?

    Quando usar: Requesting more tests for a module that lacks sufficient coverage

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

    Existe algum motivo para não estarmos usando o utilitário existente para isso?

    Quando usar: When someone writes custom code for something that already exists in the codebase

  28. This timeout value seems too aggressive for production.

    Este valor de timeout parece muito agressivo para produção.

    Quando usar: When a network or operation timeout is set too low for real-world conditions

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

    O caminho feliz funciona, mas e o tratamento de erros?

    Quando usar: When code only handles the success case and ignores failures

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

    Precisamos pensar em como isso escala com um grande conjunto de dados.

    Quando usar: 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.

    Esta é uma mudança quebra-compatibilidade — precisamos coordenar com o time mobile.

    Quando usar: 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.

    Acho que devemos tratar o caso em que a API retorna um 429.

    Quando usar: When rate limiting from external APIs isn't handled

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

    Este regex é ilegível — podemos adicionar um comentário ou dividi-lo?

    Quando usar: When a complex regular expression has no documentation

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

    Devemos adicionar um índice nesta coluna para acelerar a consulta.

    Quando usar: When a database query is slow due to missing indexes

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

    Esta resposta de API deveria ser armazenada em cache para reduzir chamadas de rede desnecessárias.

    Quando usar: 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.

    Vamos garantir que não estamos expondo dados sensíveis nessa resposta.

    Quando usar: When reviewing API responses that might leak private information

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

    Podemos evitar o force unwrap aqui? É um crash esperando para acontecer.

    Quando usar: 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?

    Podemos adicionar uma cláusula guard no topo em vez de envolver tudo em um if?

    Quando usar: Suggesting guard-style early exit over deep nesting

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

    Boa sacada tratando esse caso especial — eu não teria pensado nisso.

    Quando usar: Praising a developer for anticipating an unusual scenario

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

    Isso ficaria melhor como uma propriedade computada em vez de um método.

    Quando usar: When a no-argument method that returns a value could be a property

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

    O tratamento de erros aqui segue bem nossos padrões estabelecidos.

    Quando usar: Praising consistent error handling that matches team standards

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

    Devemos validar o esquema da resposta antes de processá-la.

    Quando usar: When API response data is used without validating its structure

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

    Eu preferiria ver uma anotação de tipo explícita aqui para legibilidade.

    Quando usar: When type inference makes the code harder to understand at a glance

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

    Esta formatação de data deveria respeitar a localização do usuário.

    Quando usar: When dates are formatted with a hardcoded format string

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

    Considere usar um protocolo aqui para tornar isso mais flexível.

    Quando usar: When concrete types are used where protocols/interfaces would be better

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

    Bom uso de generics aqui — muito limpo e reutilizável.

    Quando usar: Complimenting good use of generic types for reusability

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

    Devemos discutir esta decisão arquitetural em um documento de design primeiro.

    Quando usar: 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.

    Precisamos tratar o estado de carregamento na UI enquanto esta requisição está em andamento.

    Quando usar: When async operations don't show loading indicators to the user

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

    Esta implementação de paginação não trata a última página corretamente.

    Quando usar: When pagination logic has edge cases around the final page of results

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

    O contrato da API mudou mas a documentação não foi atualizada.

    Quando usar: When API docs are out of sync with the actual implementation

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

    Poderíamos usar um tipo de exceção mais específico aqui?

    Quando usar: When a generic Exception is thrown instead of a domain-specific one

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

    Este fallthrough no switch é intencional, certo?

    Quando usar: 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.

    Eu adicionaria um timeout a esta requisição de rede para evitar ficar pendurado indefinidamente.

    Quando usar: When a network call has no timeout configured

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

    Isso é super-engenheirado para o que precisamos agora.

    Quando usar: When a solution is more complex than what the current requirements demand

  55. This would be cleaner using destructuring assignment.

    Isso ficaria mais limpo usando desestruturação.

    Quando usar: When properties are accessed one by one instead of using destructuring

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

    A assinatura do método mudou mas os chamadores não foram atualizados.

    Quando usar: When a function's parameters change but all call sites aren't fixed

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

    Esse callback hell pode ser limpo com async/await.

    Quando usar: When nested callbacks make code difficult to follow

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

    Os testes passam mas não estão verificando nada significativo.

    Quando usar: When tests exist but don't verify important behavior

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

    Por favor, faça squash nesses commits antes de fazer o merge para manter o histórico limpo.

    Quando usar: When a PR has too many small/messy commits that should be combined

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

    Esta escolha de estrutura de dados é perfeita para este caso de uso.

    Quando usar: Praising a well-chosen data structure for a specific problem

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

    Este endpoint retorna dados demais — podemos paginar a resposta?

    Quando usar: 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?

    Essa mudanca vai quebrar a compatibilidade retroativa com clientes de API mais antigos?

    Quando usar: 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.

    Deveriamos adicionar comentarios JSDoc a essa API publica para que os consumidores saibam o que cada parametro espera.

    Quando usar: Requesting documentation for a public-facing API function

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

    Este bloco catch engole a excecao silenciosamente — no minimo deveriamos registra-la em log.

    Quando usar: 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.

    Em vez desses blocos if-else aninhados, uma clausula guard no topo deixaria isso muito mais limpo.

    Quando usar: 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.

    Esse force unwrap pode crashar em producao — vamos usar optional binding com um fallback em vez disso.

    Quando usar: 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.

    Poderiamos simplificar isso usando uma cadeia de map e filter em vez do for loop manual com condicionais.

    Quando usar: Suggesting functional programming approach over imperative looping

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

    Vamos adicionar um limitador de taxa a esse endpoint para prevenir abuso.

    Quando usar: 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?

    Essa função está fazendo muitas coisas. Podemos dividi-la em helpers menores e mais focados?

    Quando usar: Requesting changes when a function has grown too complex

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

    Devemos adicionar validação de entrada antes de passar esses dados para a camada de serviço.

    Quando usar: 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.

    O erro está sendo engolido aqui. Deveríamos pelo menos registrá-lo antes de retornar um valor padrão.

    Quando usar: Noting that error information is being silently discarded

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

    Poderíamos usar injeção de dependência aqui em vez de instanciar o serviço diretamente?

    Quando usar: 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?

    Essa feature flag está habilitada há três meses. Devemos limpar o caminho de código morto?

    Quando usar: 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.

    Consideramos cachear essa resposta da API? Ela raramente muda e a chamamos em cada carregamento de página.

    Quando usar: 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.

    A carga cognitiva deste método é bastante alta. Tive que relê-lo várias vezes para entender o fluxo.

    Quando usar: 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.

    Esses rótulos de botão não são acessíveis. Leitores de tela vão ler apenas "botão" sem nenhum contexto.

    Quando usar: Flagging accessibility issues in UI code

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

    Este protocolo tem muitos requisitos. Considere dividi-lo em protocolos menores e composáveis.

    Quando usar: 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.

    Está faltando propagação de erros adequada aqui. O chamador não tem como saber por que a operação falhou.

    Quando usar: 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.

    A UI está ótima, mas a relação de contraste de cores não atende os padrões WCAG AA para texto do corpo.

    Quando usar: Flagging accessibility color contrast issue

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

    Esta consulta está sem um índice. Sem ele, faremos uma varredura completa da tabela em cada requisição.

    Quando usar: Identifying missing database index for performance

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

    Eu preferiria que usássemos um protocolo aqui para que possamos trocar a implementação nos testes.

    Quando usar: Suggesting abstraction for better testability

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

    Em vez de retornar null aqui, podemos usar o tipo Result para tornar o caso de erro explícito?

    Quando usar: 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.

    A lógica de negócios está vazando para a camada de view. Vamos mover esse cálculo para o view model.

    Quando usar: Identifying violation of separation of concerns

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

    Considere usar um type alias aqui para melhorar a legibilidade dessa assinatura genérica complexa.

    Quando usar: 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?

    O aninhamento profundo torna isso difícil de entender. Podemos achatar com guard clauses ou extrair métodos?

    Quando usar: 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.

    Notei que a ordem de foco desses campos de formulário não corresponde ao layout visual. Isso vai confundir usuários de teclado.

    Quando usar: 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?

    Por que estamos criando uma nova conexão de banco de dados para cada requisição em vez de usar um pool de conexões?

    Quando usar: 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.

    Estou preocupado com o acoplamento entre esses dois módulos. Eles não deveriam precisar conhecer os internos um do outro.

    Quando usar: Raising concerns about tight coupling between modules

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

    Este bloco catch é muito abrangente. Devemos tratar tipos de erro específicos em vez de capturar tudo.

    Quando usar: Requesting more granular error handling

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

    A camada de dados não deveria conhecer UIKit. Este import cria uma dependência desnecessária do framework de UI.

    Quando usar: Flagging an architecture boundary violation

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

    Esta é uma boa abstração, mas certifique-se de que não se torne uma abstração furada conforme os requisitos evoluem.

    Quando usar: Cautioning about abstraction sustainability

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

    Não estamos validando o formato do email antes de salvar no banco de dados. Isso pode levar a dados corrompidos.

    Quando usar: 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.

    O nível de log aqui deveria ser warn, não info. Queremos ser alertados se esse caminho de código for atingido em produção.

    Quando usar: 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.

    Este é um ótimo exemplo de composição sobre herança. A flexibilidade que isso proporciona vale o código um pouco mais verboso.

    Quando usar: 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?

    Vejo que estamos usando force unwrap aqui. Podemos usar guard let ou optional binding para tratar o caso nil de forma elegante?

    Quando usar: 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?

    Esta feature flag está sendo verificada na view, no view model e no serviço. Podemos centralizar a verificação em um único lugar?

    Quando usar: 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.

    O texto alternativo da imagem está faltando nessas miniaturas de produto. Usuários com deficiência visual não saberão o que mostram.

    Quando usar: 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.

    Precisamos adicionar métricas em torno desta operação para que possamos configurar alertas se a latência degradar.

    Quando usar: Requesting monitoring and alerting instrumentation

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

    Este SELECT * deveria ser substituído por nomes de colunas explícitos. Vai quebrar se alguém adicionar uma coluna depois.

    Quando usar: Flagging fragile SQL query pattern

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

    Se cachearmos isso, também precisamos pensar sobre invalidação de cache. Quando esses dados ficam obsoletos?

    Quando usar: 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.

    Este view controller tem mais de 500 linhas. Devemos extrair os métodos de data source da table view em uma classe separada.

    Quando usar: 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.

    Este switch statement deveria ter uma verificação exaustiva. Adicionar um case default esconde o aviso do compilador quando novos valores de enum são adicionados.

    Quando usar: 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.

    Eu adicionaria um TTL a esta entrada de cache. Dados de configuração obsoletos podem causar comportamento inesperado em produção.

    Quando usar: 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.

    Usar uma propriedade computada aqui em vez de uma armazenada evitaria totalmente o problema de dados obsoletos.

    Quando usar: 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.

    Esta closure está capturando self fortemente e pode causar um vazamento de memória. Considere usar [weak self] aqui.

    Quando usar: 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.

    Acho que o trade-off aqui pende demais para performance em detrimento da legibilidade. Este código será difícil de manter.

    Quando usar: 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.

    As instruções de log de debug estão boas para desenvolvimento, mas devemos protegê-las com uma verificação de nível de log para evitar overhead em produção.

    Quando usar: 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.

    A navegação por teclado deste modal está quebrada. Usuários não conseguem navegar com Tab até o botão de fechar ou pressionar Escape para dispensá-lo.

    Quando usar: 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.

    A abordagem de degradação elegante aqui está perfeita. Se o serviço de terceiros estiver indisponível, o usuário ainda tem uma experiência utilizável.

    Quando usar: Praising resilient design that handles service failures gracefully

Frases avançadas (96)

  1. I noticed a potential memory leak here.

    Notei um possível vazamento de memória aqui.

    Quando usar: Flagging a memory management issue in the code

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

    Essa abordagem não vai escalar bem. Você considerou usar um dicionário?

    Quando usar: Raising scalability concerns and suggesting an alternative data structure

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

    Eu preferiria usar um protocolo aqui para tornar isso mais testável.

    Quando usar: Suggesting dependency injection via protocol for better testability

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

    Essa closure deveria capturar self de forma fraca para evitar um ciclo de retenção.

    Quando usar: 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.

    Essa chamada de API deveria estar em uma thread de fundo para não bloquear a thread principal.

    Quando usar: Flagging a threading issue with network calls

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

    Considere usar async/await em vez de completion handlers para melhor legibilidade.

    Quando usar: Suggesting modernization of asynchronous code style

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

    A condição de corrida aqui pode causar bugs intermitentes em produção.

    Quando usar: 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.

    As implicações de performance de usar filter seguido de map aqui valem a pena considerar. Um único compactMap seria mais eficiente.

    Quando usar: 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?

    Esse force unwrap vai causar crash no app se o valor for nil. Você pode tratar o optional de forma segura?

    Quando usar: 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?

    A complexidade ciclomática desta função está muito alta — podemos simplificar as ramificações?

    Quando usar: 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.

    Isso parece que pode ser uma condição de corrida.

    Quando usar: When identifying potential concurrency issues in multithreaded code

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

    Isso viola o princípio DRY — a mesma lógica existe no serviço de usuário.

    Quando usar: When duplicate code is found across different parts of the codebase

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

    Você considerou as implicações de desempenho dessa consulta dentro de um loop?

    Quando usar: When a database query or API call is made inside a loop, causing N+1 issues

  14. This violates the single responsibility principle.

    Isso viola o princípio da responsabilidade única.

    Quando usar: 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.

    Eu sugeriria usar uma abordagem mais defensiva aqui com limites de erro adequados.

    Quando usar: Recommending safer error handling patterns in critical code paths

  16. This catch block is swallowing the exception silently.

    Este bloco catch está engolindo a exceção silenciosamente.

    Quando usar: When an error is caught but not logged or re-thrown

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

    Esse acoplamento entre módulos vai nos dar problemas depois.

    Quando usar: Warning about tight coupling that will cause maintenance problems

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

    Devemos sanitizar essa entrada do usuário para prevenir injeção SQL.

    Quando usar: Identifying a security vulnerability with unsanitized input

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

    Isso precisa de um script de migração para a mudança no esquema do banco de dados.

    Quando usar: When a DB schema change is made without a corresponding migration

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

    Não tenho certeza se essa abstração se justifica.

    Quando usar: When an abstraction layer adds complexity without clear benefit

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

    Este é um problema clássico de consulta N+1.

    Quando usar: When code triggers individual database queries for each item in a collection

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

    Este teste está testando detalhes de implementação em vez de comportamento.

    Quando usar: 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.

    Eu evitaria mutar o estado diretamente — use um padrão reducer.

    Quando usar: Suggesting immutable state management patterns

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

    Vejo potencial para um vazamento de memória aqui com esse ciclo de referência forte.

    Quando usar: When closures or delegates create retain cycles

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

    Este parâmetro booleano é um code smell — considere usar métodos separados.

    Quando usar: When a function takes a boolean that toggles different behavior

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

    A asserção de tipo aqui não é segura — podemos usar uma verificação de tipo em vez disso?

    Quando usar: When a forced type cast could crash at runtime

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

    Isso seria um bom candidato para o padrão strategy.

    Quando usar: When suggesting a design pattern to replace conditional logic

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

    A injeção de dependência aqui torna isso muito mais fácil de testar.

    Quando usar: Complimenting good use of dependency injection for testability

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

    Eu recomendaria encapsular essa dependência de terceiros atrás de uma interface.

    Quando usar: When external libraries are used directly without abstraction

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

    Isso se beneficiaria de ser envolvido em uma transação.

    Quando usar: When multiple database operations should be atomic

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

    Você considerou usar o padrão strategy aqui para tornar isso mais extensível?

    Quando usar: Suggesting a design pattern to improve code flexibility and maintainability

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

    Devemos aplicar debounce neste manipulador de eventos para evitar chamadas excessivas.

    Quando usar: When a UI event fires too frequently without throttling

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

    Estou preocupado com a segurança de thread desse estado mutável compartilhado.

    Quando usar: When a shared variable is modified without synchronization

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

    Isso parece otimização prematura — vamos manter simples por enquanto.

    Quando usar: 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.

    Este encadeamento de opcionais está saindo do controle — talvez reestruturar o modelo de dados.

    Quando usar: When deeply nested optional chaining indicates a design problem

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

    Vamos usar um padrão builder aqui para lidar com todos esses parâmetros do construtor.

    Quando usar: When a constructor has too many parameters making it unwieldy

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

    A complexidade desta função excede nosso limite — vamos refatorar.

    Quando usar: 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.

    Esta verificação de feature flag deveria estar no ponto de entrada, não no fundo da lógica.

    Quando usar: When a feature flag is checked too deep in the call chain

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

    A lógica de retry aqui não tem backoff exponencial.

    Quando usar: 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.

    Esta concatenação de string em um loop vai ser lenta — use um string builder.

    Quando usar: When strings are concatenated repeatedly inside a loop causing performance issues

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

    Esta cadeia de map/filter poderia ser simplificada com um único reduce.

    Quando usar: When multiple array operations could be combined into one

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

    Esta asserção vai falhar em produção — use uma validação adequada.

    Quando usar: When debug assertions are used where production-safe validation is needed

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

    Estamos vazando detalhes de implementação pela API pública.

    Quando usar: When internal types or structures are exposed in the public interface

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

    Esta escolha de algoritmo de ordenação pode não ser ótima para as características dos nossos dados.

    Quando usar: When the sorting approach doesn't match the typical data patterns

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

    Devemos adicionar limitação de taxa a este endpoint antes de ir ao ar.

    Quando usar: When a public-facing endpoint has no protection against abuse

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

    O limite de erro aqui vai capturar erros dos componentes filhos também.

    Quando usar: When an error boundary's scope is broader than intended

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

    Esta função recursiva precisa de um limite de profundidade para evitar stack overflow.

    Quando usar: 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.

    Eu sugeriria adicionar um circuit breaker para esta chamada de serviço externo.

    Quando usar: When calls to external services have no fallback mechanism

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

    Este é um caso de uso perfeito para inicialização lazy.

    Quando usar: 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.

    Este PR resolve o problema, mas acho que há uma causa raiz mais profunda que estamos ignorando.

    Quando usar: When a fix treats the symptom rather than the underlying problem

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

    Estamos logando dados pessoais aqui? Isso pode ser um problema de conformidade.

    Quando usar: When personally identifiable information might be written to logs

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

    O observador não está sendo removido na desalocação — isso vai causar problemas.

    Quando usar: When notification observers or event listeners aren't properly cleaned up

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

    Vamos usar um método factory em vez desse construtor complexo.

    Quando usar: 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.

    Este loop cria uma nova conexao com o banco de dados em cada iteracao — isso vai ser um gargalo de desempenho.

    Quando usar: 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.

    Esta entrada do usuario esta sendo concatenada diretamente na consulta SQL — isso e uma vulnerabilidade de SQL injection.

    Quando usar: 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.

    Essa cadeia de opcionais esta ficando muito profunda — deveriamos verificar nil mais cedo no fluxo.

    Quando usar: 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.

    Percebi que estamos renderizando HTML enviado pelo usuario sem sanitizacao — isso nos expoe a ataques XSS.

    Quando usar: 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.

    Deveriamos envolver essa transacao de banco de dados em um bloco try-finally para garantir que a conexao seja sempre liberada.

    Quando usar: 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.

    Essa consulta N+1 dentro do loop vai destruir o desempenho — deveriamos agrupar as chamadas ao banco de dados.

    Quando usar: 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.

    Um metodo Factory limparia isso bem em vez de ter todas essas variantes de construtor espalhadas.

    Quando usar: 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?

    Consideramos o que acontece quando dois usuarios tentam atualizar o mesmo registro simultaneamente?

    Quando usar: 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.

    O teste esta verificando detalhes de implementacao em vez do comportamento — isso vai quebrar toda vez que refatorarmos.

    Quando usar: 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.

    Essa classe tem responsabilidades demais — ela lida com parsing, validacao e persistencia tudo de uma vez.

    Quando usar: Noting a violation of the Single Responsibility Principle

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

    Usar interpolacao de string dentro dessa consulta a torna vulneravel a injecao — por favor, use consultas parametrizadas.

    Quando usar: 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?

    Vejo uma potencial condição de corrida aqui. O que acontece se duas threads acessarem este mapa concorrentemente?

    Quando usar: Flagging thread safety issues in concurrent code

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

    Essa operação é idempotente? Se a requisição for repetida, vamos acabar com registros duplicados?

    Quando usar: 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?

    Essa consulta N+1 será um gargalo de desempenho quando tivermos mais dados. Podemos usar um join ou busca em lote?

    Quando usar: 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.

    Essa cadeia de async/await parece boa, mas precisamos de um handler de cancelamento para quando o usuário navegar para fora.

    Quando usar: 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?

    A paginação parece correta, mas o que acontece quando novos itens são inseridos enquanto o usuário está rolando?

    Quando usar: Questioning edge cases in a pagination implementation

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

    Qual é a estratégia de migração para usuários existentes quando implantarmos essa mudança incompatível?

    Quando usar: Asking about backward compatibility and migration plans

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

    Você poderia adicionar regiões aria-live para anunciar essas atualizações de conteúdo dinâmico para tecnologias assistivas?

    Quando usar: Requesting accessibility improvements for dynamic content

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

    Este cache não tem política de evicção. Ele crescerá sem limites ao longo do tempo e eventualmente causará problemas de memória.

    Quando usar: 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.

    Devemos usar paginação baseada em cursor em vez de offset. Paginação por offset é não confiável com conjuntos de dados que mudam frequentemente.

    Quando usar: Recommending a better pagination approach

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

    Este estado mutável compartilhado entre threads precisa de um mecanismo de sincronização adequado.

    Quando usar: Flagging unsafe concurrent access to shared state

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

    Esta mensagem de log inclui PII do usuário. Precisamos redigir ou hashear campos sensíveis antes de logar.

    Quando usar: Flagging privacy concerns in logging statements

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

    Este endpoint aceita entrada do usuário mas não a sanitiza. Estamos vulneráveis a ataques de injeção aqui.

    Quando usar: 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?

    Essa chamada await está dentro de um for loop. Podemos usar Promise.all ou TaskGroup para paralelizar essas requisições?

    Quando usar: Suggesting parallel execution instead of sequential async calls

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

    Esta lógica de retry não tem backoff exponencial. Retries rápidos podem sobrecarregar o serviço downstream.

    Quando usar: 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.

    Precisamos tratar o caso em que a API retorna status 429. Sem tratamento de rate limit, vamos continuar martelando o servidor.

    Quando usar: 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.

    A abordagem é sólida, mas acho que devemos adicionar um script de migração de banco de dados para lidar com a mudança de schema de forma segura.

    Quando usar: 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?

    Esta extensão adiciona muitos métodos a um tipo do sistema. Podemos escopá-los em um namespace personalizado para evitar colisões?

    Quando usar: 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.

    A concorrência estruturada aqui está bem feita. Usar um task group mantém o tempo de vida das tarefas filhas bem delimitado.

    Quando usar: 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.

    Devemos adicionar spans de rastreamento de requisição aqui para que possamos ver de onde vem a latência no trace distribuído.

    Quando usar: Requesting better observability with distributed tracing

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

    O cursor de paginação deveria ser opaco para o cliente. Expor IDs internos vaza detalhes de implementação.

    Quando usar: 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.

    A restrição genérica aqui é muito restritiva. Usar conformidade de protocolo em vez de um tipo concreto tornaria isso mais flexível.

    Quando usar: 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.

    Precisamos garantir que esta operação de escrita e a leitura subsequente estejam na mesma transação para evitar inconsistências.

    Quando usar: 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.

    Esta mutação não é atômica. Se o processo travar entre essas duas escritas, teremos estado inconsistente.

    Quando usar: 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.

    Podemos adicionar um padrão circuit breaker aqui? Se o serviço externo cair, devemos falhar rápido em vez de enfileirar requisições.

    Quando usar: 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.

    Como esta API é consumida por clientes mobile, devemos versioná-la agora antes que se torne uma mudança incompatível depois.

    Quando usar: 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.

    A isolação de actor aqui previne data races, mas devemos verificar que o async let não captura self fortemente e causa um ciclo de retenção.

    Quando usar: 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.

    Verificamos se este endpoint é idempotente? O SDK do cliente faz retry em timeout de rede, então podemos receber chamadas duplicadas.

    Quando usar: 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.

    O grafo de dependências aqui é circular. Módulo A depende do Módulo B que depende do Módulo A. Precisamos introduzir um protocolo para quebrar o ciclo.

    Quando usar: 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.

    Esta cláusula WHERE está construindo uma string SQL bruta a partir da entrada do usuário. Precisamos de consultas parametrizadas para prevenir injeção SQL.

    Quando usar: 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.

    A conformidade com Sendable está faltando nesta struct que cruza fronteiras de actor. O compilador vai sinalizar isso no modo de concorrência estrita.

    Quando usar: 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.

    A paginação baseada em offset retornará resultados errados se itens forem deletados entre requisições de página. Vamos tratar esse caso de borda.

    Quando usar: 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.

    Este índice composto cobre três colunas, mas a consulta usa apenas duas delas. A terceira coluna adiciona overhead de escrita sem beneficiar as leituras.

    Quando usar: Optimizing database indexes for actual query patterns

Outras situações do dia a dia de dev

← Inglês para devs

Guias com mais contexto

Leve para o celular

No app Devlingo você recebe 10 frases novas por dia, cada uma com contexto real, pronúncia e exemplos, e o widget mostra a frase do dia na Tela de Início do iPhone.

Perguntas frequentes

O que mais perguntam sobre o assunto, respondido com a fonte.

O que significa nit em code review?
Nit (de nitpick) marca um comentário pequeno, de estilo, que não impede a aprovação. Ex.: nit: could we rename this variable?
Como sugerir uma mudança sem ser grosso em inglês?
Troque o imperativo por pergunta ou sugestão: Have you considered…?, What if we…?, I'd suggest….
DevlingoFrases técnicas e fluência
Usar sem baixarBaixar