We switched to the Golang a while ago and it was like finding the right piece of a puzzle, a perfect fit! How? Read on!
“The only way is to Go.”
"Huh? Go? Where?"
We’d been so comfortable developing in Python for a while, but now we’d hit a few roadblocks. We gathered for an impromptu intervention and that’s where this conversation came up. And that’s how we were first introduced to Go (Lang).
We switched to the Go a while ago and almost instantly developed an affinity towards the language. It was like finding the right piece of a puzzle, a perfect fit !
The Setbacks we faced.
Python was so easy to read and code. A bit too easy though.
As we continued developing, our code became messier day by day. We even had regular code cleanups so that our code looked organised. Although a few days later we'd be back to the same state.
But perhaps the biggest issue was packaging and distributing our code. Since Python is an interpreted language, we had to carry out the painstaking task of managing all the dependencies and containerising our code all the time.
Moreover, we very well knew that was our code could be exposed! (we didn’t want this situation especially when developing applications handling sensitive information)
Java was immediately eliminated as an option; It had always been so convoluted. The complexity of the code, the huge size of the codebase was a huge letdown. Not to mention the bloated application size -------
We wanted a language that was newer, had a low learning curve, was easy to read, and resulted in a cleaner code.
We wanted a language apt for developing modern server-side applications.
How Go came to the Rescue.
1: The Code
Minimalism is the key.
Go is readable, has a minimalist syntax and produces a clean, concise code. It is pretty easy to learn too. We got accustomed to the syntax within two days.
And since its static typed, you automatically end up writing code that’s more accurate, which eventually implies that you spend less time debugging.
2 : The Speed
We all know when it comes to speed, nothing can beat C. But Go is fast.Blazing fast. The performance gain might not be seen during initial development but as the scale increases, it becomes apparent that Go can match the speed of C, outshining most of the other popular languages.
One great feature is that it inherently supports concurrency and multi threading through Goroutines and Channels (more on that later). It's pretty apparent that Go was built keeping modern processors in mind.
3: Application Size
A Go source code will always compile to a single binary file. Take it and run on any compatible OS platform and you're done. It's as simple as that. Plus, the compilation is super quick and the resulting binary is extremely lightweight, usually a few kilobytes in size. Compare that with the size of any Java binary file which can sometimes go in megabytes.
Many would argue that Go is relatively new language. It was released not more than a decade ago while others have been in the game for a much longer time. Its obvious they’ll be more stable and have a larger community support.
Well....Wrong! Let’s do a quick fact check.
Go is now a highly values skill and given the high demand and a rather low supply, Go developers are earning comparatively fatter pay checks with a median salary of about $74,000.
The software industry agrees too.
The greatest win for Go has to be Docker and Kubernetes. The two most widely used container creation and orchestration platforms are so ubiquitous in the software universe that almost every other software makes use of these.
Products like Hugo (a widely used static site generator), Traefik ( a reverse proxy and load balancer), Hashicorp Terraform (a popular system for creating infrastructure as code) are all written using Go.
A lot of technology big-shots including the likes of Google, Uber and DropBox use Go while a number of other organisations have moved their legacy systems to Go to exploit its performance related features.
If you think about it, all of this has been achieved within a decade. Its evident that Go is a powerful language and is here to stay for a long time. So why to wait more? Let's Go !