<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fernando Gallardo</title>
    <description>The latest articles on DEV Community by Fernando Gallardo (@jfgg).</description>
    <link>https://dev.to/jfgg</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3986182%2F53cecff7-4a58-4a64-970a-374962f8996f.jpeg</url>
      <title>DEV Community: Fernando Gallardo</title>
      <link>https://dev.to/jfgg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jfgg"/>
    <language>en</language>
    <item>
      <title>How to write a good pull request description</title>
      <dc:creator>Fernando Gallardo</dc:creator>
      <pubDate>Thu, 18 Jun 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/jfgg/how-to-write-a-good-pull-request-description-3oc6</link>
      <guid>https://dev.to/jfgg/how-to-write-a-good-pull-request-description-3oc6</guid>
      <description>&lt;p&gt;A pull request without a description is a puzzle with missing pieces.&lt;/p&gt;

&lt;p&gt;The reviewer has to reconstruct what you were trying to do, why you did it this way, and what could go wrong, from the code alone. That’s not a review, it’s archaeology. And it’s why so many PRs get approved with a “LGTM” that doesn’t mean anything.&lt;/p&gt;

&lt;p&gt;A good PR description isn’t bureaucracy. It’s the thing that makes your change reviewable — and therefore mergeable — without three rounds of back-and-forth.&lt;/p&gt;

&lt;p&gt;Why most PR descriptions fail&lt;/p&gt;

&lt;p&gt;The most common PR descriptions look like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;”Fix bug”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;”Update user service”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;”WIP”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;”Changes per feedback”&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tell the reviewer nothing. They don’t explain what the bug was, what broke, what the fix does, or how to verify it works. The reviewer is starting from zero.&lt;/p&gt;

&lt;p&gt;The second most common failure is the opposite: a description that’s just a list of  every file changed, copy-pasted from the diff. That’s also useless, it describes what changed, not why.&lt;/p&gt;

&lt;p&gt;A good description answers the questions a reviewer would ask if they could.&lt;/p&gt;

&lt;p&gt;The goal is to make the review faster and the approval more confident.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to include in a pull request
&lt;/h2&gt;

&lt;p&gt;A PR description that actually helps has four components. None of them are long, a good description for a focused PR can be under 150 words. The point is structure, not volume.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. What this change does (2-4 sentences)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not a list of files. Not a commit log. A plain explanation of what problem this PR solves and what it does to solve it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This PR adds rate limiting to the &lt;code&gt;/auth/login&lt;/code&gt; endpoint. Witout it, the endpoint can be used for credential stuffing with no hrottling. The implementation uses a sliding window counter in Redis with a 60-second TTL.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;2. Why this approach&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If there were alternative implementations you considered and rejected, say so.&lt;/p&gt;

&lt;p&gt;This prevents reviewers from suggesting alternatives you already evaluated, and it shows your reasoning.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We considered using an in-memory counter, but that doesn’t work across multiple instances. Redis was already in the stack, so the overhead is minimal.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;3. How to test it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Specific steps. Not “run the tests”, which tests? Where? Under what conditions?&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Start the service locally with &lt;code&gt;docker compose up&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Hit &lt;code&gt;/auth/login&lt;/code&gt; more than 10 times in 60 seconds with any credentials&lt;/li&gt;
&lt;li&gt;The 11th request should return 429&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;4. What’s out of scope&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one gets skipped most often, but it prevents the review from expanding into territory you didn’t intend to cover.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This PR doesn’t address rate limiting on other endpoints. that’s tracked in #412.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Pull request best practices for developers
&lt;/h2&gt;

&lt;p&gt;Beyond the description itself, there are a few pull request best practices that  consistently improve review quality:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep PRs focused.&lt;/strong&gt; A PR that does one thing is easier to review than one that does three. If you’re fixing a bug and refactoring a module and updating a dependency, that’s three PRs, or at minimum, a description that clearly separates the three concerns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Link to the issue or ticket.&lt;/strong&gt; The PR description doesn’t need to contain all the context,  it needs to point to where the context lives. A link to the relevant issue, Jira ticket, or design doc is worth more than a paragraph trying to summarize it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don’t self-review your own PR right after writing it.&lt;/strong&gt; The gap between writing code and reviewing it needs to be longer than five minutes. Come back to it after a break, or ask for a review first and do your own pass after seeing the comments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add a screenshot or recording for UI changes.&lt;/strong&gt; A reviewer who can see the before/after state will spot visual regressions that are invisible in a diff.&lt;/p&gt;

