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)
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
Looks good to me. Approved!
Parece bom para mim. Aprovado!
Quando usar: Approving a pull request after review
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
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
What happens if this value is nil?
O que acontece se esse valor for nil?
Quando usar: Asking about null safety and edge cases
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
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
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
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
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
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
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
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'
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
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
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
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
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
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
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'
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Approved with minor comments — nothing blocking.
Aprovado com comentários menores — nada bloqueante.
Quando usar: Approving a PR while leaving optional improvement suggestions
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
- Daily standup280 frases
- Pull requests300 frases
- Bug reports300 frases
- Reuniões300 frases
- Entrevistas de emprego300 frases
- Slack e chat300 frases
- E-mail298 frases
- Discussões técnicas299 frases
- Frases educadas300 frases
- Pair programming300 frases
- Documentação300 frases
Guias com mais contexto
- Daily em inglês: 30 frases prontas para o standup
- Entrevista em inglês: 15 perguntas e respostas para devs
- Como se apresentar em inglês na entrevista
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.