Learning Go as Java Developer
Table of Contents
Learning Go as a Java Developer
There is no need to introduce Go much , by now its popular enough, however for anyone that’s like me a month ago , I will shorten and summarise here what Go is about, and why I chose to learn it and how I am doing just that. Go is a programming language, statically typed and compiled “systems” language.Go is built for type-safety , concurrency and efficient latency free garbage collection. I could not say Go is a functional language, even though it supports functional programming, and my inital thoughts were it’s not object oriented either, but according to Google Tech talk introducing Go, Rob Pike one of the creators of Go argues it is an object oriented programming language just without inheritance. Go supports composition, dependency injection and interfaces.
For most of my career I have been a Java developer, I fell in love with it way back in college, hell I even gatekeeped teaching it when I was a university lecturer (a story for another day). I understood and still believe in what Java stands for and the stability and confidence it brings, not forgetting the pervasiveness it has had over decades, there was a time when every digital device you touched was running a Java binary in the background.
Now with over a decade of this Java knowledge and use sprinkled with a bit of C# and a lot of Python, I have decided to learn and start building with Go . Why …? One may be forced to wonder, I wil tell you a few of the reasons here .
- The thrill of learning, I love learning new things, I love learning things that I can do with my hands, I have found myself learning to knit, I have learnt how to play a guitar I have learnt how to play a mbira( and can claim to be pretty good at it), I even have a harmonica on the way from from Germany (Hohner Special 20 in C).
- Now the bread and butter reason, I recently moved into a role where I primarily interact with a Go codebase, and every now and then I am called to sift through the code to understand and interpret the logic. While I can safely do this without much knowledge of Go, just using my knowledge of programming I can read through and figure it out, but now it’s a new challenge that makes me want to know more about it and figure out why we have high value products written completely in Go, what’s the pull factor?
- I found a mentor who is an expert in go and in my selfish thinking I cannot not use this opportunity to learn. So now that we have got that out of the way, the question is going to be How am I going to learn Go programming. The process: I am going to use a few techniques and resources at my disposal to learn go as fast as I can, considering I actually don’t have a lot of time to spare efficiency is going to be the one very important tool in the bag.
Here are the resources I have at my disposal .
I have this Learn Go with Tests , a very beginner friendly and easy to use tutorial. I like it not because it’s beginner friendly but rather because it follows TDD religiously. I love TDD but in work situations I have rarely fully implemented TDD . I have mostly used it or was compelled to use when working with an existing codebase, one I did not write or I wrote but it’s now legacy . For my own confidence I would write the tests first just to make sure I don’t bring a wrecking ball and destroy the whole thing, so I am using this as an opportunity to get back to TDD and get it ingrained in me.
I already mentioned my mentor whom I meet with regularly, I can bring as many questions as I desire to him and we talk through the deep technical concepts in Go thinking.
Again as I already mentioned I have codebases in Go, where I can immediately see how the concepts are being implemented.
Go reference documentation, I have installed the documentation on my local machine for easy access.
Now you probably want to know How …? am I going to do this, so my learning format is going to be like this,
- Read and test out the concepts in the (Learn Go with tests), If the topic is very interesting explore it more by finding more resources to read on the topic.
- Go through the codebases and see implementation of the said concept
- Speak to my mentor and disucss the nitty gritties .
What’s the endgoal ?
- I am currently developing ideas for a couple of small projects that I will use to implement the most interesting concepts in Go, talk of go routines, select and other concepts.
- I am also working on developing a bigger project that I am calling my capestone hahaha (college days where fun).
Now if you’re fascinated or interested in learning Go, come along on the journey I will be sharing very short and quick notes and pointers to help others learning Go. Thank you for reading through my ramblings.