Golang learning journal — (0) Background & Table of Contents

Shelly
4 min readSep 18, 2022

--

Photo by Jess Bailey on Unsplash

Why do I start this learning journey?

Let’s be honest. We are new to Go. We have a job that needs us to code with Go. We don’t have so much time to go through lengthy literature to study Go. Hence, for those who suffer like me, I would love to help you (and the future me) by sharing what I have learned so far on the way to becoming a Go developer.

I will share with you all the confusion and the “A-Ha” moment I got when learning Go. For stuff that you can find easily online, I would not bother to share. The topics I share here are those that I have to look up multiple Stack Overflow answers, youtube videos, medium articles, or a few official documents so that I can finally get a clear answer. Let’s aim for efficiency. No bullshit. :)

I plan to put my Go learning journey in this series with a table of contents at the end of this article. I will also keep editing this story once I add more content in the future. Stay tuned!

Since I am also new to Go, I may not be 100% correct. Hence, feel free to leave a comment if you see something that is wrong/can be improved further. Thanks :)

The following sections contain:

- Who am I

- Where to start learning Go efficiently

- How is Go different from JavaScript

- Table of contents for my future journal

Who am I?

I am a software developer without a computer science degree (which is actually common — according to the Stack Overflow survey, it’s around 40% of developers around the world as of 2020). Like many non-computer-science-background developers, I start my developer career with JavaScript (JS). After ~2 years as a JS developer who wrote Node.JS & React, I accidentally stepped into the wonderland of go. Due to imposter syndrome, I keep learning, and here is my learning journey with Go.

Where to start learning Go efficiently (in 3–4 days)?

My starting point was the tour of go. However, like many official documents, it’s not really beginner friendly. For beginners, you would need some extra background knowledge to understand the “lean” documentation. But since the tour of go wastes no words, I have discovered that I overlooked many sentences when I first time went through this tour.

My recommendation for starting learning Go would be The Complete Developer’s Guide (Golang) by Stephan Grider on Udemy. I have also purchased Learn How To Code: Google’s Go (golang) Programming Language from Todd McLeod. Although I love how Todd speaks and his life philosophy, Stephan’s course is shorter, much more up-to-date, and to the point. I completed Stephan’s course (which is only 83 videos compared to Todd’s course which is 368 videos) within 3–4 days and it’s good enough for me to kick off coding with Go. I was with Todd till video 28, and felt still quite limited in my knowledge about Go. However, I believe that Todd’s 368 videos must have value. I will slowly go through it when I have free time. For kicking off coding for my job, Stephan is definitely enough.

How is Go different from JS?

Below are some A-ha comparisons that I learned when comparing Go to JavaScript.

  • Go does not have “while” loop. It uses also “for” keyword for both JS-equivalent-for-loop and equivalent-while-loop
  • Struct is like “Class” in JavaScript
  • Map is like “Objects” in JavaScript
  • Go does not have inheritance like JavaScript, but go has “composition” which works similarly to inheritance from JavaScript (see liskov substitution principle at this youtube)
  • The JS “Array” is like Go’s “Slices”. Go also have array, but Go’s “Array” is fixed size, whereas its “Slice” is dynamic size and is used much more often in Go
  • JS is more FP (functional programming) than OOP (Object Oriented Programming), whereas Go is neither OOP nor FP, but procedural programming. However, after listening to Might Go actually be OOP? from Go Time: Golang, Software Engineering podcast, I discover that — it’s all about the definition! People may not be wrong when they say Go is OOP. Since people coming from different programming languages have different definition of what is OOP, you need to be open-minded and continue listening! They may know something that you don’t know.
  • Go is itself concurrent — but not “parallel”. Differences between concurrent and parallel can be found in this Stack Overflow answers

Thanks for reading till here. If you found the article helpful, feel free to clap multiple times on the article (one person can clap up to 50 times!), or ❤️ give me some tips following the below link ❤️. Thank you in advance :)

You are also welcome to clap for this article through liker land, so I can receive some coins on the blockchain! :)

--

--