<?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: Bella Souzas</title>
    <description>The latest articles on DEV Community by Bella Souzas (@bellasouzas).</description>
    <link>https://dev.to/bellasouzas</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%2F321475%2Ff62313f7-3a38-49df-a213-1f0ef0817c00.jpeg</url>
      <title>DEV Community: Bella Souzas</title>
      <link>https://dev.to/bellasouzas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bellasouzas"/>
    <language>en</language>
    <item>
      <title>Git Simplified: A Beginner's Guide to Version Control</title>
      <dc:creator>Bella Souzas</dc:creator>
      <pubDate>Mon, 22 May 2023 20:21:57 +0000</pubDate>
      <link>https://dev.to/bellasouzas/git-simplified-a-beginners-guide-to-version-control-1j4d</link>
      <guid>https://dev.to/bellasouzas/git-simplified-a-beginners-guide-to-version-control-1j4d</guid>
      <description>&lt;p&gt;If you're new to the world of software development, you might have heard the term "Git" thrown around quite a bit. Git is a powerful tool that developers use for version control, allowing them to track changes, collaborate with others, and manage their codebase efficiently. In this beginner-friendly blog post, we will demystify Git and explain its key concepts and benefits in simple terms.&lt;/p&gt;

&lt;p&gt;What is Git?&lt;br&gt;
Git is a distributed version control system (VCS) that helps developers manage and track changes to their codebase. It allows multiple developers to work on the same project simultaneously while keeping a detailed history of every change made. Git enables teams to collaborate seamlessly, revert changes when necessary, and maintain a clean and organized codebase.&lt;/p&gt;

&lt;p&gt;Key Concepts of Git:&lt;/p&gt;

&lt;p&gt;Repository: A Git repository, or repo for short, is like a central hub that stores all the project files and their history. It serves as a complete record of every change made to the codebase.&lt;/p&gt;

&lt;p&gt;Commit: A commit represents a snapshot of the codebase at a specific point in time. It includes changes made to files and a message describing the purpose of the commit. Commits allow developers to track the evolution of the project and understand the context behind each change.&lt;/p&gt;

&lt;p&gt;Branch: In Git, a branch is an independent line of development that allows developers to work on different features or bug fixes simultaneously. Each branch can have its commits and history. Branches provide isolation and flexibility, making it easier to experiment and collaborate without affecting the main codebase.&lt;/p&gt;

&lt;p&gt;Merge: Merging is the process of combining changes from one branch into another. When a feature or bug fix is complete, it can be merged back into the main branch, often called the "master" or "main" branch. Merging ensures that all changes are integrated smoothly.&lt;/p&gt;

&lt;p&gt;Why it's so important?&lt;/p&gt;

&lt;p&gt;Version Control: Git keeps track of every change made to your codebase, allowing you to view and revert to any previous version easily. This provides a safety net and helps mitigate the risk of losing valuable code.&lt;/p&gt;

&lt;p&gt;Collaboration: Git facilitates seamless collaboration among developers. Multiple team members can work on the same project simultaneously, making changes independently in their branches. Git enables smooth integration of these changes through merging, ensuring that everyone's work is accounted for.&lt;/p&gt;

&lt;p&gt;Branching and Experimentation: With Git's branching feature, developers can create new branches to work on specific features or experiment with ideas without affecting the main codebase. This promotes a flexible and iterative development process.&lt;/p&gt;

&lt;p&gt;Traceability and Accountability: Git provides a clear history of all changes made to the codebase. Each commit includes information about who made the change and why. This traceability enhances accountability and enables efficient debugging and issue resolution.&lt;/p&gt;

&lt;p&gt;Git is an essential tool for modern software development, providing version control capabilities that empower developers to collaborate effectively and manage their codebase with ease. By understanding the key concepts of Git, such as repositories, commits, branches, and merging, you can take advantage of its benefits and streamline your development workflow. Whether you're working on a personal project or contributing to a large-scale team effort, Git's simplicity and power will undoubtedly enhance your coding journey.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Demystifying CI/CD: A Beginner's Guide to Continuous Integration and Continuous Delivery</title>
      <dc:creator>Bella Souzas</dc:creator>
      <pubDate>Mon, 22 May 2023 20:17:02 +0000</pubDate>
      <link>https://dev.to/bellasouzas/demystifying-cicd-a-beginners-guide-to-continuous-integration-and-continuous-delivery-1h5o</link>
      <guid>https://dev.to/bellasouzas/demystifying-cicd-a-beginners-guide-to-continuous-integration-and-continuous-delivery-1h5o</guid>
      <description>&lt;p&gt;In the world of software development, there are several key practices that enable teams to deliver high-quality applications efficiently. Two of the most important concepts are Continuous Integration (CI) and Continuous Delivery (CD). If you're new to these terms, don't worry! This blog post will explain CI/CD in simple terms, breaking down the concepts and benefits for beginners.&lt;/p&gt;

