Jerod Santo changelog.com/posts

Learning by example

People who are learning their first programming language require a lot of scaffolding. Not only do they need to pick up the grammar of the language, they must also grok the underlying constructs of programming in general.

(Imagine teaching someone how to conjugate the verb jugar in Spanish only to find out they do not know what conjugation is.)

For those of us who have made it through our first (or second, or third) programming language, we need a different kind of resource. I already "get" branching, looping, and variable scope. I've mapped, I've reduced, I've forked, and I've threaded.

When I'm learning a new programming language, I already know what I'm trying to accomplish, I just don't know how to accomplish it in this brave new world.

That's why I love "____ by Example" style learning resources.

Check out Go by Example.

Go by Example is a hands-on introduction to Go using annotated example programs.

I used this extensively while writing my first real Go program. Almost solely. I'd ask myself a questions like:

  • "How do Go's switch statements work?" Example
  • "How do I parse this JSON response?" Example
  • "How are files read?" Example

For someone with a lot of programming experience, learning Go was trivial with Go by Example by my side.

We need more of these. Every programming language should have one. There are a handful out there:

Some of these are outdated or incomplete, but they're a good start. If your favorite language doesn't have a high quality "____ by Example" style resource, you should absolutely start one.

If you know of any others (or create your own), link them up in the comments below!


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00