&lt;h2&gt;
  
  
  The security section most teams skip
&lt;/h2&gt;

&lt;p&gt;There’s one section most PR templates don’t include: a note on security implications.&lt;/p&gt;

&lt;p&gt;Not every PR needs this, a typo fix doesn’t. But any PR that touches authentication, authorization, input handling, file uploads, external APIs, or new dependencies  should include a line or two about what the security surface is and how it’s handled.&lt;/p&gt;

&lt;p&gt;This doesn’t need to be a formal threat model. It can be as simple as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Security: This endpoint accepts file uploads. Files are validated for MIME type and size limit before being written to S3. No user-supplied file path is used.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Or:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Dependencies: Added &lt;a href="mailto:jsonwebtoken@9.0.2"&gt;jsonwebtoken@9.0.2&lt;/a&gt;. Checked against OSV, no known  CVEs. Replaces the unmaintained jwt-simple package.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Teams that use automated security analysis in CI can use that output as a reference, if the scanner flagged something, the PR description should acknowledge it and explain how it was resolved. Platforms like Ixtli produce per-PR security summaries that make this easy to include without doing the research manually.&lt;/p&gt;

&lt;h2&gt;
  
  
  A template you can actually use
&lt;/h2&gt;

&lt;p&gt;Here’s a minimal template that covers the essentials. Adapt it to your team’s conventions, the point isn’t to fill out every field for every PR, it’s to make the important fields habitual.&lt;/p&gt;

&lt;h3&gt;
  
  
  GitHub
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## What&lt;/span&gt;

[1-3 sentences: what problem does this solve and how]

&lt;span class="gu"&gt;## Why this approach&lt;/span&gt;

[Optional: alternatives considered and why they were rejected]

&lt;span class="gu"&gt;## How to test&lt;/span&gt;

[Specific steps to verify the change works]

&lt;span class="gu"&gt;## Out of scope&lt;/span&gt;

