I am having some days off, so I have compiled a list of Golang resources to go through during this time, aimed to become a better Go developer. I am hoping that this can also be helpful to you. By the time we all reach the end of the list, our level of language familiarity should have increased a lot!
- How to write Go code
Quick initial refresher in case you need it!
- Effective Go
I think it's a very good idea to revisit the "Effective Go" document once in a while with different skill level. In my case, the understanding I get from it and the profitability is nothing compared to the understanding I got a while ago when I read it for the first time. The more your mind has been exposed to different Go codebases, the more insight you can find when reading this.
- Code Review comments
I discovered this document recently and as the description says, it's a nice complement for the Effective Go write up. It's full of interesting comments that you should take into account, useful when doing code reviews (or writing your own code!)
- Standard library
Not being an extremely large standard library, getting to know it quite well is quite advisable. Having a pretty good knowledge will save you from the error of reaching for a third party library to accomplish something that can be easily done remaining within the stdlib.
Also, remember that the language specification is here to help
Getting more into action, I got to admit pointers were hard to grasp at first. If you want an explanation which is comprehensive and very easy to follow, check Junmin Lee's fantastic video
- Benchmarking and profiling
I am almost sure that if you are doing Go, one of the main reasons is because you want peformant code. So well, things don't always go as expected, and when issues arise, knowing how to benchmark and profile will give you a big advantage. This comprehensive workshop contains a lot of interesting information about this matter.
Even though Go has a pretty short language specification that doesn't mean it's an easy language. I think Go is in fact difficult... or at least difficult to get right. It's really easy to get "whatever" up and running and I think that explains its popularity, but if your goal is not just to have "whatever" but idiomatic code which is precise, clean and simple to understand then you better be ready to face a pretty nice collection of quirks that you should know in order to write the best possible code. Here are two good articles on this topic.
The darker corners of go
Sometimes you want to get a good understanding of many crucial parts (mocks, interfaces, etc...) without doing toy exercises or easy tutorials. In this case the most enjoyable option is to do a long project tutorial like the following:
- Http servers with ScyllaDB and Kafka https://www.youtube.com/watch?v=IS9Erqkx-ks&list=PLGRs9mrW62D1I4SF1p03zNn0x2WSSFhOA
You can also find a collection of guided long-ish tutorials here:
- Gophexercises https://gophercises.com/
Almost ending the list, here is a triad of playlists put together by John Arundel from Bitfield Consulting which can serve as a good general resource, available in three different skill levels.
Ending the list, it's time for books. I like books because the signal to noise ratio is so much better than many online tutorials. Unfortunately in some cases they might get outdated very easily, but if you pick books with the right content, many times the learnings you get from them should be timeless. For instance, the original "The Go Programming Language" book might not have the latest and greatest information about modules, but that is something that you can research on your own and doesn't make the book less valid as the best starting point for the language.
Having said that, a couple of titles that have grabbed my attention
- The interpreter/compiler book
The Interpreter Book and its sequel, The Compiler Book are two resources to accomplish writing an interpreter (and a compiler) for a made up language. Really interesting proposition and definitely on my "to do" list.
- Practical Go Lessons
This excellent resource almost replaces entirely the rest of the list. A mamooth-sized book with everything you need to know about writing Go. The HTML version of the book is free, but you can support the author buying paper and digital copies. A must-bookmark!