<?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: Allison Piovani</title>
    <description>The latest articles on DEV Community by Allison Piovani (@apiovanidev).</description>
    <link>https://dev.to/apiovanidev</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%2F216276%2F8e1186ca-d239-42b8-9dc3-4a97aa33be00.jpeg</url>
      <title>DEV Community: Allison Piovani</title>
      <link>https://dev.to/apiovanidev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/apiovanidev"/>
    <language>en</language>
    <item>
      <title>4 Reasons for your Company to use Go</title>
      <dc:creator>Allison Piovani</dc:creator>
      <pubDate>Tue, 01 Oct 2024 21:32:37 +0000</pubDate>
      <link>https://dev.to/apiovanidev/4-reasons-for-your-company-to-use-go-3e5l</link>
      <guid>https://dev.to/apiovanidev/4-reasons-for-your-company-to-use-go-3e5l</guid>
      <description>&lt;h1&gt;
  
  
  1 - Performance
&lt;/h1&gt;

&lt;p&gt;Extremely efficient and fast, tools that require high efficiency and performance prefer Go for their backend. By compiling into native machine code, it can achieve extraordinary performance without requiring specific configurations within the code for each scenario.&lt;br&gt;
When talking about Go, we must always mention concurrency, which involves tasks being executed simultaneously. Most languages on the market require adaptations to work in this model or something close to it. Go, on the other hand, brings this by default and in a simplified way.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Some features:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Memory management: it already has a garbage collector by default and mechanisms to avoid leaks.&lt;/li&gt;
&lt;li&gt;Benchmarking tools.&lt;/li&gt;
&lt;li&gt;Easily vertically scalable.&lt;/li&gt;
&lt;li&gt;Facilitated use for ARM architecture.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  2 - Learning Curve
&lt;/h1&gt;

&lt;p&gt;Go has a simple and concise language that can initially seem strange but is quickly overcome by more experienced developers. Even the way it works is quite similar to other languages, making it easy to navigate between files.&lt;br&gt;
As a first language to learn, its approach is quite simple, even for learning OOP, even though it has its own way of doing things, making learning possible without much suffering.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;3 - Market Adoption&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Despite being a new language, it already has several libraries and frameworks that can facilitate development.&lt;br&gt;
Some companies that already use Go: Google, Uber, Netflix, Dropbox, IBM, Spotify, Microsoft, and many others. This list just keeps growing.&lt;br&gt;
&lt;em&gt;Clouds:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GCP (Google Cloud Platform): Go was born within Google, so it was very well tested and refined in its projects. We can say that GCP is Go's first home.&lt;/li&gt;
&lt;li&gt;AWS (Amazon Web Service): already provides the latest versions in its Lambdas, machines configured to be executed if certain events occur.&lt;/li&gt;
&lt;li&gt;Azure: I've never had much contact, but Microsoft has a very cool initiative involving Azure and Go, it's worth checking out later. Considering this, I believe Azure is also more than prepared to handle Go.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  4 - &lt;strong&gt;Maintenance&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Its main concept is to be simple, simplicity favors the maintenance of code over the long term, also reducing the delivery time of implementations.&lt;br&gt;
It has code debugging easily configurable in IDEs if it doesn't come by default, very well established and tested by the market.&lt;br&gt;
It brings native support for automated testing and reports, ensuring that new versions of the application are still behaving as expected.&lt;br&gt;
Its package management is quite simple, having only one main manager model.&lt;br&gt;
&lt;em&gt;Other important maintenance points:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The community is constantly growing and is very collaborative.&lt;/li&gt;
&lt;li&gt;It has a very well-written and organized official documentation.&lt;/li&gt;
&lt;li&gt;It has been working on technologies like WebSocket, Http/Https, gRPC, HTML 2 for years.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for reading! Leave a comment or like to let us know what you think.&lt;/p&gt;