&lt;p&gt;What is Continuous Integration (CI)?&lt;br&gt;
Continuous Integration (CI) is a development practice that focuses on merging code changes from multiple developers into a shared repository frequently. The goal is to ensure that changes made by individual developers don't introduce conflicts or break the application. CI involves automating the process of building, testing, and validating code changes as soon as they are committed. By doing so, CI helps detect and resolve issues early, making it easier for teams to collaborate and maintain a stable codebase.&lt;/p&gt;

&lt;p&gt;Benefits of CI:&lt;/p&gt;

&lt;p&gt;Early Bug Detection: By integrating and testing code changes frequently, CI helps identify bugs and issues early in the development process. This allows developers to fix problems before they become more challenging and time-consuming to resolve.&lt;/p&gt;

&lt;p&gt;Faster Feedback Loop: CI provides quick feedback to developers about the impact of their code changes. Automated tests run after every commit, providing valuable insights into the quality and functionality of the application. Developers can address issues promptly, ensuring a faster feedback loop and improved productivity.&lt;/p&gt;

&lt;p&gt;Codebase Stability: With CI, teams can maintain a stable codebase by continuously integrating and validating code changes. This reduces the risk of integration problems and ensures that the application remains reliable, even as multiple developers work on different features simultaneously.&lt;/p&gt;

&lt;p&gt;What is Continuous Delivery (CD)?&lt;br&gt;
Continuous Delivery (CD) extends the principles of CI by automating the process of deploying applications to production environments. CD enables teams to release software reliably and frequently by automating various stages, including building, testing, and deploying the application. The goal is to have a deployment pipeline that allows for rapid and reliable releases, ensuring that the application is always in a deployable state.&lt;/p&gt;

&lt;p&gt;Benefits of CD:&lt;/p&gt;

&lt;p&gt;Faster Time to Market: CD enables teams to release new features, bug fixes, and improvements quickly and consistently. With automated deployment pipelines, the time required to deliver changes to end-users is significantly reduced, giving organizations a competitive edge in the market.&lt;/p&gt;

&lt;p&gt;Reduced Risk: CD minimizes the risk of errors and inconsistencies that often arise during manual deployments. By automating the entire deployment process, CD ensures that every release goes through standardized tests and quality checks, reducing the likelihood of deployment-related issues.&lt;/p&gt;

&lt;p&gt;Increased Customer Satisfaction: With CD, teams can respond to customer feedback and market demands swiftly. By continuously delivering incremental updates and improvements, organizations can provide a better user experience, address issues promptly, and deliver value to their customers consistently.&lt;/p&gt;

&lt;p&gt;Continuous Integration (CI) and Continuous Delivery (CD) are crucial practices that empower software development teams to build, test, and deliver applications efficiently and with high quality. CI ensures that code changes from multiple developers are integrated and tested frequently, while CD automates the deployment process, allowing for reliable and rapid releases. By adopting CI/CD practices, organizations can enhance collaboration, reduce risks, and deliver software faster, ultimately improving customer satisfaction and gaining a competitive advantage in the ever-evolving world of software development.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>O que é Audit Log?</title>
      <dc:creator>Bella Souzas</dc:creator>
      <pubDate>Wed, 11 Nov 2020 22:01:12 +0000</pubDate>
      <link>https://dev.to/bellasouzas/o-que-e-audit-log-lh1</link>
      <guid>https://dev.to/bellasouzas/o-que-e-audit-log-lh1</guid>
      <description>&lt;p&gt;A ideia do Audit Log é que sempre que acontecer algo importante, isso seja registrado, indicando o que aconteceu e quando aconteceu. &lt;/p&gt;

&lt;p&gt;Existe alguns formatos que podem ser  um audit log, como por exemplo;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;um arquivo

