Wednesday, April 8, 2009

How I learned to love hockey (and what that has to do with programming)

Growing up, I was not a sports fan in the least. I didn't enjoy watching them, I had no interest in learning the rules, and I had NO interest in playing any of them. In gym, I was so accident prone that I had to sit with the asthma kids, and I was damned happy to do so. I preferred playing SET to kicking a ball around.

I dated a few guys that were into sports. In the interest of being a couple, they'd try to teach me the rules while watching a game on TV. Liking systems, I'd try my best to learn. Football was the first attempt. I'd post some of the repartee, but honestly, it bored me so terribly, I can't even dredge up the few things that I did manage to pick up. What I came up with could probably fit on a 3x5 card, and have room for my Superbowl Dip recipe.

Fortunately, I married a guy who, while interested in sports, understood that I had no interest in watching or understanding them. I thought that would simply be something I'd never get into.

Then came Jim.

Jim, a friend of mine, has season tickets to the Washington Capitals, and invited me to join him for a game. Really, I was just interested in a night out rather than learning about hockey. For the first few games, I was just there to BS with Jim. He even joked about how I didn't know what the hell was going on.

Jim (watching me trying to look attentive): So, you know what they're doing?

Me: Oh, sure!

Jim: Okay. What team is our team?

(Long, painful pause)

Me: They're... in... white?

Jim: You know, you can ask if you don't get what's going on.

No, no, I was good. I was just there for the company and the Boardwalk Fries. I don't think I learned a damn thing that first season.

At least, that's what I thought.

The second season, I again joined Jim for weekend games, but I noticed something different. I was beginning to understand the game. I could tell when something bad happened. When the Caps were playing well. When they were having a rough night. When a player seemed 'off.'

Now, keep in mind, Jim hadn't explained any rules to me. I hadn't read anything. There wasn't anything I could think of that would have given my an understanding of the game at all. So, where had it come from?

I paid attention to the next few games, and started to get clues as to where this implicit knowledge had come from: the crowd. The crowd was filled with people who did, in fact, know hockey. They knew what a bad call was, they reacted to a team that was on fire, and a team that was tired and run down. In general, there's a buzz during games: people chatting, moving about, coughing, shuffling between seats. When things happen, that buzz turns to shouts... or silence. The changes in volume snap my attention to what was going on. I'd subconsciously replay the last few seconds in my head and try to map that to the sound.

I tested my implicit knowledge on my expert. While I was still very fuzzy, I was on the right track. With this in hand, I actually started looking up some of the rules that interested me, like penalties.

So what does this have to do with learning?

Rules are boring

They really, really are. I don't know many people who find rules interesting. Some people do become rule dictionaries, but I guarantee, the interest came first. People don't learn the rules first: they find the interest.

So when it comes to programming, why do we focus on the rules first? Loving computers and, more importantly, loving code should come first. However, every class I've ever been in has started with data structures and variables and syntax and, well, the rules.

Why not show them the buzz first? Take them to a users group in your area and let them see people talking about what they do. Most coders are more than happy to talk about their work, and are excited to talk about whatever neat thing has their attention at the moment. If you have someone you're really interested in seeing excel, see if you can get them to a conference. It's one thing to look at code and understand what an if statement is. It's another matter completely to understand the community that goes with it.

Rules are a good resource

Does this mean we should eschew rules completely? Of course not. They're a good resource. Once I was in love with hockey, I wanted to know more about the sport. While I'm no rulebook, I do know what the penalties are, the types of players, and some of the strategy behind the game. Hell, this year, I've even learned about standings, and will sometimes check up on other teams to see what their chances of overtaking us are.

As a coder learns more he/she will want to know more. They'll want to know more syntax, or how to make their code more efficient. They'll look at new frameworks and languages. They'll become an evangelist. If all we ever make are cube-rats, all we'll ever get is loveless code that does barely what it's supposed to do, and never anything more.

And by the by... Go Caps! Southeast Division Champs!

4 comments:

Anonymous said...

:) You and your analogies - this is great. I think this dovetails really nicely with the argument about getting a CS degree or not (something I struggle with all the time). I came into this career because of the buzz - I started teaching myself what was fun and interesting, and almost 10 years later I've grown fairly accomplished ... buuut there are still big gaps in my knowledge when it comes to the "rules". I'm thinking about going back to school for my CS (or related) degree this year.

Jim said...

Neat commentary on life's rules in general. I never did figure out what the Blue Line was for!

kcunning said...

@Barbara - I love analogies! It's part of my liberal arts background coming out of the closet.

While a degree can be good, some of the best coders I know have degrees in something completely different. I'd recommend getting a degree in something awesome, and a minor in CS, or just fill up your alternate classes with the cool CS classes.

@Jim - You know, I know it has something to do with stoppage in play, but that's about it. Something about it crossing more than two lines...

Laconfyr said...

The Blue Line determines offsides, the two line rule was removed after the lockout.