Really like this concept, since looking at code in active use & development is a critical part of getting past beginner level in a language. Would love to see code-reading lists like this for other languages.
That’s similar to how I got started with Go – I read the first chapter of Summerfield’s book (it has five example programs covering a couple of langauge features), then the spec and Effective Go. When I have questions about how to do things, I look in the standard library for places where they do something similar; the standard library is eminently readable.
As someone who’s started learning Go in the past month, I can’t stress enough how much example usages help. Reading a function signature alone (as most of the golang docs are) is pretty difficult when you’re trying to wrap your head around a new concept. But when there’s a nice working example it makes things very tangible and easy to understand. From the repeated exposure thru example is also a great way to reenforce language idioms and best practices.
One of the things I’ve pledged to do in new code I work on is to provide
Of course, I also strive to write useful function documentation, as
well. I don’t always do this, but I consider solid, usable
documentation as part of the release process. Software isn’t useful if
it isn’t usable.
I too learned Go in the last month. I found the playground to be pretty useful as an exploration tool while browsing codebases in my browser. It’s simple, but it significantly cuts down on the context switching costs between a text editor, a terminal to run code, and another pane that you are viewing code or the spec in.