Sunday, September 27, 2009

Nike + iPod

As I mentioned recently, I'll be running in the 5K Your Way run in October (feel free to sponsor me!) like I did last year. Last year I expected to walk and ended up running the entire thing, but I was in pain for several days afterwards, so this year I decided to train for it. I started in May, as soon as the weather got nice. I chose a path that's about 3-3½ km long, and started out by alternating walking and running – I would walk for 90 seconds and then run for 60. The idea was that you do this for a week or two, then gradually increase the amount of time you were running until you were finally running the whole thing. I found that this plan didn't work very well – I found that I hated the running part and while running, looked forward to when I could walk again. Then when my walking time was up, I though "Oh crap, I have to run again". One time when I was out, I decided "Ah screw it, I'll just run the whole thing" and I did. My legs hurt a little for a while afterwards, but I preferred just running to alternating, since I didn't have to keep checking my watch and I didn't have the dread of having to start running again. I took a break in July when we went to Scotland and then tried to get back into it when we came back, but was having trouble getting motivated. I was well into baseball season at that point, and I didn't want to run hard enough that I couldn't play my best. Not that I'm an all-star ball player or anything, but I wanted to contribute whatever I could to the team, and taking myself out of a game in the fifth inning because I couldn't run anymore wouldn't be much of a contribution. But then my birthday came, and everything changed.

I went up to my parents' place the weekend after my birthday, and when it came time to open my gifts, they gave me two little boxes and told me to open the top one first. I opened it and it was a thing called Nike + iPod, which is a little sensor that you put in your shoe that communicates with a thing you attach to your iPod, and it tracks how fast and far you run and uploads that data to the nikerunning.com website so you can keep track of your runs. Very cool, but right on the box, it said "Requires iPod Nano". My iPod is a 80 GB 5G, but I thought that maybe Trudy (who has an iPod Classic similar to mine) had done some research and found that it works with my iPod as well. Nicky, sitting beside me, grabbed the second gift box and said "Maybe this is an iPod Nano!"  I gave a little chuckle and said "maybe", not for an instant thinking he was right. Of course, he was – it was a beautiful silver Nano.

I don't wear Nike shoes. I've had Nikes before and they never seem to fit my feet properly. But the Nike+ sensor is supposed to go into a little cut-out inside some pairs of Nike shoes, so I had to improvise by stuffing it under the insole in my Reebok's. It was a little uncomfortable at first, but I got used to it pretty quickly. It's amazing how much this little thing has changed my workout patterns. I started running once or twice a week, and found that my legs quickly adapted, and while they would be sore for an hour or two after the runs, I was still able to play baseball and didn't suck any worse than I usually do. By the end of August, I was running at least twice a week, and my distances were growing as well. I don't think the sensor was completely accurate for me (perhaps it slides around under my foot and that affects its distance calculations) – Google Maps thinks my original route is about 3.9 km, but Nike+ has recorded it as anywhere between 4.3 and 5.48 km. I did run a little further than normal on the second one, but not a full kilometre and a half. I recently bought a Shoe Pouch for the sensor that fits on top of the shoe, which works very nicely. The distances are more consistent now so I end up trusting them more.

The device itself is very cool – you can tell it you want to work out over a predetermined distance or just keep running until you say stop. Then you pick a playlist and say "go", and it starts recording and playing the playlist. When you're done, it tells you how far you ran (or walked – it can tell the difference), how long it took, your average pace, and how many calories you burned. You can also choose a "power song", which it plays if you press and hold the center button down. The idea here is that if you need some inspiration, you can play your favourite pick-me-up song whenever you want. The next time you sync your iPod, it will update your Nike+ account.

