<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kelvin Romero on Medium]]></title>
        <description><![CDATA[Stories by Kelvin Romero on Medium]]></description>
        <link>https://medium.com/@kelvinromero?source=rss-210b195449f6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*H_-XHN0wBbY17arfuROWEg.jpeg</url>
            <title>Stories by Kelvin Romero on Medium</title>
            <link>https://medium.com/@kelvinromero?source=rss-210b195449f6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 01:45:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kelvinromero/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Switching from pulseaudio to pipewire]]></title>
            <link>https://kelvinromero.medium.com/switching-from-pulseaudio-to-pipewire-83d019b60a0c?source=rss-210b195449f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/83d019b60a0c</guid>
            <category><![CDATA[manjaro]]></category>
            <category><![CDATA[arch-linux]]></category>
            <category><![CDATA[pipewire]]></category>
            <category><![CDATA[pulseaudio]]></category>
            <dc:creator><![CDATA[Kelvin Romero]]></dc:creator>
            <pubDate>Sun, 09 Nov 2025 13:59:23 GMT</pubDate>
            <atom:updated>2025-11-09T13:59:23.968Z</atom:updated>
            <content:encoded><![CDATA[<h4>A fix for media not playing on browsers</h4><blockquote>Youtube videos aren&#39;t playing, not even whatsapp audios, what do I do? — Regretful Arch user</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*1nLgh5ixlBNGumUsIIz8eg.png" /></figure><p>I only do TL;DR versions, so… time to speed run this shit:</p><h3>Check for updates:</h3><pre>sudo pacman -Syu</pre><h3>When we try to install — conflict:</h3><pre>sudo pacman -S pipewire pipewire-pulse pipewire-alsa wireplumber</pre><h3>Let&#39;s remove only pulse audio:</h3><pre>sudo pacman -Rdd pulseaudio</pre><p>Why is this important? So you don&#39;t remove shit that the GUI needs, cause some OS componentes may depend on pulseaudio, you can check with: <em>pacman -Qi pulseaudio</em>, you don&#39;t wanna remove them right?</p><h3>Insall pipewire packages and reboot:</h3><pre>sudo pacman -S pipewire-{jack,alsa,pulse}</pre><h3>Sources</h3><ul><li><a href="https://www.reddit.com/r/archlinux/comments/1ahptc8/completely_unable_to_play_any_videos/">https://www.reddit.com/r/archlinux/comments/1ahptc8/completely_unable_to_play_any_videos/</a></li><li><a href="https://bbs.archlinux.org/viewtopic.php?id=273969">https://bbs.archlinux.org/viewtopic.php?id=273969</a></li></ul><h3>System</h3><pre>Linux ** 6.1.153-1-MANJARO #1 SMP PREEMPT_DYNAMIC Fri Sep 19 17:27:31 UTC 2025 x86_64 GNU/Linux</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83d019b60a0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pre-flight, CORS e como eles impactam usuários]]></title>
            <link>https://medium.com/fretecom-tech/pre-flight-cors-e-como-eles-impactam-usu%C3%A1rios-9251bbe7a927?source=rss-210b195449f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/9251bbe7a927</guid>
            <category><![CDATA[preflight-request]]></category>
            <category><![CDATA[cors]]></category>
            <dc:creator><![CDATA[Kelvin Romero]]></dc:creator>
            <pubDate>Mon, 28 Apr 2025 21:26:00 GMT</pubDate>
            <atom:updated>2025-04-29T13:56:55.633Z</atom:updated>
            <content:encoded><![CDATA[<h4>Por que só eu to tomando erro de CORS?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V6Iqo6cdh-Hu7jJsgTZ5ag.png" /><figcaption>Imagem também gerada por IA</figcaption></figure><p>Esses dias, um desenvolvedor me procurou com uma dúvida curiosa: o problema de CORS na aplicação já havia sido resolvido, mas ele <strong>continuava</strong> tomando erro de CORS no navegador.<br> Fui investigar, e achei que valia compartilhar aqui o que descobri — até porque pode ser útil para outros também.</p><p>(Disclaimer: este texto foi escrito com a ajuda do ChatGPT, ajustado para o contexto da Fretebras.)</p><h3>O que é CORS?</h3><p>CORS (Cross-Origin Resource Sharing) é uma proteção que o <strong>navegador</strong> aplica para evitar que aplicações web façam requisições para domínios diferentes do seu sem autorização explícita.</p><p>Ou seja: mesmo que o servidor responda corretamente, o navegador pode <strong>bloquear a resposta</strong> se os cabeçalhos de CORS não estiverem certos.</p><h3>O que aconteceu?</h3><p>O servidor já estava configurado para permitir as requisições, mas o navegador do dev continuava barrando por CORS.<br> O motivo? <strong>Cache de preflight</strong>.</p><p>O navegador tinha guardado uma resposta antiga de uma requisição OPTIONS (a chamada preflight), que dizia que o acesso não era permitido. Mesmo depois da correção no servidor, o navegador ainda <strong>confiava na resposta antiga</strong>.</p><h3>Como funciona o OPTIONS?</h3><p>Antes de certas requisições (por exemplo, POSTs com cabeçalhos customizados), o navegador envia automaticamente uma requisição OPTIONS para perguntar ao servidor:</p><blockquote><em>“Eu posso fazer essa requisição?”</em></blockquote><p>Se o servidor responde positivamente, o navegador segue para a requisição real. Se não, ele bloqueia.</p><p>Essa resposta pode incluir o cabeçalho Access-Control-Max-Age, que diz por quanto tempo o navegador pode <strong>confiar</strong> nessa autorização sem perguntar de novo.</p><h3>Como funciona o cache?</h3><p>Se o servidor responde, por exemplo, com:</p><pre>Access-Control-Max-Age: 3600</pre><p>O navegador entende que pode usar essa autorização por 3600 segundos (1 hora). Durante esse período, ele <strong>não reenvia o preflight</strong>.</p><p>O problema é que, se o servidor mudar a configuração durante esse tempo, o navegador <strong>não sabe</strong> — ele continua confiando na resposta antiga até o cache expirar.</p><p>Isso explica porque o desenvolvedor ainda via o erro, mesmo depois da correção.</p><h3>Como corrigir</h3><p><strong>Abra as Ferramentas para Desenvolvedores</strong> pressionando F12<br>Com as Ferramentas para Desenvolvedores abertas, <strong>clique com o botão direito do mouse no botão &quot;Recarregar&quot;</strong> (o ícone de seta circular na barra de endereço).<br>No menu de contexto que aparece, selecione <strong>&quot;Limpar cache e recarregar forçosamente&quot;</strong></p><h3>Em resumo</h3><ul><li>O CORS é uma proteção do navegador, não do servidor.</li><li>O navegador pode <strong>cachear a autorização</strong> de CORS com base no preflight (OPTIONS).</li><li>Mudanças no servidor podem <strong>não ser percebidas imediatamente</strong> por quem tem cache armazenado, ou seja, o desenvolvedor não consegue invalidar o cache do lado do usuário</li><li>Soluções possíveis incluem forçar o refresh (limpar cache) ou usar Access-Control-Max-Age menores.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9251bbe7a927" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fretecom-tech/pre-flight-cors-e-como-eles-impactam-usu%C3%A1rios-9251bbe7a927">Pre-flight, CORS e como eles impactam usuários</a> was originally published in <a href="https://medium.com/fretecom-tech">Frete.com Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A única saída, é através]]></title>
            <link>https://kelvinromero.medium.com/a-%C3%BAnica-sa%C3%ADda-%C3%A9-atrav%C3%A9s-b16cd7507a0a?source=rss-210b195449f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b16cd7507a0a</guid>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[ócio]]></category>
            <category><![CDATA[mindfulness]]></category>
            <dc:creator><![CDATA[Kelvin Romero]]></dc:creator>
            <pubDate>Sun, 02 Feb 2025 23:27:40 GMT</pubDate>
            <atom:updated>2025-02-02T23:27:40.853Z</atom:updated>
            <content:encoded><![CDATA[<p>E outras reflexões do ócio</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y9jPVhExQhD90EF0" /><figcaption>Photo by <a href="https://unsplash.com/@sadmax?utm_source=medium&amp;utm_medium=referral">Amber Kipp</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>As vezes eu desinstalo o Instagram e desativo o YouTube no meu celular.</p><p>E quando sinto vontade de usar, de alguma forma me condicionei a pensar que não me distrair seria bom, agora aprecio ficar só com meus pensamentos. Engraçado que algumas vezes eu durmo, e até isso me ajuda a pensar de melhor, de maneira mais clara, menos ansiosa.</p><p>Mas também acontece de algumas coisas ficarem evidentes, como por exemplo, direção é mais importante que velocidade, é a ideia de que na vida é melhor não desperdiçar recursos e energia até que você tenha clareza do que precisa ser feito.</p><p>Não mais tenho pressa de estar em movimento, fazendo algo para me sentir produtivo, e sentir-se produtivo não é um indicador de eficácia.</p><p>E quando nada vem a mente, relembrei que a melhor coisa que posso fazer é começar consertando o que se anuncia em necessidade de reparo.</p><p>Geralmente eu começo organizando meu quarto, no processo meus pensamentos já ficam mais organizados também, em seguida começo a focar em fazer meu corpo mais forte e funcional. Procuro comer e dormir melhor, fazer exercício.</p><p>Eventualmente quando eu precisar entrar em movimento, pelo menos sei que tudo está funcionando adequadamente.</p><p>Outra coisa que ficou evidente é que a melhor solução para um problema não é evitar, mas sim encarar ele de frente e resolver. Se você nunca enfrentar aquilo que tem medo, a ansiedade vai te consumir.</p><p>“The only way out, is through” — Robert Frost</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b16cd7507a0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to make terrible Rest APIs]]></title>
            <link>https://kelvinromero.medium.com/how-to-make-terrible-rest-apis-fc647dfad46d?source=rss-210b195449f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc647dfad46d</guid>
            <dc:creator><![CDATA[Kelvin Romero]]></dc:creator>
            <pubDate>Tue, 27 Feb 2024 17:17:39 GMT</pubDate>
            <atom:updated>2024-02-27T17:17:39.460Z</atom:updated>
            <content:encoded><![CDATA[<h4>What is an API? What is Rest and Restful?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*777PQf9zA7wFocPc.jpg" /><figcaption>Why the fuck!?</figcaption></figure><p>This article started as just a rant, but then I started reading Roy Fielding’s dissertation on <em>Architectural Styles and the Design of Network-based Software Architectures</em>, so I needed to break it down into 3 <em>poo —</em> parts, I mean parts:</p><ul><li>Me fucking ranting</li><li>What the fuck is REST</li><li>Me fucking happy</li></ul><h4>Do no not match routes and resources delivered</h4><p>Let’s say we have a marketplace for properties, and we want to list houses, for that, we make a request using the URI (Uniform <strong>Resource</strong> Identificator) houses? No, let’s call it places.</p><pre># Request to list houses, where type=1 means houses, that&#39;s easy to guess<br>GET /places?type=1 HTTP/1.1<br>Host: www.example.com</pre><h4>Do not name resources, use methods instead</h4><p>Let’s say we want to list another <strong>resource</strong>, a list of all visits to properties a client has made. There you go, name the <strong>RESOURCE </strong>like a method:</p><pre># Request to list houses<br>GET /getVisitByClient HTTP/1.1<br>Host: www.example.com</pre><h4>Do not dare to reuse the same response structure</h4><p>Okay, let’s call places to get a list of houses, call places by client to get their list of houses:</p><pre># Request to list houses<br>GET /places HTTP/1.1<br>Host: www.example.com<br><br># Response that should not be stored in the cache<br>HTTP/1.1 200 OK<br>Date: Wed, 24 Feb 2024 12:00:00 GMT<br>Cache-Control: no-store<br>Content-Type: text/html<br>Content-Length: 1234<br><br>{<br>  &quot;house_id&quot;: &quot;123456&quot;,<br>  &quot;address&quot;: {<br>    &quot;street&quot;: &quot;123 Main Street&quot;,<br>    &quot;city&quot;: &quot;Anytown&quot;,<br>    &quot;state&quot;: &quot;NY&quot;,<br>    &quot;zip_code&quot;: &quot;12345&quot;<br>  },<br>  &quot;photos&quot;: [<br>    &quot;https://example.com/photos/photo1.jpg&quot;,<br>    &quot;https://example.com/photos/photo2.jpg&quot;,<br>    &quot;https://example.com/photos/photo3.jpg&quot;<br>  ]<br>}<br><br># Request to list houses<br>GET /placesByClient HTTP/1.1<br>Host: www.example.com<br><br># Response that should not be stored in the cache<br>HTTP/1.1 200 OK<br>Date: Wed, 24 Feb 2024 12:00:00 GMT<br>Cache-Control: no-store<br>Content-Type: text/html<br>Content-Length: 1234<br><br>{<br>  &quot;house_id&quot;: &quot;123456&quot;,<br>  &quot;location&quot;: {<br>    &quot;street_address&quot;: &quot;123 Main Street&quot;,<br>    &quot;city_name&quot;: &quot;Anytown&quot;,<br>    &quot;state&quot;: &quot;NY&quot;,<br>    &quot;zipcode&quot;: &quot;12345&quot;<br>  },<br>  &quot;house_photos&quot;: [<br>    {<br>      &quot;photo_id&quot;: 1,<br>      &quot;photo_url&quot;: &quot;https://example.com/photos/photo1.jpg&quot;<br>    },<br>    {<br>      &quot;photo_id&quot;: 2,<br>      &quot;photo_url&quot;: &quot;https://example.com/photos/photo2.jpg&quot;<br>    },<br>    {<br>      &quot;photo_id&quot;: 3,<br>      &quot;photo_url&quot;: &quot;https://example.com/photos/photo3.jpg&quot;<br>    }<br>  ]<br>}</pre><h4>Do not use HTTP verbs</h4><p>Did you know that HTTP has some verbs that represent Create, Read, Update, and Destroy? Yeah… fuck that:</p><pre># Use GET with a body!<br>GET /getVisitByClient HTTP/1.1<br>Host: example.com<br>Content-Type: application/json<br>Content-Length: [length]<br><br>{<br>  &quot;client_id&quot;: 1<br>}<br><br># Create a client with the &quot;create resource&quot;<br>POST /create/client HTTP/1.1<br>Host: example.com<br>Content-Type: application/json<br>Content-Length: [length]<br><br>{<br>  &quot;client_name&quot;: &quot;Doom Eternal - The only thing I fear is you&quot;<br>}<br><br># Use get to create! Get a creation of something, that makes perfect sense!<br>GET /visitor_count_increase HTTP/1.1<br>Host: example.com<br>Content-Type: application/json<br>Content-Length: [length]<br><br><br># What is patch?<br>PUT /update_places_address HTTP/1.1<br>Host: example.com<br>Content-Type: application/json<br>Content-Length: [length]<br><br>{<br>  &quot;address&quot;: &quot;some address&quot;<br>}</pre><h4>What in the world is the HTTP STATUS CODE?</h4><pre># Status 500 or a mysterious payload?<br>HTTP/1.1 200 OK<br>Date: Wed, 24 Feb 2024 12:00:00 GMT<br>Content-Type: text/html<br><br>&quot;Server error!&quot;<br><br><br># Gues the error hahaha!<br>HTTP/1.1 422 Unprocessable Entity<br>Date: Wed, 24 Feb 2024 12:00:00 GMT<br>Content-Type: text/html<br><br>&quot;You did something wrong!&quot;<br></pre><h4>Do not version it</h4><p>And the best bit, want to change something? Just change it. They&#39;ll update the client.</p><h3>What the fuck is REST?</h3><p><strong>Let’s take what is an API, Rest and Restful out of the way</strong>: An API is an interface contract for systems to interact with each other. Rest is an architectural style, a set of constraints that makes up a contract. A Restful API is simply a system interface that adheres to the rest principles.</p><p>Let’s look at the constraints established by the REST architectural style, one constraint added on top of the other.</p><h4>Client-Server Architecture</h4><p>It gives us separation of concerns, separating user interface from data storage concerns, improving portability and scalability. Now we have two components that can evolve separately.</p><p>We can switch the user interface technologies, or even add them. For instance, we can switch from React to Svelte, or create an Android APP to consume the same API.</p><p>In the same way, the front end will not have concerns about database technologies, or how many servers are necessary.</p><h4>Stateless</h4><p>As in Client-Stateless-Server, the communication must be stateless. This is important, each client request must contain all the information necessary for the server to understand the request. It shouldn’t rely upon stored context on the server.</p><p>What this means is that requests cannot be handled like they are part of a session, for example, we shouldn’t have a session token to identify the client and then we add credits to the client based on the session token</p><p>Actually, each request should contain the target user and the value of the credit. This way we improve:</p><ul><li>Visibility — Because everything to know, we know from the request, no need to query which user needs to receive credits.</li><li>Reliability — It becomes easier to recover from failures, just resend the payload if the request fails.</li><li>Scalability — Server-side stuff is just less complicated, no need to manage resources across requests.</li></ul><p>By the way, if authentication is needed, each request should send a username and password or even better use JWTs.</p><h4>Cache</h4><p>As a way of improving networking efficiency, we use cache. Which is basically data that the client can use later for equivalent requests. So we need to label a response to a request as cacheable or non-cacheable.</p><p>One way we can do that is through the use of the HTTP Header, Cache-Control, this tells the client or any intermediary (like proxies) for how long or IF the response can be cached, here are some examples using different directives (instructions):</p><pre># Response cachable for 3600 seconds, or 60 minutes, AKA 1 hour<br>HTTP/1.1 200 OK<br>Date: Wed, 24 Feb 2024 12:00:00 GMT<br>Cache-Control: max-age=3600<br>Content-Type: text/html<br>Content-Length: 1234<br><br>[Content of the response]<br><br><br># Response that should not be stored in cache<br>HTTP/1.1 200 OK<br>Date: Wed, 24 Feb 2024 12:00:00 GMT<br>Cache-Control: no-store<br>Content-Type: text/html<br>Content-Length: 1234<br><br>[Content of the response]</pre><p>It also goes both ways, client can also set directives, you can find out more at the <a href="https://developer.mozilla.org/pt-BR/docs/Web/HTTP/Headers/Cache-Control">MDN</a>.</p><h4>Layered System</h4><p>A system where each component knows about only the next direct component. This way we reduce complexity and give us the ability to provide abstractions. For example, multiple APIs in front of a legacy code base, multiple databases, or the adoption of proxies and firewalls.</p><p>One downside is that we add overhead and latency, which may be perceived by the user. But we gain from the fact that each component on this system can have a single responsibility and no need to stress about the whole chain as the data flows through the system components.</p><h4>Code-On-Demand</h4><p>This one is optional but is the ability of a client to download code. I never had the need to do that, but you can download pieces of code to extend client functionality, like Java Applets, Charting libraries for data visualization, or macro downloads for user automation.</p><p>Added to that, we can make sure our API is easy to use and understand. Here’s my take on the examples at beginning of the article:</p><h4>Uniform Resource Identifier — URI</h4><p>The key abstraction in REST is a <em>resource. </em>Any information that can be named can be a resource: documents, images, and non-virtual objects. It can be a collection or can be empty. So to our house resource, we can provide improvements like this:</p><pre># List all houses<br>GET /houses HTTP/1.1<br>Host: www.example.com<br><br># Or even better as a subset of our property resource<br># This even helps us avoid overusage of query parameters<br>GET /properties/houses HTTP/1.1<br>Host: www.example.com<br><br># And to get a property<br>GET /properties/&lt;property id&gt; HTTP/1.1<br>Host: www.example.com<br><br># And to list properties our client visited<br># Again, avoiding even the use of ?visited=true query parameter<br>GET /client/&lt;client id&gt;/visited_properties HTTP/1.1<br>Host: www.example.com</pre><h4>Reuse of response resource</h4><p>This is just my opinion, but just reuse the same resource across all endpoints, it makes the API more consistent. A house address will always be called address, not location, not place.</p><h4>Use of HTTP Verbs</h4><p>They provide us with a framework, here how you can use the methods to manage properties:</p><pre># To list all properties<br>GET /properties HTTP/1.1<br>Host: www.example.com<br><br># To list a specific property<br>GET /properties/123 HTTP/1.1<br>Host: www.example.com<br><br># To create a property<br>POST /properties HTTP/1.1<br>Host: www.example.com<br>Content-Type: application/json<br><br>{<br>  &quot;address&quot;: &quot;123 Main Street&quot;,<br>  &quot;city&quot;: &quot;Anytown&quot;,<br>  &quot;state&quot;: &quot;NY&quot;,<br>  &quot;price&quot;: 350000,<br>  &quot;bedrooms&quot;: 4,<br>  &quot;bathrooms&quot;: 2.5,<br>  &quot;square_feet&quot;: 2500,<br>  &quot;year_built&quot;: 2005,<br>  &quot;features&quot;: [&quot;hardwood floors&quot;, &quot;fireplace&quot;, &quot;updated kitchen&quot;]<br>}<br><br># To update a property<br>PUT /properties/123 HTTP/1.1<br>Host: www.example.com<br>Content-Type: application/json<br><br>{<br>  &quot;address&quot;: &quot;456 Elm Street&quot;,<br>  &quot;city&quot;: &quot;Sometown&quot;,<br>  &quot;state&quot;: &quot;CA&quot;,<br>  &quot;price&quot;: 400000,<br>  &quot;bedrooms&quot;: 3,<br>  &quot;bathrooms&quot;: 2,<br>  &quot;square_feet&quot;: 2000,<br>  &quot;year_built&quot;: 2010,<br>  &quot;features&quot;: [&quot;garden&quot;, &quot;pool&quot;]<br>}<br><br># To delete<br>DELETE /properties/456 HTTP/1.1<br>Host: www.example.com<br><br># To patch it<br>PATCH /properties/789 HTTP/1.1<br>Host: www.example.com<br>Content-Type: application/json<br><br>{<br>  &quot;price&quot;: 380000<br>}</pre><h4>Use of HTTP Status Codes</h4><p>Let’s not forget about the need to do regex on the body, on the front. Use the HTTP Status Code for more accurate feedback</p><pre># Retrieving a resource<br>HTTP/1.1 200 OK<br>Content-Type: application/json<br><br>{<br>  &quot;message&quot;: &quot;Resource retrieved successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;id&quot;: 123,<br>    &quot;name&quot;: &quot;Example Property&quot;,<br>    &quot;address&quot;: &quot;123 Main Street&quot;<br>  }<br>}<br><br># Creating<br>HTTP/1.1 201 Created<br>Location: /properties/123<br>Content-Type: application/json<br><br>{<br>  &quot;message&quot;: &quot;Resource created successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;id&quot;: 123,<br>    &quot;name&quot;: &quot;New Property&quot;,<br>    &quot;address&quot;: &quot;456 Elm Street&quot;<br>  }<br>}<br><br># Deleting<br>HTTP/1.1 204 No Content<br>Content-Length: 0<br><br># The client did something wrong<br>HTTP/1.1 422 Unprocessable Entity<br>Content-Type: application/json<br><br>{<br>  &quot;error&quot;: &quot;Unprocessable Entity&quot;,<br>  &quot;message&quot;: &quot;Validation failed&quot;,<br>  &quot;errors&quot;: [<br>    {<br>      &quot;field&quot;: &quot;email&quot;,<br>      &quot;message&quot;: &quot;Email address is invalid&quot;<br>    },<br>    {<br>      &quot;field&quot;: &quot;password&quot;,<br>      &quot;message&quot;: &quot;Password must be at least 8 characters long&quot;<br>    }<br>  ]<br>}<br><br># Resource not found<br>HTTP/1.1 404 Not Found<br>Content-Type: application/json<br><br>{<br>  &quot;error&quot;: &quot;Not Found&quot;,<br>  &quot;message&quot;: &quot;Resource not found&quot;<br>}<br><br># Server error and there&#39;s nothing the client can do<br>HTTP/1.1 500 Internal Server Error<br>Content-Type: application/json<br><br>{<br>  &quot;error&quot;: &quot;Internal Server Error&quot;,<br>  &quot;message&quot;: &quot;An unexpected error occurred&quot;<br>}</pre><h4>API Versioning</h4><p>Last but not least, whenever you need to break the API contract, create a new version, breaking contracts is bad!</p><pre># Examples<br><br>/api/v1/properties<br>/api/v2/properties</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*djJnidjEytWi9tJs.jpg" /><figcaption>There you go, I’m finished pooping on legacy APIs</figcaption></figure><h3>Sources</h3><ul><li><a href="https://www.rfc-editor.org/rfc/rfc9110">https://www.rfc-editor.org/rfc/rfc9110</a></li><li><a href="https://ics.uci.edu/~fielding/pubs/dissertation/top.htm">https://ics.uci.edu/~fielding/pubs/dissertation/top.htm</a></li><li><a href="https://developer.mozilla.org/pt-BR/docs/Web/HTTP/Headers/Cache-Control">https://developer.mozilla.org/pt-BR/docs/Web/HTTP/Headers/Cache-Control</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc647dfad46d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Product Market Fit For Developers]]></title>
            <link>https://kelvinromero.medium.com/product-market-fit-for-developers-7c8843e0a1d3?source=rss-210b195449f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c8843e0a1d3</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[product-market-fit]]></category>
            <dc:creator><![CDATA[Kelvin Romero]]></dc:creator>
            <pubDate>Tue, 20 Jun 2023 22:08:19 GMT</pubDate>
            <atom:updated>2023-06-21T22:56:20.931Z</atom:updated>
            <content:encoded><![CDATA[<h3>Listen to the user, deliver fast, measure and do it again</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NURAGQMxyC3JN_te.png" /></figure><h3>Definition</h3><p>Have you ever heard about product market fit? <a href="https://www.youtube.com/watch?v=FBOLk9s9Ci4">Micheal Seibel from Y Combinator</a> defines Product Market Fit as:</p><blockquote><em>Product market fit is not the “I built the thing that the customers want…” Product Market Fit is what happens after you build it… it’s when the user is using it in a explosive and destructive way…</em></blockquote><p>It’s when people are excited about what you built, it’s when the usage is growing so fast that you almost can’t handle the traffic, it’s when the value is very obvious to the customer. And sometimes the user will know this before you.</p><h3>Why does it matter for developers?</h3><p>It matters for two reasons. You most likely will not get it right the first time. And you will not know the customer if you don’t measure usage.</p><h3>You don’t get it right the first time</h3><p>Well, that’s a fact. Most developers are far away from the customer. More often than not, developers brag about how AI will not replace them because PMs can’t precisely describe what they want. So what makes you think that you, who have never met a single customer, know better?</p><p>So, what can you do? To put it simply, do things as simply and quickly as possible. This way, you and your team can measure, listen to the customer, and iterate.</p><p>A good rule of thumb is to build something with the smallest technical debt, making it easier to swap in the future.</p><h3>Measuring is important</h3><p>This one is quite simple: you must understand how the user wants to use your tool. You want to make it easier, remove barriers, so you can achieve the explosive, destructive, and better yet, disruptive use of your tool!</p><p>And your team can’t do that if you don’t measure the user’s behavior. Therefore, every new feature should be delivered as fast as possible, and attention should be paid to how it’s performing.</p><h3>Conclusion</h3><p>As a developer, your role is crucial in enabling and supporting your team to deliver new features rapidly, while always keeping the customer in mind. Additionally, it is essential to measure how the customer utilizes these features.</p><p>By fulfilling this responsibility, you become the primary enabler in achieving product-market fit!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c8843e0a1d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Escrevendo boas mensagens de commit]]></title>
            <link>https://medium.com/fretecom-tech/escrevendo-boas-mensagens-de-commit-1cce88c107f5?source=rss-210b195449f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cce88c107f5</guid>
            <category><![CDATA[engenharia]]></category>
            <category><![CDATA[commit-messages]]></category>
            <category><![CDATA[good-practices]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Kelvin Romero]]></dc:creator>
            <pubDate>Fri, 09 Jun 2023 11:45:44 GMT</pubDate>
            <atom:updated>2023-06-09T11:47:09.729Z</atom:updated>
            <content:encoded><![CDATA[<p>Por que me importar em escrever boas mensagens de commit?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BeaHBRAgDts2-fh7Gqsmxg.png" /><figcaption>AI generated image of people collaborating and a graphical representation of git commit messages.</figcaption></figure><h3>Por quê?</h3><p>Aqui está o motivo pelo qual você deve escrever boas mensagens de commit (tldr usando mensagens de commit):</p><ul><li>feat: perfectly describes exactly what this commit does when applied</li><li>fix: the commit itself, which must apply a single and complete solution</li><li>revert: becomes way easier to revert a single thing</li><li>feat: tells the story of the project</li><li>fix: people not knowing the project context and circumstances</li></ul><p>Como você pode ver, é possível facilmente contar uma história usando commits, e é claro, você deve combiná-los com o conventional commits.</p><p><em>As mensagens de commit contam a história do projeto mesmo que o software de gerenciamento de projetos tenha desaparecido.</em></p><p><em>Enquanto o projeto existir, o log do git contará a história!</em></p><h3>Como?</h3><h4>Descrevendo exatamente o que o commit faz</h4><p>O que acontecerá com o sistema se eu aplicar este commit? Que valor é entregue? Que novo comportamento ou recurso ele traz? O que está consertando?</p><p>Perguntas como essas devem ser respondidas por suas mensagens de commit. Porque ajuda os desenvolvedores a entender facilmente o contexto e qual decisão levou a esse código. Por exemplo, “corrigir problema” não ajuda muito, mas mensagens como “corrigir: latência com complexidade de tempo reduzida” oferecem muito mais contexto sobre o que estava acontecendo.</p><blockquote><em>Não assuma que o revisor conhece o problema ou contexto original, certifique-se de adicioná-lo [1]</em></blockquote><p>Se necessário, quebre uma linha, use o corpo da mensagem do commit para contexto adicional.</p><h4>Descrevendo uma solução única e completa</h4><p>Quando você desmembra uma história, idealmente deve ser a menor unidade de trabalho que entrega valor, assim como devem ser seus commits, uma solução única e completa.</p><p>Digamos que você está adicionando um recurso para baixar uma planilha e corrigindo um nome de variável de ambiente. Faça commits separados. Se o recurso de download estiver com defeito e a correção da variável de ambiente conserta algo, por que reverter ambos? Se seus commits forem concisos, isso é mais fácil.</p><p>E um conselho que aplico no dia a dia , nunca deixo o código apenas no meu computador, envio as modificações como <em>wip</em> para o remoto, e no dia seguinte dou um git — amend quando concluo as modificações, dado que não estou numa branch compartilhada, claro.</p><h4>Usando mensagens imperativas</h4><p>Acho que é uma técnica que ajuda a criar mensagens concisas porque você está dizendo o que o commit faz quando aplicado. Aqui estão alguns exemplos:</p><ul><li>“feat: allow user to invite over email”</li><li>“refactor: listen only to delete events”</li><li>“fix: clickable area for checkbox”</li><li>“doc: adds instructions to setup dev env”</li><li>“chore: doubles cpu for api”</li></ul><p>É uma simples forma de se expressar que melhora a escrita dos commits.</p><h3>Sources</h3><p>[1] <a href="https://www.freecodecamp.org/news/writing-good-commit-messages-a-practical-guide/">https://www.freecodecamp.org/news/writing-good-commit-messages-a-practical-guide/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cce88c107f5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fretecom-tech/escrevendo-boas-mensagens-de-commit-1cce88c107f5">Escrevendo boas mensagens de commit</a> was originally published in <a href="https://medium.com/fretecom-tech">Frete.com Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing good commit messages]]></title>
            <link>https://kelvinromero.medium.com/writing-good-commit-messages-527679b1babb?source=rss-210b195449f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/527679b1babb</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[commit-messages]]></category>
            <category><![CDATA[best-practices]]></category>
            <dc:creator><![CDATA[Kelvin Romero]]></dc:creator>
            <pubDate>Wed, 07 Jun 2023 17:09:50 GMT</pubDate>
            <atom:updated>2023-06-07T17:09:50.298Z</atom:updated>
            <content:encoded><![CDATA[<p>Why should I care about writing good commit messages?</p><blockquote><em>Sure thing “fix problem” or “add button” is a good enough message that offers all the information necessary to understand the decision behind the code you wrote, plus you can quickly find the MR and/or the card on Jira or Trello and it will perfectly describe what you’ve done because you plans never change… It would take 5 minutes tops to understand the history of the code.</em></blockquote><h3>Why?</h3><p>Here’s why you should write good commit messages (tldr using commit messages):</p><ul><li>feat: perfectly describes exactly what this commit does when applied</li><li>fix: the commit itself, which must apply a single and complete solution</li><li>revert: becomes way easier</li><li>feat: tells the project’s story</li><li>fix: people not knowing the project context and cicurmstances</li></ul><p>As you can see, you can easily tell a story using commits, btw of course you should combine them with the conventional commits pattern.</p><blockquote><em>Commit messages tells the of the story of the project even if the project management software is gone.</em></blockquote><blockquote><em>While the project exists the git log will the story!</em></blockquote><h3>How?</h3><h4>Describing exactly what the commit does</h4><p>What will happen to the system if I apply this commit? What value is delivered? What new behavior or feature it brings? What it’s fixing?</p><p>Questions like this should be answered by your commit messages. Because it helps developers easily understand the context and what decision lead to that code. For instance, “fix problem” doesn’t help much, but messages like “fix: latency with reduced time complexity” offers a lot more context to what was happening.</p><blockquote><em>Do not assume the reviewer understands what the original problem was, ensure you add it [1]</em></blockquote><p>If necessary, break a line, use the message body.</p><h4>Describing a single and complete solution</h4><p>When you break down an story ideally it should be the smallest unit of work that delivers value so should be your commits, a single complete solution.</p><p>Let’s say you are adding a feature to download a spreadsheet and fixing an env var name. Make separate commits. If the download feature is buggy the env var fixes something, why would revert booth of them? If your commits are concise, that’s easier.</p><p>Also, I never leave the code just on my computer, I always push it with a <em>wip</em> message which I amend on the next day when I’m finished developing it, of course given that I’m working on a feature branch.</p><h4>Using imperative messages</h4><p>I think it’s a technique that helps creating concise messages because you are telling what the commit does when applied. Here are a few examples:</p><ul><li>“feat: allow user to invite over email”</li><li>“refactor: listen only to delete events”</li><li>“fix: clickable area for checkbox”</li><li>“doc: adds instructions to setup dev env”</li><li>“chore: doubles cpu for api”</li></ul><p>[1] <a href="https://www.freecodecamp.org/news/writing-good-commit-messages-a-practical-guide/">https://www.freecodecamp.org/news/writing-good-commit-messages-a-practical-guide/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=527679b1babb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In praise of doing good work]]></title>
            <link>https://kelvinromero.medium.com/in-praise-of-doing-good-work-68e8e7380ef7?source=rss-210b195449f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/68e8e7380ef7</guid>
            <category><![CDATA[workplace]]></category>
            <category><![CDATA[quiet-quitting]]></category>
            <category><![CDATA[work-life-balance]]></category>
            <dc:creator><![CDATA[Kelvin Romero]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 17:01:47 GMT</pubDate>
            <atom:updated>2023-01-09T17:01:47.046Z</atom:updated>
            <content:encoded><![CDATA[<p>Talking a little late about quiet quitting</p><p>Why should you even try to do your best work at any given company?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tD_iHskyzDz8b3rJ" /><figcaption>Photo by <a href="https://unsplash.com/@shridhar?utm_source=medium&amp;utm_medium=referral">Shridhar Gupta</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I’m not advocating for working oneself to exhaustion, but doing good work, finding ways to improve processes or cut costs, and helping coworkers can be rewarding. Here are some things I consider.”</p><h4>Improve job prospects</h4><p>Getting good results will help your career. During job interviews, you can share a good story about how you made contributions to your team and previous employer.</p><h4>Helps you build partnerships</h4><p>Being a good teammate can actually build friendships. In my personal experience, trying to make my coworkers lives better actually helped gain their respect and admiration, which lead to a lasting friendship even after we both left the company. And by the way, I feel the same way about them.</p><h4>Helps you as an entrepreneur</h4><p>If your goal is to create your own business, most skills you develop at work can be helpful on your own endeavors, even if it’s in a different field.” Skills like project management, leadership and critical thinking are essential for those who want to build a business.</p><p>Also, those friendships I mentioned earlier can potentially turn into partnerships, as you will recognize each other’s competence.</p><h4>Caring is fulfilling</h4><p>When your work is meaningful, you will feel proud of achieving good results. And one way to achieve that is to choose a cause, a result that you believe that it’s important, and working and collaborating towards that will give you that feeling.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68e8e7380ef7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2023]]></title>
            <link>https://kelvinromero.medium.com/2023-e77688771d69?source=rss-210b195449f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e77688771d69</guid>
            <category><![CDATA[strategic-planning]]></category>
            <category><![CDATA[2023]]></category>
            <category><![CDATA[planning]]></category>
            <dc:creator><![CDATA[Kelvin Romero]]></dc:creator>
            <pubDate>Sun, 08 Jan 2023 00:24:20 GMT</pubDate>
            <atom:updated>2023-01-08T14:17:50.219Z</atom:updated>
            <content:encoded><![CDATA[<p>How I’m strategizing.</p><p>I’m not planning the whole year, but I have an outline (a list) of what I want to become over the next two years. I did this by watching the world, its trends, talking to others, and to my psychologist who helps me with being consistent.</p><ol><li>First, from this list, I selected what I want to do and learn over the first month of the year.</li><li>After that, I took a moment to analyze my daily routine, and I identified the detrimental habits and <strong>how I can design the environment to make hard for me fall onto them</strong>.</li><li>I listed the habits that I want to develop, and <strong>strategies to make them inevitable</strong>. (I wanted to read more last year, so I placed an interesting book on each room, and it worked)</li><li>I made a timeline<strong> with realistic deadlines based on the activity duration</strong> (e.g. taking a course or reading a book)</li></ol><p>Developing a plan is not necessarily difficult, but putting the plan into action can be challenging. That’s what I am focusing on, what actually sets me up to be successful on what I’m aiming at.</p><p>I’m also taking my limitations and personal issues into account. That I am a human being, that I need fun and quality sleep. I’m focusing on the journey, because “The man who loves walking will walk further than the man who loves the destination.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XPWqlegPVdv5UF2oGyIMZg.png" /><figcaption>Just to give an Idea how I use notion</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e77688771d69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Merging logical volumes Linux]]></title>
            <link>https://kelvinromero.medium.com/merging-logical-volumes-linux-6ee54f2e744e?source=rss-210b195449f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ee54f2e744e</guid>
            <category><![CDATA[centos]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[lvm]]></category>
            <dc:creator><![CDATA[Kelvin Romero]]></dc:creator>
            <pubDate>Fri, 03 Jul 2020 21:31:01 GMT</pubDate>
            <atom:updated>2020-07-03T21:31:01.040Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2LTbQqZ2mBgCUlSGmbLVVg.jpeg" /></figure><p>Let’s say you have the following scenario and you want expand the root volume into the current home space (output is abreviated):</p><pre>root@remote-machine # fdisk -l<br>...</pre><pre>Disk /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 sectors<br>Units = sectors of 1 * 512 = 512 bytes<br>Sector size (logical/physical): 512 bytes / 512 bytes<br>I/O size (minimum/optimal): 512 bytes / 512 bytes</pre><pre>Disk /dev/mapper/centos-swap: 10.5 GB, 10536091648 bytes, 20578304 sectors<br>Units = sectors of 1 * 512 = 512 bytes<br>Sector size (logical/physical): 512 bytes / 512 bytes<br>I/O size (minimum/optimal): 512 bytes / 512 bytes<br></pre><pre>Disk /dev/mapper/centos-home: 364.2 GB, 364191416320 bytes, 711311360 sectors<br>Units = sectors of 1 * 512 = 512 bytes<br>Sector size (logical/physical): 512 bytes / 512 bytes<br>I/O size (minimum/optimal): 512 bytes / 512 bytes</pre><pre>...</pre><p>Start by compressing your home folder:</p><pre>tar -cvzf home.tar.gz /home/</pre><p>I recomend you copying it to another disk or just scp into some place safe. In my case, from my computer I copied the file:</p><pre>me@local-machine $ scp root@remote-machine:/home/home.tar.gz .</pre><p>Remove home partition: umount the folder, remove the lvm and extend the root to 100% of the space avaiable. <em>Note that you might need a little bit of space for the following operations</em>:</p><pre>umout /home<br>lvremove /dev/mapper/home<br>lvextend -l +100%FREE -r /dev/mapper/root</pre><p>Copy the backup file back, up to your server and expand it:</p><pre>scp home.tar.gz root@remote-machine:/home/home.tar.gz<br>tar -cvzf home.tar.gz /home/</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ee54f2e744e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>