Preface

Before I start, let me highlight what I love about Go and why I chose to learn it as my next programming language.

To begin with, let me say that Go hands-down is a great language; It is easy to read, with clear syntax. And it compiles to a single binary file which makes apps fast and compact and can compile to run on different platforms. And it’s statically typed and garbage-collected, making it efficient.

It is like a modern C with package support, memory safety, automatic garbage collection, and concurrency baked-in. And you get all the nice features from a statically typed language, and IDEs love it, and so does your development workflow.

In today’s world of cloud-native microservices, containerized architectures, You can be up-to-date with knowledge in Go. Many notable open-source projects are built using Go (i.e., Docker, Kubernetes, Etherium, and Terraform, to name a few). Those platforms have APIs and SDKs readily available natively for you to use. And many global companies have been using Go in production (i.e., Google, Netflix, Dropbox, Heroku, and Uber, to name a few), proving that it has been battle-tested and powerful mature language to based your work into.

This made me decide to pursue Go as my next language, and in 2018, I was hired by a company that uses Go. After 8+ years of working with Ruby, the first thing I did to learn Go was to relate to what I know in Ruby. And I thought it would be a good idea to document my learning process.

My initial intention was to keep it as my personal documentation and notes, but I decided to post it online after much careful thought and consideration. From one topic, it grew into a series of multiple online articles, discussing all my research and learnings about the language, collecting its analogies that I can compare with Ruby to help me learn it.

By teaching familiar implementations found in Ruby, you will see the correlation between the two languages, establishing familiar concepts to give you enough knowledge to be comfortable with Go and start programming with it.

This book was made with a Rubyist in mind in a friendly, conversational, and informal manner. All the learning metaphors are based on Ruby. I think it will help you learn the Go programming language when you already know Ruby. You don’t need to take notes or remember things. Just continue reading and understand how things work from what you already know and how it relates and is applied in Go to learn the language.

This book does not discourage people from using Ruby. Ruby is still my favorite scripting language of all time, and I attest to Ruby’s slogan, “A Programmer’s Best Friend,” because it is just a pleasure to use. I use Ruby all the time, and it has become a go-to extension of my mind to do something requiring computers. And I always get excited about new updates about Ruby.

Finally, I hope this book can help you get started and master Go as your next programming language. With so many great opportunities out there to build great things with Go, you will not regret learning it.

Now, let’s get started!