The Nike+ site is pretty Flash-heavy but slick, showing each run you recorded, when it happened, and how long you went. It will also show you a graph of your pace throughout the run, with a little mark at each kilometre point, as well as whenever you pressed the centre button during the run (which updates you on how far you've gone and how long it's been) or played your power song. It keeps track of your fastest mile (7'30"), 5k (21'31" – though I think that was based on the 4+ km run I did that it recorded as 5.48, so it's unreasonably low), and 10k (none... yet), as well as your total number of workouts (15), kilometres (61.50), length of time (5:20:49), calories burned (4989), and average pace (5:13/km). You can set up goals (i.e. run 10 times within 4 weeks (which I just completed the other day! Yay me!), or run some number of total kilometres in so many weeks), or join challenges, which are competitions in which you join a team of people with something in common (could be men vs. woman, or something like fans of different baseball teams) and add to the total for your team.

I hooked up the Nike site with my facebook account so whenever I sync my iPod, it updates my facebook status with the results of my latest run (eg. "Graeme ran 4.41 km on 9/25/2009 at 11:37 AM with a pace of 5'20"/km"). I did this with the idea that if I broadcast to everyone whenever I run, I have some accountability. If I skip a week or run shorter than usual, everyone will notice. Of course nobody will really notice – nobody's paying that close attention to my running patterns. But it still sticks in my mind when I'm thinking of cutting a corner or taking the shorter path, "people are going to see 3.8 km instead of 4.4 and think I wimped out, so I'll take the longer route". And I do, and I end up glad that I did. Amazing, the power of peer pressure, even imagined peer pressure.

If you are a runner, or want to be, I highly recommend the Nike + iPod. Not only is the Nano a slick little piece of hardware, but the Nike+ part is very motivational. Well, not really motivational, but it certainly makes it more fun. I ran 5k once last year, and that afternoon I couldn't walk down a flight of stairs. The next day I had to work at home. I was in pain for three or four days. I've been training with this thing seriously for only about a month, and last week I came within 1 km (4.53, 5.2, and 4.4 km, a total of 14.13km) of doing the 5k run three times in five days.

Thursday, September 24, 2009

Help make cancer history

In October of last year, I participated in the 5K Your Way run, part of the Toronto Marathon, to raise money for cancer research at Princess Margaret hospital. Princess Margaret was where my sister Trudy went for her cancer surgery last year, and thanks to their early diagnosis and subsequent surgery, she is now cancer-free. Obviously this is a very important cause for me, so once again I'm looking for donations for this year's event. Last year, our team raised over $6000, of which I personally raised $480. My goal for this year is to surpass both the amount we raised and to beat my running time from last year. I have been training most of the summer, so I should be able to run the 5k race and climb up and down a set of stairs on the same day.

Any donation you can make is very much appreciated. Click here to visit my personal page where you can sponsor me. Don't forget to click "Go To Team Page" above the lovely picture of me and Trudy and check out the list of team members and a picture of all of us from last year's run – you can even sponsor my kids or Trudy directly if you'd prefer.

To those who do sponsor me and those have done so already, thank you very much for helping Princess Margaret hospital in their quest to eliminate cancer in our lifetime.

Tuesday, September 22, 2009

Alan Turing

Sorry, I'm a little late to the party on this one. After reading an article written by my colleague Glenn Paulley, I decided to write about it as well, mainly because Glenn's blog and mine have different audiences. The story he writes about (and I'm about to cover) is both tragic and infuriating; I wouldn't call the ending "happy", but it's certainly the best that could be expected under the circumstances. Note that this is not a technical article at all. It is about a computer scientist, but it's mainly the story of a man.

If you've never studied computer science or cryptography, you have likely never heard of Alan Turing. Computer Science students don't learn much about Turing the man, but you can't study computer science for long before coming across his name. He was a brilliant mathematician and cryptanalyst who not only developed some of the most basic fundamentals of computer science and artificial intelligence, but helped to end World War II. Turing was one of the scientists who worked at Bletchley Park, and was instrumental in breaking the German "Enigma" code, among others. Turing was awarded the OBE (Officer of the Order of the British Empire) for his work during the war.

Turing also happened to be gay, which was illegal in Britain at the time (and remained so until the late 60's). Only seven years after World War II ended, Turing was arrested, charged, and convicted of gross indecency. As a sentence, he was given a choice: chemical castration or prison. He chose the former, and was given estrogen treatments to attempt to kill his libido. This was successful, but also caused Turing to grow breasts. His security clearance was also revoked, thus ending his employment with the government. In 1954, two years after his conviction, Turing committed suicide by eating an apple laced with cyanide. There are some that say that his death was not a suicide at all, but accidental. Regardless, the death of this brilliant man at only 41 years of age was a tragedy.

In late July of this year, a British computer scientist named John Graham-Cumming started an online petition asking the British government to apologize for the treatment of Alan Turing. Within weeks he had several thousand signatures and on September 10th, British Prime Minister Gordon Brown issued an official apology to Turing.

Congratulations to John Graham-Cumming on getting this done, and kudos to Gordon Brown and the British government for doing the right thing and apologizing for the appalling treatment of Alan Turing.

Saturday, September 19, 2009

Balsillie vs. Bettman, Round Two

So it's down to the NHL vs. Jim Balsillie now. Should the NHL be allowed to own of one of its own teams? I would have imagined that the league owning a team would not be allowed, though I suppose MLB owned the Expos for a short while. The really weird thing about this – scratch that. One of the really weird things about this is that the NHL has publicly stated that if they win the auction, they will consider moving the Coyotes out of Phoenix.  I beg your pardon? Isn't that one of the main reasons that they refuse to let Balsillie into the club? They keep saying that an NHL team can be successful in Phoenix (despite the fact that it hasn't been in fourteen years), so why would they need to move them? And if they're not against moving them, what's the problem with letting Balsillie do it?

The NHL has stated that the other main reason that they're so dead set against Balsillie is because of his supposed "lack of integrity". Right. Because NHL owners are just packed to the gills with integrity. Here is an article listing five former NHL owners who have spent time in prison, and that doesn't include the recently-convicted Boots Del Biaggio.

But even if the NHL wins the auction, then what? The number of season tickets sold in Phoenix for this year is in the hundreds (compared to the twelve thousand plus for the Leafs), they'll have the same trouble finding sponsors and selling advertising that the previous owners had, and they've stated that they may move or sell the team. Jim Balsillie is the only one currently interested in buying the team. So the league will spend well over a hundred million to buy the team, lose millions of dollars operating the team, and then either move it anyway, or sell it at a loss. That's a lot of money to spend just to spite Jim Balsillie. And if they end up selling it to Balsillie anyway, it will all have been for nothing.

Stephen Brunt said on Prime Time Sports the other day that if the NHL loses this auction, Gary Bettman's days as commissioner are numbered, and he's probably right. Which means that Bettman is gambling not only hundreds of millions of dollars of the NHL's money, but his job as well. Is keeping Balsillie out of the ownership club really that important?

As much as I would love to see an NHL team in Hamilton, I can't say I support the way Jim Balsillie has done this. His tactics have been heavy-handed and he's certainly not making friends of the other owners nor the league executive. Would an NHL team work in Hamilton? I think so. There are enough hockey fans in this area, plus there would be lots of people from the Guelph-Cambridge-Kitchener-Waterloo area that would come, not to mention all the GTA people who can't get Leafs tickets. I found it amusing a couple of years ago when a group of people who wanted to bring an NHL team to Hamilton proposed boycotting pre-season NHL games in Hamilton to "send a message" to the NHL. Good thinking guys – show the NHL how wrong they were by allowing them to hold a pre-season game here to an empty arena. The next time they're considering expansion or moving a team, they're not going to remember a boycott, all they're going to remember is playing to an embarrassingly small crowd in Hamilton and quickly scratch the name off the list.

Opponents of an NHL team in Hamilton point to the lack of interest in the Hamilton Bulldogs as proof that the NHL won't work here. But that's a faulty argument, and here's why.

I am a Hamilton resident who would be interested in watching and supporting a Hamilton NHL team but isn't interested in the Bulldogs. I'm sure the Bulldogs are full of talented young players, but honestly, they're a farm team. The whole idea of the team (and the AHL in general) is to give the players experience and get them ready for the NHL. It's really hard to get pumped up for a team whose players would leave in a heartbeat if they get a call from the big club. You can't blame them for that – getting to the NHL has likely been a dream for every one of the Bulldogs players since they first laced up the skates as a child. The AHL is mainly made up of three types of players: those too young or inexperienced to be in the NHL, those who simply aren't good enough to be in the NHL, and those who have had a taste of the NHL but were the lowest on the totem pole when it came to sending someone down. But the NHL is the pinnacle of professional hockey, containing the best players in the world. Any way you slice it, the quality of players in the AHL is lower than in the NHL. Doesn't mean that AHL games can't be exciting – as long as two teams are roughly equivalent in skill level, you can have an exciting game at any level. But if you combine the lower skill level with what I said before about players bolting the second they get the chance at an NHL team, I cannot see how the argument can be made that a city that doesn't support the AHL won't support the NHL.

Thursday, September 17, 2009

Top Ten Rock Instrumental Songs

I'm only going to list instrumental songs by artists who primarily perform non-instrumental work, otherwise I could sit here all day listing Eric Johnson and Joe Satriani songs. There are in no particular order.

  1. Rush: YYZ – one of the first instrumental songs I remember from when I started really paying attention to music in the early 80's, and still stands to me as the quintessential rock instrumental song.
  2. Alice in Chains: Whale and Wasp - Combines a beautiful acoustic guitar (the "whale") with the occasional screeching electric guitar (the "wasp"). Listening to this song was the inspiration for this list.
  3. Triumph: Fingertalkin' - An outstanding acoustic guitar piece by Rik Emmett, one of the best guitarists in any genre. Too bad it's on what was probably Triumph's worst album, "Progressions of Power".
  4. Metallica: The Call of Ktulu – The opening sounds like two guitars playing together, but it's only one. If they replaced Orion (also an excellent song) and Leper Messiah on Master of Puppets with this song and Creeping Death, Puppets would be the perfect metal album.
  5. Linkin Park: Session – the sole "electronic" entry on this list, complete with record scratches. In general I'm not big on this kind of stuff, but this song is very cool.
  6. Rush: La Villa Strangiato – over nine minutes long, and features some amazing guitar work from Alex Lifeson. I still think he's the least musically talented member of Rush, but he ain't no slouch either.
  7. Steely Dan: East St. Louis Toodle-oo – Somebody cranked the wah-wah pedal up to eleven for this one.
  8. Pink Floyd: One of These Days – Technically shouldn't qualify because there are lyrics – right in the middle someone says in a very distorted voice "One of these days, I'm going to cut you into little pieces". But David Gilmour plays some pretty sweet slide guitar.
  9. The Tea Party: Winter Solstice – two acoustic guitars and someone tapping on what sounds like a wooden block. Some of the fastest strumming you'll ever hear.
  10. Porcupine Tree: Wedding Nails – Kick-ass guitar over a driving bass / drum beat.

Runners-up: Songs that I had listed originally but then I kept thinking of more.

  • Sarah McLachlan: Last Dance
  • Metallica: Orion
  • The Tea Party: The Badger
  • Yes: Mood For A Day

Monday, September 14, 2009

Not too distracting

We're having some work done on the building I work in. This was the view from my office for part of today.

WorkerOutsideWindow

Saturday, September 12, 2009

Useful Windows Tools

Every year, Scott Hanselman posts a list of tools that he uses. After reading this year's list, I decided to do my own. Why? Because I have many thousands of readers like he does? No. Because some of my readers are techies and would find the list useful? Well, maybe a couple of them. Because those readers who are not techies might find it interesting too? Not bloody likely. The real reason is the same as the reason for the majority of the rest of my postings: just 'cause.

Work Tools

  • 4NT – I use a zillion batch files at work for doing all kinds of repetitive tasks – anything I need to do more than once, I write a batch file for. The Windows batch file language is pretty lame, so Sybase has a site license for 4NT as a command shell replacement and it's so much more powerful than the Windows one. I don't think you can get 4NT anymore, but the latest version is called Take Command. Some people at work are using that but I'm still on 4NT. Not for any nostalgic reason, just because I can't be bothered to change it. Windows 7 will ship with a thing called Powershell which is supposed to be pretty good, but I can't imagine rewriting all the scripts I already have.
  • ActivePerl – I actually prefer writing python code to perl, but if you're doing anything involving string manipulation or regular expressions, you can't beat perl. Over the last couple of years I've rewritten a  lot of my 4NT batch files in perl.
  • ActivePython – One of our testing tools at work uses python so I've been writing a lot of python over the last few years. I thought the whole whitespace thing was crazy at first, but as long as you have a good editor (see emacs below) that knows about that stuff, it's not so bad.
  • emacs – We don't use an IDE at work, so most developers use either emacs or Watcom vi (since we used to be Watcom). Many are switching over to vim rather than vi. I can use vi and did for many years, but I usually use emacs.
  • Thunderbird for both email and news. Our company uses Lotus Notes, but I gave up on that years ago. I used Outlook for a number of years and it was OK, but now and again it would get into a state where it wouldn't download any emails but wouldn't give any errors either. I switched to Thunderbird and have been happy ever since. A few add-ons make it complete:
  • VMWare – we have a VMWare server set up on a big kick-ass machine in the lab, and I have a couple of VMs that are running 24/7 on that machine. One is running XP and I use it for network stuff as well as NetWare development (so I don't have to install all the NetWare stuff on my laptop), and the other runs 64-bit Vista. I used to use actual physical computers for this type of stuff, but this is just so much easier and more convenient. Even from home, I can remote desktop into them and even reboot them.
  • Remote Desktop – comes with Windows, but I had to mention it. I use this all the time for connecting to test machines, our build machines, and my VMWare VM's.
  • TightVNC for those older (Win 2000) machines that don't support Remote Desktop, we use VNC. I also have a VNC server set up on a unix machine, so I can use VNC to connect to that and get a Unix desktop on my Windows machine. There are lots of VNC clients / servers available, but I've found TightVNC gives pretty good performance, even when I'm at home (and therefore using wireless networking through a VPN).

Blogging

Web surfing and websites

  • Google Chrome – I've been using this pretty much exclusively since about May, and I still love it. Still fast, and it has a bookmark editor now. It periodically and silently updates itself so you always have the latest patches. Once XMarks is available for Chrome, it will be perfect.
  • Firefox – I still use Firefox now and again for sites that Chrome doesn't support. Actually, I can only think of one. We recently started using a tool at work for code reviews which has a web interface that doesn't play nicely with Chrome, so I use Firefox for that. Required add-ons:
    • XMarks for synchronizing bookmarks. I don't use bookmarks all that often anymore (I usually use delicious.com), but XMarks will also synchronize stored passwords, which is very useful.
    • AdBlock Plus
    • Gmail Notifier – puts an icon in the bottom corner of your browser with your current unread count.
    • NoScript
  • GMail is the best web-based email around. I get almost no spam that isn't marked as spam, and being able to tag messages with multiple tags (rather than put them into one and only one folder) is amazing. Being from Google, the search feature is also very good, and filters let you do clever things with messages as they arrive. For example, every time I publish a blog posting, I have it emailed to my gmail account. A filter then tags it with the "BlogArchive" tag and archives it without me even seeing it, so I have a backup of every article.
  • Google Reader for reading blogs and other RSS feeds.
  • StackOverflow – programming Q&A site. Very useful for learning stuff and getting questions answered, but it's fun to try and answer questions as well. Rather humbling sometimes, when I see a question and think "I know how to do that!" but before I post my brilliant solution, I read another answer saying "You could do this <my solution>, but that's inefficient (or slow or dangerous or...). Here's a better way" and proceeds to explain something that is clearly superior to my idea. There are also serverfault.com (for IT pros) and superuser.com (for general computer questions) as well as meta.stackoverflow.com (for questions about SO itself), but SO is still my favourite.
  • delicious.com – I rarely ever save bookmarks through the browser anymore, I just use delicious. Far easier to type now that it's delicious.com rather than del.icio.us.

Music and Video

  • iTunes – Gail has a Sony Walkman MP3 player and uses Windows Media Player to set up playlists and stuff. iTunes is just so much easier. It makes it easy to view any MP3 tags on your songs, and also makes it easy to select multiple songs and change attributes of all of them at once. You can set it up to detect a new CD being inserted in the drive, automatically rip it and add it to your library, and then eject it, so you can rip new CDs and sync them to your iPod just by putting the disk in the drive.
  • Videora iPod Converter converts (hence the name) video files from whatever format they're in into the appropriate format for your iPod, and automatically adds it to iTunes as well. Very handy for downloading TV shows that you missed. I have a dock for my iPod that connects to the TV, so we can watch stuff through the TV rather than on the iPod or computer.
  • CDBurnerXP – Windows Vista has built-in CD burning support, but I prefer CDBurnerXP. It gives you the whole drag-and-drop interface for selecting files, tells you how close you are to filling the disk as you add stuff, makes it easy to erase rewritable CDs / DVDs, writes both audio and data CDs as well as data DVDs, it does everything.

General Utilities

  • Jungle Disk – backs up all of our digital pictures and stuff online using Amazon's S3 service. I paid $20 for Jungle Disk originally, which gives me free upgrades for life, and I can install the software on as many machines as I want. I pay Amazon directly for the S3 storage, which for me is under $5 a month. (I wrote about this last summer.) The data is fully encrypted and the encryption key is not stored on the Amazon servers. Restoring is even easier – set up a network drive and just copy whatever files you want.
  • DropBox – you install the (free) software on multiple machines and point each of them at a directory on a local drive, and the software keeps the directories synchronized. To copy a file from one machine to another, just drop it into the DropBox directory and it's instantly copied to whatever other machines are synchronizing. Couldn't be simpler. There's even a web interface so you can access your data on a machine that doesn't have the DropBox software installed. I use this with...
  • KeePass – for storing and generating passwords. I created a KeePass database file in my DropBox directory on my work machine and it keeps track of my eBay, Paypal, Twitter, Linked In, banking etc. passwords, plus my router's WPA key. DropBox then syncs the file with my DropBox directory at home. I can change a password in either place and it gets synced with the other. When I set my password for a site, I use KeePass to generate a random password, then I modify it in a way that only I know and store that. I also have a text file in my DropBox directory that holds the unmodified passwords, in case I need a password in a place where I can't install KeePass. When I double click on the entry, KeePass copies the password into the clipboard so I can paste it into the browser. KeePass automatically clears the clipboard after 15 seconds so I don't accidentally paste it anywhere else later.
  • FileZilla – The best GUI FTP client I've used. I don't do much with FTP; updating my lacrosse pool website is about it, but FileZilla makes it easy.
  • Foxit Reader – got this one from Scott's list above. I got tired of Adobe Reader continually getting bigger and bigger. All I want to do is read PDF's, I shouldn't need tons of software to do this. Plus I kept hearing about security problems with Adobe.
  • ĀµTorrent makes downloading torrents brain-dead easy. Set up the directory where the downloaded files should go, then whenever you click on a torrent, it just does the right thing. It even stays in the background and does everything silently.
  • Microsoft Money – Microsoft is killing this product, which sucks because the alternative is Quicken, which I tried earlier this year and wasn't too impressed. I have a pretty old version anyway, so as long as it keeps working, I'm fine.
  • IrfanView – the best application for image manipulation. Allows you to specify a directory full of image files and do a batch rename/conversion/both, which is useful for taking 10 MP images and scaling them down for displaying on a family website, for instance.
  • QuickTax – I buy this every year during tax season. Asks you all the relevant questions and fills in your forms for you, or you can enter stuff directly if you want. Gives you tips on saving tax, copies relevant data from last year's forms, can print out the forms, and can give you all the information you need to submit electronically. Well worth the $40.

Thursday, September 03, 2009

The Interview

I graduated from the University of Waterloo in 1992 with a BMath in computer science. During my last term at Waterloo, those who were graduating went through interviews for full-time jobs. I interviewed for several companies, but I was only really interested in two: Microsoft in Redmond, Washington and Corel in Ottawa. I did my sixth work term at Microsoft, and they flew me out there again for the grad interviews. Unfortunately, due to some administrative mix-up, they had set up interviews for me on the assumption that I was a co-op student looking for a four-month position, not a graduate looking for full-time work, so those interviews didn't amount to anything. I have no memory of flying or driving to Ottawa for the Corel interview, but I remember it taking place there, so I must have made my way there somehow.

I went through three interviews that day. The first was with the HR person (whose name, I believe, was Sandra Gibson – I have no idea why I remember that), telling me about compensation and benefits and such. The second was with the man who would be my boss if I got the job, Roger Bryanton, in which he told me about what their group did and the positions available. He asked me some technical questions as well as some more general ones like what I'd be interested in working on. Then came the third one, which is the only one I really remember. The interviewer was a man named Pat Beirne, who was Corel's chief engineer and the man who originally wrote much of their signature application, CorelDRAW. I didn't know it at the time, but the man was basically a living legend among Corel people. Roger brought me into Pat's office, introduced us and left. I knew this was going to be a technical interview, so I put on my virtual propeller hat and got ready for the questions. Pat stood up and walked over to the large whiteboard on the wall to my left. It's been over seventeen years since that interview, but I still clearly remember what he said next:

I'm here to find out if you know what you say you know.

I didn't lie on my resume. I didn't say I was an expert in anything. I didn't say I had extensive C experience when I really only had some C experience. I didn't say I was proficient in something I'd never used. But when the chief freakin' engineer of the company says something like that and you're twenty-two years old, even if you didn't lie, and regardless of your self-confidence level, you're gonna get nervous. And I was.

"Let's start with an algorithm," he said. I don't remember what it was for, but he asked me to write some C code that would solve some fairly simple problem. There was a loop and an array and some numbers, but that's all I remember. I wrote it up on the whiteboard in about 15-20 lines of code. "Great," he told me, and I finally breathed out. I'd done it – I'd proven that I knew what I said I knew! I'd gotten the job, right? Not quite yet – we weren't done. Not even close.

"Now make it faster."

"Ummmm... OK.... I guess there are a few things being done here that don't always need to be done, so you could add an if statement around them, and that would be a little faster."

"Good. Now instead of handling just ten values, make it handle any number of values."

"Oh... ummm... rather than using a static array here, you could dynamically allocate it."

"Excellent. Now make it use half as much memory."

"Uhhhhhh... you could.... ummmm....."

"Here's a hint: none of the numbers you're storing is bigger than 50,000."

"Oh, OK, you could use a short int rather than int and that would use half as much space."

"Very good. Now make it faster."

We went on like that for hours. Well, it felt like hours. "Make it faster." "Make the code smaller." "Make it handle negative numbers." "Make it faster again." By the time I was done, I'm sure I had three machine instructions that would handle an infinite number of values in a nanosecond using zero memory.

Of course even then I knew that he wasn't testing to see how small and fast I could make this particular algorithm. He was testing three things:

  1. How well I knew the C language, and programming concepts in general
  2. What kind of problem solving skills I had
  3. How I perform under pressure

These are in no particular order; in fact #1 was by far the least important of the three. If I had #1 but was short on #2 or #3, well thanks for coming in and we'll be in touch. Someone with #2 and #3 but was short on #1 – well, you can learn C. Which would you rather have on your team: A great C programmer who can only solve easy problems or falls apart under pressure, or a great problem solver who works well under pressure but doesn't know C very well? The first one is useless – in fact he's worse than useless, he's a hindrance to the team. You take the second guy, send him on a five-day C course, and you're all set. It doesn't mean that he's definitely going to turn into an awesome programmer, but he's certainly got a better shot than the first guy.

"But how does the story end?"

I got the job, and worked for Roger on CorelSCSI Pro from June 1992 until August 1993, when I left Ottawa to start grad school at Western. One of the pieces of software I worked on at Corel was a CD-ROM driver for Novell NetWare, which did not support CD-ROMs at the time. When I started at Sybase in 1997, I was hired to replace someone who happened to be the NetWare guy. My boss saw NetWare on my resume, and I became the new NetWare guy. Twelve years later, I'm still the NetWare guy.

(Geek alert: technophobes stop reading now) I learned something about the C language that day as well – if you have a pointer to type X, then incrementing the pointer by one does not advance the pointer by one byte, it advances it by sizeof(X) bytes. During the interview, that bit of knowledge allowed me to make the code just a little smaller, but it's such a fundamental part of how pointers work in C that I can't begin to count the number of times I've made use of it since then. And I can honestly say that I learned it from Pat Beirne.

Tuesday, September 01, 2009

Stick a fork in 'em

The Jays announced their September call-ups today: Dirk Hayhurst, Brian Wolfe, and Joe Inglett. That's it. Notably absent: Jeremy Accardo, who is 2-1 with a 3.10 ERA, 26 K's, and 12 saves in 29 innings in AAA. Kind of a lot of hits given up (32), but not terrible, and only 7 walks. At the major league level, Accardo has a 2.50 ERA with 14 K's in 18 innings. He missed most of 2008, but was awesome in 2007 and seems to be doing better than fine in Las Vegas this year. So given that this season is effectively over for the Jays, why is Accardo still in Vegas? I don't know, and neither does he.

I loved this quote from the article:

"There's really no rhyme or reason to some of the decisions that are made, and that's out of your hands as a player," Accardo said Saturday before the 51s' x-x win/loss over/to Reno at Cashman Field. "All you can do is pitch, and pretty much this whole year I've thrown well. I feel better than I ever have, and my stuff is as good as it's ever been."

Looks like somebody forgot to finish their research before publishing the story.

Anyway, the Jays will finish no better than fourth in the AL East this year, the eighth of Ricciardi's reign. In that time, they have never had a sniff of the postseason, and have only finished higher than third once – and that was when they grabbed second place on the last day of the 2006 season. They were never in contention that year either and finished 10 games back of first. Since Ricciardi was hired as Toronto's GM, every other team in MLB has either made the playoffs at least once or fired their GM. Now, I have questioned many of his moves, but to be fair, he's made some good ones too, and honestly, I think Ricciardi has proven that he's a decent baseball guy. He might have some success in a different division, but being in the same division as the Yanks and Red Sox, the Jays need either a decent baseball guy and bucketloads of money (i.e. $150-175 million), or a great baseball guy. Since they're not likely to get the bucketloads of money, they need to fire Ricciardi and begin the search for the great baseball guy. What's Pat Gillick up to these days?