My Experience with Learning Golang
Tags: go, programming, learning, tutorials
Published: 2020-03-07 08:23:33

---
title: My Experience with Learning Golang
published: true
description: An overview of my experience using the resources out there for learning Go
tags: golang, programming, learning, tutorials
cover_image: https://i2.wp.com/pmihaylov.com/wp-content/uploads/2020/03/gopher.jpg?w=1262&ssl=1
canonical_url: https://pmihaylov.com/learning-golang-experience/
---
<!-- wp:paragraph -->
<p>So you want to learn Golang?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Great! Perhaps I could help you. When I learnt <a href="https://pmihaylov.com/past-year-catch-up/">I'd be joining Uber</a>, I had some time to prepare for the tech stack ahead. One of the key things I had to get onboarded to quickly was coding in Golang.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>So I started searching for good courses around the web, which could help with getting me caught up with the language and its paradigms. Some were great, others were pretty bad. And the bad part is, it isn't obvious at first glance.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Actually, some of the most promoted courses on Golang are some of the most useless ones. So learning Go can be quite frustrating due to the lack of good courses out there. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In this article, I will share what good, bad and ugly courses I've encountered in the bumpy ride of learning Go.</p>
<!-- /wp:paragraph -->

<!-- wp:more -->
<!--more-->
<!-- /wp:more -->

