<?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: Alexandre Liberato</title>
    <description>The latest articles on DEV Community by Alexandre Liberato (@alexandreliberato).</description>
    <link>https://dev.to/alexandreliberato</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%2F175363%2F97f6b78a-eded-4de5-bebf-b018253038d1.png</url>
      <title>DEV Community: Alexandre Liberato</title>
      <link>https://dev.to/alexandreliberato</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexandreliberato"/>
    <language>en</language>
    <item>
      <title>Como encontrar linhas repetidas em um arquivo no Linux</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Thu, 20 Oct 2022 12:46:59 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/como-encontrar-linhas-repetidas-em-um-arquivo-no-linux-2alh</link>
      <guid>https://dev.to/alexandreliberato/como-encontrar-linhas-repetidas-em-um-arquivo-no-linux-2alh</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sort repeated.csv | uniq -c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IwqyR2UW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g3bvw1gtpl69sipcorhg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IwqyR2UW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g3bvw1gtpl69sipcorhg.png" alt="Image description" width="771" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cli</category>
    </item>
    <item>
      <title>Como adicionar pre-commit no Git</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Thu, 29 Sep 2022 12:24:26 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/como-adicionar-pre-commit-no-git-4il0</link>
      <guid>https://dev.to/alexandreliberato/como-adicionar-pre-commit-no-git-4il0</guid>
      <description>&lt;p&gt;Tendo uma verificação de pre-commit evitamos enviar código com warnings de lint, erros de teste e outros para o PR:&lt;/p&gt;

&lt;p&gt;Baixar o arquivo abaixo e colocar no diretório 'hooks' do seu repositório:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd project-repo-directory
$ cp ~/Downloads/pre-commit .git/hooks/
$ git add .
$ git commit -m 'xxx'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Quando ele detecta um erro no teste ou lint ele para e não commita.&lt;/p&gt;

&lt;p&gt;A linha 9 é um comando usado para verificar os lints localmente.&lt;br&gt;
Na linha 12 para funcionar vc precisa instalar o gotestsum, que acho mais ágil para ler os erros, ou trocar a linha dessa ferramenta para 'make test' ou o comando que você utiliza pra seus testes unitários.&lt;/p&gt;

&lt;p&gt;pre-commit&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments.  The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
make metalint
exit $?
​
gotestsum --format pkgname --  -race ./...
exit $?
​
​
if git rev-parse --verify HEAD &amp;gt;/dev/null 2&amp;gt;&amp;amp;1
then
    against=HEAD
else
    # Initial commit: diff against an empty tree object
    against=$(git hash-object -t tree /dev/null)
fi
​
# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --bool hooks.allownonascii)
​
# Redirect output to stderr.
exec 1&amp;gt;&amp;amp;2
​
# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &amp;amp;&amp;amp;
    # Note that the use of brackets around a tr range is ok here, (it's
    # even required, for portability to Solaris 10's /usr/bin/tr), since
