Learn Go with Tests reaches 20k stars

I made The first commit for Learn Go with Tests (LGWT) on the 2nd of March 2018. I was hungover and frustrated at the lack of high-quality test-driven development articles I had seen in the Go community, so I decided to give it a Go.

Whilst I understand that GitHub stars don't mean anything, they are still an indicator that the project is well received. I'm not going to engage in false modesty; I'm proud of this project; it's probably one of the best things I've accomplished in my career.

Star History Chart

However, it would be wrong not to mention that it has been a community effort driven by 212 other contributors. I truly appreciate every contribution you have made.

With each star, fork, and contribution, the project's reach has expanded, reaching corners of the world I could have imagined. Between 2018 and now, there have been 1299 more commits and translated into five other languages.

The repository's impact has even been recognised beyond the GitHub platform, with mentions in articles, forums, books and tech conferences.

The rest of this post reflects on the experience, lessons learned, and plans.

 Be nice

I never intended to write much more beyond the hello world chapter, but when my friend messaged me saying I was top of the orange site, I couldn't quite believe it. The comments were positive, and my GitHub feed was alive for the first time. This drove me to keep writing more; without the positive feedback, it's unlikely LGWT would exist at all.

The feedback confirmed for me that the idea was a good one. I could use Go, a simple, easy-to-understand language and ecosystem, as a vehicle for teaching TDD properly.

The takeaway here is, be nice! If you use something someone provides or read something interesting, tell them. It will mean a lot and may act as a motivator for them to keep them driving forward.

Learning by writing learning go with tests

I wouldn't describe myself as a Go expert when I started the project. I only had a few years of experience with Go, although I did have around ten years of software development experience.

Whether you're writing open-source code or blogging, if it gets attention, you will have people giving you feedback on your work. Sometimes it is done in a constructive, friendly manner, and some people are just angry someone said something wrong on the internet. Sadly, you have to build a bit of resiliency for this, but I definitely learned a lot from the community and hopefully taught a lot back to it.

I've always relied on writing to organise my thoughts to communicate better, and the five years of LGWT have helped me practice this critical skill. Having to write these posts has helped my TDD coaching skills tremendously. I am a much better teacher of TDD as a result.

 Work in progress

Delightfully, the Go language is very conservative concerning language design. This means the content I wrote five years ago is still broadly correct. Some tooling changes have happened (I try to resist adding stuff about that anyway), but the language is highly stable. As new features land or exciting additions to the standard library are made, I will always try to bring a chapter in to cover it.

That said, I would hope by the time readers have made it to the end of the book, they have learned how to fish. That's why you'll find the most recent chapters of LGWT, are not specific to Go, but more around software design and approaches.

To that end, I am working on a chapter called "Living without mocks", which goes into contract testing, testing databases and some commentary on designing your software for testability, especially with respect to fast and accurate feedback loops. No promises when it'll be done, as I do have bills to pay and other hobbies to enjoy.

Learn X with tests

Many have requested that someone make equivalent resources for Rust, JavaScript and others. As I mentioned earlier, if I have done a good job with LGWT, you can read that and apply the same method for learning other things; you don't need someone to write something for you.

You can find me using tests to try and get a handle on a few programming languages to varying levels of expertise at:

They don't feature any commentary, just the code.

I would love to write a "proper" book in the LGWT format sometime in the future. On my list of "maybe, one day, if I win the lottery and don't have to have a full-time job"

  • Learn Rust with Tests
  • Learn Ocaml with Tests
  • Learn Svelte with Tests

It's not a proper book.

I do feel sad that I haven't gotten a physical book edited by a real publisher due to all this effort. Mainly to give to my parents as I think they would understand the accomplishment better!

I have had a couple of publishers approach me, but none of them has been able to work with the constraint of keeping material open-source, which is understandable as they need to make money. Realistically, the only way to accomplish this dream is to find the time to do it again with a different programming language.

Comments

In one final ego boost, I did some internet searches to try and dig up some pleasant comments for LGWT.

One of the things that took my programming know-how to the next level was going through a Test Driven Development guide that used Golang

Learn Go with Tests is incredible

@quii

you've written one of the best programming books I've ever used. "Learn Go with Tests". Enjoying it very much. Thank you.

As a beginner, I found Learn Go with Tests extremely helpful. Thanks a lot

@quii

for putting up such great learning content! :)

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.

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.

Learn Go with Tests is the best programming language course I've ever gone through.

https://github.com/quii/learn-go-with-tests

That's all. Just sharing that the methodology worked so well. I felt like I could legitimately jump right into a Go developer team.

....

I can't upvote this enough.

I am going through this course- and it is fabulous. Covers tests, and even though the topic names might seem easy or trivial(I mean there is only so many ways you can write loops or define arrays), they include a lot of "extras" that make it fun- for example one of the topics might include details about how to write doctests and docs, another one might introduce table driven tests and provide advice on when to use them. Overall it is great.