Mat has written a book (Go Programming Blueprints), co-created Gopherize.me, created Bitbar, and is currently a co-founder at Pace. We’re grateful that he’s taken the time to answer a few questions today.
What first drew you to Go?
Before the Go 1.0 release, I wanted to build something on Google App Engine and there were only three options at the time: Java, Python and Go. I hadn't used any of them before, but Go had a little EXP (experimental) warning on it, which I failed to resist.
I had spent years tying myself in knots with complicated type hierarchies in C#, so it was intriguing to learn that Go didn't even have classes.
I was surprised by how quickly I could pick up and get things working in this new language. Over time I realised that the philosophies that were driving its design (minimalism, simplicity, a focus on readability and code maintenance) really resonated with me.
It isn't an overstatement to say that I kind of fell in love with Go.
You used to work at Machine Box, which creates Facebox, Objectbox, and other ML “boxes”? Do you think Go has a future as a premier ML language?
Go is out-paced by Python in this area because of the pedigree and momentum it has with mathematicians and data scientists, as well as tried and tested libraries for crunching all those numbers.
At Machine Box, we used a fair bit of Python inside the boxes in the early versions. We discussed writing and open-sourcing some Go libraries to replace the Python ones, but the company was sold before we got round to it.
Go 2.0 is on the horizon…what features are you most hoping make the cut?
They can add features to Go 1.x. I think Go 2.0 would be an opportunity to remove or simplify things. For example, I'd drop the new
keyword in favour of creating thingsLikeThis{}
The standard library came to be through a process akin to evolution by natural selection. The Go 1.0 promise brings stability and reliability to users (I think it's the unsung hero of Go's success) but it's an albatross around the necks of the contributors. Go 2.0 would let us apply modern thinking to old APIs.
Having said that, Go's standard library is very good. I think we all take it for granted, but it's a real achievement of software engineering.
* I did a talk about Things in Go I Never Use at Gotham Go.
You are currently working on Pace, a “minimalist project management tool”. Is it entirely written in Go?
The backend is entirely written in Go which communicates via a JSON/HTTP RPC API to a JavaScript/TypeScript Svelte app that runs in the browser.
We're trying to share and open-source as much of the useful internals of Pace as we can. And we may even extract some pieces as standalone projects/products. The blog is mostly inspired by real problems we had to solve when building Pace.
We don't obsess too much over the performance of code unless it's proven to be a bottleneck, so it's surprising that Pace turns out to be the most performant project I've ever worked on. A customer even asked us what "tricks" we used to make it "feel" so quick, but I think they were just used to JIRA.
What advice do you have to a budding Gopher?
Get good at writing unit tests for your Go code, it's always the quickest way to iterate. Try test-driven development; you might find it improves your code quality and package design (it did for me).
Build real little things, and share them with others. Solve real not imaginary problems. Talk about your experiences online or at meet-ups. I know you think you don't have anything interesting to say, but that is never true.