​
    # the square bracket bytes happen to fall in the designated range.
    test $(git diff --cached --name-only --diff-filter=A -z $against |
      LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
    cat &amp;lt;&amp;lt;\EOF
Error: Attempt to add a non-ASCII file name.
​
This can cause problems if you want to work with people on other platforms.
​
To be portable it is advisable to rename the file.
​
If you know what you are doing you can disable this check using:
​
  git config hooks.allownonascii true
EOF
    exit 1
fi
​
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>git</category>
      <category>swe</category>
      <category>developer</category>
      <category>tooling</category>
    </item>
    <item>
      <title># Use Vale Linter in LunarVim</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Mon, 08 Aug 2022 13:43:37 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/-use-vale-linter-in-lunarvim-2oeo</link>
      <guid>https://dev.to/alexandreliberato/-use-vale-linter-in-lunarvim-2oeo</guid>
      <description>&lt;h1&gt;
  
  
  Use Vale Linter in LunarVim
&lt;/h1&gt;

&lt;h2&gt;
  
  
  What
&lt;/h2&gt;

&lt;p&gt;Vale is a linter for prose, it's fast and customizable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install &amp;amp; Configure Vale
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Dowloand it's binary from &lt;a href="https://github.com/errata-ai/vale/releases"&gt;https://github.com/errata-ai/vale/releases&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Put it in your PATH&lt;/li&gt;
&lt;li&gt;Create a conf file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;~/.vale.ini&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;StylesPath = styles

MinAlertLevel = suggestion
Vocab = Base

Packages = Google, alex

[*]
BasedOnStyles = Vale, Google, alex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Custom configuration: &lt;a href="https://vale.sh/generator/"&gt;https://vale.sh/generator/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure LunarVim
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Edit your ~/.config/lvim/config.lua
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- -- set additional linters
local linters = require "lvim.lsp.null-ls.linters"
linters.setup {
  { command = "vale", filetypes = { "golang", "go" } },
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>nvim</category>
      <category>lint</category>
    </item>
    <item>
      <title>What is a bug?</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Thu, 28 Jul 2022 19:57:00 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/what-is-a-bug-ge1</link>
      <guid>https://dev.to/alexandreliberato/what-is-a-bug-ge1</guid>
      <description>&lt;h1&gt;
  
  
  Error, bug, defect, failure and fault [swe]
&lt;/h1&gt;

&lt;h2&gt;
  
  
  tl;dr
&lt;/h2&gt;

&lt;p&gt;An Error/Mistake in code generates a Defect/Bug, if the system does not perform as intended then it is a Fault, and if the user notices the fault, it is a Failure.&lt;/p&gt;

&lt;p&gt;error/mistake   -&amp;gt; defect/bug/fault -&amp;gt; failure&lt;/p&gt;

&lt;h2&gt;
  
  
  Differences
&lt;/h2&gt;

&lt;p&gt;“When a developer commits a mistake in code it is called Error, when the error is found during tests it is called Defect, when a defect is  sent to production then it is called Bug, when the system doesn't perform as intended due to lack of resources or invalid data then it is a Fault and when the user perceive the fault or bug/defect then it Is Failure”&lt;/p&gt;

&lt;h3&gt;
  
  
  Error
&lt;/h3&gt;

&lt;p&gt;A mistake, misconception or misunderstanding from the developer (dev, sw, qa, etc) that leads to a bug/defect or a fault.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bug/Defect
&lt;/h3&gt;

&lt;p&gt;Variance between expected and actual. The requirement is: wrong, missing or extra.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fault
&lt;/h3&gt;

&lt;p&gt;Incorrect step, process or data definition that causes the program to perform unintended.&lt;br&gt;
Ex: lack of resources or invalid data&lt;/p&gt;

&lt;h3&gt;
  
  
  Failure
&lt;/h3&gt;

&lt;p&gt;Not perform functions within specified performance and/or requirements.&lt;/p&gt;

&lt;h3&gt;
  
  
  Issue
&lt;/h3&gt;

&lt;p&gt;It means any activity in the software development cycle where&lt;br&gt;
the source is some anomaly or flaw that need to be fixed. Ex: documentation, bug fix and requirement change.&lt;/p&gt;

&lt;h3&gt;
  
  
  Technical Debt
&lt;/h3&gt;

&lt;p&gt;A technical debt is an action in the software development life cycle that was intentionally delayed (that can or cannot generate a bug later).&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>testing</category>
      <category>softwareengineering</category>
      <category>swe</category>
    </item>
    <item>
      <title>Como medir o desempenho de seus sistemas (benchmark)</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Wed, 04 Aug 2021 18:58:00 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/como-medir-o-desempenho-de-seus-sistemas-benchmark-2kc3</link>
      <guid>https://dev.to/alexandreliberato/como-medir-o-desempenho-de-seus-sistemas-benchmark-2kc3</guid>
      <description>&lt;h2&gt;
  
  
  Definição
&lt;/h2&gt;

&lt;p&gt;Benchmark: Medir o desempenho relativo de um objeto, geralmente através de testes diretos e realizado comparações dos resultados periódicamente.&lt;/p&gt;

&lt;h2&gt;
  
  
  Porquê
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AX3W1B1S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dhv08t63zyz7dhvmmd1r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AX3W1B1S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dhv08t63zyz7dhvmmd1r.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Escalabilidade: Sua aplicação possui a habilidade de receber e suportar uma grande carga de requisições sem sacrificar a latência das respostas?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Alta disponibilidade: Temos que manter as coisas funcionando, qual o limite do seu sistema? Quando ele para?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Ferramentas
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Language&lt;/th&gt;
&lt;th&gt;Gateways&lt;/th&gt;
&lt;th&gt;Advantages&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;vegeta&lt;/td&gt;
&lt;td&gt;Go&lt;/td&gt;
&lt;td&gt;Http&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;wrk&lt;/td&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;Http&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;strest&lt;/td&gt;
&lt;td&gt;TypeScript&lt;/td&gt;
&lt;td&gt;gRPC&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ghz&lt;/td&gt;
&lt;td&gt;Go&lt;/td&gt;
&lt;td&gt;gRPC&lt;/td&gt;
&lt;td&gt;stats + in use&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;pprof&lt;/td&gt;
&lt;td&gt;--&lt;/td&gt;
&lt;td&gt;--&lt;/td&gt;
&lt;td&gt;profilling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;k6&lt;/td&gt;
&lt;td&gt;Go&lt;/td&gt;
&lt;td&gt;Http, gRPC&lt;/td&gt;
&lt;td&gt;scriptable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;hey&lt;/td&gt;
&lt;td&gt;Go&lt;/td&gt;
&lt;td&gt;Http&lt;/td&gt;
&lt;td&gt;stats + ghz like&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  ghz
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Go&lt;/li&gt;
&lt;li&gt;Não possui suporte a scripts mas pode ser usado como uma lib Go.&lt;/li&gt;
&lt;li&gt;Pode ser rodado: localmente &amp;amp; ambientes de integração continua(CI) e como testes de performance&lt;/li&gt;
&lt;li&gt;Pode enviar mensagens dinamicamente, ou seja, alterando o conteudo dos objetos em cada novo request&lt;/li&gt;
&lt;li&gt;As mensagens podem ser enviadas com JSON ou binário&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Métricas &amp;amp; Definições
&lt;/h2&gt;

&lt;p&gt;Vamos selecionar algumas métricas, que importam para nosso sistema, e criar algumas definições para enendermos e também podermos acompanhar o desempenho com o tempo:&lt;/p&gt;

&lt;p&gt;Fase I&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Req/s - O número de requisições que o serviço foi capaz de servir com sucesso&lt;/li&gt;
&lt;li&gt;Latência média - tempo o qual foi gasto entre o envio da requisição e o recebimento da resposta&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fase II&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Req/s&lt;/li&gt;
&lt;li&gt;Latência média e 90/95/99 percentis&lt;/li&gt;
&lt;li&gt;Consumo médio de CPU, memoria - recurso utilizado durante o benchmark provido pelo docker stats&lt;/li&gt;
&lt;li&gt;Profile - profile da aplicação (cpu, mem, threads)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Como medir o desempenho
&lt;/h2&gt;

&lt;p&gt;As requisições serão disparadas para nosso servidor e teremos inicialmente dois tipos de requisição: &lt;/p&gt;

&lt;p&gt;1 Definir cenários&lt;br&gt;
    1.1 Input&lt;br&gt;
    1.2 Output&lt;br&gt;
2 Configurar app para profile&lt;br&gt;
3 Executar localmente o benchmark&lt;/p&gt;

&lt;h2&gt;
  
  
  Cenários
&lt;/h2&gt;

&lt;p&gt;Exemplos:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inserção de transações&lt;/li&gt;
&lt;li&gt;Relatório&lt;/li&gt;
&lt;li&gt;Enxurrada de eventos do cliente

&lt;ul&gt;
&lt;li&gt;por algum motivo o cliente estava com eventos represados e foram liberado de uma vez&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Uso por horário de pico&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Profile
&lt;/h2&gt;

&lt;p&gt;Depois do benchmark podemos analisar o profile do app para verificar pontos de otimização.&lt;/p&gt;

&lt;p&gt;Tipos:&lt;br&gt;
    - CPU: Determina onde um programa gasta tempo enquanto ativamente consumindo ciclos do processador (não sleeping ou esperando por I/O).&lt;br&gt;
    - Heap: Reporta alocação de memória, usado para monitorar uso de memória atual e checar por memory leaks.&lt;br&gt;
    - Threadcreate: Seções do programa que levaram a novoas threads no SO.&lt;br&gt;
    - goroutine: Stack traces das goroutines.&lt;br&gt;
    - ...&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://k6.io/blog/performance-testing-grpc-services/"&gt;https://k6.io/blog/performance-testing-grpc-services/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://blog.golang.org/pprof"&gt;https://blog.golang.org/pprof&lt;/a&gt;&lt;br&gt;
&lt;a href="https://eltonminetto.dev/post/2020-04-08-golang-pprof/"&gt;https://eltonminetto.dev/post/2020-04-08-golang-pprof/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://k6.io/blog/comparing-best-open-source-load-testing-tools/"&gt;https://k6.io/blog/comparing-best-open-source-load-testing-tools/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://pkg.go.dev/github.com/bojand/ghz?utm_source=godoc"&gt;https://pkg.go.dev/github.com/bojand/ghz?utm_source=godoc&lt;/a&gt;&lt;/p&gt;

</description>
      <category>desempenho</category>
      <category>benchmark</category>
      <category>go</category>
      <category>portugues</category>
    </item>
    <item>
      <title>Visualize a arquitetura do seu sistema com C4 Model</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Wed, 30 Jun 2021 13:34:19 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/visualize-a-arquitetura-do-seu-sistema-com-c4-model-3pcl</link>
      <guid>https://dev.to/alexandreliberato/visualize-a-arquitetura-do-seu-sistema-com-c4-model-3pcl</guid>
      <description>&lt;h1&gt;
  
  
  C4 Model
&lt;/h1&gt;

&lt;p&gt;website: &lt;a href="https://c4model.com/" rel="noopener noreferrer"&gt;https://c4model.com/&lt;/a&gt;&lt;br&gt;
author: Simon Brown&lt;/p&gt;

&lt;p&gt;Inspirado em UML e 4+1 Model, foi criado e melhorado ao longo do tempo para ajudar a visualizar a arquitetura de sistemas e aproximar o modelo do sistema com o código.&lt;/p&gt;

&lt;h2&gt;
  
  
  Principais lemas
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Foco nas estruturas estáticas (componentes)&lt;/li&gt;
&lt;li&gt;Abstrações e não notações (mapas)&lt;/li&gt;
&lt;li&gt;Engenharia e não arte, não use visio use plantuml&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quem usa UML?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fea463zck8mg7arckxjyh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fea463zck8mg7arckxjyh.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Desculpas

&lt;ul&gt;
&lt;li&gt;"Nem todos sabem UML no time"&lt;/li&gt;
&lt;li&gt;"Vou parecer velho"&lt;/li&gt;
&lt;li&gt;"Ferramentars ruins"&lt;/li&gt;
&lt;li&gt;"Muito detalhado"&lt;/li&gt;
&lt;li&gt;"É uma bela forma de perder tempo"&lt;/li&gt;
&lt;li&gt;"Agile não precisa documentar"&lt;/li&gt;
&lt;li&gt;"O valor ta na conversa", daí a conversa é só sobre ficar até mais tarde...&lt;/li&gt;
&lt;li&gt;"O valor tá no código", daí vc olha o código e...&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;p&gt;Com a chegada das metodologias ágeis as pessoas tem buscado simplificar e usar formas mais simples de modelagem.&lt;/p&gt;




&lt;ul&gt;
&lt;li&gt;Use um quadro branco!
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F848mw81pec7jh5xat4z0.png" alt="alt text"&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;O problema é que faltou tempo e/ou ferramenta adequada!
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa4s6rcg29xtohpp8rqrg.png" alt="alt text"&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;Problemas dos diagramas atuais

&lt;ul&gt;
&lt;li&gt;Tamanhos, cores diferentes&lt;/li&gt;
&lt;li&gt;Falta de legenda e descrição&lt;/li&gt;
&lt;li&gt;Não padronização&lt;/li&gt;
&lt;li&gt;Abreviações&lt;/li&gt;
&lt;li&gt;Falta de títulos&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Por quê?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvi5hbf2uw6tqmaf6my9y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvi5hbf2uw6tqmaf6my9y.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Troca de pessoas, rotatividade = informação pro ralo&lt;/li&gt;
&lt;li&gt;Visualização!&lt;/li&gt;
&lt;li&gt;Peça para um arquiteto desenhar a sua casa, o que terá? Sim, a planta baixa da sua casa.&lt;/li&gt;
&lt;li&gt;Você, uma pessoa que não é formada em arquitetura conseguirá entender todo contexto, principais idéias da planta. Consegue se localizar e localizar portas, janelas etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvpxzfj7jdma1igeks6hq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvpxzfj7jdma1igeks6hq.png" alt="alt text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbttgmxh5mfrnoh6jo6we.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbttgmxh5mfrnoh6jo6we.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;br&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    "Boa comunicação = times melhores"&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Público&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmvjsdodw0wmb7p5ixqy0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmvjsdodw0wmb7p5ixqy0.png" alt="alt text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.sambrinson.com/sharing-knowledge/different-minds/" rel="noopener noreferrer"&gt;Sam Brinson&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Temos que ter em mente que o público de nossos diagramas pode ser amplo, desde um presidente e um diretor da companhia até seu colega que acabou de entrar na firma.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Mapas
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdkogzpcvem2bpe70vjra.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdkogzpcvem2bpe70vjra.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Olhe o mapa da sua cidade ou imagine ele.&lt;br&gt;
O que vai notar?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Igrejas&lt;/li&gt;
&lt;li&gt;Hospitais&lt;/li&gt;
&lt;li&gt;Ferrovias&lt;/li&gt;
&lt;li&gt;Estradas&lt;/li&gt;
&lt;li&gt;Estações de metrô&lt;/li&gt;
&lt;li&gt;Museus&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Olhe o mapa de outra cidade e perceba como as mesmas abstrações estarão presentes, apenas com notações diferentes (fontes, linhas cores, formatos)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa4ev6yesik1xcleik5m9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa4ev6yesik1xcleik5m9.png" alt="alt text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiqnhchjn17a5k3vhyqiy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiqnhchjn17a5k3vhyqiy.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Como funciona?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Abstrações hierárquicas / Agrupamentos
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9pduu9hug5luqas60fr0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9pduu9hug5luqas60fr0.png" alt="alt text"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Contamos uma história linear de C1 até C4 , ou seja a história continua ao dar o zoom.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;O C4 Model é uma estrutura estática, uma vez definido pode-se por exemplo criar outras documentações mais específicas caso necessário, como: diagramas de sequência, ER, BP, etc.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4Cs
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdaimx9ueg0ddsa3wvaoj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdaimx9ueg0ddsa3wvaoj.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;C1 - Contexto                                                                           | Overview | Continente&lt;br&gt;
C2 - Containers                                                                        | Overview | Estado&lt;br&gt;
C3 - Componentes                                                                   | Zoom       | Cidade&lt;br&gt;
C4 - Código                                                                              | Detalhes  | Foto da rua&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkndlfm80ldn2c0v4i89f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkndlfm80ldn2c0v4i89f.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;!!! C4 não é recomendado devido ao detalhamento, pode ser usado por exemplo com uma ferramenta que gere essa doc&lt;/p&gt;

&lt;h3&gt;
  
  
  Notação
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use títulos!&lt;/li&gt;
&lt;li&gt;Coloque descrições do que o sistema faz!
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqz75xudnbflndefdx122.png" alt="alt text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quando usar?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0chois3jlrm622ps7sh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0chois3jlrm622ps7sh.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Se seu diagrama tem mais de ~20 elementos já pode ser melhor dividir nas camadas do C4 para melhor entendimento&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2qy61qcxddu10hxxao3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2qy61qcxddu10hxxao3.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Exemplo
&lt;/h2&gt;

&lt;p&gt;Level 1 - Contexto&lt;br&gt;
Sistemas, usuários e dependências&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi4hsbnleqnkly1qo3eq4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi4hsbnleqnkly1qo3eq4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Level 2 - Containers&lt;br&gt;
Arquitetura geral e escolhas de tecnologias&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ikbxky03mtdbawc7kxp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ikbxky03mtdbawc7kxp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Level 3 - Componentes&lt;br&gt;
Componentes lógicos e interações&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6ftgfa2mc0tl4yo1vrt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6ftgfa2mc0tl4yo1vrt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Level 4 - Classes&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4nxw2uyfgknucwqaszir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4nxw2uyfgknucwqaszir.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Visão geral (time), é um L1 de Contexto sem foco em apenas um sistema:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv009jsya7nepmy1voo33.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv009jsya7nepmy1voo33.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Mais
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=x2-rSnhpw0g" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=x2-rSnhpw0g&lt;/a&gt;&lt;/p&gt;

</description>
      <category>c4model</category>
      <category>arquitetura</category>
      <category>diagramas</category>
      <category>portugues</category>
    </item>
    <item>
      <title>Alterar o Método de Autenticação do Repositório Git Local</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Mon, 28 Jun 2021 14:08:05 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/alterar-o-metodo-de-autenticacao-do-repositorio-git-local-3ak</link>
      <guid>https://dev.to/alexandreliberato/alterar-o-metodo-de-autenticacao-do-repositorio-git-local-3ak</guid>
      <description>&lt;p&gt;Depois de ter configurado sua conta no Github para utilizar autenticação via SSH, você agora quer alterar algum repositório já existente para esse método? &lt;/p&gt;

&lt;p&gt;Acesse a página do repositório que deseja fazer isso e clique em 'Code -&amp;gt; Clone' e selecione 'SSH':&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5pt6annntpfkq774egvn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5pt6annntpfkq774egvn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Agora copia esse endereço e troque no arquivo '.git/config', a url da propriedade 'remote "origin"', ou via comando:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git remote set-url origin git@github.com:user/repo.git&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Agora basta executar um push para testar.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>auth</category>
      <category>ssh</category>
    </item>
    <item>
      <title>Instalando asdf e Golang no Ubuntu 20.04</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Wed, 23 Jun 2021 18:00:27 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/instalando-asdf-no-ubuntu-20-04-17gl</link>
      <guid>https://dev.to/alexandreliberato/instalando-asdf-no-ubuntu-20-04-17gl</guid>
      <description>&lt;h2&gt;
  
  
  Sobre
&lt;/h2&gt;

&lt;p&gt;Estava tentando testar essa ferramenta para gerenciamento de linguagens e ferramentas, segue o caminho que trilhei da instalação até ter o executável da linguagem que desejava, golang no caso, disponível na linha de comando:&lt;/p&gt;

&lt;h2&gt;
  
  
  Instalação
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sudo apt install curl git
$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Configuração
&lt;/h2&gt;

&lt;p&gt;Abra o arquivo ~/.bashrc e adicione as seguintes linhas:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#
# asdf - language/tools version manager
#
source ~/.asdf/asdf.sh
source ~/.asdf/completions/asdf.bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Execute:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ . .bashrc&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Pronto, basta testar:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ asdf info&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Golang
&lt;/h2&gt;

&lt;p&gt;Para instalar a linguagem Go por exemplo, basta:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ asdf install golang 1.16.5
$ asdf global golang 1.16.5
$ asdf shell golang 1.16.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;E para verificar a instalação:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ go version&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

</description>
      <category>asdf</category>
      <category>linux</category>
      <category>go</category>
      <category>portugues</category>
    </item>
    <item>
      <title>Detectar problemas no Pub/Sub do Google Cloud</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Tue, 20 Apr 2021 22:26:19 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/detectar-problemas-no-pub-sub-do-google-cloud-1j9m</link>
      <guid>https://dev.to/alexandreliberato/detectar-problemas-no-pub-sub-do-google-cloud-1j9m</guid>
      <description>&lt;h1&gt;
  
  
  Sobre
&lt;/h1&gt;

&lt;p&gt;“O Pub/Sub é um serviço de mensagens em tempo real totalmente gerenciado que permite o envio e o recebimento de mensagens entre aplicativos independentes.”&lt;/p&gt;

&lt;h2&gt;
  
  
  Termos Utilizados
&lt;/h2&gt;

&lt;p&gt;consumidor = assinante/subscriber&lt;br&gt;
produtor = publicador/publisher&lt;br&gt;
mensagens = eventos/itens da fila&lt;/p&gt;

&lt;h1&gt;
  
  
  Detectando Problemas
&lt;/h1&gt;

&lt;p&gt;Existem alguns tipos de problemas que podem ser detectados observando o monitoramento das mensagens de uma fila:&lt;/p&gt;

&lt;p&gt;a) Os consumidores não conseguem acompanhar o ritmo/volume das mensagens&lt;br&gt;
b) Mensagens travadas&lt;br&gt;
c) Perda de dados&lt;/p&gt;

