<?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: Jeferson 'Shin' Leite Borges</title>
    <description>The latest articles on DEV Community by Jeferson 'Shin' Leite Borges (@shinspiegel).</description>
    <link>https://dev.to/shinspiegel</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F127888%2F6c533776-4c88-45d4-8cb9-9cf7b4667e79.jpeg</url>
      <title>DEV Community: Jeferson 'Shin' Leite Borges</title>
      <link>https://dev.to/shinspiegel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shinspiegel"/>
    <language>en</language>
    <item>
      <title>The Struggles of Making Games</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Wed, 10 Jul 2024 19:47:07 +0000</pubDate>
      <link>https://dev.to/shinspiegel/the-struggles-of-making-games-32hp</link>
      <guid>https://dev.to/shinspiegel/the-struggles-of-making-games-32hp</guid>
      <description>&lt;p&gt;Ok, I'll try to write this post in both portuguese and english. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt; English
&lt;/h3&gt;

&lt;p&gt;When I started making games around 2018, it was just for fun. I was excited about my progress with JavaScript, and the idea of using some of that knowledge to make games felt like a natural leap.&lt;/p&gt;

&lt;p&gt;But there's more to the story.&lt;/p&gt;

&lt;p&gt;When I was 10, I made simple games with &lt;a href="https://en.wikipedia.org/wiki/Game-Maker" rel="noopener noreferrer"&gt;Game-Maker&lt;/a&gt; &lt;br&gt;
&lt;small&gt;(note that this is not GameMaker, it's Game-Maker, with a &lt;code&gt;-&lt;/code&gt; in the middle; totally different products, like something Microsoft would name)&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;At 13, I toyed with RPG Maker 2000, which was super innovative at the time. Lots of events and many small RPGs that never went anywhere. I remember trying to make one, and the best I could do was create some half-baked enemies and a nonsensical story that went nowhere.&lt;/p&gt;

&lt;p&gt;At 15, with a good friend from my youth (who I still miss), we messed around with PHP to create a little map for use while playing GURPS.&lt;/p&gt;

&lt;p&gt;A few years later, while talking with a coworker, we had just finished playing &lt;a href="https://en.wikipedia.org/wiki/Cave_Story" rel="noopener noreferrer"&gt;Cave Story&lt;/a&gt;, which had received a fan translation. I discovered it was made by just one person. Soon, we were discussing, "Why don't we make a game?"&lt;/p&gt;

&lt;p&gt;This was back in 2005, almost 10 years before Godot existed and about 5 years (if not more) before anyone had free access to Unity. But the world wasn’t hopeless, and &lt;a href="https://liballeg.org/" rel="noopener noreferrer"&gt;Allegro&lt;/a&gt; was there to save the day.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;By the way, that page looks the same as when I first saw it in 2005.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As I learned to write code in C, something I had never done before (the closest was a bit of BASIC, lots of Excel functions, and some Lisp for AutoCAD), but nothing was going to stop me from progressing.&lt;/p&gt;

&lt;p&gt;After a few days, I had a &lt;code&gt;sprite&lt;/code&gt; on the screen that I could move with the arrow keys, basically the &lt;code&gt;hello world&lt;/code&gt; of any game dev!&lt;/p&gt;

&lt;p&gt;Conversations came and went, and my coworker didn’t want to make the &lt;code&gt;sprites&lt;/code&gt; for the game anymore. All I had left was a &lt;code&gt;png&lt;/code&gt; file full of dreams.&lt;/p&gt;

&lt;p&gt;In 2013, when I graduated in Industrial Design, I made a board game for my final project, one of many I created during my university years. Sadly, I shared very few with friends (something I should have done much more).&lt;/p&gt;

&lt;p&gt;Before I knew it, it was 2018, and I was opening the newly released Godot 3. I started making little games again, and usually, the same thing breaks me: "Art."&lt;/p&gt;

&lt;p&gt;How to make the "&lt;em&gt;Art&lt;/em&gt;." I understand the process of "&lt;em&gt;design&lt;/em&gt;," I can do it, and I can write code where I can understand myself well enough. But the "&lt;em&gt;art&lt;/em&gt;." That I need to define.&lt;/p&gt;

&lt;p&gt;What is "&lt;em&gt;art&lt;/em&gt;"?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The first two things that come up in the dictionary are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The ability or skill to apply knowledge or execute an idea.&lt;/li&gt;
&lt;li&gt;A set of means by which something can be practically realized.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;And what is "&lt;em&gt;art&lt;/em&gt;" for me in the context of Game Dev?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Art is the process by which design material is converted into &lt;code&gt;assets&lt;/code&gt; for a game.&lt;br&gt;
In this case, graphics, music, code, dialogues, sound effects...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Alright, if &lt;em&gt;art&lt;/em&gt; is everything that makes a game, a &lt;em&gt;game&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, what’s the problem?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The problem is that, even with effort, I still can’t reach a quality level that satisfies me. I can make music, sound effects (even if most are just &lt;em&gt;blips&lt;/em&gt; and &lt;em&gt;blops&lt;/em&gt;), and I can create the pixel art that I love.&lt;/p&gt;

&lt;p&gt;But I don’t enjoy this process. Opening my text editor to write code is fun, opening the pixel editor and designing a character is cool... but...&lt;/p&gt;

&lt;p&gt;Animating is a pain,&lt;/p&gt;

&lt;p&gt;Pixel art is fun, but animating is a real drag.&lt;/p&gt;

&lt;p&gt;Composing music is cool, but man, it takes me almost an entire day to compose &lt;strong&gt;one&lt;/strong&gt; song, and it still feels subpar.&lt;/p&gt;

&lt;p&gt;Sound effects never bothered me; just grab some objects around the house and record with the mic, throw in tons of effects, and it’s done.&lt;/p&gt;

&lt;p&gt;I enjoy coding, and I usually can make way more than &lt;strong&gt;one&lt;/strong&gt; mechanic a day for my tiny games.&lt;/p&gt;

&lt;center&gt;So what to do?&lt;/center&gt;

&lt;center id="dont-know-en"&gt;&lt;b&gt;I have no idea&lt;/b&gt;&lt;/center&gt;



&lt;p&gt;But let me tell you what hasn’t worked so far:&lt;/p&gt;

&lt;h3&gt;
  
  
  Writing a Game Design Document (GDD)
&lt;/h3&gt;

&lt;p&gt;Of course, the process maniac here decided to put a process into making games. Many hours of planning have been done, and my list on &lt;a href="https://shinspiegel.itch.io/" rel="noopener noreferrer"&gt;itch&lt;/a&gt; remains the same.&lt;/p&gt;

&lt;p&gt;For every item on &lt;a href="https://shinspiegel.itch.io/" rel="noopener noreferrer"&gt;itch&lt;/a&gt;, I must have at least 3 other GDDs that never left the paper. And for every game there, I have at least 5x more material in GDD to continue the game.&lt;/p&gt;

&lt;p&gt;What doesn’t work?&lt;/p&gt;

&lt;p&gt;Overplanning and not seeing results.&lt;/p&gt;

&lt;p&gt;The more I prepare, the less perceptible the results are. It just feels farther from finishing. There are always more &lt;code&gt;sprites&lt;/code&gt; to be made than I have lifetime to create, always more music to be composed than I have the capacity to make.&lt;/p&gt;

&lt;p&gt;And remember, I’m a hobbyist at this, and my drawing and composing skills are limited. (To not call it &lt;em&gt;mediocre&lt;/em&gt;)&lt;/p&gt;

&lt;h3&gt;
  
  
  Kanban, Trello, Jira...
&lt;/h3&gt;

&lt;p&gt;No matter the type of board, it’s just a more visual way of doing a GDD, and simpler. The more information on each card, the worse; the less information on each card, the worse.&lt;/p&gt;

&lt;p&gt;I tried putting cards with tags, colors, drawings, icons, but in the end, it’s just effort that I don’t see where it’s going, and that I could be using to write more code or make more graphics.&lt;/p&gt;

&lt;p&gt;Between a board and a checklist, I prefer the list.&lt;/p&gt;

&lt;h3&gt;
  
  
  Simple text files or Markdown?
&lt;/h3&gt;

&lt;p&gt;If it’s a checklist, why not go straight to text files?&lt;/p&gt;

&lt;p&gt;Markdown is the new &lt;code&gt;.doc&lt;/code&gt; for developers, but with fewer color effects for words and no way to link to a data sheet, but it works well enough, honestly.&lt;/p&gt;

&lt;p&gt;It works as mind map. But when it starts getting heavier than that, it loses its point, especially if you want to include time estimates or try to create a pseudo-Trello. &lt;em&gt;It doesn’t work&lt;/em&gt;. Don’t try it, you’ll get hurt!&lt;/p&gt;

&lt;p&gt;Now, if it’s just "to-do lists" or a simplified version of GDD, it "&lt;em&gt;works&lt;/em&gt;" within limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  And the future?
&lt;/h3&gt;

&lt;p&gt;So what now that I’ve compiled all the information? As I said here, I have no idea. But all mistakes lead you forward, helping you learn and become a better dev, or in this case, a better game dev, right?&lt;/p&gt;

&lt;p&gt;I hope so.&lt;/p&gt;

&lt;p&gt;That’s it for today, thank you.&lt;/p&gt;

&lt;p&gt;(()=&amp;gt;{})()&lt;/p&gt;



&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt; Portugues
&lt;/h3&gt;

&lt;p&gt;Quando eu comecei a fazer jogos em meados de 2018, era apenas uma brincadeira. Estava empolgado com meu desenvolvimento em JavaScript e pensar que poderia usar parte do conhecimento para fazer jogos foi apenas um salto natural.&lt;/p&gt;

&lt;p&gt;Mas, existe algo que precede isso.&lt;/p&gt;

&lt;p&gt;Quando tinha 10 anos, fazia jogos simples com &lt;a href="https://en.wikipedia.org/wiki/Game-Maker" rel="noopener noreferrer"&gt;Game-Maker&lt;/a&gt; &lt;br&gt;
&lt;small&gt;(repare que esse não é o GameMaker, é o Game-Maker, com um &lt;code&gt;-&lt;/code&gt; que separa o nome; produtos totalmente diferentes, parece até a Microsoft dando nome a produtos)&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;Quando tinha 13 anos, brincava com RPG Maker 2000, que era super inovador na época. Vários eventos e muitos pequenos RPGs que nunca chegaram a lugar algum. Lembro de ter tentado fazer um e o melhor que consegui foi criar meia dúzia de inimigos e uma história sem pé nem cabeça que leva de lugar algum para lugar nenhum.&lt;/p&gt;

&lt;p&gt;Quando eu tinha 15 anos, junto com um grande amigo de juventude (de quem sinto falta até hoje), fizemos uma brincadeira em PHP. Era apenas para ser um mapinha para usar enquanto jogávamos GURPS.&lt;/p&gt;

&lt;p&gt;Alguns anos depois, enquanto conversava com um colega de trabalho, tínhamos acabado de jogar &lt;a href="https://en.wikipedia.org/wiki/Cave_Story" rel="noopener noreferrer"&gt;Cave Story&lt;/a&gt;, que havia recebido uma tradução de fã, e eu descobri que tinha sido feito por apenas uma pessoa. Logo entramos no assunto "por que não fazemos um jogo?".&lt;/p&gt;

&lt;p&gt;Isso foi em 2005, quase 10 anos antes do Godot existir, e uns 5 anos (se não mais) antes de qualquer um ter acesso (gratuito) à Unity. Mas ainda assim o mundo não estava perdido, e &lt;a href="https://liballeg.org/" rel="noopener noreferrer"&gt;Allegro&lt;/a&gt; estava aqui para te salvar.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Inclusive, essa página continua igual desde que eu a vi pela primeira vez em 2005.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Enquanto eu aprendia a escrever código em C, algo que nunca fizera antes, o mais perto que cheguei foi um pouco de BASIC e muitas funções de Excel, além de um pouco de Lisp para AutoCAD, mas isso não iria me impedir de progredir.&lt;/p&gt;

&lt;p&gt;Depois de uns dias, eu já tinha um &lt;code&gt;sprite&lt;/code&gt; na tela e conseguia movê-lo com as setas do teclado, basicamente o &lt;code&gt;hello world&lt;/code&gt; de qualquer game dev!&lt;/p&gt;

&lt;p&gt;Conversas vão e vêm, e meu colega de trabalho não queria mais fazer os &lt;code&gt;sprites&lt;/code&gt; para o jogo, e a única coisa que me restou foi um arquivo &lt;code&gt;png&lt;/code&gt; com sonhos ali.&lt;/p&gt;

&lt;p&gt;Em 2013, quando me graduei em Design Industrial, fiz como projeto de graduação um jogo de tabuleiro, um de muitos que fiz ao longo dos anos na universidade, e tão poucos compartilhei com amigos (algo que deveria ter feito muito mais).&lt;/p&gt;

&lt;p&gt;Quando me dei conta, era 2018 e eu estava abrindo o recém-lançado Godot 3, e então comecei novamente a fazer joguinhos. Geralmente o ponto que me quebra é o mesmo: "Arte".&lt;/p&gt;

&lt;p&gt;Como fazer a "&lt;em&gt;Arte&lt;/em&gt;"? O processo de "&lt;em&gt;design&lt;/em&gt;" eu entendo, sou capaz de fazer, escrever código onde consigo me entender o bastante; mas a "&lt;em&gt;arte&lt;/em&gt;", essa eu preciso definir.&lt;/p&gt;

&lt;p&gt;O que é "&lt;em&gt;arte&lt;/em&gt;"?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As duas primeiras coisas que aparecem no dicionário são:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Capacidade ou habilidade para a aplicação de conhecimento ou para a execução de uma ideia.&lt;/li&gt;
&lt;li&gt;Conjunto dos meios pelos quais é possível obter a realização prática de algo.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;E o que é "&lt;em&gt;arte&lt;/em&gt;" para mim no contexto de Game Dev?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Arte é o processo pelo qual o material de &lt;em&gt;design&lt;/em&gt; é convertido em &lt;code&gt;assets&lt;/code&gt; para um jogo.&lt;br&gt;
Nesse caso gráficos, música, código, diálogos, efeitos sonoros...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Certo, então &lt;em&gt;arte&lt;/em&gt; é tudo o que faz um jogo, &lt;em&gt;jogo&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;E onde está o problema?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;O problema é que eu, mesmo com esforço, ainda não consigo atingir um ponto de qualidade que me deixe satisfeito. Sou capaz de fazer músicas, efeitos sonoros (mesmo que a maioria sejam &lt;em&gt;blips&lt;/em&gt; e &lt;em&gt;blops&lt;/em&gt;), e consigo fazer a pixel art que tanto gosto.&lt;/p&gt;

&lt;p&gt;Mas eu não me divirto nesse processo. O processo de abrir o meu editor de texto e escrever código é divertido, abrir o editor de pixel e fazer o design de um personagem é legal... mas...&lt;/p&gt;

&lt;p&gt;Fazer animações é um saco,&lt;/p&gt;

&lt;p&gt;Pixel art é legal, mas fazer animações é um belo pé no saco.&lt;/p&gt;

&lt;p&gt;Compor música é legal, mas pai amado, eu levo quase um dia inteiro para compor &lt;strong&gt;uma&lt;/strong&gt; música, e ainda assim fica meia boca.&lt;/p&gt;

&lt;p&gt;Efeitos sonoros nunca me incomodaram, basta pegar uns objetos pela casa e gravar com o microfone, jogar toneladas de efeitos e está pronto.&lt;/p&gt;

&lt;p&gt;Código eu me divirto, e geralmente consigo fazer muito mais do que &lt;strong&gt;uma&lt;/strong&gt; mecânica por dia para meus jogos minúsculos.&lt;/p&gt;

&lt;center&gt;E então o que fazer?&lt;/center&gt;


&lt;center id="dont-know"&gt;&lt;strong&gt;Eu não tenho ideia&lt;/strong&gt;&lt;/center&gt;
&lt;br&gt;&lt;br&gt;

&lt;p&gt;Mas deixa eu te falar o que não funcionou até agora:&lt;/p&gt;

&lt;h3&gt;
  
  
  Escrever um Game Design Document (GDD)
&lt;/h3&gt;

&lt;p&gt;Claro que o maluco dos processos aqui iria decidir colocar processo para fazer os joguinhos, e muitas horas de planejamento já foram feitas e minha lista no &lt;a href="https://shinspiegel.itch.io/" rel="noopener noreferrer"&gt;itch&lt;/a&gt; continua no mesmo.&lt;/p&gt;

&lt;p&gt;Para cada item no &lt;a href="https://shinspiegel.itch.io/" rel="noopener noreferrer"&gt;itch&lt;/a&gt;, eu devo ter pelo menos 3 outros GDDs que nunca saíram do papel. E para cada jogo ali, eu tenho pelo menos mais 5x mais material em GDD para continuar o jogo.&lt;/p&gt;

&lt;p&gt;O que não funciona?&lt;/p&gt;

&lt;p&gt;Planejar demais e não ver resultado.&lt;/p&gt;

&lt;p&gt;Quanto mais eu preparo, menos resultados são perceptíveis, apenas que está longe demais de terminar. Sempre tem mais &lt;code&gt;sprites&lt;/code&gt; para serem feitos do que eu tenho tempo de vida para fazer, sempre tem mais músicas para serem compostas do que eu tenho capacidade de fazer.&lt;/p&gt;

&lt;p&gt;E lembre-se, eu sou um hobista nisso, e minha capacidade de desenho e composição são limitadas. (Para não chamar de &lt;em&gt;meia-boca&lt;/em&gt;)&lt;/p&gt;

&lt;h3&gt;
  
  
  Kanban, Trello, Jira...
&lt;/h3&gt;

&lt;p&gt;Não importa o tipo de board, isso é apenas uma forma mais visual de um GDD, e mais simplista. Quanto mais informações em cada cartão, pior; quanto menos informação em cada cartão, pior.&lt;/p&gt;

&lt;p&gt;Tentei colocar cartões com tags, coloridos, com desenhos, com ícones, mas no fundo, isso é apenas esforço que não vejo onde está indo, e que poderia estar usando para fazer mais código, ou fazer mais gráficos.&lt;/p&gt;

&lt;p&gt;Entre um board e uma lista com check-list, prefiro a lista.&lt;/p&gt;

&lt;h3&gt;
  
  
  Arquivos de texto simples, ou Markdown?
&lt;/h3&gt;

&lt;p&gt;Se é check-list, por que não ir direto aos arquivos de texto?&lt;/p&gt;

&lt;p&gt;Markdown é o novo &lt;code&gt;.doc&lt;/code&gt; do desenvolvedor, mas com menos efeitos de cores para as palavras e não tem como conectar numa planilha de dados, mas funciona bem o bastante, sinceramente.&lt;/p&gt;

&lt;p&gt;Funciona como organização de pensamentos. Mas quando começa a ficar mais pesado que isso, perde o sentido, principalmente se quiser colocar estimativas de tempo, ou tentar fazer um pseudo-Trello. Não funciona. Não tente, você vai se machucar!&lt;/p&gt;

&lt;p&gt;Agora, se for apenas "listas do que fazer", ou uma versão simplificada de GDD, "&lt;em&gt;funciona&lt;/em&gt;" dentro dos limites.&lt;/p&gt;

&lt;h3&gt;
  
  
  E o futuro?
&lt;/h3&gt;

&lt;p&gt;E o que fazer agora que compilei todas as informações, como eu disse aqui, não tenho ideia. Mas todos os erros te levam para frente, te fazem aprender a se tornar um dev, ou nesse caso um game dev, melhor, não?&lt;/p&gt;

&lt;p&gt;Espero que sim.&lt;/p&gt;

&lt;p&gt;Isso é por hoje, obrigado.&lt;/p&gt;

&lt;p&gt;(()=&amp;gt;{})()&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>godot</category>
    </item>
    <item>
      <title>Today I uninstalled VSCode</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Fri, 01 Mar 2024 10:08:51 +0000</pubDate>
      <link>https://dev.to/shinspiegel/today-i-uninstalled-vscode-4c19</link>
      <guid>https://dev.to/shinspiegel/today-i-uninstalled-vscode-4c19</guid>
      <description>&lt;h4&gt;
  
  
  TL:DR
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Yup, this is real, this is totally legit. &lt;br&gt;
On this very day I finally uninstalled VSCode.&lt;br&gt;
Goodbye Microsoft, and fˆ%c off!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let me start with some context, I didn't start as a software engineer, but I was there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When &lt;code&gt;bgcolor&lt;/code&gt; was an official property of HTML for styling&lt;/li&gt;
&lt;li&gt;When &lt;code&gt;jQuery&lt;/code&gt; was something useful with &lt;code&gt;WordPress&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;When &lt;code&gt;actionScript&lt;/code&gt; was the future of the internet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My first &lt;code&gt;hello world&lt;/code&gt; was on the DOS with a little BASIC magic, but at the time this was not "software", just scripts, and I always used these "scripts" for simple stuff, automating my routine with design tools, and making my life easier, little did I know that these scripts were already "software", just my mind didn't recognise as software.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I was naive.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In the last decade, when I started &lt;strong&gt;to code for real&lt;/strong&gt;, I needed a tool for this, and Google Docs wouldn't help that much&lt;/p&gt;

&lt;p&gt;But which text editor can I use? At the time there was not a single good solution, I saw some people with fancy IDEs, but this looks too complicated for my two-neuron-brain.&lt;/p&gt;

&lt;p&gt;So there was the simple &lt;a href="https://www.sublimetext.com/"&gt;Sublime&lt;/a&gt;, which was good for the first few years, then I found &lt;a href="https://brackets.io/"&gt;Brackets&lt;/a&gt; a text editor for the web, at the time software it was from the &lt;em&gt;beloved&lt;/em&gt; Adobe, so it was a nice choice.&lt;/p&gt;

&lt;p&gt;I can design in Photoshop, open the Brackets and apply the changes there. Perfect match!&lt;/p&gt;

&lt;p&gt;A few years later I had to jump on &lt;a href="https://atom-editor.cc/"&gt;Atom&lt;/a&gt;, and another year I was on the VSCode which was my home for the last 6 years. &lt;/p&gt;

&lt;p&gt;Everyone in the team uses it, friends, managers, the "namaste" guy, that nerdy Trekker, my uncle after downloading a "legal" version of Minecraft, your mon... &lt;/p&gt;

&lt;p&gt;But I know better, I know Microsoft, I saw what you did in the past, and I know how scummy and degenerated you are. That's why I never fully trusted.&lt;/p&gt;

&lt;p&gt;At some point, I'll need to move. &lt;/p&gt;

&lt;p&gt;But move to where? &lt;a href="https://zed.dev/"&gt;Zed&lt;/a&gt; isn't an open source (at the time), &lt;a href="https://atom-editor.cc/"&gt;Atom&lt;/a&gt; is pretty much dead, maybe put my coins in the &lt;a href="https://lapce.dev/"&gt;Lapce&lt;/a&gt;, it's made with Rust, so should be blazing fast.&lt;/p&gt;

&lt;p&gt;But they all felt that something was missing, there was no magic, there was no mystery.&lt;/p&gt;

&lt;p&gt;The more I looked, the less I felt like changing from VSCode, and more frustrated with the conditioning that Microsoft did on my brain to not even try something else.&lt;/p&gt;

&lt;p&gt;One day I saw my coworker using a very strange code editor, in the terminal, and I do spend a fair amount of time in the terminal, so why not? &lt;/p&gt;

&lt;p&gt;I decided to test, and &lt;em&gt;I failed super hard&lt;/em&gt;. How am I supposed to use this tool? Why do I need to use &lt;code&gt;hjkl&lt;/code&gt; to move the cursor? What curse is that?!&lt;/p&gt;

&lt;p&gt;I quickly moved back to the safe walls of VSCode, but this little interaction made me think. Looks like this could be the new mystery for my two-neuron-brain to solve. But making the change would be too much effort, so how to make this change in a slow and easier manner?&lt;/p&gt;

&lt;p&gt;First I need to learn the Vim motion, this is the way that this text editor moves things, and soon I found that pretty much all code editors have a way to enable this feature, from the elite JetBrain shitware to the worse nightmare xCode. &lt;/p&gt;

&lt;p&gt;So I just need to enable this feature on the VSCode, and... &lt;strong&gt;F&amp;amp;ˆK&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;There is no toggle for that, where in my &lt;code&gt;settings.json&lt;/code&gt; do I need to add to enable this? What do you mean there is an extension for that? Fine, one download later and I can start using it.&lt;/p&gt;

&lt;p&gt;The first step was the hardest one, but now I can feel comfortable.&lt;/p&gt;

&lt;p&gt;One day I did open my VSCode and I saw the new update, and I sniffed the usual shitification, looks like Microsoft is now collecting &lt;strong&gt;more&lt;/strong&gt; data from me, more data from my usage, but wait. I did disable the telemetry, and I saw my &lt;code&gt;json&lt;/code&gt; file with this flag disabled, but why I can see the network call for the Microsoft server? &lt;/p&gt;

&lt;p&gt;Considering my familiarity with the amazing quality of Microsoft, and looks like when you disable the telemetry, you disable part of it, not all of the telemetry, for the "bugs", "crash", and training data for the "Copilot", this is never an option.&lt;/p&gt;

&lt;p&gt;For &lt;a href="https://www.thurrott.com/windows/windows-10/187407/microsoft-has-a-software-quality-problem"&gt;some&lt;/a&gt; &lt;a href="https://www.thurrott.com/windows/windows-10/187407/microsoft-has-a-software-quality-problem"&gt;reason&lt;/a&gt; &lt;a href="https://onmsft.com/feature/microsoft-in-2021-the-good-the-bad-and-the-ugly/"&gt;I'm not&lt;/a&gt; surprised.&lt;/p&gt;

&lt;p&gt;If you look at the Edge Browser, it had a good start, but now just look at it and you can see the shitfication, Windows were never good to start, and the Teams was so badly bad that had to start from scratch to be just "bad" again.&lt;/p&gt;

&lt;p&gt;And I ask, why VSCode would be different? &lt;/p&gt;

&lt;p&gt;Time to say goodbye to bloatware about AI shit forced on the developers on a global level trying to squeeze a few extra copilot subscriptions.&lt;/p&gt;

&lt;p&gt;And with this, I'm moving my things to NeoVim and on the terminal I'll stay. Until Microsoft buys this software and turns it into shit.&lt;/p&gt;

&lt;p&gt;Thanks for reading, &lt;br&gt;
And special thanks to this coworker who showed me the way,&lt;br&gt;
And another one to the &lt;a href="https://www.twitch.tv/theprimeagen"&gt;cult leader ThePrimeagen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ps.: If you got offended by any text about Microsoft, I can recommend this &lt;a href="https://www.news24.com/you/archive/how-to-avoid-or-treat-burn-wounds-20170728-2"&gt;article&lt;/a&gt; to help.&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>neovim</category>
      <category>webdev</category>
      <category>microsoft</category>
    </item>
    <item>
      <title>Web Security</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Tue, 07 Feb 2023 12:23:58 +0000</pubDate>
      <link>https://dev.to/shinspiegel/web-security-c9h</link>
      <guid>https://dev.to/shinspiegel/web-security-c9h</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What are these texts?&lt;/strong&gt;&lt;br&gt;
I was studing and for me to have some real study done I need to write it down, this is a small collection of topics that I studied in the last few weeks.&lt;br&gt;
Other links from the same study-pool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/branching-strategies-535m/edit"&gt;Branching Strategies&lt;/a&gt; &amp;gt; &amp;gt; - &lt;a href="https://dev.to/shinspiegel/ci-cd-nb7"&gt;CI / CD&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/critical-rendering-path-1acm"&gt;Critical Rendering Path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/requirements-7d4"&gt;Requirements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/release-strategy-51be"&gt;Release Strategy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/rest-3877"&gt;REST&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/static-analysis-2650"&gt;Static Analysis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/web-security-c9h"&gt;Web Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Web Security
&lt;/h2&gt;

&lt;p&gt;Web apps have become essential business enablers as more organizations use them for a variety of purposes, including e-commerce, customer engagement, and employee empowerment. These apps continue to be the target of serious cyber attacks despite the fact that they generate enormous amounts of user and organizational data. Web security fundamentals, common vulnerabilities, and resources to keep up with the shifting threat landscape are covered in this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Online Web Applications Security Project (OWASP)
&lt;/h2&gt;

&lt;p&gt;The Open Web Application Security Project, or OWASP, is an international non-profit organization dedicated to web application security. One of OWASP’s core principles is that all of their materials be freely available and easily accessible on their website, making it possible for anyone to improve their own web application security. The materials they offer include documentation, tools, videos, and forums. Perhaps their best-known project is the OWASP Top 10.&lt;/p&gt;

&lt;h3&gt;
  
  
  Top ten list
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Injection.&lt;/strong&gt;&lt;br&gt;
Before understanding user input, web apps that take it must correctly validate it. Attackers may inject code or commands that are then executed if this is not done correctly. A successful injection can lead to a number of detrimental effects, ranging from attackers gaining access to sensitive information to losing administrative control of the server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Broken Authentication.&lt;/strong&gt;&lt;br&gt;
Many web applications depend on authentication and session management. Attackers may be able to steal user identities and accounts thanks to security weaknesses in these procedures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sensitive Data Exposure.&lt;/strong&gt;&lt;br&gt;
To keep it from being accessed by outside parties, web applications must secure the data they process, both while it is in transit and while it is at rest. This is crucial for PII that relates to financial data, healthcare data, and other types of PII (Personally Identifiable Information). Credit card fraud, identity theft, account takeover, and other attacks are included in the risk category of sensitive data exposure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;XML External Entities (XXE).&lt;/strong&gt;&lt;br&gt;
A common format for storing and sharing data is XML and JSON. It features the capability to dereference local or external URIs using the parser. An attacker may use a poorly-configured parser in a number of different ways. Malicious XML/JSON can attempt remote code execution, refer to confidential local data (such a file containing user credentials), or conduct a DoS (Denial of Service) assault by accessing local resources, among other things.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Broken Access Control.&lt;/strong&gt;&lt;br&gt;
This refers to inadequately-enforced restrictions on what authenticated users are allowed to do. A system with this flaw can allow attackers to gain unauthorized access to data, and even to interfere with the access that legitimate users have.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security Misconfiguration.&lt;/strong&gt;&lt;br&gt;
This group of dangers is highly diverse. It covers a wide range of topics, such as unpatched vulnerabilities in services, libraries, frameworks, and applications, incorrectly configured HTTP headers, sensitive information contained in verbose error messages that can be used to strengthen an attack, and open cloud storage (data stored in the cloud with unrestricted access privileges).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-Site Scripting (XSS).&lt;/strong&gt;&lt;br&gt;
Numerous online apps include user inputs into their sites. In XSS, an attacker provides inputs that contain scripts, the attacker wants the scripts to be included in the pages delivered to other users. (Common examples include comments, product reviews, user profiles for membership sites, etc.) An attacker can do a number of things if a web application does not correctly validate its inputs, including hijacking user sessions, changing the pages that are served to other users, and rerouting other users to malicious websites.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Insecure Deserialization.&lt;/strong&gt;&lt;br&gt;
XML and JSON are often used to serialize data. Web applications are vulnerable to malware payloads if they receive serialized data from unreliable sources. Numerous exploits, such as privilege escalation and remote code execution, may emerge from this.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Using Components with Known Vulnerabilities.&lt;/strong&gt;&lt;br&gt;
If a library or framework that an application utilizes has a known exploit, the attacker may be able to access the same internal resources as the program if they are successful. Depending on the application's access, this might lead to anything from server espionage and remote code execution to data theft.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Insufficient Logging &amp;amp; Monitoring.&lt;/strong&gt;&lt;br&gt;
Web applications must accurately record events so that administrators may determine if potentially malicious activity is taking place. Organizational regulations should also mandate that administrators keep a close eye on the logs to see what's happening. Failure to do so will significantly increase the harm done by successful attacks and frequently enable attackers to switch targets and broaden the scope of their operations. This risk might appear the simplest to manage out of the top 10, yet it still poses a serious threat to business.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Some Specifics
&lt;/h2&gt;

&lt;p&gt;OWASP is a gives the general idea on how to manage and work with the security for web applications. Still there is some common know vector for attacks.&lt;/p&gt;

&lt;h3&gt;
  
  
  SQL Injection
&lt;/h3&gt;

&lt;p&gt;An attacker can take advantage of weaknesses in a database's search process by using SQL injection. SQL injection allows an attacker to get access to sensitive data, create or modify user rights, or carry out data change, manipulation, or destruction schemes. A hacker can thus seize important data or change it to prevent or manage the operation of a vital system. An easy way to accomplish this though non-validate user input, or query params.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cross-site Scripting
&lt;/h3&gt;

&lt;p&gt;Cross-site scripting (XSS) is the name of a flaw that allows attackers to place client-side scripts inside of a page. This is then utilized to have immediate access to crucial info. A hacker may employ XSS to impersonate another user or trick a user into exposing important information. Some examples could be unintentional ability for the user to add custom details on their profile non-validating this user input.&lt;/p&gt;

&lt;h3&gt;
  
  
  Remote File Inclusion
&lt;/h3&gt;

&lt;p&gt;With remote file inclusion, an attacker makes use of flaws in a web application to reference external scripts. The attacker can then try to upload malware using an application's referencing feature. These malware varieties are also known as backdoor shells. The entire process is carried out from a different Uniform Resource Locator (URL) on a different domain.&lt;/p&gt;

&lt;h3&gt;
  
  
  Password Breach
&lt;/h3&gt;

&lt;p&gt;Password hacking is a frequent method used to access online resources. Frequently, a hacker will use a password that a user or administrator had previously used to sign in to a different website for which the hacker has a list of login information.&lt;/p&gt;

&lt;p&gt;In other instances, hackers employ a method known as "password spraying," in which they utilize well-known passwords like "12345678" or "password123" and attempt each one individually until they succeed in gaining access. Other methods include employing keyloggers or just looking for your password on paper and utilizing it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Breach
&lt;/h3&gt;

&lt;p&gt;An information breach occurs when private or delicate data is made public. Data breaches can occasionally occur by mistake, but they are frequently the work of hackers who want to use or sell the data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Malware Installation
&lt;/h3&gt;

&lt;p&gt;Malware can do a great deal of harm once it has been installed on a local network, including data exfiltration, ransomware encryption, and extortion.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phishing
&lt;/h3&gt;

&lt;p&gt;Since the majority of attacks begin with phishing emails, online security must have a method to prevent fraudulent emails from getting to an employee's inbox.&lt;/p&gt;

&lt;h3&gt;
  
  
  Distributed denial-of-service (DDoS)
&lt;/h3&gt;

&lt;p&gt;The distributed denial-of-service (DDoS) assault allows attackers to disrupt services for days at a time, harming revenue and operational continuity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tool of trade when dealing with web security
&lt;/h2&gt;

&lt;p&gt;These are some ways to protect the web application against some attack vectors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Web Application Firewall (WAF)
&lt;/h3&gt;

&lt;p&gt;A good WAF can potentially reduce or stop DDoS attacks and reduce or block malicious code injection when users submit information using online forms. It can substantially boost your techniques and reduce attacks, but it shouldn't be the only way to counter web-based attacks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vulnerability scanners
&lt;/h3&gt;

&lt;p&gt;Before it is put into use, any software should be penetration tested, but even in production, it should be regularly checked for security flaws. Scanners carry out simple hacker behaviors to discover weaknesses in your software. You can address problems before they lead to a serious data breach if you identify vulnerabilities before attackers do. Good scanning tools also look for corporate infrastructure configuration errors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fuzzing tools
&lt;/h3&gt;

&lt;p&gt;Similar to scanners, fuzzing tools can evaluate code as it is being produced in real time. A fuzzer checks the code before it is deployed to staging, throughout testing, and lastly before it is deployed to production. A fuzzer, as opposed to a straightforward scanner, offers information on the potential issue to assist developers and operational staff in resolving it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Black box testing tools
&lt;/h3&gt;

&lt;p&gt;Black box testing techniques simulate real-world attacks to detect flaws in software, which attackers utilize in a variety of ways. These tools carry out harmful operations against installed software to find potential security holes and make use of widely available exploits to assist developers in fixing problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  White box testing tools
&lt;/h3&gt;

&lt;p&gt;Coding errors cause widespread vulnerabilities to be introduced as developers create their programs. A white box testing tool evaluates code as it is written and gives developers knowledge to assist them avoid frequent errors. Consider white box testing as a means to monitor the creation of software in order to identify vulnerabilities before the code is compiled and released to testing and production settings.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>security</category>
      <category>websecurity</category>
    </item>
    <item>
      <title>Static Analysis</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Tue, 07 Feb 2023 12:23:54 +0000</pubDate>
      <link>https://dev.to/shinspiegel/static-analysis-2650</link>
      <guid>https://dev.to/shinspiegel/static-analysis-2650</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What are these texts?&lt;/strong&gt;&lt;br&gt;
I was studing and for me to have some real study done I need to write it down, this is a small collection of topics that I studied in the last few weeks.&lt;br&gt;
Other links from the same study-pool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/branching-strategies-535m/edit"&gt;Branching Strategies&lt;/a&gt; &amp;gt; &amp;gt; - &lt;a href="https://dev.to/shinspiegel/ci-cd-nb7"&gt;CI / CD&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/critical-rendering-path-1acm"&gt;Critical Rendering Path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/requirements-7d4"&gt;Requirements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/release-strategy-51be"&gt;Release Strategy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/rest-3877"&gt;REST&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/static-analysis-2650"&gt;Static Analysis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/web-security-c9h"&gt;Web Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What are "static analysis" tools?
&lt;/h2&gt;

&lt;p&gt;Static analysis tools refer to various tools that examine source code, executables, and even documentation to find problems before they occur. No code is actually executed.&lt;/p&gt;

&lt;p&gt;These tools vary widely in scope and purpose, from compiler-level logic error checking and code style enforcement to cloud-based tool suites that cover everything from formatting documentation to analyzing code complexity.&lt;/p&gt;

&lt;p&gt;In short, you can think of a static analysis tool as any tool that helps you maintain a healthy codebase without actually running that code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why are they useful to you?
&lt;/h2&gt;

&lt;p&gt;Ultimately, we want successful features/tools/products/etc. Build and deliver. It takes effort, time and money.&lt;/p&gt;

&lt;p&gt;In the short term, we can choose to accept technical debt, smelly code, and bad practices.&lt;/p&gt;

&lt;p&gt;Ultimately, however, all of these things catch up to us. Technical debt, smelly code, and emerging bugs slow down development cycles, reduce product quality, and ultimately increase the effort, time, and money required to develop a product.&lt;/p&gt;

&lt;p&gt;Static analysis tools can help us find and fix these issues more easily before they have a significant impact on our projects, reducing and preventing these issues across the board.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Quality
&lt;/h2&gt;

&lt;p&gt;You can enforce coding standards and analyze dependency graphs.&lt;/p&gt;

&lt;p&gt;You can analyze control flow, nesting, and data flow, as well as the complexity of blocks, functions, classes, files, and more.&lt;/p&gt;

&lt;p&gt;There are tools to analyze requirements documents or code documents.&lt;/p&gt;

&lt;p&gt;They can be used to reformat code or measure test coverage.&lt;/p&gt;

&lt;p&gt;These things tend to look small in isolation, but if ignored, the quality of our code can slowly degrade over time.&lt;/p&gt;

&lt;p&gt;With the right tools, we can analyze and optimize our code more easily. This makes the process more efficient and therefore more likely to last over the life of our project.&lt;/p&gt;

&lt;p&gt;If our code was evaluated the same way by a tool every time, our team might also learn to write code with fewer problems.&lt;/p&gt;

&lt;p&gt;Static analysis tools can improve the initial quality of our code, which can reduce the number of issues the tool needs to detect. Through this iterative process, the codebase can be further refined.&lt;/p&gt;

&lt;p&gt;In a perfect world, we would start by writing problem-free code. Of course, we don't live in a perfect world and bug-free code is a dream, but if we continually analyze our code, fix those problems, and learn from the process, we can continue to write more efficient code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Review
&lt;/h2&gt;

&lt;p&gt;The simple answer is that you don't.&lt;/p&gt;

&lt;p&gt;A big part of growing up as a software engineer is learning to analyze our code and introduce many of the ideas mentioned above. While reviewing code we can skip any type of tools and apply code analysis.&lt;/p&gt;

&lt;p&gt;But building software is much more than just code and yet we only have so much time in the day and so much brain power to spare. Finding and implementing all these different code quality components slows down the code review process considerably and makes it a burden rather than a great learning opportunity.&lt;/p&gt;

&lt;p&gt;Incorporating static analytics into the development and/or build pipeline automatically relieves the burden of manually performing analytics. There is no need to apply code patterns by manually commenting out each PR line. Code complexity analysis can be time-consuming and difficult for a developer.&lt;/p&gt;

&lt;p&gt;This tool can perform the same analysis every day with the same attention to detail. Relying on static analysis tools also removes the human element from potentially frustrating parts of the review process such as careful design or convention errors.&lt;/p&gt;

&lt;p&gt;The tool suggests deviations from an agreed-upon style without the need for back-and-forth between team members. There is no bias. The machine is not in a bad mood and hangs on every little thing.&lt;/p&gt;

&lt;p&gt;Either the device succeeds or fails. Less time spent discussing and debating minor points in the review leaves more time for more interesting and important conversations. What tools do well cant happen if its entirely the developers responsibility.&lt;/p&gt;

&lt;p&gt;Secure your code reviews and automate as much as possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools to use:
&lt;/h2&gt;

&lt;p&gt;These are some common use tools for the most commons scenarios on the Javascript and front-end development.&lt;/p&gt;

&lt;h3&gt;
  
  
  ESLint
&lt;/h3&gt;

&lt;p&gt;ESLint is an open source Javascript tool by Zakas in June 2013. Often used to find problematic patterns or code that doesn't follow certain style guidelines. ESLint is written using Node.js to provide a fast runtime environment and easy installation via npm. With ESLint you can enforce coding standards using a fixed set of independent rules. Yes you can enable and disable the rule. These rules are fully binding.&lt;/p&gt;

&lt;h4&gt;
  
  
  Why use ESLint?
&lt;/h4&gt;

&lt;p&gt;JavaScript is a dynamic language that is loosely typed and very prone to developer error. ESLint helps you incorporate guidelines into your coding standards and helps reduce these errors. The main reason for implementing such a guide is that each developer has their own writing style (naming conventions/tabs/single or double quotes for strings etc.). Additionally different styling techniques can make your codebase look different more error prone and more fragile. This can lead to pitfalls that you don't want to face especially when dealing with JavaScript.&lt;/p&gt;

&lt;h4&gt;
  
  
  When to use it?
&lt;/h4&gt;

&lt;p&gt;This is the type of tool that can be used regardless of project size or team. In both cases you should apply the usual standard coding practices/guidelines. Linting tools like ESLint allow developers to find problems without running their own JavaScript code. One of the main reasons for creating ESLint was to allow developers to create their own lining rules.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to use it?
&lt;/h4&gt;

&lt;p&gt;You can install ESLint using npm or yarn:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;eslint &lt;span class="nt"&gt;--save-dev&lt;/span&gt; &lt;span class="c"&gt;## or yarn&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: It is also possible to install ESLint globally rather than locally (using npm install eslint --global). However, this is NOT recommended, and any plugins or shareable configs that you use must be installed locally in either case.&lt;/p&gt;

&lt;p&gt;After installing it, initialize it with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx eslint &lt;span class="nt"&gt;--init&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: — init assumes you have a package.json file already. If you don't, make sure to run npm init or yarn init beforehand.&lt;/p&gt;

&lt;p&gt;The moment you're done with the installation and initialization you'll have a .eslintrc.{js,yml,json} file in your directory. In it, you'll see some rules configured like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;eslint.rc&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"rules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"semi"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"always"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"quotes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"double"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're here that means you've successfully configured the ESLint. Here's how you can use it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx eslint &amp;lt;your file&amp;gt;.js
&lt;span class="c"&gt;## or&lt;/span&gt;
npx eslint &amp;lt;folder containing js files&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also add lint in your &lt;code&gt;package.json&lt;/code&gt; file (if not already added)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"lint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"eslint ."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Prettier
&lt;/h3&gt;

&lt;p&gt;Prettier applies a consistent code style to your code base (ie code patterns that don't affect the AST). This is because it ignores the original style and recasts the parsed AST to its own rules that use maximum lines. Consider the length and wrap the cords when necessary.&lt;/p&gt;

&lt;h4&gt;
  
  
  Why prettier?
&lt;/h4&gt;

&lt;p&gt;The biggest reason for adopting Prettier is to stop all the ongoing debate about style. Its generally agreed that a general style guide is valuable for a project or team but getting there can be a painful and rewarding process. People are very passionate about how to write specific code and no one likes to spend time writing or getting information.&lt;/p&gt;

&lt;p&gt;Prettier is generally recommended for those with existing codebases and JavaScript experience but those who benefit disproportionately are those new to codebases. People might think this is only useful for people with very limited programming experience but we've seen experienced engineers shorten the onboarding time to join the company because they've coded before. Different styles can be used and developers can come. in other programming languages.&lt;/p&gt;

&lt;p&gt;What usually happens after using Prettier is that they realize that they actually spent a lot of time and mental energy designing their code. With good editor integration you can hit that magic link key and the code is formatted. It was an eye-opening experience if ever.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to use it?
&lt;/h4&gt;

&lt;p&gt;Prerequisites: Node.js (^10.12.0, or &amp;gt;=12.0.0)&lt;br&gt;
You can install ESLint using npm or yarn:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;prettier &lt;span class="nt"&gt;--save-dev&lt;/span&gt; &lt;span class="c"&gt;## or yarn&lt;/span&gt;
&lt;span class="nb"&gt;touch&lt;/span&gt; .prettierrc &lt;span class="c"&gt;## Create the basic configuration file&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the configuration file you can extra configure for your taste of for the project needs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;.prettierrc&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"trailingComma"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"es5"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"tabWidth"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"semi"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"singleQuote"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can run the prettier and format the files with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx prettier &lt;span class="nt"&gt;--write&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also add lint in your &lt;code&gt;package.json&lt;/code&gt; file (if not already added)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"lint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"prettier --write ."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  SonarQube
&lt;/h3&gt;

&lt;p&gt;From all the options, this is the heavier one.&lt;/p&gt;

&lt;p&gt;SonarQube is an open source platform developed by SonarSource for continuous code quality checking. Sonar performs static code analysis and provides detailed reports on code duplication code smells errors and vulnerabilities.&lt;/p&gt;

&lt;h4&gt;
  
  
  Benefits of SonarQube
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sustainability&lt;/strong&gt; - Reduce complexity and improve application life by duplicating code for potential vulnerabilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Productivity&lt;/strong&gt; - Reduce maintenance costs and operational risk at scale. This eliminates the need to modify the code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quality&lt;/strong&gt; - Code quality control is an integral part of the software development process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Errors&lt;/strong&gt; - It detects code errors and prompts developers to automatically fix them before sending output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consistency&lt;/strong&gt; - Determines where code standards are violated and improves quality.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Developers provide functionality that developers need on tight deadlines. It is important for developers to compile quality code multiple times due to potential code duplication errors and deployment complexity.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to use it?
&lt;/h4&gt;

&lt;p&gt;Pre-requisites: Docker and Docker-compose&lt;/p&gt;

&lt;p&gt;Create a docker compose file, add the follow content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;## docker-compose.yml&lt;/span&gt;
&lt;span class="c1"&gt;## https://github.com/SonarSource/docker-sonarqube/blob/master/example-compose-files/sq-with-postgres/docker-compose.yml&lt;/span&gt;
&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3"&lt;/span&gt;
&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sonarqube&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sonarqube:community&lt;/span&gt;
    &lt;span class="na"&gt;hostname&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sonarqube&lt;/span&gt;
    &lt;span class="na"&gt;container_name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sonarqube&lt;/span&gt;
    &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;db&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;SONAR_JDBC_URL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;jdbc:postgresql://db:5432/sonar&lt;/span&gt;
      &lt;span class="na"&gt;SONAR_JDBC_USERNAME&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sonar&lt;/span&gt;
      &lt;span class="na"&gt;SONAR_JDBC_PASSWORD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sonar&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;sonarqube_data:/opt/sonarqube/data&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;sonarqube_extensions:/opt/sonarqube/extensions&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;sonarqube_logs:/opt/sonarqube/logs&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;9000:9000"&lt;/span&gt;
  &lt;span class="na"&gt;db&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres:12&lt;/span&gt;
    &lt;span class="na"&gt;hostname&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgresql&lt;/span&gt;
    &lt;span class="na"&gt;container_name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgresql&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;POSTGRES_USER&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sonar&lt;/span&gt;
      &lt;span class="na"&gt;POSTGRES_PASSWORD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sonar&lt;/span&gt;
      &lt;span class="na"&gt;POSTGRES_DB&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sonar&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;postgresql:/var/lib/postgresql&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;postgresql_data:/var/lib/postgresql/data&lt;/span&gt;

&lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sonarqube_data&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sonarqube_extensions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sonarqube_logs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;postgresql&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;postgresql_data&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;after the file created you just need a simple &lt;code&gt;docker-compose up&lt;/code&gt; on the folder with the file to start the sonarqube.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>codecoverage</category>
      <category>testing</category>
    </item>
    <item>
      <title>REST</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Tue, 07 Feb 2023 12:23:50 +0000</pubDate>
      <link>https://dev.to/shinspiegel/rest-3877</link>
      <guid>https://dev.to/shinspiegel/rest-3877</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What are these texts?&lt;/strong&gt;&lt;br&gt;
I was studing and for me to have some real study done I need to write it down, this is a small collection of topics that I studied in the last few weeks.&lt;br&gt;
Other links from the same study-pool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/branching-strategies-535m/edit"&gt;Branching Strategies&lt;/a&gt; &amp;gt; &amp;gt; - &lt;a href="https://dev.to/shinspiegel/ci-cd-nb7"&gt;CI / CD&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/critical-rendering-path-1acm"&gt;Critical Rendering Path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/requirements-7d4"&gt;Requirements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/release-strategy-51be"&gt;Release Strategy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/rest-3877"&gt;REST&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/static-analysis-2650"&gt;Static Analysis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/web-security-c9h"&gt;Web Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is RESTful API?
&lt;/h2&gt;

&lt;p&gt;To have a safe online information exchange between two computer it's needed an interface, one of then is RESTful API. To carry out various duties, the majority of business apps must interface with other internal and external applications. For instance, in order to automate invoicing and connect with an internal services application. This information exchange is supported by RESTful APIs because they adhere to safe, dependable, and effective standards for software communication.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an API?
&lt;/h2&gt;

&lt;p&gt;An application programming interface (API) defines the rules that you must follow to communicate with other software systems. Developers expose or create APIs so that other applications can communicate with their applications programmatically. Usually there is an client and a resource that the client aim to retrive.&lt;/p&gt;

&lt;p&gt;Clients: that seek to access information via the web are referred to as clients. The client, who makes use of the API, might be a person or a piece of software.&lt;/p&gt;

&lt;p&gt;Resources: are the details that various programs give their users. Resources can be any kind of data, including text, numbers, photos, videos, and so on. The device that provides the client with the resource is also referred to as the server. While retaining security, control, and authentication, businesses use APIs to share resources and offer web services. They can also choose which customers have access to particular internal resources with the aid of APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is REST or RESTFul?
&lt;/h2&gt;

&lt;p&gt;A software architecture called Representational State Transfer (REST) places restrictions on how an API should operate. REST APIs are APIs that adhere to the REST architectural design. RESTful web services are online services that use the REST architecture. RESTful web APIs are commonly referred to as RESTful APIs. REST API and RESTful API can, however, be used interchangeably.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the benefits of RESTful APIs?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Scalability
&lt;/h3&gt;

&lt;p&gt;Because REST optimizes client-server interactions, systems that employ REST APIs can grow effectively. Because the server does not need to keep track of previous client requests, statelessness reduces server burden. Some client-server interactions are reduced or eliminated entirely by properly managed caching. All of these aspects enable scaling without creating performance-degrading communication bottlenecks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Flexibility
&lt;/h3&gt;

&lt;p&gt;Total client-server separation is supported by RESTful web services. In order for each server component to develop independently, they disconnect and simplify the numerous server components. Changes to the server application's platform or technology have no impact on the client application. Flexibility is further increased by the option to overlay application features. For instance, developers don't need to rewrite the application logic to make changes to the database layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Independence
&lt;/h3&gt;

&lt;p&gt;Regardless of the technology being used, REST APIs work. Different programming languages can be used to create client and server apps without changing how the API is designed. On either side, the underlying technology can be changed without impacting communication.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do RESTful APIs work?
&lt;/h2&gt;

&lt;p&gt;A RESTful API performs the same fundamental task as accessing the internet. When a client needs a resource, it uses the API to communicate with the server. In the server application API documentation, API developers outline how the client should utilize the REST API. The standard procedures for any REST API call are as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A request is made to the server by the client.

&lt;ul&gt;
&lt;li&gt;The client formats the request in accordance with the API documentation so that the server can interpret it.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The server verifies the client's identity and validates that the client is authorized to submit that request.

&lt;ul&gt;
&lt;li&gt;The request is received by the server, which then handles it internally.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The client receives a response from the server.

&lt;ul&gt;
&lt;li&gt;If the request was successful or not is indicated in the response to the client.&lt;/li&gt;
&lt;li&gt;Any information that the client asked for is also included in the response.&lt;/li&gt;
&lt;li&gt;Depending on how the API is designed by the developers, the REST API request and response details differ widely.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Details of the REST request
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Unique resource identifier (URL)
&lt;/h3&gt;

&lt;p&gt;The server identifies each resource with unique resource identifiers. For REST services, the server typically performs resource identification by using a Uniform Resource Locator (URL). The URL specifies the path to the resource. A URL is similar to the website address that you enter into your browser to visit any webpage. The URL is also called the request endpoint and clearly specifies to the server what the client requires.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method (or Verbs)
&lt;/h3&gt;

&lt;p&gt;Each resource is assigned a special resource identifier by the server. The server commonly uses a URL to identify resources for REST services. The path to the resource is specified by the URL. The website address you type into your browser to access any webpage is similar to a URL. The URL makes explicit to the server what the client needs and is also known as the request endpoint.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GET: used to access server-side resources at the URL provided. The server can cache GET requests and include arguments in RESTful API queries.&lt;/li&gt;
&lt;li&gt;POST: used to deliver information to servers. Multiple requests for the same resource result in multiple copies of that resource being created as a byproduct.&lt;/li&gt;
&lt;li&gt;PUT: used to complete update already-existing resources. The same request will not create multiple instances of the resource.&lt;/li&gt;
&lt;li&gt;PATCH: used to modify already-existing resources. In contrast with the PUT, this request changes partial of the resource.&lt;/li&gt;
&lt;li&gt;DELETE: used delete a resource. Usually this returns an empty body.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Headers
&lt;/h3&gt;

&lt;p&gt;Additionally, the request includes headers or other metadata. They provide details like the server, encoding, timestamp, and content type and provide further context for the request. Commonly authentication is added as headers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Message body
&lt;/h3&gt;

&lt;p&gt;The resource representation is contained in the request body. Based on the information in the request headers, the server chooses an appropriate representation format. Clients may request data in the Text, XML or JSON formats for example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common authentication for REST
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Basic authentication: The user name and password are sent by the client in the request header. Base64 is an encoding method that turns the pair into a collection of 64 characters for secure transmission.&lt;/li&gt;
&lt;li&gt;Bearer authentication: The act of granting access control to the token bearer is referred to as bearer authentication. The server normally generates the bearer token in response to a login request. It is typically an encrypted string of characters. To access resources, the client includes the token in the request headers.&lt;/li&gt;
&lt;li&gt;API keys: Another option for REST API authentication is API keys. In this method, the server gives a brand-new client a special created value. The client uses the special API key to identify itself each time it wants to access resources. Because the client must send the key, which leaves it open to network theft, API keys are less secure.&lt;/li&gt;
&lt;li&gt;OAuth: For extremely secure login access to any system, OAuth combines passwords and tokens. The authorization process is completed by the server after it first requests a password and an extra token. It has a defined scope and longevity and can check the token at any time as well as over time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to read a REST response?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Status line
&lt;/h3&gt;

&lt;p&gt;The three-digit status code in the status line indicates whether the request was successful or unsuccessful. The first character determines the type of the response, the other digits determine specific type of response.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1XX: informational&lt;/li&gt;
&lt;li&gt;2XX: successful&lt;/li&gt;
&lt;li&gt;3XX: redirection&lt;/li&gt;
&lt;li&gt;4XX: client error&lt;/li&gt;
&lt;li&gt;5XX: server error&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Message body
&lt;/h3&gt;

&lt;p&gt;The resource representation is contained in the response body. Based on the information in the request headers, the server chooses an appropriate representation format. Clients may request data in the Text, XML or JSON formats for example.&lt;/p&gt;

&lt;h3&gt;
  
  
  Headers
&lt;/h3&gt;

&lt;p&gt;Additionally, the response includes headers or other metadata. They provide details like the server, encoding, timestamp, and content type and provide further context for the response.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>rest</category>
      <category>api</category>
    </item>
    <item>
      <title>Release Strategy</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Tue, 07 Feb 2023 12:23:46 +0000</pubDate>
      <link>https://dev.to/shinspiegel/release-strategy-51be</link>
      <guid>https://dev.to/shinspiegel/release-strategy-51be</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What are these texts?&lt;/strong&gt;&lt;br&gt;
I was studing and for me to have some real study done I need to write it down, this is a small collection of topics that I studied in the last few weeks.&lt;br&gt;
Other links from the same study-pool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/branching-strategies-535m/edit"&gt;Branching Strategies&lt;/a&gt; &amp;gt; &amp;gt; - &lt;a href="https://dev.to/shinspiegel/ci-cd-nb7"&gt;CI / CD&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/critical-rendering-path-1acm"&gt;Critical Rendering Path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/requirements-7d4"&gt;Requirements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/release-strategy-51be"&gt;Release Strategy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/rest-3877"&gt;REST&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/static-analysis-2650"&gt;Static Analysis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/web-security-c9h"&gt;Web Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is a release strategy?
&lt;/h2&gt;

&lt;p&gt;Release is when the software is ready to be pushed to production. The process can also involves making the software open to a small group of users.&lt;/p&gt;

&lt;h2&gt;
  
  
  What kind of releases we can use?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Continuous release availability
&lt;/h3&gt;

&lt;p&gt;Delivery teams can release their solutions whenever they want. This is the only strategy that supports continuous delivery. To make it work, a host of practices are required, such as fully automated deployment, fully automated regression testing, feature toggles, self-recovering components, and many others.&lt;/p&gt;

&lt;h3&gt;
  
  
  Release windows
&lt;/h3&gt;

&lt;p&gt;A release window is a period of time when one or more teams can release into production. A release slot is a subset of the release window during which a team can deploy their solution into production. If your organization has a policy that production releases occur between 1 am and 5 am on Saturday nights, then up to four releases may occur during that window.&lt;/p&gt;

&lt;p&gt;The advantages of this approach are that it provides a consistent release schedule to business stakeholders and that it has release date targets for delivery teams. Slow cadence release windows can be a problem for release management processes that need to support multiple teams. Teams have to aim for a future release window because there are only so many release slots available during each window. This problem gets worse when teams move to a continuous delivery strategy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Release train
&lt;/h3&gt;

&lt;p&gt;The idea of a release train is that every team involved with that train has the same release schedule, for example, this train releases once a quarter, or once a month, or even once a week. In large programs, where the individual teams are each working on part of a larger whole, this strategy is used.&lt;/p&gt;

&lt;p&gt;A release train provides a consistent release schedule for stakeholders and serves as a rallying point for development teams. The train metaphor works well in practice. If your team misses the release date, the train goes on without you, and you need to wait for space on the next train.&lt;/p&gt;

&lt;p&gt;Dependencies are also respected. Similar to a family taking a trip together, if several components need to ship together they have to go on the same train. Development teams are constrained to a common release schedule, making it difficult to support lean or continuous delivery strategies. Slow cadence release windows can cause a potential disadvantage, as release trains may also suffer from them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ring deployment
&lt;/h3&gt;

&lt;p&gt;Different groups receive a new feature to manage the risk of deployment. These groups are represented as a series of rings, starting with a small group and growing to encompass all your users.&lt;/p&gt;

&lt;p&gt;Pick users for each group based on similar attributes or an opt-in process if you do a ring deployment. Features can be made available to those groups. It is possible to release to internal users first, then to the other users, and then to all users.&lt;/p&gt;

&lt;h3&gt;
  
  
  Percentage-based releases
&lt;/h3&gt;

&lt;p&gt;In a percentage roll out, the deployment has already happened and the release will be based on a percentage. The new feature will be rolled out to 10% of users, 25%, then 50%, until all users receive it. Users are randomly selected to get the new feature. If there is a way to identify them, they retain access to the new feature. When users must log in to use your product or accept cookies, this is the best kind of sorting.&lt;/p&gt;

&lt;p&gt;There is little variation in your targeted user base, so these releases are useful when you cannot run a beta program. If you run a small B2B application with the same 1000 monthly active users, a percentage-based release is likely to give you an accurate estimate of whether the full rollout is likely to have a positive or negative impact on your user base.&lt;/p&gt;

&lt;h3&gt;
  
  
  Canary releases
&lt;/h3&gt;

&lt;p&gt;A canary release is a test to see if a feature release will have a positive impact on users. Only a small number of your users will be able to use the new feature, and you can only target them based on who they are.&lt;/p&gt;

&lt;p&gt;Make sure the small group in your canary release is representative of your overall users. Older versions of a phone's operating system may be missed if a canary release only goes to people with the latest phones.&lt;/p&gt;

&lt;p&gt;A canary release can be used to test capacity management and user acceptance. If you roll out a new feature to a group and realize that it consumes too many resources, you can turn the feature off and make the product better.&lt;/p&gt;

&lt;h3&gt;
  
  
  Targeted releases
&lt;/h3&gt;

&lt;p&gt;It makes sense to target a release based on something other than percentages. A food delivery service could try out a new feature or set of related features in one medium-size city to see how it works for multiple types of users.&lt;/p&gt;

&lt;p&gt;If that service makes a change that affects restaurants, drivers, and consumers, all of those users should receive the change at the same time. If the city-wide roll out produces good results, the service can release it to the rest of their user base.&lt;/p&gt;

&lt;h3&gt;
  
  
  Entitlement releases
&lt;/h3&gt;

&lt;p&gt;It's possible that you want a flag that affects access. What users can do on your platform is affected by these flags. An entitlement release can be used to add a feature that is only for a small group of users. If you had a premium service, you could change the release to only allow people who paid a membership fee to use it.&lt;/p&gt;

&lt;p&gt;You can combine entitlement releases with percentage-based releases or canary releases, but only some users will have access to the feature after the release is done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Post-release tasks
&lt;/h2&gt;

&lt;p&gt;When the feature is fully deployed, your flag's lifecycle doesn't finish. You need to have metrics and monitoring set up to view human and system behaviors, and you need to have a plan to remove temporary flags after you fully implement the new feature.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tracking metrics.
&lt;/h3&gt;

&lt;p&gt;We can determine whether something is improving or not by using metrics. When releasing new features, you should consider what metrics you need to track.&lt;/p&gt;

&lt;p&gt;With the deployment of a new feature, the availability, reliability, and response time of the application should not change. Before, during, and after you deploy code, set up monitoring to make sure it doesn't degrade.&lt;/p&gt;

&lt;p&gt;Depending on your objectives and business, the metrics you track will be different. Tracking metrics such as page load time, errors, uptime, conversions, or user registration can tell you whether a feature is performing well or causing problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  The flags are being removed.
&lt;/h3&gt;

&lt;p&gt;It is not a good idea to include deployment and release flags in your code. After a feature is stable and fully released, you can remove the code associated with the feature flags. It eliminates the chance of accidental deactivation of the feature and makes your code easier to read and understand.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>releasestrategy</category>
    </item>
    <item>
      <title>Requirements</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Tue, 07 Feb 2023 12:23:43 +0000</pubDate>
      <link>https://dev.to/shinspiegel/requirements-7d4</link>
      <guid>https://dev.to/shinspiegel/requirements-7d4</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What are these texts?&lt;/strong&gt;&lt;br&gt;
I was studing and for me to have some real study done I need to write it down, this is a small collection of topics that I studied in the last few weeks.&lt;br&gt;
Other links from the same study-pool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/branching-strategies-535m/edit"&gt;Branching Strategies&lt;/a&gt; &amp;gt; &amp;gt; - &lt;a href="https://dev.to/shinspiegel/ci-cd-nb7"&gt;CI / CD&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/critical-rendering-path-1acm"&gt;Critical Rendering Path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/requirements-7d4"&gt;Requirements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/release-strategy-51be"&gt;Release Strategy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/rest-3877"&gt;REST&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/static-analysis-2650"&gt;Static Analysis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/web-security-c9h"&gt;Web Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What are requirements?
&lt;/h2&gt;

&lt;p&gt;What you are going to accomplish is defined by the requirements. What will be included, what won't be included, how it will be done, and who will do it. Possible risks to the project, as well as criteria to measure the project's success, are often included in requirements. This information for the reader may include charts, graphs, diagrams, use cases, and mock-ups. It is necessary to define a project's need as well as the solution in order to write effective requirements. To write effective requirements, it must define a project's need as well as the solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are functional requirements?
&lt;/h2&gt;

&lt;p&gt;In software development, functional requirements determine the functions an entire application or just one of its components should perform. A function consists of three steps: data input – system behavior – data output. It can calculate, manipulate data, carry out business processes, establish user interaction, or do any other tasks. In other words, a functional requirement is WHAT an application must or must not do after some data input. Functional requirements are important as they show software developers how the system is intended to behave. If the system doesn’t meet functional requirements it means that it doesn’t work properly.&lt;/p&gt;

&lt;p&gt;Function requirements determine the functions of an entire application or some (or even one) component. The three steps of a function are: data input, system behavior and data output. It can do a lot of things, such as calculating, manipulating data, carrying out business processes, and establishing user interaction. A functional requirement is what an application must or cannot do after some data input. Functional requirements show how the system is intended to work. The system doesn't work properly if it doesn't meet functional requirements. In other words, a functional requirement is WHAT the software should do.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are non-functional requirements?
&lt;/h2&gt;

&lt;p&gt;The performance and quality characteristics of software, such as system usability, effectiveness, security, and scalability, are considered non-functional requirements. For instance, a website must load in no more than 3 seconds and be able to serve more than 15 million people without seeing any performance issues. An app will still be able to carry out its essential tasks if non-functional requirements aren't met, but it won't be able to offer a satisfying user experience. Non-functional requirements are crucial because they aid in defining the system capabilities and restrictions necessary for producing high-quality software. Therefore, for effective product adoption, non-functional criteria are just as crucial as functional needs. In other words, a functional requirement is HOW the software should do.&lt;/p&gt;

&lt;h2&gt;
  
  
  How they differ?
&lt;/h2&gt;

&lt;p&gt;The benefit of understanding the distinction between functional and non-functional requirements is that they specify the project's overall scope of work and budge. To create an application within the specified time and financial constraints, software engineers must stay current with this scope. The development team must prolong deadlines when the scope of the task is continually changing, which raises development expenses. This could have negative effects on a project.&lt;/p&gt;

&lt;p&gt;When developing an MVP, it's critical to distinguish between the two categories of criteria. The features and functionality that should be included to the app first should be discussed by the development team and the client. A client could have his or her own ideas on the project's specifications. It's crucial to understand what kind of demand it is if a customer decides they want to remove or modify a feature. Software engineers can typically adjust non-functional needs with little effort, but functional requirements usually take more effort and significant modifications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where requirements comes from?
&lt;/h2&gt;

&lt;p&gt;Customers should ideally have all the functional and non-functional requirements ready before contacting starting the development. Therefore, they must either seek a third party source or prepare them in advance on their own. These are some groups examples of functional requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Business requirements: outline the project's objectives and expectations, potential advantages, potential restrictions, and scope.&lt;/li&gt;
&lt;li&gt;User requirements – include the user's requirements and the system's capabilities for the user's activities.&lt;/li&gt;
&lt;li&gt;System requirements – include system activities, hardware and software requirements, and other information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is also some groups for non-functional requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Availability – ensures that the software will operate reliably for a specific amount of time, such as with minimal downtime throughout the year.&lt;/li&gt;
&lt;li&gt;Capacity – determines how much data or services the application can handle.&lt;/li&gt;
&lt;li&gt;Performance – determines the app's speed.&lt;/li&gt;
&lt;li&gt;Recoverability – assures that the app can restore the system to a specific set of parameters or recover all the data following a system failure.&lt;/li&gt;
&lt;li&gt;Reliability – specifies that the application will operate without interruption in a specified environment or for a set amount of time.&lt;/li&gt;
&lt;li&gt;Scalability – decides whether the app's functionality will remain unaffected by changes to its size or volume.&lt;/li&gt;
&lt;li&gt;Security – establishes the level of security that the app should have, for instance, banking and fintech apps must adhere to national and international security standards.&lt;/li&gt;
&lt;li&gt;Supportability – indicates whether the app is simple to support and maintain throughout its life cycle and what type of help is needed, such as an internal team or remote support.&lt;/li&gt;
&lt;li&gt;Usability – determines how easily a user may interact with the app's interface, such as the color of the screen and the size of the buttons.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How can I express some requirements?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  User Stories
&lt;/h3&gt;

&lt;p&gt;It is standard procedure to write the requirements as user stories. User stories are the requirements that a user communicates. They typically take the shape of multiple short, repetitive sentences:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As a (user), I want to (goal) so that (reason).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When needed to explain or show to non-technical members, user stories are helpful and can explain easily most of the features and functionalities needed on the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Software Requirements Specification Document
&lt;/h3&gt;

&lt;p&gt;A software development team can use the Software Requirements Specification (SRS) document to guide their work when developing an app. It contains a thorough explanation of all the features and functions of the product, as well as a compilation of all the customers' needs and wishes in a language that is understandable to the development team.&lt;/p&gt;

&lt;p&gt;An SRS document typically has the following major sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Intro: a brief introduction that includes the goal of the product, a glossary of words, and references to relevant literature and resources for the development of the app&lt;/li&gt;
&lt;li&gt;Description: description includes a thorough explanation of the characteristics of the product, coding guidelines, data interchange rules, and more.&lt;/li&gt;
&lt;li&gt;Features: the section on system features, which describes how the features of the app should work.&lt;/li&gt;
&lt;li&gt;Non-functional: Non-functional criteria include all performance benchmarks, the qualities of an app, and security specifications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For efficient application development, user cases, user stories, and SRS generation are crucial. However, there are other documents that are just as crucial for the beginning and growth of a project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Other tools
&lt;/h3&gt;

&lt;p&gt;There are huge variety of tools and methodologies that could be applied for development. These are some that can be used, modified or even based on to create new ones.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>requirements</category>
    </item>
    <item>
      <title>Critical Rendering Path</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Tue, 07 Feb 2023 12:23:01 +0000</pubDate>
      <link>https://dev.to/shinspiegel/critical-rendering-path-1acm</link>
      <guid>https://dev.to/shinspiegel/critical-rendering-path-1acm</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What are these texts?&lt;/strong&gt;&lt;br&gt;
I was studing and for me to have some real study done I need to write it down, this is a small collection of topics that I studied in the last few weeks.&lt;br&gt;
Other links from the same study-pool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/branching-strategies-535m/edit"&gt;Branching Strategies&lt;/a&gt; &amp;gt; &amp;gt; - &lt;a href="https://dev.to/shinspiegel/ci-cd-nb7"&gt;CI / CD&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/critical-rendering-path-1acm"&gt;Critical Rendering Path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/requirements-7d4"&gt;Requirements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/release-strategy-51be"&gt;Release Strategy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/rest-3877"&gt;REST&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/static-analysis-2650"&gt;Static Analysis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/web-security-c9h"&gt;Web Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Critical Rendering Path
&lt;/h2&gt;

&lt;p&gt;The series of operations a browser performs to translate HTML, CSS, and JavaScript into visible pixels on the screen is known as the Critical Rendering Path (CRP). If we can improve that, our page will render more quickly.&lt;/p&gt;

&lt;p&gt;The steps needed for the browser to render are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Document Object Model(DOM)&lt;/li&gt;
&lt;li&gt;CSS Object Model(CSSOM)&lt;/li&gt;
&lt;li&gt;Render Tree&lt;/li&gt;
&lt;li&gt;Layout&lt;/li&gt;
&lt;li&gt;Paint&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1. Document Object Model (DOM)
&lt;/h3&gt;

&lt;p&gt;When we make request to a server, we get a response in the form of an HTTP message, which is divided into three parts: the start line, the header files, and the body. The body can include any arbitrary binary data (pictures, movies, and audio), and/or text, but the start line and headers are both text-based.&lt;/p&gt;

&lt;p&gt;After receiving the answer (HTML markup language), the browser must translate all of the markup into what is typically displayed on screens. The browser starts by digesting the HTML and constructing the DOM according to a clearly defined set of steps.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Convert bytes to characters&lt;/li&gt;
&lt;li&gt;Identify tokens&lt;/li&gt;
&lt;li&gt;Convert tokens to nodes&lt;/li&gt;
&lt;li&gt;Build DOM Tree&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The string of characters converted from the bytes (if needed) will create the HTML body of the page. Something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="err"&gt;...&lt;/span&gt;
    &lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="na"&gt;title&lt;/span&gt; &lt;span class="err"&gt;...&lt;/span&gt;
    &lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="na"&gt;link&lt;/span&gt; &lt;span class="err"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which are converted into tokens by the tokenizer, creating an token structure, the example below are just a reference and not a real tokenized HTML.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;StartTag:head&lt;/span&gt;
&lt;span class="s"&gt;Tag:meta&lt;/span&gt;
&lt;span class="s"&gt;Tag:link&lt;/span&gt;
&lt;span class="s"&gt;EndTag:head Hello...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While the tokenizer is converting the text into tokens, another function takes these tokens and converts them to Node objects. The Document Object Model, or DOM, is a tree structure that captures the content and properties of HTML as well as all the relationships between the nodes.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. CSS Object Model (CSSOM)
&lt;/h3&gt;

&lt;p&gt;Therefore, the DOM just records the page's content and not its associated CSS. We need to create the CSS Object Model in order to integrate CSS. The way CSSOM is built is very similar to how DOM is built.&lt;/p&gt;

&lt;p&gt;However, we are unable to use the same incremental technique (partially generated CSS tree) as we did when building the DOM in this situation. Let's assume that we used partial CSS when building our page, for example &lt;code&gt;p {background:'red'}&lt;/code&gt;, after some other part of the CSS we reach &lt;code&gt;p {background:'blue'}&lt;/code&gt;, this operation overrides the previous one. If an incremental technique were used, this nodes would have a wrong color applied.&lt;/p&gt;

&lt;p&gt;As a result, the browser stops page rendering until it has finished receiving and processing all of the CSS.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;CSS IS RENDER BLOCKING&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is important to note that,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;JAVASCRIPT IS PARSER BLOCKING&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Because whenever we see the script tag in our HTML markup, it prevents the DOM from being constructed. As JavaScript may attempt to affect the page's style, Javascript should only be used after CSSOM creation.&lt;/p&gt;

&lt;p&gt;JavaScript execution and CSS block rendering are both examples of this. Certain scripts don't alter the DOM or CSSOM, therefore they shouldn't prevent rendering. We employ async for those scripts so that they are not hindered by CSSOM or DOM creation.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Render Tree
&lt;/h3&gt;

&lt;p&gt;After the tree structure and the styles (DOM and CSSOM) are calculated. The tree is finally rendered with all the styles correct applied. The components with characteristics like &lt;code&gt;display:none&lt;/code&gt; are ignored because it only records visible content.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Layout
&lt;/h3&gt;

&lt;p&gt;We need to determine where and how each element is placed on the page now that our render tree has been constructed. This is the stage of layout. The browser will execute the layout step each time we alter the geometry (width, height, and position) of elements.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Paint
&lt;/h3&gt;

&lt;p&gt;The visible page content can finally be transformed to pixels in the paint phase so that it can be shown on the screen. In this process, the vector (boxes or forms created during the layout step) is converted to the raster (combination of individual pixels to be displayed on screen). This conversion is carried out by the rasterizer.&lt;/p&gt;

&lt;p&gt;In most cases, one surface is painted. However, the browser will occasionally create various surfaces known as layers that can each be painted into separately. Once it is finished, the browser correctly merges all of the layers into one layer and displays them on the screen. Composite Layers is the name given to this procedure.&lt;/p&gt;

&lt;p&gt;Usually all of these procedures occurs on the CPU, after all the layers are then send to the GPU that will make the drawing on the browser viewport.&lt;/p&gt;

&lt;p&gt;The hardware will display a new image or frame for the user to see whenever the screen undergoes any form of visual change, such as scrolling or animation. Most devices refresh the screen at a rate of 60 frames per second (Hz), which is the standard.&lt;/p&gt;

&lt;p&gt;Therefore, if we have 1000ms for 60 frames, we only have 16ms to produce each frame.&lt;br&gt;
We typically only have 10 milliseconds because the browser uses the remaining time for other tasks.&lt;/p&gt;

&lt;p&gt;If the process takes more than that, we can say that the page is laggy or janky.&lt;/p&gt;

&lt;h3&gt;
  
  
  Blocking the render
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Order or blocking&lt;br&gt;
Javascript &amp;gt; Style &amp;gt; Layout &amp;gt; Paint &amp;gt; Composite&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Understanding exactly which parts of the pipeline our code activates is crucial because on each phase we can create some overhang that could cause a lag or jank.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>criticalrenderingpath</category>
    </item>
    <item>
      <title>CI / CD</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Tue, 07 Feb 2023 12:22:29 +0000</pubDate>
      <link>https://dev.to/shinspiegel/ci-cd-nb7</link>
      <guid>https://dev.to/shinspiegel/ci-cd-nb7</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What are these texts?&lt;/strong&gt;&lt;br&gt;
I was studing and for me to have some real study done I need to write it down, this is a small collection of topics that I studied in the last few weeks.&lt;br&gt;
Other links from the same study-pool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/branching-strategies-535m/edit"&gt;Branching Strategies&lt;/a&gt; &amp;gt; &amp;gt; - &lt;a href="https://dev.to/shinspiegel/ci-cd-nb7"&gt;CI / CD&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/critical-rendering-path-1acm"&gt;Critical Rendering Path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/requirements-7d4"&gt;Requirements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/release-strategy-51be"&gt;Release Strategy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/rest-3877"&gt;REST&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/static-analysis-2650"&gt;Static Analysis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/web-security-c9h"&gt;Web Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is CI / CD
&lt;/h2&gt;

&lt;p&gt;CI/CD is a process that helps developers quickly and frequently deliver applications to customers by automating the development process. CI/CD is a software development practice that emphasizes continuous integration, continuous delivery, and continuous deployment.&lt;/p&gt;

&lt;p&gt;CI/CD is a helpful solution for integrating new code, which can often cause problems for development and operations teams, it's also, a process that helps your software development team keep their applications running smoothly and efficiently by automating and monitoring them throughout the development process. The "CI/CD pipeline" is a collection of interconnected practices that are often used by development and operations teams working together in an agile way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Continuous integration vs. delivery vs. deployment
&lt;/h2&gt;

&lt;p&gt;The CI/CD has a few different meanings.&lt;/p&gt;

&lt;p&gt;The "CI" always refers to continuous integration, is an automation process that developers use to keep their code bases up-to-date. Successful CI means that new code changes to an app are frequently built, tested, and merged to a shared repository. One way to avoid the problem of having multiple branches of an app in development that could conflict with each other is to use a solution like Git.&lt;/p&gt;

&lt;p&gt;The "CD" refers to continuous delivery and/or continuous deployment, which are related concepts that sometimes get used interchangeably. Both are about automation, but they are also used to show how much automation is happening.&lt;/p&gt;

&lt;p&gt;Continuous delivery means that changes to an application are automatically tested and uploaded to a repository, where they can be deployed to a live production environment by the operations or devops team. It is an answer to the problem of poor visibility and communication. It is the purpose of continuous delivery to make it easy to deploy new code.&lt;/p&gt;

&lt;h2&gt;
  
  
  CI/CD Flow
&lt;/h2&gt;

&lt;p&gt;It is possible for CI/CD to specify just connected practices of continuous integration and continuous delivery, or it can also mean all connected practices of continuous integration, continuous delivery, and continuous deployment. Sometimes "continuous delivery" is used to make it more complicated because of the processes of continuous deployment as well. CI/CD is a process that involves adding a high degree of ongoing automation and continuous monitoring to app development, so it's probably not worth your time to get bogged down on specific definitions.&lt;/p&gt;

&lt;p&gt;Case-by-case, what the terms refer to depends on how much automation has been built. Many enterprises start by adding CI, and then automate delivery and deployment down the road, for instance as part of cloud-native apps or just to enhance the process of the deployment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Continuous integration, the CI
&lt;/h3&gt;

&lt;p&gt;In modern application development, the goal is to have multiple developers working on the same app. If an organization is set up to merge all branching source code on a single day, the resulting work can be tedious, manual, and time-intensive. There is a chance that a change to an application will conflict with other changes made by other developers. The problem can be further compounded if each developer has their own IDE settings, instead of the team agreeing on a single cloud-based IDE, or sharing the same settings for all the IDEs.&lt;/p&gt;

&lt;p&gt;The integration should happen on a daily basis, or in the best, multiple times a day. Once a developer's changes to an application are merged, those changes are validated by automatically building the application and running different levels of automated tests, to ensure the changes haven't broken the app. The entire app needs to be tested, from classes to the different modules. Continuous integration makes it easier to fix bugs when automated testing discovers a conflict between new and existing code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Continuous delivery, the CD
&lt;/h3&gt;

&lt;p&gt;Continuous delivery streamlines the release of code to a repository following the automation of builds and unit and integration testing. In order to have an effective continuous delivery process, it is important that continuous integration is built into the development process. The goal of continuous delivery is to have a codebase that is always ready for deployment to a production environment. This involves test automation and code release automation from the merge of code changes to the delivery of production ready builds. The operations team is able to deploy an app quickly and easily at the end of the process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Continuous deployment, the other CD
&lt;/h3&gt;

&lt;p&gt;Continuous deployment is the final stage of a mature CI/CD pipelines. Continuous delivery is an extension of continuous deployment, which automatically releases a production ready build to a code repository. Continuous deployment relies heavily on well-designed test automation because there is no manual gate at the stage.&lt;/p&gt;

&lt;p&gt;Continuous deployment means that a change to a cloud application can be made within minutes if it passes automated testing. It's easier to receive and incorporate user feedback now. It is easier to release changes to apps in small pieces, rather than all at once, as a result of all of these connected CI/CD practices. There is a lot of upfront investment since automated tests will need to be written to accommodate a variety of testing and release stages.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are some common CI/CD tools?
&lt;/h2&gt;

&lt;p&gt;A team can automate their development, deployment, and testing with CI/CD tools. Some tools specifically handle integration, some manage development and deployment, and others specialize in continuous testing or related functions. Currently most of the repository solutions already have some level of CI/CD integrated, like Gitlab CI/CD, Github Actions and others.&lt;/p&gt;

&lt;p&gt;There is also other tools that automate the process like Jenkins, TravisCI, Spinnaker, GoCD, Concource and Screwdrivers. All these solutions provides almost the same level of CI and CD for most of the projects. At the end of the day, does not matter what specific tool is used as long there is a process for the CI and CD on the project and most of the deployment can be automated.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Branching Strategies</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Tue, 07 Feb 2023 12:21:21 +0000</pubDate>
      <link>https://dev.to/shinspiegel/branching-strategies-535m</link>
      <guid>https://dev.to/shinspiegel/branching-strategies-535m</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What are these texts?&lt;/strong&gt;&lt;br&gt;
I was studing and for me to have some real study done I need to write it down, this is a small collection of topics that I studied in the last few weeks.&lt;br&gt;
Other links from the same study-pool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/branching-strategies-535m/edit"&gt;Branching Strategies&lt;/a&gt; &amp;gt; &amp;gt; - &lt;a href="https://dev.to/shinspiegel/ci-cd-nb7"&gt;CI / CD&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/critical-rendering-path-1acm"&gt;Critical Rendering Path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/requirements-7d4"&gt;Requirements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/release-strategy-51be"&gt;Release Strategy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/shinspiegel/rest-3877"&gt;REST&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/static-analysis-2650"&gt;Static Analysis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shinspiegel/web-security-c9h"&gt;Web Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is branching strategies
&lt;/h2&gt;

&lt;p&gt;Git is a common version control system used in many organizations, and branches are often used as a way for teams to develop features separately.&lt;/p&gt;

&lt;p&gt;These branches are usually merged or rebased back to a master branch once the work is completed. This way, the features (and any bug fixes) are kept separate from each other allowing you to fix bugs more easily.&lt;/p&gt;

&lt;p&gt;Branches protect the mainline of code, and any changes made to a branch don't affect other developers. A branching strategy is the way that software development teams use version control when writing, merging and deploying code.&lt;/p&gt;

&lt;p&gt;Even though branches aren't strictly limited to Git, I'll primarily use Git for version control. Before we discuss different branching strategies, let's take a look at how Git actually works and why it is such a popular source control system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why you need a branching strategy
&lt;/h2&gt;

&lt;p&gt;A branching strategy is essential to avoid conflicts when merging changes and to make it easier to integrate changes into the master branch.&lt;/p&gt;

&lt;h3&gt;
  
  
  A branching strategy aims to:
&lt;/h3&gt;

&lt;p&gt;To maximize productivity, ensure that developers are working in a coordinated fashion.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allows parallel development&lt;/li&gt;
&lt;li&gt;Organize a series of planned, structured releases&lt;/li&gt;
&lt;li&gt;Created a path to follow on the process to create and merge&lt;/li&gt;
&lt;li&gt;Improves the ability to create a more coherent environment for releases&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Here some common strategies
&lt;/h2&gt;

&lt;h3&gt;
  
  
  GitFlow
&lt;/h3&gt;

&lt;p&gt;GitFlow is a powerful development workflow that enables parallel development where developers work on features on different branches from the master branch. This makes it easier to manage features and keep them consistent. Later, when the changes are complete, the developers merge those changes back into the master branch for release.&lt;/p&gt;

&lt;p&gt;This branching strategy consists of the following branches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Master&lt;/strong&gt;: The main code to be release. This code should be production ready.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Develop&lt;/strong&gt;: This is a intermediary branch for testing, QA or any other usage before release a new version of the software.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature&lt;/strong&gt;: to develop new features, you should branch off the develop branch. This is not a single branch. Every feature should have its own branch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Release&lt;/strong&gt;: to prepare a new production release, you typically branch from the develop branch and merge back to both develop and master.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hotfix&lt;/strong&gt;: is created when a bug is discovered and needs to be fixed. This allows developers to continue working on their own changes on the develop branch while the bug is being fixed. This branch is typically derived from the master.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The master branch is considered to be the most important branch, with an infinite lifetime. The other branches are meant to help developers work together more effectively, usually lasting only a short time.&lt;/p&gt;

&lt;h4&gt;
  
  
  Pros and Cons
&lt;/h4&gt;

&lt;p&gt;This model allows for parallel development to protect the production code, so the main branch remains stable for release while developers work on separate branches. Adding more branches can lead to multiple versions of the code being maintained, which can become difficult to manage as developers merge their changes from the development branch to the main.&lt;/p&gt;

&lt;p&gt;Developers will need to create a release branch first, then make sure any final work is also merged back into the development branch and then that release branch will need to be merged into the main branch.&lt;/p&gt;

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

&lt;p&gt;This is a simpler version of GitFlow designed for smaller teams. It doesn't require managing multiple versions, making it ideal for smaller teams. This model doesn't use release branches.&lt;/p&gt;

&lt;p&gt;Starting with the master branch, developers create branches, feature branches, which are isolated from the master and used for their own work. These branches are then merged back into the main branch. The feature branch is deleted. This model keeps the master code in a deployable state so that it can support continuous integration and continuous delivery processes.&lt;/p&gt;

&lt;h4&gt;
  
  
  Pros and Cons
&lt;/h4&gt;

&lt;p&gt;It is heavily based on the Agile principles, which makes it a fast, streamlined branching strategy that uses short production cycles and frequent releases. This strategy allows for fast feedback loops so that teams can quickly identify and solve issues.&lt;/p&gt;

&lt;p&gt;If a development strategy doesn't have multiple development branches, it's more susceptible to bugs and can lead to an unstable production code if bug fixes happen in the main branch. The master branch can become cluttered because it is used for both production and development.&lt;/p&gt;

&lt;p&gt;The model is more suited for smaller teams, and as teams grow they may experience merge conflicts as everyone is merging to the same branch. This can be problematic as developers can't see what other developers are working on, leading to potential conflicts.&lt;/p&gt;

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

&lt;p&gt;GitLab Flow is a simpler alternative to GitFlow that allows for feature-driven development and feature branching with issue tracking. GitFlow helps developers create a develop branch and use that as the default, while GitLab Flow works with the main branch right away.&lt;/p&gt;

&lt;h4&gt;
  
  
  Pros and Cons
&lt;/h4&gt;

&lt;p&gt;If you want to keep multiple environments and want to have a staging environment separate from the production environment, this is a great solution. Whenever the development branch is ready for release, you can merge back into the production branch and release it.&lt;/p&gt;

&lt;p&gt;This strategy allows developers to maintain separate versions of software in different environments, providing proper isolation. GitLab Flow assumes that you can deploy your code into production whenever you merge a feature branch into the master branch, but GitLab Flow also allows your code to pass through internal environments before it reaches production.&lt;/p&gt;

&lt;h3&gt;
  
  
  Trunk-based development
&lt;/h3&gt;

&lt;p&gt;Trunk-based development is a branching strategy that, in fact, doesn't require any branches. Developers integrate their changes into a shared trunk at least once a day. The trunk shared between the all of the developers should be ready for release at any time.&lt;/p&gt;

&lt;p&gt;The key to successful Git development is to make frequent, smaller changes. This helps limit the number of long-lasting branches and avoids merge conflicts, which ensures that all developers are working on the same branch.&lt;/p&gt;

&lt;p&gt;In other words, developers commit directly to the trunk without using branches. Feature flags are a common strategy for controlling which features are enabled in a software application. Because the trunk is always ready for release, feature flags help separate deployment from release, so any changes that aren't ready can be wrapped in a feature flag and hidden while completed features and can be released to end users without delay.&lt;/p&gt;

&lt;h4&gt;
  
  
  Pros and Cons
&lt;/h4&gt;

&lt;p&gt;Continuous integration is a powerful tool for managing changes to a project's source code. Trunk-based development makes it easy to keep the trunk up to date, which makes it easy to test changes and ensure that the project is running smoothly.&lt;/p&gt;

&lt;p&gt;Developers can collaborate more easily by viewing changes other developers make directly in the trunk without the need for branches. This is different from other branching methods where each developer works independently in their own branch and any changes that occur in that branch can only be seen after merging into the main branch.&lt;/p&gt;

&lt;p&gt;Trunk-based development eliminates the stress of long-lived branches because it doesn't require branches, and merge conflicts or so-called "merge hell" because developers push small changes frequently. This will help to avoid any conflicts that may arise.&lt;/p&gt;

&lt;p&gt;This strategy is better suited for more experienced developers, as it offers a lot of autonomy. This might be intimidating for inexperienced developers, who are interacting directly with the shared trunk. If you are a less experienced team, you may want to use a Git branching strategy.&lt;/p&gt;

</description>
      <category>git</category>
      <category>branchingstrategies</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The pain of upgrading software</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Sun, 11 Sep 2022 08:26:36 +0000</pubDate>
      <link>https://dev.to/shinspiegel/the-pain-of-upgrading-software-pdg</link>
      <guid>https://dev.to/shinspiegel/the-pain-of-upgrading-software-pdg</guid>
      <description>&lt;p&gt;Ok, I'll try to write this post in both portuguese and english.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt; English
&lt;/h3&gt;

&lt;p&gt;Okay, I'm toying with this &lt;a href="https://shinspiegel.itch.io/until-the-end-of-it"&gt;little project&lt;/a&gt; to make a simple little game, with some metroidvania elements (because of reaons) using the &lt;a href="https://godotengine.org/"&gt;Godot Engine&lt;/a&gt; behind the scenes to learn &lt;a href="https://en.wikipedia.org/wiki/Video_game_design"&gt;Game Design&lt;/a&gt; elements and of course, sharpen my knowledge on other platforms.&lt;/p&gt;

&lt;p&gt;Like everyone, I'm all waiting for the long-awaited version 4 of the engine, still there is some alpha versions have been released recently that are stable enough to play with and learn what's next in the engine.&lt;/p&gt;

&lt;p&gt;Not only that, I can also provide one or two collaborations on the &lt;a href="https://docs.godotengine.org/"&gt;documentation&lt;/a&gt; to improve or even just make it a little clearer.&lt;/p&gt;

&lt;p&gt;And like every software update, we have some pains, and with them comes bilateral thinking:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On the one hand&lt;/strong&gt;, I can progress with the development of the game in the current version which is stable and ready for production (not that I care about that for a hobby project), I already have most of the elements I need ready to use, it's a matter of adding only the missing details (other enemies, level designing other areas...)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On the other hand&lt;/strong&gt;, I know that there are some parts of the code that I made that are not good, some paradigms that I shouldn't have used, and of course, many improvements that I learned throughout this experiment. If I would start the project from scratch I will be much more able to do something better for my dev experience than I had when I started the project.&lt;/p&gt;

&lt;p&gt;Now the problem,&lt;/p&gt;

&lt;p&gt;Even if I had a button: "update version" and everything is updated and working perfectly, my accumulated errors will still carry the weight in development.&lt;/p&gt;

&lt;p&gt;And since I have the opportunity to review the code (to update the GDScript version), I could in theory update my past mistakes and make it more fit for the future "Shin" not swearing to present "Shin" so much.&lt;/p&gt;

&lt;p&gt;This is the pain of updating the software, as it's a hobby project, and it's going to affect maybe 3 people at most, that won't be a problem, doing everything from scratch.&lt;/p&gt;

&lt;p&gt;But dealing with larger software, where it affects many people, that thought is clearly seen. As a result, I can see in the industry a lot of stuff being used from 10, 20 years ago, and nobody changes anything because updating will bring pain.&lt;/p&gt;

&lt;p&gt;Anyway, this is a small rant, and to remind me that I will continue to develop the same game, but I will update to the new version of the engine.&lt;/p&gt;

&lt;p&gt;Wish me luck with the crazy choice I'm making.&lt;/p&gt;

&lt;p&gt;Ps.: And that way the game will never be officially finished, becoming another project for the drawer.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt; Português
&lt;/h3&gt;

&lt;p&gt;Certo, eu to brincando com esse &lt;a href="https://shinspiegel.itch.io/until-the-end-of-it"&gt;pequeno project&lt;/a&gt; de fazer um joguinho simples, com alguns elementos de metroidvania (porque sim) usando o &lt;a href="https://godotengine.org/"&gt;Godot Engine&lt;/a&gt; por trás dos panos para aprender elementos de &lt;a href="https://en.wikipedia.org/wiki/Video_game_design"&gt;Game Design&lt;/a&gt; e claro, afiar meus conhecimentos em outras plataformas.&lt;/p&gt;

&lt;p&gt;E como todos eu estou aguardando a tão esperada versão 4 da engine, a questão é que recentemente tem sido liberadas versões alpha que estão estáveis o bastante para brincar e aprender o que vem por aí na engine. &lt;/p&gt;

&lt;p&gt;Não apenas isso, também posso perceber uma ou outra colaboração que posso fazer na &lt;a href="https://docs.godotengine.org/"&gt;documentação&lt;/a&gt; para aprimorar ou mesmo apenas deixar ela um pouco mais clara. &lt;/p&gt;

&lt;p&gt;E como toda atualização de software, temos algumas dores, e com elas venho o pensamento bilateral:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;De um lado&lt;/strong&gt;, eu tenho como progredir com o desenvolvimento do jogo na versão atual que é estável e pronta para produção (não que eu me importe com isso para um project de hobby), tenho já boa parte dos elementos que preciso prontos para uso, é uma questão de adicionar somente os detalhes que faltam (outros inimigos, fazer o level design de outras áreas...)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do outro lado&lt;/strong&gt;, eu sei que tem algumas partes do código que fiz que não está legal, alguns paradigmas que não deveria ter usado, e claro, muitas melhorias que eu aprendi ao longo desse experimento. Como sempre se eu começar o projeto do zero terei muito mais capacidade de fazer algo melhor para minha experiência de dev do que tinha quando comecei o projeto.&lt;/p&gt;

&lt;p&gt;Agora o problema,&lt;/p&gt;

&lt;p&gt;Mesmo que tivesse um botão: "atualize a versão" e tudo seja atualizado e funcionando perfeitamente, meus erros acumulados ainda terão o peso no desenvolvimento.&lt;/p&gt;

&lt;p&gt;E como eu tenho a oportunidade de revisar o código (para autalizar a versão do GDScript), eu poderia em teoria atualizar meus erros do passado e deixar ele mais apto para o futuro "Shin" não xingar tanto o "Shin" do presente.&lt;/p&gt;

&lt;p&gt;E esta é a dor de atualizar o software, como é um projeto de hobby, e vai afetar talvez 3 pessoas no máximo, isso não será um problema, fazer tudo do zero.&lt;/p&gt;

&lt;p&gt;Mas quando se pensa em software maior, onde afeta muitas pessoas, esse pensamento claramente é visto. Resultado pelo qual consigo ver na indústria muita coisa sendo usada de 10, 20 anos atrás, e ninguém muda nada porque atualizar vai trazer dores.&lt;/p&gt;

&lt;p&gt;De qualquer forma, esse é um pequeno desabafo, e para me lembrar que eu irei continuar desenvolvendo o mesmo jogo, mas irei atualizar para a versão nova da engine.&lt;/p&gt;

&lt;p&gt;Me desejem sorte pela escolha maluca que estou tomando.&lt;/p&gt;

&lt;p&gt;Ps.: E dessa forma o jogo nunca será oficialmente terminado, se tornando mais um projeto para a gaveta.&lt;/p&gt;

&lt;p&gt;(() =&amp;gt; ())()&lt;/p&gt;

</description>
      <category>upgrade</category>
      <category>godot</category>
      <category>development</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>SignalBus?</title>
      <dc:creator>Jeferson 'Shin' Leite Borges</dc:creator>
      <pubDate>Mon, 08 Aug 2022 08:10:06 +0000</pubDate>
      <link>https://dev.to/shinspiegel/signalbus-4788</link>
      <guid>https://dev.to/shinspiegel/signalbus-4788</guid>
      <description>&lt;p&gt;Ok, I'll try to write this post in both portuguese and english.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt; English
&lt;/h3&gt;

&lt;p&gt;Let's go!&lt;/p&gt;

&lt;p&gt;What is a &lt;code&gt;SignalBus&lt;/code&gt; and why all this noise in my head when I think about this pattern and more importantly, how to implement it in &lt;a href="https://godotengine.org/"&gt;Godot?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So what's the concept on this one?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine the situation, you made your UI all beautiful and wonderful, you have your level all built up, you even have points to spawn the character throughout the level. Everything is perfect, then you need to connect the player and his life points with the UI.&lt;/p&gt;

&lt;p&gt;The initial thought comes to mind, "This is a job for signals!", so at your &lt;em&gt;level&lt;/em&gt; you locate the player's &lt;em&gt;node&lt;/em&gt; and then connect it to &lt;em&gt;UI&lt;/em&gt;. Everything works, but now you have a code snippet somewhere (level, player, or UI) that you need to know everyone's details and organize.&lt;/p&gt;

&lt;p&gt;So this code is entangled.&lt;/p&gt;

&lt;p&gt;For small games, this is not a problem, and particularly, until well advanced in my development I didn't experience any problems, and the solution seemed to me even elegant.&lt;/p&gt;

&lt;p&gt;But I've this itch in my head, this noise in my brain, this might be better, but how?&lt;/p&gt;

&lt;p&gt;It was then that I heard the term &lt;code&gt;SignalBus&lt;/code&gt;. Now we have a problem and we're going to solve the problem a little more elegantly, and then we're going to think about the implications of that.&lt;/p&gt;

&lt;p&gt;In this case we have a &lt;a href="https://en.wikipedia.org/wiki/Singleton_pattern"&gt;&lt;code&gt;Singleton&lt;/code&gt;&lt;/a&gt;, which for the engine is done just by creating a script (which we will call &lt;code&gt;SignalBus.gd&lt;/code&gt; and add the list of &lt;a href="https://docs.godotengine.org/en/stable/tutorials/scripting/singletons_autoload.html"&gt;auto-loads&lt;/a&gt;, that way the script will always be running and it can be called in any other script.&lt;/p&gt;

&lt;p&gt;Let's then add something very interesting to our friend signal bus, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gdscript"&gt;&lt;code&gt;&lt;span class="c1"&gt;#SignalBus.gd&lt;/span&gt;
&lt;span class="k"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;Node2D&lt;/span&gt;

&lt;span class="k"&gt;signal&lt;/span&gt; &lt;span class="n"&gt;PlayerDamaged&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;total_hp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;current_hp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pretty short, right?&lt;br&gt;
But what about our player friend?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gdscript"&gt;&lt;code&gt;&lt;span class="c1"&gt;#Player.gd&lt;/span&gt;
&lt;span class="k"&gt;class_name&lt;/span&gt; &lt;span class="n"&gt;Player&lt;/span&gt; &lt;span class="k"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;KinematicBody2D&lt;/span&gt;
&lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;receive_damage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;damage&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="c1"&gt;#...&lt;/span&gt;
  &lt;span class="n"&gt;SignalBus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"PlayerDamaged"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_hp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;current_hp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, the player class only knows about SignalBus, but it doesn't know the UI, it doesn't know the level, and honestly, it doesn't need to. The level also no longer needs to know the player, let alone the UI.&lt;/p&gt;

&lt;p&gt;Now let's see the UI class,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gdscript"&gt;&lt;code&gt;&lt;span class="c1"&gt;#UI.gd&lt;/span&gt;
&lt;span class="k"&gt;class_name&lt;/span&gt; &lt;span class="n"&gt;UI&lt;/span&gt; &lt;span class="k"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;Control&lt;/span&gt;
&lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;_ready&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;damage&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="c1"&gt;#...&lt;/span&gt;
  &lt;span class="n"&gt;SignalBus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"PlayerDamaged"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"on_update_player_life"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;on_update_player_life&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="c1"&gt;# Update ui with actual values&lt;/span&gt;
&lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we have a code that is only coupled to &lt;code&gt;SignalBus&lt;/code&gt;, with that we can move things to other places and even put more things listening to the player signal.&lt;/p&gt;

&lt;p&gt;Imagine that we now have an enemy that waits to hear the player take damage and then shoots? Or we need to put a new animation of shaking the screen when the player takes damage, all this can be done by the same signal that is controlled by our friend &lt;code&gt;bus&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt; Português
&lt;/h3&gt;

&lt;p&gt;Vamos lá, &lt;/p&gt;

&lt;p&gt;O que é um &lt;code&gt;SignalBus&lt;/code&gt; e porque todo esse barulho em minha cabeça quando penso nesse padrão e o mais importante, como implementar ele em &lt;a href="https://godotengine.org/"&gt;Godot?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Qual a idea por trás?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine a situação, você fez sua UI toda linda e maravilhosa, você tem seu nível todo construido, você tem até pontos para nascer o personagem ao longo da fase. Tudo é perfeito, aí você precisa conectar o jogador e seus pontos de vida com a UI.&lt;/p&gt;

&lt;p&gt;Em seu pensamento inicial vem a mente, "Isso é um trabalho para sinais!", então na sua &lt;em&gt;nível&lt;/em&gt; você localiza o &lt;em&gt;nó&lt;/em&gt; do jogador e então conecta junto a &lt;em&gt;UI&lt;/em&gt;. Tudo funciona, mas agora você tem um trecho de código em algum lugar (nível, jogador ou UI) que precisa saber dos detalhes de todo mundo e organizar.&lt;/p&gt;

&lt;p&gt;Ou seja, acoplamento de código.&lt;/p&gt;

&lt;p&gt;Para jogos pequenos, isso não é um problema, e particularmente, até bem avançado no meu desenvolvimento eu não senti problemas, e a solução me pareceu até mesmo elegante.&lt;/p&gt;

&lt;p&gt;Mas eu tinha essa pulga atrás da orelha pensando, isso pode ser melhor, mas como?&lt;/p&gt;

&lt;p&gt;Foi então que ouvi o termo &lt;code&gt;SignalBus&lt;/code&gt;. Agora temos um problema e iremos a solução do problema um pouco mais elegante, e depois vamos pensar nas implicações disso.&lt;/p&gt;

&lt;p&gt;Nesse caso temos um &lt;a href="https://en.wikipedia.org/wiki/Singleton_pattern"&gt;&lt;code&gt;Singleton&lt;/code&gt;&lt;/a&gt;, que para a engine é feito apenas por criar um script (que vamos chamar de &lt;code&gt;SignalBus.gd&lt;/code&gt; e adicionar a lista de &lt;a href="https://docs.godotengine.org/en/stable/tutorials/scripting/singletons_autoload.html"&gt;auto-loads&lt;/a&gt;, dessa forma o script vai estar sempre em execução e se pode ser chamado em qualquer outro script.&lt;/p&gt;

&lt;p&gt;Vamos então adicionar algo bem interessante no nosso amigo busão de sinais, segue o exemplo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gdscript"&gt;&lt;code&gt;&lt;span class="c1"&gt;#SignalBus.gd&lt;/span&gt;
&lt;span class="k"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;Node2D&lt;/span&gt;

&lt;span class="k"&gt;signal&lt;/span&gt; &lt;span class="n"&gt;PlayerDamaged&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;total_hp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;current_hp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bem curtinho, né?&lt;br&gt;
Mas e o nosso amigo jogador?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gdscript"&gt;&lt;code&gt;&lt;span class="c1"&gt;#Player.gd&lt;/span&gt;
&lt;span class="k"&gt;class_name&lt;/span&gt; &lt;span class="n"&gt;Player&lt;/span&gt; &lt;span class="k"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;KinematicBody2D&lt;/span&gt;
&lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;receive_damage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;damage&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="c1"&gt;#...&lt;/span&gt;
  &lt;span class="n"&gt;SignalBus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"PlayerDamaged"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_hp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;current_hp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Como se pode ver, a classe do jogador conhece apenas do SignalBus, mas não conhece o UI, nem conhece o nível, e sinceramente, não precisa. O nível também não precisa mais conhecer o jogador, e muito menos o UI.&lt;/p&gt;

&lt;p&gt;Agora vmaos a classe do UI,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gdscript"&gt;&lt;code&gt;&lt;span class="c1"&gt;#UI.gd&lt;/span&gt;
&lt;span class="k"&gt;class_name&lt;/span&gt; &lt;span class="n"&gt;UI&lt;/span&gt; &lt;span class="k"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;Control&lt;/span&gt;
&lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;_ready&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;damage&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="c1"&gt;#...&lt;/span&gt;
  &lt;span class="n"&gt;SignalBus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"PlayerDamaged"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"on_update_player_life"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;on_update_player_life&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="c1"&gt;# Update ui with actual values&lt;/span&gt;
&lt;span class="c1"&gt;#...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Agora temos um código que está acoplado apenas no &lt;code&gt;SignalBus&lt;/code&gt;, com isso podemos mover coisas para outros lugares e inclusive colocar mais coisas ouvindo o sinal do player. &lt;/p&gt;

&lt;p&gt;Imagine que agora temos um inimigo que espera ouvir o jogador receber dano para então atirar? Ou precisamos colocar uma nova animação de tremer a tela quando o jogador receber dano, tudo isso pode ser feito pelo mesmo sinal que é controlado pelo nosso amigo &lt;code&gt;bus&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Espero que tenha gostado desse trecho.&lt;/p&gt;

&lt;p&gt;(()=&amp;gt;())()&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>godot</category>
      <category>signalbus</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
