This is the eighth in my series of best books to learn Go in 2023. Read my conclusion, or browse the entire series:
- Go Programming Language for Dummies by Wei-Meng Lee
- Go Programming In Easy Steps by Mike McGrath
- Learning Go by Jon Bodner
- Beginning Go Programming by Rumeel Hussain and Maryam Zulfiqar
- Learning Go Programming by Shubhangi Agarwal
- Go For Beginners by Edward Thornton
- Learn Go With Pocket-Sized Projects by Aliénor Latour, Pascal Bertrand, and Donia Chaiehloudj
- Go Fundamentals by Mark Bates and Cory LaNou
- The Go Programming Language by Alan Donovan and Brian Kernighan
- Get Programming with Go by Nathan Youngman and Roger Peppé
- For the Love of Go by John Arundel (this post)
This book initially flew under my radar, because it is self published and did not appear in my Amazon search. Thanks to an astute viewer of my earlier reviews, who pointed it out to me!
For the Love of Go by John Arundel, 209 pages (eBook only). Published 2023 by Bitfield Consulting.
This book targets “complete beginners,” even those who “don’t know anything about … programming” (p. 10)
And true to this goal, the book takes a very easy-to-follow, step-by-step approach to Go, first by introducing some simple code, helping the reader run the code, then explains the concepts.
The writing is very friendly and accessible. Definitely beginner-friendly. You should find no surprise terms thrown at you (or when you do, the author is careful to point you in the right direction, with a helpful link to StackOverflow, or some other more detailed resource).
And in line with the beginner-friendly approach, the book takes you through every step, in a surprising amount of detail. For example, in chapter three, while talking about returning error values from functions, we run into an error
assignment mismatch: 2 variables but calculator.Divide returns 1. Then rather than fixing the function in one step, we’re taken through the individual steps, first adding the
error value to the function signature, then seeing a new error (
not enough arguments to return), then correcting that error.
This book is written to be read cover to cover. And its beginner-friendly language and lighthearted approach should make that an easy task.
This does mean it’s not good reference material. In fact, there’s no index at all (but you can of course search the PDF easily, which helps mitigate this limitation).
The book opens by having you install Go locally, although it defers to the online instructions for details there. Then it has you initialize the project with a
go.mod file, then copy a two simple files (one with a single function, the other with a single test) into your project. From there, you’re off writing code and tests, guided by the book.
You’re then taken through all the core features of the Go language you would expect: Data types, functions and methods, conditional statements, etc.
The last chapter of the book, The Tao of Go, gets into some of the more soft-skills, or human-centric aspects of programming: Kindless, Simplicity, Humulity, and Not Striving, as they apply to programming, and specifically to the ethos of Go and its surrounding community of developers.
Right off the bat, this book, like any book for an absolute beginner, is not “complete.” There are many important simply not addressed. And that’s okay. The end of the book points the reader to a number of additional books by the same authorto help fill some of these gaps.
Before I talk about what’s missing, though, let me point out two important things that are present in this book.
First, before even showing you any code, the book walks you through setting up a Go module. This is something missing in most of the other books I’ve reviewed, and I believe it will confuse most newcomers, as this really is a vital step. Kudos to John Arundel for addressing this right off the bat!
Second, almost as quickly, the book introduces the concept of writing tests. The only other book I’ve reviewed that pays as much attention to testing is Learn Go with Pocket-Sized Projects, and it’s not even completely written yet. In some ways, this book goes a step further than Pocket-Sized Projects, in that it teaches you to write tests before code (often called Test-Driven Development).
The book also does an admirable job of introducing the reader to
gofmt, the standard code formatting tool that all Go developers should be using. And this is just one example of how this book does a good job of introducing the absoulte newcomer to the broader Go ecosystem, ethos, and way of working. Some other books stop at just teaching you the technical aspects of Go. This one really sets you on the right track for being comfortable within the broader Go community, by explaining some of the more nuanced conventions, like this use of a particular coding style.
So what’s missing? Well, the big thing that I am looking for in this review series, which is missing from this book, is generics. Although given the absolute beginner audience this book is written for, I think that’s actually appropriate. And what’s more, if you want to learn generics after reading this book, you can read Know Go: Generics by the same author, which is listed along with several other books on more specific advanced topics, at the end of the book.
Beyond that, there are a few other topics this book understandably doesn’t address:
- except to mention the
t.Parallel()function, used to make tests run concurrently, there is no discussion of go routines, channels, or other concurrency topics
contextpackage is absent
- JSON (un)marshaling, the
os.Args, and many other peripheral concepts that are commonly covered in introductory books are not addressed here.
Aside from a few ambiguously worded statements, which honestly should not bother anyone but the most nit-picky amoung us, I have not found any accuracy errors.
This book is only sold as an eBook, in PDF, ePUB, and mobi formats. I read the PDF version, which is attractively presented with black text on a white background, and some color syntax highlighting in the code samples.
Each chapter also opens with a little cartoon character, and in the final section of the book, referencing other books by the author, we have some book cover photos. Otherwise, the book is free from graphics.
There are a number of hyperlinks within the book, which take you to online resources, such as StackOverflow answers, or official documentation from the Go project.
This would probably be my pick for the absolute beginner to computer programming who wants to learn Go. This book won’t take you all the way to professional-level programming, but it will really help get you off on the right foot.
If you already have experience programming, this book isn’t written for you, and I would suggest one of the others.
This is the last book in my review series! I will soon be writing up my conclusion, and my final recommendation for which book you should read in 2023 to learn Go. Be sure to subscribe to my daily Go mailing list, where I’ll announce that final article, so you don’t miss it!