&lt;p&gt;Para verificar a causa podemos checar:&lt;/p&gt;

&lt;h3&gt;
  
  
  Produtor
&lt;/h3&gt;

&lt;p&gt;Quem produz/publica as mensagens&lt;/p&gt;

&lt;h4&gt;
  
  
  Meio
&lt;/h4&gt;

&lt;p&gt;A ferramenta em uso, no caso o PubSub&lt;/p&gt;

&lt;h4&gt;
  
  
  Consumidor
&lt;/h4&gt;

&lt;p&gt;Quem consome as mensagens&lt;/p&gt;

&lt;p&gt;Para entender melhor como solucionar esses problemas você pode checar também na documentação oficial, como por exemplo:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OCl3FVrw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eyshki8atthaihf4npaz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OCl3FVrw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eyshki8atthaihf4npaz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Exemplo
&lt;/h1&gt;

&lt;p&gt;Processo com pico no consumidor:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eJrepqnF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/niub9gqgikmisol0gs7t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eJrepqnF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/niub9gqgikmisol0gs7t.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Lp3ToxfC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mryqnfz9iz68us5e1llt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Lp3ToxfC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mryqnfz9iz68us5e1llt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Olhamos para duas métricas, como no quadro da documentação visto acima, “oldest_unacked_messages“ e “unacked messages”.&lt;/p&gt;

