I’ve been quiet about my first couple weeks of Ruby class, but not because of anything having to do with the class itself. It’s been hot in Seattle: the inside thermostat has been regularly clocking in at 90, and the last thing I want touching me is a laptop. Or a cat. Or any item of fabric. I’ve also been sidelined by a nasty cold.

I am going to class and doing my homework though, because, priorities.

We’re using Chris Pine’s Learn to Program book, and I really like it. It’s a great teaching companion. For one, the book has great examples and challenge problems — they’re fun, whimsical, not too easy or difficult, and reinforce key ideas from the chapters. What’s more, they’re the type of programing challenges that a more advanced student could take and build on (make it better, make it live on the web, etc).

But the BIG thing he does and why this is a Chris Pine appreciation post is how he handles recursive programing.

In many programing classes, recursion is treated as A Big Deal and sometimes the instructor will make you go back and solve problems you already solved, but recursively this time. You’ll probably have to do a factorial. Through the course of trying to understand how a program can call itself, you may or may not get stuck in a brain loop that ends in expletives and alcohol.

But not Chris Pine.

Continue reading