My Apprenticeship - Wednesday, June 23, 2004

This summer I'm revisiting my short apprenticeship at Object Mentor. I'll be posting commentary on all my posts from the summer of 2004 exactly 5 years later to the day.

Wednesday 6-23-04

More fun today with 'Cowboy' and 'You Cowboy.'

We got to a point where I was totally lost. Finally. Monday and Tuesday were all about picking up small things and differences from Java. Today we got into some full on Polymorphism and it was cool/confusing. Cowboy and You Cowboy were all over it and, unfortunately, I was driving (had control of the keyboard). Cowboy started talking a mile a minute while You Cowboy had some helpful suggestions about topics unrelated. I had just about no idea what I was typing. I don't think pair programming works very well with 'pairs' of three -- sometimes there is too much going on and rational thought is impeded. Later I was able to catch on and here's what was happening: The CheckBook can take in Deposits and Checks, both of which are children of the Transaction class. Today's big task (amongst others) was to give the CheckBook class the ability to step through all the transactions and reorder them. That meant the CheckBook had to inherit from the Enumerator class and the Check class needed to inherit from Enumeratable. And there was much Overriding and passing of classes and the casting -- don't forget the casting. In fact, just thinking about it makes me want to look over the code again. I've got to get M.S. Visual Studio installed on my laptop. Instead, I've been having fun using OM's super-fast mini-computers. They have these cute little Dells with flat panel screens that can fit four to a box in shipping crates. Pretty handy if you need to haul a bunch of computers to a conference (like, say, the XP/Agile Universe conference August 15-18 in Calgary! Whoo!).

I got another puzzle right today. What's up with that? If you want, here it is: You are in a room with three switches. In another room, not visible from your room, are three lights. Each light is controlled by one switch. All the switches are off now. If you leave the room to check on the lights, you can't come back (the door locks behind you, poison gas steams into the room, dogs are released that shoot killer bees out of their mouths when they bark, etc.). You can play with the switches as long as you like but when you go to the other room you want to be able to know which switch controls which light.

Remember: Penn and Teller say that people who love puzzles must die.

Oh 'Cowboy' and 'You Cowboy!', your antics still amuse after all these years. Not so pleasant memories about casting classes into other classes. That whole statically typed thing seems like such a fad in hindsight. I shouldn't really trash talk about Java and C# though. I think half the reason I react with aversion to them is that I was a mediocre programmer back when I was in static land. When I was in Ruby I really came into my own as a programmer and so I associate Java and C# with the times in my life when I sucked and Ruby with some actual competency and satisfaction.
Also, I love the part where I was impressed with the flat panel monitors -- this was 2004 when only the serious would shell out tall green for a 15 inch monitor with thousands of colors and a 1:50 contrast ratio.


Sam M. said…
Thanks for re-posting these. It's both entertaining and enlightening to read them. Are you going to post the answers to these puzzles? I think the answer to the 3 switches is to turn one on, leave one off and turn one on for a minute or so so the bulb gets hot and then turn it off before you leave the room. Is that the answer?
Jake Scruggs said…
yes that's the answer and no I wasn't going to post the answers. maybe thoughtful commenter will provide them.

Popular posts from this blog

Point Inside a Polygon in Ruby

What's a Good Flog Score?

SICP Wasn’t Written for You