Another great resource that influenced my thinking on TDD even outside Python is the "testing goat" book (aka "Test-Driven Development with Python" by Harry Percival) https://www.obeythetestinggoat.com/
The official Go tour (https://go.dev/tour/) is also a good resource IMHO, especially for people already experienced with other languages, because it points out the key differences.
Read and typed along with an early edition of this a few years back and it has continued to be one of my favorite technical tutorials of all time, far surpassing lots of other golang material that I've paid money for.
Brilliant resource. I learned a lot from real practical examples (compared to the bluebook "The Go programming language"). And I started writing tests religiously after reading it.
Thanks for the resource! I'm having a lot of fun exploring your notebook. I'm not entirely sure why I decided Go would be the net programming language I learnt, but I'm glad I did that!
This is one of the best resources for starting with Go! It’s very practical and teaches a lot of important concepts in an easy to understand way. Cannot recommend this enough! If you read the book and learned something new consider sponsoring the author as a ‘thank you’!
After doing the go tour, this was my learning resource that solidified all the concepts for me. Learning how to test and make tests easy in Go was so beneficial. Most resources only teach the language constructs with maybe a brief mention of testing package
If you like this you will like the concept of learning with koans or katas. The "rustlings" intro to rust is in such format. Most use test runners but you usually edit the code not the test.
I once found out about that technique for Scala, which actually has an operator / language construct for "fill in the blanks here"; I believe if called it just throws a NotImplementedException or something like that.
This book is hugely different from the katas or koans of the early 2000's though. It teaches you with full program structures that you would encounter in the real world. You come out of the book knowing best practices for building real applications.
In releases, you'll find PDFs and epubs, I'm pretty sure most epub readers will let you use a dark mode. Or you can just read the markdown files on GitHub, which also supports it.
I decided to learn and use Go for my recent job hunt, and this site was just the best. I used the structure of the code in the "build an application" section in every take home coding challenge I wrote.
Go is among the lowest barrier-to-entry programming languages but most entry-level tutorials don't even get into testing, So a test focused entry-level Go tutorial is indeed a fresh take and an useful one.
28 comments
[ 4.7 ms ] story [ 68.6 ms ] threadI agree TDD is a good way to learn a new language.
One of my favorite books Exercises for Programmers (https://www.programmingbooks.dev/extra/#exercises-for-progra...) promotes this approach as well.
[1] https://gobyexample.com/
https://github.com/rust-lang/rustlings
https://github.com/gamontal/awesome-katas
https://github.com/ahmdrefat/awesome-koans/blob/master/koans...
[1]: https://github.com/quii/learn-go-with-tests/tree/main/concur...
Dark Reader: https://darkreader.org/
The project is open-source (https://github.com/quii/learn-go-with-tests) so there's a few options available to you.
In releases, you'll find PDFs and epubs, I'm pretty sure most epub readers will let you use a dark mode. Or you can just read the markdown files on GitHub, which also supports it.
Congratulations to the author & contributors.