Dave Cheney Avatar

Dave Cheney

Dave Cheney dave.cheney.net

The Zen of Go

How do you write good code? How do you know when you’ve written good code? Dave Cheney writes this with inspiration from PEP 20 - The Zen of Python.

If there’s a continuum between good and bad, how to do we know what the good parts are? What are its properties, its attributes, its hallmarks, its patterns, and its idioms?

Which brings me to idiomatic Go. To say that something is idiomatic is to say that it follows the style of the time. If something is not idiomatic, it is not following the prevailing style. It is unfashionable.

More importantly, to say to someone that their code is not idiomatic does not explain why it’s not idiomatic. Why is this?

Dave Cheney the-zen-of-go.netlify.com

The Zen of Go

Dave Cheney’s ten engineering values for writing simple, readable, and maintainable Go code. Some of these apply outside of Go, as well. For instance, Simplicity matters:

Simplicity is not a synonym for unsophisticated. Simple doesn’t mean crude, it means readable and maintainable. When it is possible to choose, defer to the simpler solution.

(Originally presented at GopherCon Israel 2020.)

Dave Cheney dave.cheney.net

Dave Cheney's "High Performance Go" workshop docs

If you haven’t attended the workshop directly, the next best thing is to learn indirectly by reading the workshop’s docs.

The goal for this workshop is to give you the tools you need to diagnose performance problems in your Go applications and fix them.

It’s licensed under the Creative Commons Attribution-ShareAlike 4.0 International license and the source is on GitHub.

Dave Cheney dave.cheney.net

Practical Go — Real world advice for writing maintainable Go programs

This is Dave Cheney’s working document for his Practical Go workshop. So much wisdom shared.

My goal over the next two sessions is to give you my advice for best practices writing Go code.

This is a workshop style presentation, I’m going to dispense with the usual slide deck and we’ll work directly from the document which you can take away with you today.

There’s also this page of the same name on his site, but I’m not sure if they’re directly connected.

0:00 / 0:00