Golang, it was love at first sight.
Tags: webdev, go, productivity, learning
Published: 2018-09-18 13:50:03

---
title: Golang, it was love at first sight.
published: true
description: Learning about the cloud, naturally I was driven into the face of Go, after the first LOC I got in love.
tags: webdev, golang, productivity, learning
---

> The article was originally posted on my personal website https://coder.today/go-go-go-flash-bang-d66f4c42eb7c. Meanwhile I have developed a few libraries and small apps in Go, even contributed to Go Tour and I changed some of my opinions, but I will keep this article as it was, I like immutability.


## “Go Go Go … flash bang”

When I hear “Go” I always have this [flash…back](https://soundcloud.com/cruizv/cs-go-go-go).


## Intro

Usually, when people have free time they do some R&R, but me, being weird and all I like to learn, experiment and play with new things. I have enough new hobbies (earlier this year I learned to pick locks & started to do [mobile photography](https://www.instagram.com/b.g.adrian/)), so I decided to step up my lost programming mojo.

**If** {you are like me (web or mobile developer, avoided low-level languages and concurrency for any reason) keep reading, 
**else** you already know the truth, skip to the end and share the article 😁.}

I was away from the Web development for a couple of years, doing Unity3D (C#) & mobile, so naturally I began to catch up with the **latest web trends**. I made some small projects using [MeteorJS (node +hot code +~mongodb + other steroids)](https://www.meteor.com/), **React** and **[D3JS](https://d3js.org/)**. By switching to nodeJS I ditched PHP, working in only 1 language, with shared code, I greatly improved my productivity.

**If** {you are a JavaScript developer check [this hard-core 2017 playlist](https://www.youtube.com/playlist?list=PLEXf82oPg5EPIyYa1dbsLH3i3UcCa3kXp)}

## Go — the programming language

Reading about new architectural styles, **scalability** & cloud I found a pattern, most of the [big companies (www backbone)](https://github.com/golang/go/wiki/GoUsers) switched in a way or another to Go.

When reading about it I found that we had a lot in common (me & Go), it’s a good start for any relationship.

![](https://cdn-images-1.medium.com/max/2000/1*jwSiKwsOX7ONrx4kUksrJw.jpeg)

* We are both very **opinionated**

* We like to work with JavaScript (building an API is easy or they can be complementary)

* We deeply care about developer **productivity**

* We like **KISS**. [Simple is better (vs cpp)](https://github.com/SalGnt/cscs#c-2)

* **1 way** to do it (idioms, code formatting). Having more ways complicates the project, the developer’s brain, team work and compiler’s life.

* We suck [at RegEx](http://benchmarksgame.alioth.debian.org/u64q/go.html) (but the contributors are [working on it](https://github.com/golang/go/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20regex))

* We hate **bugs** (so we enforce coding rules)

* We like to [multi task](https://tour.golang.org/concurrency/1)and work with **big data**.

**If** {you are a Gopher please help me learn faster and review my code:}
[bgadrian/data-structures
*data-structures - Abstract data structures Go packages, built with performance and concurrency in mind to learn Go.](https://github.com/bgadrian/data-structures)

![](https://cdn-images-1.medium.com/max/2000/1*Uc-Ey0te8v80aV15zR_Jhg.png)

**For me** Golang has a few more advantages:

* It is the perfect mix between **low & high-level** languages. I want to deliver fast, get things done, so taking out the garbage is not for me. The steep learning curve keeps me away from low-level.

* It has integrated Unit **Tests** — I was looking for a reason to start practicing TDD.

* **Community** — after more than 60 hours of conferences panels and reading forums I can say it is a nice community.

* I want to be more involved in the **open source** community, this is my Go sign.

* It has identity & a cool **mascot**

* It creates a **pleasant environment** (good tools, compiler warnings, idioms etc).

* **WebAssembly** Learning a compiled language will help to gain an advantage & have fun writing JavaScript and WebAssembly modules in the same time.

![](https://cdn-images-1.medium.com/max/2294/1*rkbogy-oxQQwOJiBSan9Vg.jpeg)

Most of the [“anti” Go reasons](https://github.com/ksimka/go-is-not-good) I consider them to be “pro” reasons, here are a few examples :

* **missing features** like Exceptions- results in better code, [who wants this chaos on this hands? ](https://t.co/KRvLFdTqwd).

* *“When 2 sides argue more than 15 min they are both wrong.”* In this case wars took more than a decade, so Go being **opinionated** is a good thing. No more spaces vs tabs, functions vs objects, for vs while … Developers write the same code, compiler can optimize it better.

* **overloading** — usually creates too much similar code, and there is no polymorphism, so no much use for it when you code in Go style. Overloading makes “cool looking code”, but is harder to debug, maintain and interpret. I think interfaces are enough (1 function does 1 thing, that can be relate to 1 interface) with explicit conversions.

![Actual c++ code](https://cdn-images-1.medium.com/max/2000/1*tqxky0NtFY9AUu02XRHgSw.jpeg)*Actual c++ code*

* code is **art**/ has no soul — I think the beauty is not in the source formatting, rather at the system/architecture level, solving difficult problems with simple solutions.

* most of the reasons can be easily ignored: they are too subjective, don’t understand the Go paradigms, their minds are stuck in OOP never land or they compare it with other languages like C/C++ (which is not an alternative for) or apply to problems outside of the scope of Go.

**If** {you want to be a better programmer by practicing [katas check CodeWars](http://www.codewars.com/r/vWPS5A)}

## Go learned from 30 yrs of development mistakes

There, I said it! It went back to the roots and returned like a Pheonix, better and with a fresh look.

I spent too many hours of my life **debugging** and fixing bugs. I remember a lot of fixes, mistakes and anti-patterns that I fixed along the years, and a lot of them are [addressed in the compiler rules and coding style of Go](https://github.com/golang/go/wiki/CodeReviewComments).

Most programmers are humans, we have feelings and bad days, different experiences and backgrounds, different level of professionalism, technology/env evolves around the code. **Bad code will always exists**, but if the Language we speak (**Go**) can fix a lot of issues (even before they exists), shall it be!

**If** {you want to learn Go check out my first steps:}
[**First steps in learning Golang**
*How am I learning Go as my new main language, what resources & techniques am I using?*coder.today](https://coder.today/first-steps-in-learning-golang-d0f3dbb3b6d7)

![](https://cdn-images-1.medium.com/max/2000/1*pe4RBWcHsCYwlw7XTOVlTw.jpeg)

Done, rant over, thanks for reading!

Thanks to [ashleymcnamara](https://medium.com/u/3ded8573854e), her gopher panel inspired me to start contributing.