loading...
Cover image for Can you recommend a book for practical learning of Go?

Can you recommend a book for practical learning of Go?

yannick_rest profile image Yannick Rehberger ・1 min read

As the title suggests, I am looking for a book that teaches Go in a practical way. That does not mean that it should just be a demo application that the reader copies. In my view a good book that teaches a programming language or framework contains the following:

  • Basic setup of the development environment
  • Chapters that teach the language/framework with practical examples and that references the original documentation for details
  • Hints and best practices for common challanges
  • Chapters about Build and Deployment

In addition to that it could also contain:

  • Some historic information about the language/framework
  • Chapters for advanced features of the language/framework

Of course, soft factors like the author's writing style and the illustrations also play a role.

For me a good example for a practical book that teaches a language or framework is "Two Scoops of Django" by Daniel and Audrey Roy Greenfeld. Django is a python web framework. I bought the book for Django version 1.8 in 2016 and it was exactly what i was looking for.

Now I would really like to learn Go and it works best for me with the combination of a good book and a private side project.

  1. So can you recommend a good book to help me learn Go?
  2. You may also want to comment on the criteria for a good book about languages and frameworks.

Discussion

pic
Editor guide
Collapse
bitfield profile image
John Arundel

Well, I completely agree with you that a good programming book should both inspire, and require, the reader to do some programming herself. That's why I'm writing the 'For the Love of Go' series, which does exactly that. In book 1, we build a calculator package, test-first, with simple challenges for beginners and much more demanding ones for experienced Gophers. In book 2, we build an online bookstore app, with the same mix of easy-to-difficult problems to solve. Forthcoming titles will cover deployment to different platforms with Go.

You can see some sample pages on the product page for each book here:

For the Love of Go

All the exercises are also available for free online, in GitHub repos:

Collapse
yannick_rest profile image
Yannick Rehberger Author

Thank you for the comment. I love the test driven approach. Do the books build on each other in terms of content? Because I am surprised that variables are explained in the second book. Also, the books are quite thin, which is great and nice when you focus on a topic. Do you reference online resources for further reading if somebody wants to study a go concept more in depth?

Collapse
bitfield profile image
John Arundel

Yes, it's always a problem when trying to teach something like Go: what do you teach first? I've deliberately focused on tests for the first book, which surprises a lot of people, and in book 2 we get thoroughly into variables and data types (structs and slices are particularly important). Yes, there are lots of links to further reading online and code challenges for people who want to push themselves beyond the basics!

Collapse
mrseptentrio profile image
Arslane M Hadjoudj

I literaly recommend you "Head First Go: A Brain Friendly Guide" from "Jay McGavren"
i found it really clear, well written, with a lot of examples and above all, repetition.
As a beginner, i struggled alot to find a book to really make me understand Go, but this one saved me.
Worth a try

Collapse
yannick_rest profile image
Yannick Rehberger Author

Thank you. I know the "Head First" books as a well known series for programming skills, even if I have never read one of them by my own. Maybe the time has come ;-)
When I look at the table of contents it seems like a classic structure in the beginning and than it goes into single use cases and the solution. This is perfect to read alongside a side project and keep improving the project with each chapter. Does the book have an own story or project that runs as a common thread through the whole book?

Collapse
mrseptentrio profile image
Arslane M Hadjoudj

Not a single one, ( excuse me if i didnt understood correctly , my english isn't relly good) but raher an Example per chapter, to illustate every part, but still using previous thigs you learned.
So yes and no actually, but finishing it, you'll build a dozen of little programms that'll cover 80 to 90% of go's concepts

Collapse
miguelhun profile image
Miguel Hun

I would recommend "Writing an Interpreter in Go" by Thorsten Ball. This book is amazing and in my opinion, it follows a similar approach to what you are looking for. Very practical book and the author explains every part of the code so you won't be just copying the code without knowing what it does.
The author's writing style is awesome. I enjoyed every single page of this book.
Highly recommended.

Collapse
leobm profile image
Felix Wittmann

These exercises have been the most beneficial for me. But it is not a book!
gophercises.com/

In principle, you learn the language while you program something and solve the exercises on your own. I think this is actually a very good concept.
But you should already have some basic experience in another programming language.

Collapse
yannick_rest profile image
Yannick Rehberger Author

On twitter I got a recommendation (nice word for promoted tweet) for the book Let's Go. It focuses on developing a web application with go and covers everything you need to know to get going. Does anyone read this book and have some thoughts to share about it?