[What this PR explicitly doesn't cover]

&lt;span class="gu"&gt;## Security notes&lt;/span&gt;

[Optional: relevant security surface, how it's handled, or "no security impact — [reason]"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep it in a .github/pull_request_template.md file and GitHub will auto-populate it for every PR.&lt;/p&gt;

&lt;h3&gt;
  
  
  GitLab
&lt;/h3&gt;

&lt;p&gt;Keep it in a .gitlab/merge_request_templates/Default.md&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-project/
├── .gitlab/
│   └── merge_request_templates/
│       └── Default.md
├── src/
└── README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## What&lt;/span&gt;

Describe the change and the problem it solves.

&lt;span class="gu"&gt;## Why&lt;/span&gt;

Why was this implementation chosen?

&lt;span class="gu"&gt;## How to test&lt;/span&gt;

Steps to verify the change works.

&lt;span class="gu"&gt;## Risks&lt;/span&gt;

Potential side effects or areas that may be impacted.

&lt;span class="gu"&gt;## Security impact&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; [ ] No security impact
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Authentication / Authorization
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Input validation
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Secrets / Credentials
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Data exposure
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Infrastructure / Configuration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;A PR description is not documentation for posterity. It’s communication for the reviewer who has to understand your change in the next 20 minutes.&lt;/p&gt;

&lt;p&gt;The investment is small — 10 to 15 minutes to write a description that gives your reviewer everything they need. The return is a review that’s faster, more accurate, and less likely to require three rounds of clarification.&lt;/p&gt;

&lt;p&gt;If your team’s PRs consistently lack context, the easiest fix is a template in the repo. Add it this week. If you want to take the security side further&lt;/p&gt;

&lt;p&gt;without making it a manual process, &lt;a href="https://ixtli.app" rel="noopener noreferrer"&gt;ixtli.app&lt;/a&gt; integrates directly into the PR workflow.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>gitlab</category>
    </item>
    <item>
      <title>Cómo hacer una buena revisión de código</title>
      <dc:creator>Fernando Gallardo</dc:creator>
      <pubDate>Thu, 18 Jun 2026 03:08:01 +0000</pubDate>
      <link>https://dev.to/jfgg/como-hacer-una-buena-revision-de-codigo-5db8</link>
      <guid>https://dev.to/jfgg/como-hacer-una-buena-revision-de-codigo-5db8</guid>
      <description>&lt;p&gt;Revisar código es una de las actividades más subestimadas del desarrollo de software.&lt;/p&gt;

&lt;p&gt;La mayoría de los equipos la tratan como un trámite, algo que hay que aprobar antes de mergear. El resultado es que los PRs se aprueban con un “LGTM” después de dos minutos de scroll, y los problemas reales pasan de largo.&lt;/p&gt;

&lt;p&gt;Una revisión bien hecha no es leer línea por línea buscando typos. Es entender qué intenta hacer ese código, si lo hace de la manera correcta, y si introduce riesgos que no existían antes. Eso requiere un proceso, no un instinto.&lt;/p&gt;

&lt;p&gt;Este artículo cubre cómo estructurar ese proceso: qué revisar, en qué orden, qué preguntas hacer, y cómo detectar problemas de seguridad sin ser un experto en ciberseguridad.&lt;/p&gt;

&lt;h2&gt;
  
  
  Empieza por el contexto, no por el código
&lt;/h2&gt;

&lt;p&gt;El error más común en code review es abrir el diff y empezar a leer desde la primera línea modificada. Antes de ver una sola línea, necesitas entender qué problema resuelve este cambio.&lt;/p&gt;

&lt;p&gt;Lee la descripción del PR. Si no hay descripción, o si dice “fixes bug”, ya encontraste  el primer problema. Un PR sin contexto obliga al reviewer a reconstruir el  razonamiento del autor desde cero, y eso aumenta la probabilidad de aprobar algo que no debería aprobarse.&lt;/p&gt;

&lt;p&gt;Lo que un buen PR debe explicar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Qué cambia no cómo, sino qué problema resuelve&lt;/li&gt;
&lt;li&gt;Por qué este approach si hay alternativas que se descartaron, decirlo&lt;/li&gt;
&lt;li&gt;Cómo probarlo, pasos para verificar que funciona&lt;/li&gt;
&lt;li&gt;Qué no cubre, scope explícito evita confusiones&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Si tienes esa información antes de ver el diff, tu revisión va a ser significativamente más efectiva.&lt;/p&gt;

&lt;h2&gt;
  
  
  Qué revisar y en qué orden
&lt;/h2&gt;

&lt;p&gt;No toda línea de código merece el mismo nivel de atención. Un buen reviewer distribuye su energía de forma inteligente.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primero: arquitectura y flujo de datos.&lt;/strong&gt; ¿El cambio tiene sentido a nivel de diseño? ¿Agrega una dependencia innecesaria? ¿Rompe alguna abstracción existente? Esto es lo más difícil de cambiar después.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Segundo: lógica de negocio.&lt;/strong&gt; ¿El código hace lo que dice que hace? ¿Los edge cases están cubiertos? ¿Qué pasa si el input viene vacío, nulo, o malformado?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tercero: seguridad.&lt;/strong&gt; Este punto merece su propia sección.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cuarto: legibilidad y convenciones.&lt;/strong&gt; Nombres de variables, estructura de funciones, comentarios. Importante, pero no el punto de partida.&lt;/p&gt;

&lt;p&gt;La mayoría de los reviewers hacen esto al revés, empiezan por los detalles de estilo y llegan agotados a lo que realmente importa.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cómo detectar problemas de seguridad en code review
&lt;/h2&gt;

&lt;p&gt;Detectar vulnerabilidades durante un code review no requiere ser un especialista en seguridad. Requiere hacerse las preguntas correctas.&lt;/p&gt;

&lt;p&gt;Hay patrones que aparecen consistentemente en PRs problemáticos:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Entradas sin validar.&lt;/strong&gt; ¿Los datos que vienen del exterior (usuario, API, archivo) se usan directamente sin sanitizar? Cualquier lugar donde un string externo toca una query, un path de archivo, o una llamada a sistema es candidato a revisión.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Manejo de errores que expone información.&lt;/strong&gt; Stack traces devueltos al cliente, mensajes de error con rutas internas, logs que incluyen tokens o passwords. Esto pasa más de lo que parece.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dependencias nuevas.&lt;/strong&gt; Cada &lt;code&gt;npm install&lt;/code&gt; o &lt;code&gt;pip install&lt;/code&gt; que aparec en el diff es una superficie de ataque potencial. ¿Se revisó el paquete? ¿Tiene CVE conocidos? ¿Cuántos mantenedores activos tiene?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Secrets hardcodeados.&lt;/strong&gt; Claves API, tokens, URLs de bases de datos. Son más comunes de lo que cualquier equipo quiere admitir.&lt;/p&gt;

&lt;p&gt;Algunos equipos integran análisis automatizado directamente en el flujo de revisión para que estos patrones se marquen antes de que el reviewer los vea. Herramientas como &lt;a href="https://ixtli.app" rel="noopener noreferrer"&gt;Ixtli&lt;/a&gt;, por ejemplo, analizan el diff completo del PR contra el grafo de dependencias del proyecto, no solo las líneas cambiadas, lo que hace que ciertos tipos de vulnerabilidades sean mucho más difíciles de pasar por alto.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cómo dar feedback que sirva
&lt;/h2&gt;

&lt;p&gt;El objetivo de un comentario en un code review no es demostrar que encontraste algo malo. Es que el código mejore.&lt;/p&gt;

&lt;p&gt;Algunas reglas que hacen una diferencia real:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sé específico.&lt;/strong&gt; “Este código es confuso” no ayuda. “Esta función hace tres cosas distintas, considera extraer la lógica de validación a una función separada” sí ayuda.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Distingue entre bloqueante y sugerencia.&lt;/strong&gt; No todo comentario debe impedir el merge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prefija&lt;/strong&gt; con [bloqueante], [sugerencia] o [nitpick] para que el autor sepa qué es crítico y qué es opcional.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pregunta antes de asumir.&lt;/strong&gt; Si algo no se entiende, pregunta. “¿Por qué se usa &lt;code&gt;setTimeout&lt;/code&gt; aquí en lugar de un event listener?” es mejor que asumir que es un error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aprueba cuando está listo.&lt;/strong&gt; No sigas agregando comentarios menores una vez que los problemas reales están resueltos. El proceso de review también tiene un costo.&lt;/p&gt;

&lt;p&gt;Checklist para code review&lt;/p&gt;

&lt;p&gt;Antes de aprobar un PR, recorre estos puntos:&lt;/p&gt;

&lt;p&gt;| Área | Pregunta |&lt;/p&gt;

&lt;p&gt;|------|---------|&lt;/p&gt;

&lt;p&gt;| Contexto | ¿El PR tiene descripción clara de qué resuelve? |&lt;/p&gt;

&lt;p&gt;| Diseño | ¿El cambio tiene sentido arquitectónico? |&lt;/p&gt;

&lt;p&gt;| Lógica | ¿Los edge cases están cubiertos? |&lt;/p&gt;

&lt;p&gt;| Seguridad | ¿Hay entradas sin validar, secretos expuestos, o dependencias nuevas sin revisar? |&lt;/p&gt;

&lt;p&gt;| Tests | ¿Los tests cubren los casos relevantes, no solo el happy path? |&lt;/p&gt;

&lt;p&gt;| Deuda técnica | ¿El cambio deja el código en mejor estado del que lo encontró? |&lt;/p&gt;

&lt;p&gt;No es una lista para leer rápido. Es una lista para detenerse en cada punto.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusión
&lt;/h2&gt;

&lt;p&gt;Una buena revisión de código no es más lenta que una mala, es más intencional.&lt;/p&gt;

&lt;p&gt;La diferencia está en saber qué buscar y en qué orden.&lt;/p&gt;

&lt;p&gt;Si tu equipo trata los PRs como trámites, el problema no es el código,  es el proceso.&lt;/p&gt;

&lt;p&gt;Empezar a usar un checklist consistente, pedir descripciones reales en cada PR, y separar los comentarios bloqueantes de las sugerencias son cambios que se pueden implementar esta semana sin herramientas adicionales.&lt;/p&gt;

&lt;p&gt;Para la parte de seguridad, revisar manualmente cada dependencia nueva o cada input sin validar es costoso en tiempo. Vale la pena evaluar qué parte de ese trabajo puede automatizarse, ixtli.app está construido específicamente para ese slice del proceso.&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>development</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
