Best Go books for 2024

Best Go books for 2024

Which Go books are worth your money?

There are plenty of Go books available, some good, some not so good. I think if you’re learning Go you should strive to read as widely as possible: even the best Go books represent just one point of view.

You have to start somewhere, though, and as my students often ask me “What Go books should I read?”, I thought it might be helpful to collect my recommendations in one place. Naturally, I’m including my own books: I think they’re pretty good, otherwise I wouldn’t be writing them! But I’ve tried to also give an unbiased overview of some other Golang books that I think are worth your time and money, and outline what you can learn from them.

Best introductory Go book for beginners

 
For the Love of Go (Go 1.22 edition)
Quick View
 

For the Love of Go is suitable for people with no experience of Go, or of programming in general. It introduces test-driven development (TDD) in Go in a gentle way, and walks readers through the process of developing a complete Go package, guided by tests.

The book introduces the most important fundamentals of Go: the built-in types, structs, maps, and slices, and shows how to use them as part of a real-world application (an online bookstore). It covers essential control structures like functions, loops, and conditionals, moves by easy stages on to methods and pointers, and guides readers through some useful patterns like validation, unexported types, and iota constants.

There are dozens of mini-challenges throughout the book to help the reader practice what they’ve just learned, with complete and tested solutions included (also available on GitHub).

Best intermediate-level Go book

 
The Power of Go: Tools (Go 1.22 edition)
Quick View
 

The Power of Go: Tools is for people who’ve learned the basics of Go, but now want to know what to do with it. How do you design packages and APIs? How do you test the untestable? What does good software look like? What is the Tao of Go and how do we use it?

With a focus on command-line tools, the book covers everything you’ll need to produce professional-grade software in Go: flags and arguments, files and filesystems, commands, shells and pipelines, JSON and YAML wrangling, and even API clients.

The best way to learn is by doing, and the book is crammed with exercises, puzzles, and mini-projects for you to work on. Opinionated and uncompromising, yet gentle and occasionally amusing, the book makes its lessons memorable with pithy phrases and rules of thumb (“obviousness-oriented programming”).

Best Go generics book

 
Know Go: Generics (Go 1.22 edition)
sale
Quick View
Know Go: Generics (Go 1.22 edition)
Sale Price:$34.95 Original Price:$44.95
Add To Cart
 

Know Go: Generics is the essential introduction to the new generics features in Go 1.18+. It explains in simple language what generic functions and types are, why we need them, and how they work in Go.

Suitable for beginners and experienced programmers alike, the book is a gentle but thorough tour of the new features and how to use them, including type parameters, constraints, type approximations, generic container types, the new slices and maps packages, and functional-style programming in Go with Map, Reduce, and Filter.

The book shows some interesting applications of generics in Go, explores how the language changes will affect the way we write programs and the familiar APIs of the standard library, and answers some of the most frequently-asked questions on generics, such as “What are the performance implications of using generics?” and “When should I use a generic function rather than, say, interfaces?”

Best book on test-driven development (TDD) in Go

 
The Power of Go: Tests (Go 1.22 edition)
Quick View
 

Go’s built-in support for testing puts tests front and centre of any software project, from command-line tools to sophisticated backend servers and APIs. The Power of Go: Tests will introduce you to all Go’s testing facilities, show you how to use them to write tests for the trickiest things, and distils the collected wisdom of the Go community on best practices for testing Go programs. Crammed with useful code examples, the book uses real tests and real problems to show you exactly what to do, step by step.

You’ll learn how to use tests to design programs that solve user problems, how to build reliable codebases on solid foundations, and how tests can help you tackle horrible, bug-riddled legacy codebases and make them a nicer place to live. From choosing informative, behaviour-focused names for your tests to clever, powerful techniques for managing test dependencies like databases and concurrent servers, The Power of Go: Tests has everything you need to master the art of testing in Go.

The book doesn’t insist on any particular methodology, such as TDD or Agile; there’s no religion here, just a pragmatic approach to building robust, real-world software guided by tests, with a focus on correctness and confidence.

Best Go concurrency book

Concurrency in Go: Tools and Techniques for Developers, by Katherine Cox-Buday, is simply essential reading for anyone writing concurrent programs in Go. It’s an advanced topic, and accordingly the book isn’t for beginners, but it’s packed with valuable information, patterns, and practices.

Although Go has excellent built-in support for concurrency, it operates at a very low level. Actually building correct, reliable, and performant concurrent programs is a big deal, and takes experience and know-how. The author supplies that in quantity, outlining the theoretical CSP framework that Go implements, and showing how it’s used in practice, with dozens of detailed examples and explanations of what’s going on under the hood.

Best Go cryptography book

 
$44.95
Add To Cart
 

Explore Go: Cryptography is an in-depth guide to modern cryptography in Go. It explores the history and principles of ciphers and digital security, as well as giving you all the tools you need to support cryptography in your programs.

Have you ever wondered how passwords are stored securely? What makes a good password? How codes and ciphers are designed—and broken? Where random numbers come from, and what makes them random? What are the connections between lava lamps, space games, digital signatures, black holes, and Bitcoin? Let’s find out.

Join Alice, Bob, Eve, and Mallory as we learn about the fundamental principles of cryptography and digital security, from brute force and blockchains to keyspaces and hashing. We’ll build a cipher system in Go from scratch, with step-by-step instructions and code examples at each stage (also available on GitHub).

Starting with the simplest cipher imaginable, we’ll gradually improve the system by attacking it, adding sophisticated features like block chaining, padding, digests, and authentication. Along the way, you’ll develop a powerful intuitive understanding of ciphers and keys, what makes them strong (or weak), and how to use them securely.

We’ll see how state-of-the-art modern algorithms like AES, SHA-256, Diffie-Hellman, and RSA work under the hood, and how to integrate them into real-world Go tools. This book is essential reading for all Go programmers who have to deal with encryption, authentication, and security… in other words, all of us!

Best tech career skills book

 
Sale Price:$34.95 Original Price:$44.95
Add To Cart
 

Code For Your Life is a practical, readable, and funny guide to software careers, distilling the lessons of a lifetime into the ultimate guide for anyone who wants to succeed in tech.

In these pages you’ll learn the key skills for finding the right job, nailing the interview, cracking the technical test and the take-home task, and succeeding in the job despite impostor syndrome.

Where is your career going? How can you plan and negotiate your promotions, pay rises, and contracts? How do you become a master of your technical craft, whether that’s Golang or something else? Does your future lie in management or on the staff engineer track? When is it time to launch your own business, and how can you succeed as an independent engineer?

The message of Code For Your Life is empowerment: you can and should take control of your career progress, your skills development, and your working life. The book is crammed with wise, memorable, and often amusing advice, anecdotes, quotes, tips, tricks, and guidance for engineers at every stage of their career.

“I wish I’d had this book twenty years ago,” said one rueful reader, but wherever you are on life’s journey, the inspiring takeaway of Code For Your Life is that it’s not too late. You can recapture the magic and excitement of your first steps in programming, and use it to build a fun, rewarding career.

The ultimate goal, as the book reminds us, is to build a life you won’t need a vacation from. And what a delightful prospect that is.

Rust vs Go in 2024

Rust vs Go in 2024

Being a good co-worker is your job now

Being a good co-worker is your job now

0