Ladies Learning Code: JavaScript

A couple of weekends ago I helped out at Ladies Learning Code‘s Intro to JavaScript workshop. I was a ‘mentor’, one of the large group of devs who volunteered to hang out with some eager learners all day and help them decipher programming in JavaScript. It was pretty awesome, and I can say with absolute confidence that I’ve never felt better about being a programmer than I did (and do) after that workshop.

The previous weeks had been completely insane at work and we were on deadlines that were sometimes physically painful to think about. I had lost an entire day of productivity (one I couldn’t afford to have lost) to trying to decipher an OO JavaScript framework another coworker had built, one that was full of gigantic nested object literals and confusing (for me) references, and I felt pretty terrible about my skills at that point. I strongly considered cancelling on the workshop at least five times and only barely managed to convince myself the night before that it would be fine.

It was, of course, fine.

That’s us before any of the participants got there–just organizers and mentors (note: all photos thanks to the fantastic Peter Newhook!). Yeah, there were a bucketload of us giving up a Sunday to show up at CSI Annex and talk code all day. At this point I was still mildly terrified that I would just somehow forget everything I knew about JavaScript (the thing I do for a living, all day, every day). I sometimes wonder how I don’t explode in a ball of worry.

And there’s everyone (photograph by Breanna Hughes)! I know. So much enthusiasm.

Pearl Chen and Christina Truong led us through a pile of beginner JavaScript and covered a surprising amount of ground in one day, including really great explanations of objects, some jQuery, and some fun demos. After the first exercise I finally relaxed a bit and remembered that yeah, I’m okay at this stuff. Go figure.

There’s nothing like helping someone work out the kinks in their understanding of something and watching them experience a huge epiphany. It’s ridiculously rewarding, and I got to do it for not one but four great ladies!

(Check out my almost-six-year-old Dell in the foreground. Keep on truckin’, old buddy.)

Pauline, Emma, Laura, Shetu–thanks for sticking with it and being so damn excited about learning new stuff. You guys made it one of the best times I’ve had in a while, and reminded me why I love writing code all day–we make cool stuff happen. And thanks to Ladies Learning Code for doing something amazing: making people excited to learn code, excited to say they’re learning code, excited to hang out with other people who do too. It’s a great community. I’m glad to be a part of it.

(Side note: Shetu, the lovely learner on the far right in that photo, actually interviewed me for this Globe & Mail feature after the Ruby workshop last fall! SMALL WORLD.)

The eternal battle for MVP

So I was talking with a friend of mine about the MVP battle yesterday – well, battle in the American League, anyway. As far as I’m concerned, Matt Kemp has the NL MVP all tied up and the Cy Young is gonna be Clayton Kershaw or Roy Halladay, so there’s nothing to worry about. Justin Verlander is clearly winning the AL Cy Young. That leaves AL MVP, the big ol’ debate.

The front-runners are Jacoby Ellsbury (BOS) and Jose Bautista (TOR). To compare them, here’s five sets of stats. They are kind of arbitrary, but they’re the ones that are often thrown around in the AL MVP debate, so I threw them in here. They’re batting average, runs batted in (RBI), home runs, on-base plus slugging (OPS), and wins above replacement (WAR), source Baseball-Reference:

Ellsbury Bautista
Avg .321 .302
RBI 105 103
HR 32 43
OPS .928 1.056
WAR 7.2 8.5

Ellsbury leads in batting average (by 19 points) and RBI (by two). Bautista leads in home runs and the sabermetric stats of OPS and WAR.

It should also be noted that two of Bautista’s leading stats – HR and OPS – are actually the highest in the majors (the highest OPS in the National League was Ryan Braun’s .994, and Curtis Granderson trails in home runs by two at 41).

To me this table alone yells Bautista for MVP. First of all, it’s 2011, and batting average is way less important than sabermetric stats. Batting average doesn’t take walks into account, and Bautista’s walks are astronomical — 132 BB (also leading the majors) versus Ellsbury’s 52. This means Bautista walked an insane 25.7% of the time, while Ellsbury walked 7.8%. Joey Bats did have four times as many intentional walks, but if you factor those out, it comes out to 21% versus 7%. This is a no-brainer.

Second of all, RBI is a flawed measurement. It does measure how well you hit with teammates on base, sort of, but it also measures how well your teammates get on base for you. In Ellsbury’s case, 20 of his homers were solo shots, and 27 of Bautista’s – both coming out to 63%. We’d have to analyze this a bit with the RISP numbers and maybe the preceding plays and I’m not going to do that, but clearly this is a bit of a problematic stat, especially since they’re both obviously great hitters and went over 100 RBI and are still hitting two-thirds of their home runs without anybody else on base.

OPS isn’t a perfect statistic (it weighs slugging and on-base equally, which is awkward) but at least it takes into account reaching base in any way, which I think is vastly more important than looking at RBI in a vacuum. Both of these guys have really high OPS, but Bautista’s (also league-leading) slugging percentage is almost .200 higher than Ellsbury – .608 against .452.

So … Ellsbury was more likely to get a hit in a given at-bat, and ever so slightly more likely to bat in a run. Bautista walked in one out of every four plate appearances (that’s pretty much one walk a game), hit more home runs, hit for more bases, got on base more often, and earned his team one 1.3 more wins. Oh, and he gives one hell of a staredown.

Now that the Boston Red Sox are climbing out of the rubble of the worst September collapse in history, Jacoby Ellsbury no longer has the aura of contending-team edge surrounding his shot for MVP. It’s a ridiculous consideration – good players are good players, even if their teams keep letting them down – but it’s always been a part of the MVP discussion, and one that would undoubtedly have robbed Bautista of a win had the Red Sox won one more game. But now … looking at these numbers, it’s virtually impossible to understand how someone could not pick Joey Bats.

And anyway, how could the award go to someone whose nickname is Tacoby Bellsbury?