&lt;p&gt;Ou seja os consumidores pegaram a mensagem para processamento mas não confirmaram se realizaram o processamento ou não gerando um aumento no tempo de vida das mensagens.&lt;/p&gt;

&lt;p&gt;A solução como diz a documentação poderia ser aumentar o número de consumidores ou pods para realizar o trabalho, ou bug,  mas como vemos nos gráficos foi temporário e provavelmente os pods escalaram para a demanda assim resolvendo o problema.&lt;/p&gt;

&lt;h1&gt;
  
  
  Referências
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://cloud.google.com/pubsub/docs/monitoring"&gt;https://cloud.google.com/pubsub/docs/monitoring&lt;/a&gt;&lt;br&gt;
&lt;a href="https://cloud.google.com/monitoring/api/metrics_gcp#gcp-pubsub"&gt;https://cloud.google.com/monitoring/api/metrics_gcp#gcp-pubsub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>pubsub</category>
      <category>gcp</category>
      <category>portugues</category>
    </item>
    <item>
      <title>Vim Modular Com Java, Kotlin e Go</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Fri, 26 Feb 2021 18:32:00 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/vim-modular-com-java-kotlin-e-go-8i</link>
      <guid>https://dev.to/alexandreliberato/vim-modular-com-java-kotlin-e-go-8i</guid>
      <description>&lt;p&gt;Para quem curte usar VIM, deixei o meu mais modular e vem pre configurado para Golang, Kotlin e Java além de NERDTree e algumas coisinhas a mais.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/alexandreliberato/vim-modular"&gt;https://github.com/alexandreliberato/vim-modular&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vim</category>
      <category>go</category>
      <category>java</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>Como usar o Docker sem ser root</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Sun, 29 Nov 2020 21:38:28 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/como-usar-o-docker-sem-ser-root-4m02</link>
      <guid>https://dev.to/alexandreliberato/como-usar-o-docker-sem-ser-root-4m02</guid>
      <description>&lt;p&gt;Adicione seu usuário ao grupo 'docker':&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# vim /etc/group&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Localize a linha do grupo 'docker' e adicione seu usuário ao final, após o ':' como no exemplo:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aE1iCE3U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rpes2y3sr7ibm1gw6i02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aE1iCE3U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rpes2y3sr7ibm1gw6i02.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Se o grupo ainda não existe execute:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# groupadd docker&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Para testar relogue no sistema com seu usuário ou execute o comando:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ su - $USER&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Para checar se deu certo&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ id&lt;/code&gt;&lt;/p&gt;

