We at uRadical love building systems in Go, it is one of the core languages we specialise in. This post will introduce you to Go and hopefully lead you to consider Go for your next project. Go was first conceived by Google back in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson to solve the challenges in building modern systems. At the time Google was ahead of most of us in they were already building large amounts of networked services that run on massive clusters. A problem the rest of us are encountering as we build larger and more complex systems with the use of Service Orientated Architectures (SOA), Microservices and Cloud Computing. Google like everyone else had been building these systems with existing languages, mainly C++ and Java but found these lacked the fluidity and ease of construction they desired. The team began to ask the question what would a language suited to building these types of systems look like. They wanted to create a language that would be:
- A simple language, that would be easy to write code in but also easy to maintain
- A strong set of tools
- Support for multicore programming
- A robust networking stack that aids in the development of networked services
- Performant and stable
One thing that the creators of Go noticed and something I'm very glad they steered away from was the convergence of other languages by copying features from each other, Rob Pike has rightly pointed out how we should seek to find the right tool for the job instead of one language for everything. Simplicity was and still is a foundation of Go, simplicity makes it easier to learn, build and more importantly maintain systems in. Go has taken a different approach to this feature race other languages have engaged in resulting in a stripped-down language with many advantages from less keywords to learn, less ways to do something so easier to reason over and read somebody else's. Rob pike has highlighted the importance of readability
Readable means reliable if you can read the code and know what it means then it's easier to understand, it's easier to work on, it's easier to extend, it's easier to fix when it breaks, it's easier to understand why it's broken. These are all good things
Go departed from the virtual machine approach of languages such as Java and the JVM to create a language that compiles to machine code. The result is a clean procedural language designed for the modern era of scalable cloud software.
Go is not just a language, the project includes the language and a powerful toolchain that supports fast builds of your code, mechanisms to test your code and a pragmatic means to manage your projects dependencies. A "batteries included" standard library that has the building blocks necessary to solve the demands of modern cloud applications. The language backed by the powerful toolchain and standard library help drive a culture of radical simplicity that once embraced enhances your ability to build robust applications.
We have built several large systems in Go and can testify for the robustness, simplicity, and productivity of the language. But why just take our word for it looking at the Tiobe index we see Go in in eleventh position and rising with other sites tipping it as a potential top three language for 2023 (October 2022).
We've fallen in love with Go because we've seen first hand how it has lived up to the hopes of its creators. We've learned to embrace the simplicity offered by Go, we always strive to find the simplest solution because as Brian W. Kernighan pointed out in 1976 controlling complexity is the essence of computer programming.
Controlling complexity is the essence of computer programming.
But like so much in life there are some contradictions namely, although Go is simple it can take some time and effort to master. This is best summarised by Rob Pike's comparison of the game of Go with the language
The thing about learning the game of go is that it's very easy to learn and really really hard to master
This holds true for the language, although Go code is very easy to read, any programmer familiar with any language will quickly be able to read and understand the code due to the terse and explicit nature of the code, it does take time to learn and master the finer points of the language and the patterns that have been adopted by the larger community. This is where uRadical can help you as we have built many systems with Go and have helped migrate developers from other languages to Go.
We firmly believe that despite a modest learning curve the benefits of Go make this a great choice for your development needs.
- Simplified Code - while having less features than other languages may seem a drawback it is a very powerful feature as it leads to simpler code due to developers having less options to implement functionality.
- Powerful performance - Go code builds fast. This allows developers to have iterate quicker. It compiles to machine code giving an added performance advantage. Compiling to native code removes the need for a virtual machines reducing the footprint of Go services.
- Multi-core support - languages like Java, JavaScript, Python, Ruby, or C, C ++ were created before the multi-core computers were widely used. Go embraced multi-core systems by making it easy to build programs that can utilise multi-core platforms.
- Designed for the cloud - Golang's "batteries included" standard library, helps developers build complex web services and microservices without third-party libraries. Making it perfect for the current demands for software development.
- Fast garbage collection - having begun with C/C++ programs and later moving into Java and C# development I can personally attest to the benefits of a garbage collector. Go's garbage collector is fast and something that has been improved with subsequent releases of the compiler.
- Easy maintenance - the focus on simplicity and having one way to do things leads to code that is much easier to maintain and live with, one of we believe the strongest reasons to adopt Go within an organisation.
Many top companies in a wide range of industries have had success with Go, these include many Internet giants. Go has been used to build high traffics backends to handle online booking at the likes of Uber, ecommerce at Alibaba, FinTech at Capital One and American Express, and streaming services such as SoundCloud, not to mention Google the creator of the language. We know that you could experience similar benefits adopting Go and are happy to help you do so. If you are interested reach out for a free chat where we can explore your needs and dig deeper into our experiences with Go and how we can help you.