<!-- wp:heading -->
<h2>Learning The Basics</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><em>This section is for complete beginners to programming. Go to the next one if you are already a seasoned professional.</em></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you're just getting started with programming, I actually think Golang is not the best choice for it at the moment. Partly, because some of its paradigms are the result of accumulated wisdom from programming languages preceding Go. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>One would not be able to understand it's philosophy and design choices if one hasn't seen e.g. how Java/Python/C++ work.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Additionally, probably the bigger problem is that there aren't any good "Introduction to Programming" courses in Golang that I know of. The emphasis is on <strong>good</strong>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Sure, there are some quite often recommended:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3><a href="https://www.golang-book.com/books/intro">An Introduction to Programming in GO</a></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>I haven't gone through this book myself, but I am breezing through it now and what I see is a set of one-pagers for explaining things beginners quite struggle with - for loops, arrays, functions, etc. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is probably a good way to learn Golang if you already know some other programming languages, but it would get you nowhere as a beginner.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3><a href="https://www.udemy.com/course/learn-how-to-code/">How to Code: Learn Google's Go (golang) Programming Language</a></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>This is probably one of the most recommended courses for beginners, when learning Golang. In my opinion, it is quite bad. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The author does a good job of explaining some of the concepts at a beginner's level, but it's far from perfect. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Additionally, the provided exercises to the course are simply rehashes of the syntax of the language, rather than real problems which would help you learn. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If that's the first ever course you take on programming, you'd have a "feel good" feeling that you are doing good and get a big slap in the face when you get a real programming problem to solve.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>The Verdict</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>These are the two courses for beginners I'm most familiar with. As you see, I find both of them bad for beginners. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>There are probably more as Udemy's library is full. If you think there are courses for beginners which are better than these, please recommend them in the comments below, I'm quite curious myself.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But my recommendation for total beginners is to start from somewhere else. Go learn Python first (for example) - here's actually a <a href="https://www.udemy.com/course/complete-python-developer-zero-to-mastery">pretty good course for it</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Learning the Basics With Prior Knowledge</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you are already familiar with another programming language and want to learn Golang for whatever reason, the best resources to get you started in this order are:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3><a href="https://tour.golang.org/">A Tour of Go</a></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>This is a fast-track to learn Go's syntax in a day. It's a great choice for someone like yourself. Go through it to get familiar with it and get started</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3><a href="https://gophercises.com/">Gophercises</a></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Among all the resources on Golang out there, this is the one I adore the most. This is not a step-by-step course on how to code in Golang or build some project by typing the stuff you see the instructor type on the screen.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>It's a set of projects with concise requirements you have to implement yourself without any guidance. The only thing you get is a video walkthrough of the author doing the exercises himself.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is the best way to learn any programming language, if you're not a total beginner. Far too many tutorials and courses out there teach you programming with a set of training wheels along the whole way. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is a course which removes those training wheels and shows you that you can ride the bike yourself!</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>There is a reason that the majority of courses are not like these - the easier your course is, the more people will watch it. It has to be a "feel good" experience for people to go through it. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But the harsh reality is that programming is not a "feel good" experience and the sooner you realise that the sooner you'll become a professional developer.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you're interested in something similar, whether because you did all the Gophercises or because you're learning something else, check out <a href="https://exercism.io/">exercism.io</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Data Structures &amp; Algorithms Resources</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you start going through DS &amp; Algorithms by completing the exercises in Golang, you'd be killing two birds with one stone.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>You'll be learning/refreshing your algo-fu and you'd be learning Golang at the same time.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>There are many good resources on this topic. If you're only looking for good exercises (without supplemental lectures), here are some good options:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li><a href="https://www.amazon.com/Cracking-Coding-Interview-Programming-Questions/dp/0984782850">Cracking The Coding Interview</a></li><li><a href="https://www.algoexpert.io/">Algoexpert</a></li><li><a href="https://leetcode.com/">LeetCode</a></li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Those are resources for small, independent coding problems. Any one would do the trick, these are just suggestions. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Just avoid <a href="https://www.hackerrank.com/">Hackerrank</a>. It's, surprisingly, a terrible resource for studying DS &amp; Algorithms as most of the problems there are tailored for competitive programming, which is very different from what you need from this subject area for <strong>professional development</strong>. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Unless you're a 12-year old whizz kid, looking to get into international olympiads, you'd just be wasting your time.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Alternatively, <a href="https://adventofcode.com/">Advent of Code</a> is a more complete experience as it encapsulates both general programming skills and algorithm knowledge/skills. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you have to choose one resource among all of them, choose this one.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>EDIT:</strong> One of the people <a href="http://disq.us/p/27s0zck">who commented</a> on the article recommended <a href="https://interpreterbook.com/">this book</a> as an introduction to Go + learning something quite interesting (building your own interpreter).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>I've also <a href="https://pmihaylov.com/computer-science-course-craftsman/">shared some resources</a> on this domain in the past, so I'd definitely recommend checking out that book as well.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Getting Into Web Development</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>In most use-cases, Golang is used for creating web applications. Fortunately, there is a great course to get you into this field with the language:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3><a href="https://www.usegolang.com/">Web Development with Go</a></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>This course is from the same author as the Gophercises course. It doesn't take the same approach, though. It walks you through completing a sufficiently complex project from scratch.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Although it is a complete walkthrough, there are plenty of opportunities to get the driving wheel and attempt to implement any part of the project yourself before the author starts it. That's the way I suggest you go through this course.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The worst thing to do is to just watch the course from start to finish. A slightly better option is to do that while coding along. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The best option is to see what you have to do in the upcoming part, attempt to do it yourself, and watch the author do it afterwards. In this manner, it will take you more time to complete the course, but trust me, you will learn a lot more.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Additionally, there is a supplemental book to the online course. My recommendation is to just read the book and ignore the videos altogether. It's the same content, in a different medium. But you'd go through the material much faster.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Building Microservices with Go</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Golang is mainly used for building microservices, not monolith web applications. And yet, there aren't any great courses for this that I know of.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><a href="https://www.udemy.com/course/golang-how-to-design-and-build-rest-microservices-in-go/">There</a> <a href="https://www.udemy.com/course/golang-the-ultimate-guide-to-microservices-in-go-part-1/">are</a> <a href="https://www.justforlearning.com/courses/build-your-first-microservices-based-application-using-go-and-grpc">some</a> which seem relevant, but not any I could definitely recommend. All of the ones I've linked don't have enough students nor do they look complete enough.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The way I've been learning this subject area, unfortunately, is through my experience at Uber. But that experience and knowledge is not available to the general public.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>I feel like this subject needs a proper course been made. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Fortunately, it seems the Gophercises author is having something underway. He is teasing for an upcoming course, called Advanced Web Development in Go. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you're interested in that, you can subscribe to <a href="https://www.calhoun.io/">his site</a> and stay tuned.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Conclusion</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>So there you have it. Not quite what you expected, probably. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Unfortunately, I really think the current landscape of Go courses isn't very bright in comparison to what's out there for e.g. Javascript or Python.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Nevertheless, I hope that with this article, I've helped you avoid some of the roadblocks along the way and get to the final destination faster and more effectively. </p>
<!-- /wp:paragraph -->