</description>
      <category>go</category>
    </item>
    <item>
      <title>Why doesn't Go have Ternary?</title>
      <dc:creator>Allison Piovani</dc:creator>
      <pubDate>Sun, 09 Oct 2022 15:09:59 +0000</pubDate>
      <link>https://dev.to/apiovanidev/why-doesnt-go-have-ternary-4anl</link>
      <guid>https://dev.to/apiovanidev/why-doesnt-go-have-ternary-4anl</guid>
      <description>&lt;p&gt;One things I miss most about Go is Ternary, coming from PHP and Node where the ternary is already well established, I understand how it can be controversial since a lot of them use complex logic in them, that would fit more in IF, Else and Switch. It's like a famous quote form the comics: "With great power comes great responsibility".&lt;/p&gt;

&lt;p&gt;The discussion about the Go and Ternary isn't new, there are a lot of issues on the topic, I'll leave her sources for you to delve into, I'll summarize the points that I think are most important on both sides, and the give my personal conclusion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits
&lt;/h2&gt;

&lt;p&gt;1) Drastucally reduces the use lines code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var n T
if expr {
    n = trueVal
} else {
    n = falseVal
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var n = expr ? trueVal : falseVal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) If the problem is the sumbols &lt;code&gt;?&lt;/code&gt;, &lt;code&gt;:&lt;/code&gt;. &lt;code&gt;=&lt;/code&gt;, an approach that not even in python can be quite interesting.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x := "yes" if true else "no"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) Languages like C and C++, which are the example base of Go, have ternaries.&lt;/p&gt;

&lt;p&gt;4) Variable that nedd a value default if no value is assigned to it, for example: service port.&lt;/p&gt;

&lt;h2&gt;
  
  
  Disadvantages
&lt;/h2&gt;

&lt;p&gt;1) When there is more than one expression to be validated, the ternary operation is difficult to read and it becomes impossible to determine its consummation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var b1, b2, b3 bool
...
var s = b1 || b2 ? b2 &amp;amp;&amp;amp; b3 ? b1 &amp;amp;&amp;amp; b3 : "s1" : "s2" : "s3": "s4"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) Can replaced by operations like IF, ELSE and Switch.&lt;/p&gt;

&lt;p&gt;3) Deviates from Go's goal of clarity and simplicity when it comes to syntax.&lt;/p&gt;

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

&lt;p&gt;The ternary will not come to version 1.20 (at this time we are on 1.19), discussions are whether it will come in version 2 of Go, but the reality that will hardly come, the communicates it despite being divided the majority from what I see defends that should still keep the aspects of simplicity in its syntax, even if it requires more lines of code.&lt;/p&gt;

&lt;p&gt;The biggest fear of communicating is the creation of more complex codes, I personally prefer autonomy for developers and their teams to choose the best way to write, one more option would be nice, since there are countless that make more sense to use just one line than to use at least 3.&lt;/p&gt;

&lt;p&gt;No everything is lost, if it is really necessary there are packages in Go that create the ternaries in Go or leave it very close to what we have in other languages, example: &lt;a href="https://github.com/troylelandshields/ternary" rel="noopener noreferrer"&gt;ternary&lt;/a&gt;, logically we must have other scattered around Github.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/golang/go/issues/20774" rel="noopener noreferrer"&gt;Issue 20774&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/golang/go/issues/31659" rel="noopener noreferrer"&gt;Issue 31659&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/golang/go/issues/33171" rel="noopener noreferrer"&gt;Issue 33171&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://go.dev/doc/faq#Does_Go_have_a_ternary_form" rel="noopener noreferrer"&gt;Go Doc&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/troylelandshields/ternary" rel="noopener noreferrer"&gt;Github Ternary&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>go</category>
      <category>ternary</category>
    </item>
    <item>
      <title>VS Code Extension - Git Graph</title>
      <dc:creator>Allison Piovani</dc:creator>
      <pubDate>Fri, 09 Sep 2022 03:46:34 +0000</pubDate>
      <link>https://dev.to/apiovanidev/vs-code-extension-git-graph-34hm</link>
      <guid>https://dev.to/apiovanidev/vs-code-extension-git-graph-34hm</guid>
      <description>&lt;p&gt;Today I was talking about a tool that helped me a lot, to unravel the Bug, which apparently is not wrong, let's find out the reason more calmly.&lt;/p&gt;

