---
title: "An interview with Jay McGavren, author of Head First Go"
publication: "Go Weekly"
issue: 281
published_at: "2019-09-27"
canonical_url: "https://golangweekly.com/issues/281"
---

The latest Go development news       

#281 — September 27, 2019 

[Read on the Web](https://golangweekly.com/issues/281)   

📣 In this issue we have an interview with the author of _Head First Go_! Head down to the very bottom of this issue to check it out.  

Golang Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/vcuksjxmpkeflmhke15q.jpg)](https://github.com/ThreeDotsLabs/watermill/tree/v1.0.0)   

[Watermill 1.0: A Go Library for Working Efficiently with Message Streams](https://github.com/ThreeDotsLabs/watermill/tree/v1.0.0) — We first linked to [its launch post](https://threedots.tech/post/introducing-watermill/) a year ago, but this library for building event driven apps has come a long way and reached the all important [1.0 milestone](https://github.com/ThreeDotsLabs/watermill/releases/tag/v1.0.0). 

Three Dots Labs   

[Using Go Instead of Bash for Scripts](https://presstige.io/p/Using-Go-instead-of-bash-for-scripts-6b51885c1f6940aeb40476000d0eb0fc) — It’s not a bad idea, especially if you have a love/hate relationship with `bash` like us. Krzysztof covers conventions and sharing utility functions. [Mage](https://magefile.org/) is also worth checking out if you sink down this particular rabbit hole. 

Krzysztof Kowalczyk   [![\](https://copm.s3.amazonaws.com/7b616471.png)](https://circleci.com/blog/level-up-go-test-with-gotestsum/) 

[Level Up Go Test with gotestsum](https://circleci.com/blog/level-up-go-test-with-gotestsum/) — Since go test doesn't output in the JUnit format natively, use gotestsum to do that for you. 

CircleCI sponsor   

[Go 1.13.1 and 1.12.10 Released](https://groups.google.com/d/msg/golang-announce/cszieYyuL9Q/g4Z7pKaqAgAJ) — These are minor releases to address a recently reported security issue in `net/http` where invalid HTTP/1.1 headers could be accepted and normalized. 

Filippo Valsorda   

[The Go Proposal Process: Enabling Experiments](https://research.swtch.com/proposals-experiment) — The latest in Russ Cox’s series of posts about how the Go core team and community can think about, work with, and develop new ideas for the language. This time, he thinks about how best to run _experiments_ for proposed features. 

Russ Cox   

[Ristretto: A High-Performance, Concurrent, Memory-Bound Cache](https://blog.dgraph.io/post/introducing-ristretto-high-perf-go-cache/) — The folks at Dgraph needed a better cache and couldn’t find one in the community. So, they wrote one. Note that it’s a local, per-process cache and not server-based (as yet). 

Dgraph  

💻 Jobs  

[Golang Developer at X-Team (Remote)](https://x-team.com/remote-go-developer-jobs/?utm_source=cooperpress&utm_medium=email-ad&utm_campaign=go) — Join the most energizing community for developers. Work from anywhere with the world's leading brands. 

X-Team   

[Find a Go job through Vettery](https://www.vettery.com/tech?utm_source=newsletter&utm_medium=cooper-golangweekly&utm_term=tech&utm_content=grouped&utm_campaign=ad-77582) — Vettery specializes in tech roles and is completely free for job seekers. Create a profile to get started. 

Vettery  

📘 Articles & Tutorials  

[Be Wary of Functions Which Take Several Parameters of the Same Type](https://dave.cheney.net/2019/09/24/be-wary-of-functions-which-take-several-parameters-of-the-same-type) — Dave has an opinion of one way to handle this, are there others? 

Dave Cheney   

[A Comprehensive Guide to Working with WebSockets in Go](https://yalantis.com/blog/how-to-build-websockets-in-go/) — A practical and thorough introduction to WebSockets, how they work under the hood, and working with them in Go code. 

Aleksandr Ryzhyi   

[Understanding Package Visibility in Go](https://www.digitalocean.com/community/tutorials/understanding-package-visibility-in-go?utm_source=reddit&utm_medium=social&utm_campaign=do-package-visibility) — How to share code between packages while also protecting the implementation details of your package. 

DigitalOcean   

[New Public Go, Docker and Kubernetes Training Are Available for You](https://ardanlabs.eventbrite.com?utm_source=cooperpress&utm_medium=email&utm_campaign=go) 

Ardan Labs sponsor   

[Managing Groups of Goroutines in Go](https://t.co/8lXmEbbE9A?amp=1) — The article covers the typical `WaitGroup` approach, adding in how to handle errors and context. 

Michal Bock   

[Using `io.Reader`/`io.Writer` to Stream Data](https://dasio.hashnode.dev/using-of-ioreaderiowriter-in-go-to-stream-data-ck0v22mvg0005xes1gp13f5pg) 

Dávid Mikuš   

▶[A Look At Dgraph: The Graph Database Written in Go](https://www.youtube.com/watch?v=CjkKRbtwWXA) — Did you know that Francesc Campoy (of [JustForFunc](https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJSw) fame) now works at Dgraph on their Go-powered graph database? I didn’t, but it’s great to see him in a new video. 

Francesc Campoy  

🛠 Code & Tools  

[Ants 2.0: A High-Performance Goroutine Pool](https://github.com/panjf2000/ants) — If your program is designed to generate a large number of goroutines, Ants can automatically manage and recycle them. 

Andy Pan   

[v8go: Execute JavaScript from Go](https://github.com/rogchap/v8go) — Lets you create V8 contexts and run code `eval`-style. Prebuilt static versions of V8 are included for Linux and macOS so you shouldn’t need to build V8 for yourself. 

Roger Chapman   

[Test Mux Video for Your Go App for Free ✨](https://get.mux.com/2mcQTRy) — Easily build beautiful video experiences into your Go app. Create a free Mux account with no payment information needed. 

Mux sponsor   

[Stateless: A Fluent Library for Creating State Machines](https://github.com/qmuntal/stateless) — It supports almost the same API as a similar [project in C#](https://github.com/dotnet-state-machine/stateless). 

Quim Muntal   

[xurls: Extract URLs From Text (using Regexes)](https://github.com/mvdan/xurls) — The [regexes themselves](https://github.com/mvdan/xurls/blob/master/xurls.go) are more precise than you’d guess. 

Daniel Martí   

[Fake 'Generics' Using Canadian Syllabics ᐸ..ᐳ](https://github.com/vasilevp/aboriginal) — They look like angled brackets, but they’re not. Yes, this is just a fun, little, tongue-in-cheek project. 

Pavel Vasilev   

[Gizmo: A Microservice Toolkit from The New York Times](https://github.com/nytimes/gizmo) 

The New York Times       ![Jay McGavren](https://res.cloudinary.com/cpress/image/upload/v1569514894/wywv3lqjcxtlnhbqsu6i.jpg) 

💬 A Q&A with…
Jay McGavren
author of the recently published O'Reilly book [Head First Go](http://shop.oreilly.com/product/0636920054931.do).  

Jay is serious about teaching others to code. Before _Head First Go_, he wrote a book about Ruby called (_wait for it..._) _Head First **Ruby**_. Jay believes everyone should know how to code, and has four years of experience teaching coding online. 

Your first book was about Ruby. What prompted your interest in Go? 

Ruby's a great language but it's hard to distribute finished applications. Not only do your users need to have a Ruby interpreter installed, they also need all the gems (libraries) installed that your app relies on. People have created solutions for this (like Bundler), but those solutions are still complex. Contrast this with Go, which compiles your code and all its dependencies down to a single executable. Give your users that compiled program, and they can run it even without Go installed. That's incredibly attractive if you want to create programs for distribution. 

Is Go a suitable first language for new developers? 

Simplicity is a primary goal in Go's design, so I think it's one of the best languages for new developers! For example, Go has only 25 keywords. Contrast that with Python (33 keywords), Ruby (39), or JavaScript (64). There's more to measuring a language's complexity than just keyword count, of course, but so many other aspects of Go are easier, too. You don't have to figure out class-based inheritance, or control flow with exceptions. Go code is just so much simpler and clearer. 

What strikes you as the most difficult aspect of Go to learn? 

Goroutines and channels. Go makes concurrency easier than many other languages, but it's an inherently difficult topic that can't be simply glossed over. The concurrency chapter for Head First Go had to spend a great many pages demonstrating potential pitfalls and their solutions. Fortunately, that comes late in the book, after we've already given readers the tools they need to make sense of it all. 

What excites you most about Go 2.0 and beyond? 

This might not be the most exciting answer, but I like the careful, thoughtful way the Go team is handling the introduction of new features. They're requiring lots of experimentation and feedback before anything makes it into an official release. I want future Go versions to have the same simplicity and ease of use that the early releases had. Thankfully, we seem to be on the right track to make that happen!   

You can learn about Head First Go at [headfirstgo.com](https://headfirstgo.com/) or follow him [@jaymcgavren](https://twitter.com/jaymcgavren).          

Curated by [Glenn Goodrich](https://twitter.com/ruprict) and [Peter Cooper](https://twitter.com/peterc). 

[Change your email address](https://golangweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://golangweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
