loading...
Cover image for Learn Go with tests - Book Review

Learn Go with tests - Book Review

cpustejovsky profile image Charles Clinton Pustejovsky III ・2 min read

After going through The Tour of Go and building a small Twitter bot in Go, I wanted to get more serious with this language I love.

So I decided to move on to Learn Go with tests by Chris James (quii). I began learning Test Driven Development (TDD) with NodeJS a few months ago and found that it forced me to break down problems and to think about what I wanted ____ to do which resulted in writing better code.

Here is what the beginning of Learn Go with tests promises:
Learn Go with tests introductory promises

I think it achieves all of these goals very well.

Quii takes you through the fundamentals of Golang in the first half of the book and then takes you through the process of building a fully functioning application for both the web and a command-line interface (CLI).

You'll acquire the muscle memory for TDD. Each chapter ingrains the process of writing tests that fail, making them pass, and then refactoring the code and tests.

This book also includes many asides about the whys of TDD along with external blog posts and resources that relate to both Go and TDD. This provides additional motivation to keep learning this methodology and good starting points for continuing education.

The only issue I had with the book was in the second half of the book as the application became larger with many files. It was sometimes unclear where a code snippet should go or what should be changed.

If this is an issue you encounter, I'll recommend cloning the Learning Go with tests repo and opening it in another window of your text editor or IDE. With that, you can search through to see where a specific code snippet goes if you're lost.

So if you're new to Go or new to TDD, I highly recommend reading Learning Go with tests.

Posted on by:

cpustejovsky profile

Charles Clinton Pustejovsky III

@cpustejovsky

I love programming, golang, and solving problems that help people

Discussion

markdown guide