&lt;p&gt;At the moment of desperation a graphical tool on the git path was indispensable, so that the two weeks work of 4 developers has been undone, thanks to this tool I was able to browse the changes and map the changed and relevant files that could cause the Bug.&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%2Fo9ky8fbsma1j1dktfccv.gif" 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%2Fo9ky8fbsma1j1dktfccv.gif" alt="Git Graph demo" width="1208" height="682"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And before you ask, couldn't you do that in the Github UI? Yes, it could be done, but not with such speed, when loading pages you lose a precise time if you don't lose your train of thought.&lt;/p&gt;

&lt;p&gt;As another tool in armory didn't really do it, its installation my VS Code is so light that I don't even feel the difference. I hope I don't need it anytime soon, but if I do, I'll definitely waste a lot less time this time.&lt;/p&gt;

&lt;p&gt;If you don't believe me, I suggest you try it, you can find it in the VS Code extensions browser or in the links below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/mhutchie/vscode-git-graph" rel="noopener noreferrer"&gt;https://github.com/mhutchie/vscode-git-graph&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph" rel="noopener noreferrer"&gt;https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>vscode</category>
      <category>git</category>
      <category>github</category>
      <category>version</category>
    </item>
    <item>
      <title>UUID</title>
      <dc:creator>Allison Piovani</dc:creator>
      <pubDate>Sun, 17 Jul 2022 02:21:44 +0000</pubDate>
      <link>https://dev.to/apiovanidev/uuid-4pmd</link>
      <guid>https://dev.to/apiovanidev/uuid-4pmd</guid>
      <description>&lt;p&gt;Universally Unique Identifier or GUID Globally Unique Identifier which in practice it's the same thing.&lt;/p&gt;

&lt;p&gt;It's composed by 128 Bits represented by 32 digits Hexadecimal, divided by 5 groups separeted by "-" with struct: 8-4-4-4-12.&lt;/p&gt;

&lt;p&gt;The goal identify unique information in the System, whithout a central chord.&lt;/p&gt;

&lt;p&gt;Exist 5 versions, the first digit from third batch, is separated to identify the version of UUID.&lt;/p&gt;




&lt;p&gt;Versions&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;v1&lt;br&gt;
Uses timestemp to generate the UUID, also can use NodeID which is an  identifier, usually for that MAC of the computer, or URL or prefixed data key.&lt;/p&gt;

&lt;p&gt;v2&lt;br&gt;
Very similiar to v1, but the use of NodeID is mandatory to present a security group, this group may be related to entities or some context of the application. But veru little used.&lt;/p&gt;

&lt;p&gt;v3 and v5&lt;br&gt;
It also use NodeIDas prefix. In v3 is used an MD5 hash key, while in v5 a has key of the SHA-1 algorithm is used, this second being more advised for development.&lt;/p&gt;

&lt;p&gt;v4&lt;br&gt;
It is the most used version, in this case all characters are randomly generated.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;blockquote&gt;
&lt;p&gt;Benefits&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It's also a form of information security, the ID format increment informs how many users there may be on the plaform, important information for competitiros;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Greater security if you don't have Authorization control in the application.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Disadvantages&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Makes debugging records more complex;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Increase in the cost of storage, storing in string format, char(32) can make the performance of queries quite heavy, a solution is to store in binaries;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Must have a position rule, since the collision is possible.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;blockquote&gt;
&lt;p&gt;Go&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Inside Go we have a lot of packages that press UUID, but in this demo we will use the official google package &lt;a href="https://pkg.go.dev/github.com/google/uuid" rel="noopener noreferrer"&gt;Package&lt;/a&gt;,  in addition to supporting all of the above versions. The project link is here: &lt;a href="https://github.com/piovani/go-and-uuid" rel="noopener noreferrer"&gt;Project&lt;/a&gt;&lt;/p&gt;

</description>
      <category>uuid</category>
      <category>programming</category>
      <category>go</category>
      <category>codequality</category>
    </item>
  </channel>
</rss>
