Go is one of the youngest programming languages. It was created to meet the needs of programmers working on large projects. Thanks to its simple and modern structure, it has gained popularity among many large technology companies. What are the benefits of using Go and what are the biggest companies using Golang? Let’s find out!
The history of GO
The motivation for programmers working in Google to create Go in 2007 was to establish a programming language that would be much simpler to use than the languages used at the time. It was created by experienced programmers – Ken Thompson (designer and creator of UNIX and C), Rob Pike (co-creator of UTF 8 and UNIX format) and Robert Griesemer.
C ++ was widely used at that time (and also today), and it’s considered to be very complicated and incompatible with modern times. This translated into lowered programmer productivity, who took a lot of time to solve problems they encountered during development.
Go was meant to be easy to use and perfectly suited to creating large programming systems. Because of that, many programmers working together could efficiently debug complex projects.
In 2009, Go became an open source project. Version 1.0 appeared in 2012 and now you can use version 1.13.
Why are companies using Golang?
Go contains a relatively small number of well-known concepts from other languages, which lets it create the simplest code possible. This has plenty of advantages. One of them is that other developers don’t have to break through many lines of code, which is a great timesaver. This is important because reading the code is much more time-consuming than just creating it.
Created for large projects
Creating small projects is possible using any software language, but you will encounter difficulties when you create projects that are really complex. They can require the cooperation of hundreds of programmers for many years, who have to work on millions of lines of code.
This leads to longer build times that interrupt product development. The risk of errors is also increased because the code is rewritten myriad times and the programming styles of the project participants are varied.
Many companies use Golang because more complicated projects can be completed faster and work is more efficient. It also reduces the risk of bugs, and their removal is faster and more effective.
Easy to learn
Simple code means that the basics of the language can be learned in just one week of training and then you can start programming with it. In addition, documentation and many tutorials are available on the internet.
One problem – one solution
The language is based on the philosophy that there should be a small number of solutions to one problem (or preferably only one). It differs from other languages, where it happens that there can be almost as many solutions as programmers… This promotes the cooperation of large teams and additionally makes the code work faster and more efficiently.
Ease of maintenance
The “one problem – one solution” philosophy means that many activities can be performed by machine and the effects of this process will not be clearly different from the effects of programmers.
One of the pros seen by companies using Golang is that developers have many tools for automatic code maintenance at Go. They enable, among others, code formatting and importing, searching for definitions and applications of symbols, and simple refactoring.
Similar to C
Programmers using Golang often perceive it as a C language devoid of its annoying flaws that reduce the efficiency of work. In Golang, there are fewer situations where the finished code needs to be cleaned, because it is simple and clear. At the same time, its syntax looks familiar to programmers, thanks to its similarity to C, which makes it easier to learn for people who know C.
Designed for multi-core processors
Designed for the Internet
Most of the currently used software languages were created before the time of widespread use of the Internet. For this reason, they only offer general network support.
Using the standard Go library, you can create sophisticated web services without third-party libraries. This facilitates work as there are fewer options that implement the same functionality and fewer implementations than the one actually used.
In addition, external libraries may be of low quality and may not be secure enough. Appropriate support is not always offered and changes in libraries may be unexpected.
Compiling large code (even in languages that do it relatively quickly like Java or C ++) is time-consuming. Thanks to the fact that Go was designed especially for work on large projects, compilation of code written in this language is extremely efficient. As a result, the developer receives quick feedback.
Small application size
The binary file in Go can be up to 10 times smaller than its Java equivalent. This advantage is particularly evident when deploying large applications (which companies using Golang often do). When deployed on multiple servers, this can be very important because it significantly reduces file loading time. Implementations can also be made more often.
Open Source model
Thanks to the fact that Go is an Open Source software, a large community of programmers has been created around it. This promotes new solutions and provides users with extensive support through forums and tutorials. Above all, however, the community quickly detects and eliminates code errors.
The 7 biggest companies using Golang
Golang was designed by Google engineers and is often used there for internal projects. Google Chrome and Google Earth were created in this way. It is also used in YouTube and Google App Engine.
One of the biggest companies using Golang is Uber. It is used there for the geofence service, which serves the user’s location and product availability. Geofence makes it possible to precisely define the area with special requirements (e.g. taking into account places such as airports) and to implement dynamic prices.
According to Kai Wei from Uber, the company has had very positive experiences working with Golang. The ease with which C ++, Java or Node programmers can switch to Go and the high bandwidth and delay performance have been appreciated.
The service has a guaranteed high reliability. It has been running continuously for 99.99% of the time since its commissioning. Rare downtime was caused by third-party libraries, while there were no problems in terms of the language itself.
In Twitch, Go is used for the most-loaded systems. It is appreciated for its simplicity, security, efficiency and readability, which means that it perfectly manages problems encountered when displaying live video and simultaneous chats of a large number of users.
Above all, however, Go enabled Twitch to improve 20 times the GC (garbage collection) factor responsible for automatically managing dynamically allocated memory.
Dailymotion is a video streaming website. Thanks to Golang, among others, automation of APIs has been improved. This language makes it possible to carry out a large number of automation tests, which would otherwise cause huge loads. All because of Golang simplicity and its performance, as well as the possibility of static type checking.
SendGrid is a cloud based email service specializing in the delivery of transactional messages and the one of the biggest companies using Golang. It is mainly responsible for sending purchase confirmations, sending offers, processing incoming messages and forwarding customer inquiries.
The company uses Go as the primary programming language. The advantages of this language allow it to efficiently process over 500 million messages a day. One of the challenges faced by SendGrid was the need for simultaneous asynchronous programming. This problem was solved thanks to the simplicity and elegance of the clearly optimized Go code.
Another argument in favor of switching to Go was the fact that the company’s developers have already used it widely to solve problems with SendGrid. It also reduced maintenance costs and resolved concurrency problems.
Dropbox, one of the leaders in cloud computing services constitutes another great example of a major company using Golang. It needs this language to scale its systems in a more efficient way. To this end, the company migrated its critical systems with Python.
To deal with the problem of insufficient depth of Go libraries and to be able to build larger systems, Dropbox began to build its own libraries. This allowed them to improve caching, improve the standard error interface, enable programmers to generate SQL statements programmatically, and to implement fully functional memcache client libraries.
Dropbox plans to expand Golang libraries and make internally used libraries public on GitHub.
One of the biggest companies using Golang is SoundCloud. It decided to use Go language in addition to Ruby on Rails. Its engineers described Golang as a WYSIWYG language, which means that the code entered does exactly what appears on the page. In addition, they appreciate the “one problem – one solution” philosophy, which means less time is spent thinking about the code.
For SoundCloud, the ability to perform static analysis in real time was also important, which was possible thanks to static typing and fast compilation enabled by Go. This significantly accelerated the work on applications.
Currently, SoundCloud uses 6 services and a dozen or so repositories completely written in Go.
Golang – the future of programming?
The Go language seems to be more relevant to the present day than most commonly used languages. Thanks to the simplicity and the principle of “one problem – one solution”, it allows the companies using Golang to work on large projects.
Would you like to join this club? We can help you introduce this language into your organization!
If you liked this article, you may also be interested in examples of known applications built using Node.js.