&lt;ul&gt;
&lt;li&gt;Caso use um arquivo precisará de um formato, um formulário ASCII ajuda a tornar mais legível a um ser humano sem software especial.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;uma tabela de banco de dados&lt;/li&gt;
&lt;li&gt;Estruturas mais complexas podem ser em formato XML&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Os registros são fáceis de escrever, mas difíceis de ler, principalmente quando ficam grande. &lt;br&gt;
Lembre-se sempre que a data de registro é sempre a data de processamento atual.&lt;/p&gt;

&lt;p&gt;A limitação do registro de auditoria é a dificuldade de processar o registro. &lt;br&gt;
É possível usar o audit log somente em algumas partes do modelo e outros padrões em outros. Sendo assim você pode usar o histórico em tempo real em algumas partes do projeto e outras com propriedade temporal, usando histórico de registro. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://martinfowler.com/eaaDev/AuditLog.html"&gt;Resenha do texto de Martin Fowler&lt;/a&gt; &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Benchmark para iniciantes - Go</title>
      <dc:creator>Bella Souzas</dc:creator>
      <pubDate>Fri, 03 Jul 2020 19:27:01 +0000</pubDate>
      <link>https://dev.to/bellasouzas/benchmark-para-iniciantes-go-214j</link>
      <guid>https://dev.to/bellasouzas/benchmark-para-iniciantes-go-214j</guid>
      <description>&lt;p&gt;Eu sempre ouvi sobre benchmark nos meetups, nas lives, nas discussões, mas eu achava que seria algo tão dificil que só poderia estudar quando eu estivesse bem mais avançada na linguagem. Sim, estudar testes tem sido um desafio grande, mas lendo alguns artigos, documentação da linguagem me surpreendeu sobre a implementação. &lt;/p&gt;

&lt;p&gt;O benchmark é uma ferramenta incrível que o pacote testing oferece aos gophers. O benchmark é uma ferramenta de analise do desempenho do seu código em GO. &lt;/p&gt;

&lt;p&gt;Para implementar uma função benchmark não tem mistério e pode orientar a você sobre como seu código vai performando ainda em execução. &lt;/p&gt;

&lt;p&gt;ok, ok, chega de teoria e vamos para a prática…&lt;/p&gt;

&lt;p&gt;Para implementar o benchmark vou usar como base a função Repeat que está salva no arquivo repeat.go.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;interation&lt;/span&gt;

&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="n"&gt;repeatCount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;

&lt;span class="c"&gt;// Repeat returns character repeated 5 times.&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;Repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;character&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;repeated&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;repeatCount&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="n"&gt;repeated&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;character&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;repeated&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;No arquivo repeat_test.go eu implemento o teste da função e o  benchmark usando o pacote  &lt;a href="https://golang.org/pkg/testing/"&gt;“testing”&lt;/a&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;interation&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="s"&gt;"testing"&lt;/span&gt;

&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;TestRepeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;testing&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;repeated&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;Repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;expected&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="s"&gt;"aaaaa"&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;repeated&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;expected&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Errorf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"expected %q but got %q"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;repeated&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;BenchmarkRepeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;testing&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;N&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="n"&gt;Repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;

&lt;p&gt;`&lt;/p&gt;

&lt;p&gt;Para “rodar” o test benchmark basta chamar em seu terminal &lt;code&gt; go test -bench=&lt;/code&gt; ou ‘go test -bench="." ’ , caso voce esteja usando o windowns powershell.&lt;/p&gt;

&lt;p&gt;No meu computador o resultado foi :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;goarch: amd64
pkg: github.com/bellasouza/GOWithTest/interations
BenchmarkRepeat
BenchmarkRepeat-4        4988276           211 ns/op
PASS

Process finished with exit code 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Esse resultado significa que a minha função leva em média 211 nanosegundos para rodar 4988276 vezes a função.&lt;/p&gt;




&lt;h3&gt;
  
  
  Considerações: &lt;h3&gt;
&lt;/h3&gt;

&lt;/h3&gt;

&lt;p&gt;Esses são os materiais valiosíssimos que me ajudaram a entender melhor sobre benchmark. &lt;br&gt;&lt;br&gt;
Super indico a leitura:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://golang.org/pkg/testing/"&gt;https://golang.org/pkg/testing/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/iteration"&gt;https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/iteration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go"&gt;https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