</description>
      <category>portugues</category>
      <category>docker</category>
      <category>linux</category>
      <category>freebsd</category>
    </item>
    <item>
      <title>Onde Instalar Programas no Linux?</title>
      <dc:creator>Alexandre Liberato</dc:creator>
      <pubDate>Sat, 07 Nov 2020 01:37:15 +0000</pubDate>
      <link>https://dev.to/alexandreliberato/onde-instalar-programas-no-linux-30hf</link>
      <guid>https://dev.to/alexandreliberato/onde-instalar-programas-no-linux-30hf</guid>
      <description>&lt;h1&gt;
  
  
  TL:DR
&lt;/h1&gt;

&lt;p&gt;Use o path '/opt'!&lt;/p&gt;

&lt;h1&gt;
  
  
  Motivação
&lt;/h1&gt;

&lt;p&gt;Você não quer depender dos repositórios da sua distro ou eles não possuem o programa, ou última versão, que você deseja instalar ou ainda você quer compilar e configurar seu próprio aplicativo.&lt;/p&gt;

&lt;h1&gt;
  
  
  Entendendo /user/local vs /opt
&lt;/h1&gt;

&lt;p&gt;Ambos diretórios foram pensados para instalação de programas que não pertencem ao sistema operacional, visto que os apps do sistema ficam em /bin. Entretanto eles não foram planejados para os mesmos tipos de softwares, enquanto o primeiro '/usr/local' foi concebido para conter compilações feitas pelo administrador(in house software), padrão  FreeBSD, o segundo, '/opt', é recomendado para pacotes que não fazem parte do SO e de origem de terceiros.&lt;/p&gt;

&lt;h1&gt;
  
  
  Saiba Mais
&lt;/h1&gt;

&lt;p&gt;Quer entender as entranhas desse tema? Se ligue nos recursos abaixo:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/UNIX_System_V" rel="noopener noreferrer"&gt;https://en.wikipedia.org/wiki/UNIX_System_V&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard" rel="noopener noreferrer"&gt;https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard&lt;/a&gt;&lt;br&gt;
&lt;a href="https://unix.stackexchange.com/questions/11544/what-is-the-difference-between-opt-and-usr-local" rel="noopener noreferrer"&gt;https://unix.stackexchange.com/questions/11544/what-is-the-difference-between-opt-and-usr-local&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.freebsd.org/cgi/man.cgi?query=hier&amp;amp;sektion=7&amp;amp;manpath=freebsd-release-ports" rel="noopener noreferrer"&gt;https://www.freebsd.org/cgi/man.cgi?query=hier&amp;amp;sektion=7&amp;amp;manpath=freebsd-release-ports&lt;/a&gt;                    &lt;/p&gt;

</description>
      <category>portugues</category>
      <category>linux</category>
      <category>freebsd</category>
    </item>
  </channel>
</rss>
