Go (also known as Golang) is a programming language that’s being actively developed by search giant Google. Golang was launched back in 2007, by Robert Griesemer, Ken Thompson, and Rob Pike. Go is a compiled, statically-typed language with “C”-like syntax. It was designed to be a simple language to use and learn.
History is telling us that the three people behind this project didn’t seem to enjoy C++ much, and opted for the more difficult option – to build their own language. Go is used to address several productivity and scalability issues at Google.
The founders will be happy to tell you that the main reason for building Go was to deal with – eliminate – slowness, clumsiness, and overall lack of performance of software development at Google. Google is a large corporation, with a lot of large software that needs to be maintained and improved constantly. Having the prior experience of writing, reading, debugging and maintaining such systems has made Go a very popular language among other companies. (CloudFlare, DigitalOcean, SendGrid)
Golang: What Is It Good For?
You could end-up spending a days worth of reading articles and blog posts of how Go came to be, what about the actual benefits and/or reasons to use this language? Here’s a list of areas that Go is particularly good at, and I’m pretty sure you can find all these covered in the documentation.
- Systems Programming – like C but easier, low-level access, C-interop
- Web Services – It has just about everything you need built into the Standard Library
- Concurrent Programming – Its built into the language: goroutines and channels
- Target Multiple Platforms – Linux, Windows, Mac OS X, Free BSD
- Simple Deployment – Your app is a single binary with no other dependencies
- Large Scale Development – Easy to read, write, maintain & Garbage collected, statically-typed, fast compilation, fast execution
Built With Golang
I’m still going to cover some pretty cool areas, like sample programs, Go learning resources, and other interesting tools that you may find useful.
Companies don’t always disclose the software its using to build its services, but here are some sample projects from companies who publicly state that their software has been built using Go. These examples will complement the few we already looked at.
It’s one of the most popular commenting systems in the world, which can only tell us that in order to manage millions upon millions of requests every day, Disqus needs to implement strategic and systematic choices, and it didn’t take long for Disqus to realize that Go was the answer to their calls. In their own words, the Disqus development team was looking for a solution to their realtime issues.
There is no doubt in my mind that this is one of the most popular music streaming services in the world, especially for the free artists. YouTube in comparison is nothing, as SoundCloud deals only with music and artists. The developer team at SoundCloud is praising the WYSIWYG style of Golang: Go’s strict formatting rules and its “only one way to do things” philosophy mean we don’t waste much time bikeshedding about style.
Dropbox has seen better times, but it doesn’t change the fact that this company is dealing with half a million requests to save files every single day, a task that is not meant to be dealt with your typical programming languages. Once again, we see the trend where Go is showing real promise for being a language that can scale for ultra-large companies. Their blog post discusses some of the Go projects they’ve been working on, check them out!
They didn’t make my list of the top live chat software, but they’ve definitely made this list. It looks like this is the second time as well, as my first post where I mentioned UserVoice was about minimal Go frameworks. UserVoice is building its own Go software, and if you take a look – they do have to serve a bit of a customer base!
Docker is not a side-project or a library built using Go, the whole project is built solely on Golang’s base. Just a couple of months ago we saw the release of Docker 1.0, which doesn’t mean anything more than the fact that both Docker and Golang are actively making their product better.
Learning Resources for Go (aka Golang)
You now know the history of Go, you know exactly why it has been built and by whom, and you also know all of the cool reasons as to why it is so great, and why you should consider using it. And, if all that wasn’t enough – you’ve even seen some real-world examples of big companies that rely on Go on daily basis. Are you ready to learn Go?
Go is a new, fun, productive language developed by Google and the open source community. Get a feel for the language and its standard libraries and tools in this session, where we go through installing Go and writing some simple but useful programs.
You can enjoy the 24-minute introduction video for Go, or you can get your hands dirty by trying out any of the other learning resources below. The best place to start with getting started is the official Go documentation.
You’ll be taking away quite a few things from this tutorial, but most importantly – how to go from setting up the work environment, to building a web server that will accept live connections. Either this, or the official guide, both will help you execute your first lines of Go code.
This is the first page you see when you visit the official Go homepage. The small ‘A Tour of Go’ tutorial will give you a showcase of the syntax that Go is using, and also some insightful and useful tips to keep with you as you begin to learn a new language. It’s quick to do, and it won’t hurt!
In this tutorial you’ll be seeing how the author is using the Standard Library to perform multiple tasks. It’s a great way to see how Go functionality works and operates, as well as other little neat tricks!
Honestly, the official site is probably the best learning resource there is, but it’s nice to see people taking the inititivate to bootstrap the documentation a little bit. Here we have Go by Example, a website that gives you a glimpse of the many areas of Go, and how you can learn to use them in your own programs.
Essential Articles for Go Developers
The articles I’m about to mention are useful for both beginners, and more advanced Go programmers. They’re either discussing how to become a better Go developer, or contain insightful information which may or may not affect your way of doing things with Go.
Concurrency is not parallelism
If there’s one thing most people know about Go, is that it is designed for concurrency. No introduction to Go is complete without a demonstration of its goroutines and channels.
Twelve Go Best Practices
It’s a pretty lengthy talk that has tons of code examples for you to learn from. Don’t learn something only to realize you’ve to re-learn! Follow the best practices at all times, it will yield bonus points in the future.
Less is exponentially more
You’ve seen all the talk about C/C++ not being good enough, but has anyone really said anything about it on a deeper level? Here we have Rob Pike explaining exactly how the languages compare.
Benchmark: Go vs Node.js
Node.js is also quite popular in the concurrent / real-time market, so it’s only natural that there will be people doing benchmark and comparison tests to see which language to pick to best suit their needs. Jonathan Warner – the author of the benchmark – is quite happy to say that both languages are very fast, but if you’re looking for the best speed performance as far as your code goes – Go is the pick to take.
Introductory Resources for Go
You should – by now – have a much more clear understanding of what Go does, and how it can help you. I’m sure I’ve missed out on some resources, but at the same time – I’ve tried to be as up-to-date as possible. You don’t want to learn from resources that are behind themselves. Would you add anything else to this list? I’m more than happy to consider additional resources to be added to this post.
Also, you’re very welcome to discuss your own Go integration, and perhaps you’ve got them archived as blog posts? Whatever the case, I hope you enjoyed this little roundup. It was fun to put together, and I learned quite a few new things myself. That’s what it is all about, learning new things!