C/C++: Five Things I Hate About You


Jeff Attwood said recently in a StackOverflow podcast that if you can’t think of five things you hate about your favourite programming language, then you don’t know it well enough. I started writing C code in about 1988 and C++ in about 1992, so I think I can say I’m familiar with them. I know that C and C++ are different languages, but there’s enough overlap that I’m going to group them together. Here are five things I hate about C and C++.

  1. Lack of portability. Pure C or C++ code is generally portable, but we continually run into thing like “standard” libraries that aren’t standard. Libraries for things like file I/O and threading can be vastly different on different platforms so if your application has to run on multiple platforms, you have to write the same code several times in slightly different ways. There are functions that are defined in a different header file on one platform than another. Preprocessor macros that have a leading underscore on one platform and not on another. There are functions that exist on one platform that don’t exist – or work differently – on another. The C language has been around almost forty years, and we still have to have #defines in our code to cover stricmp on one platform and strcasecmp on another. We don’t use exceptions in our code because different compilers deal with them differently, and we just started using templates because all the compilers we use finally support them in a similar enough way that they’re usable. I suppose technically these are problems with the implementations rather than the language itself.
  2. Undetectable number errors. How many times have you done x-- on an unsigned type only to find that you “decremented” it from 0 to 4294967295, and everything went haywire? Doing this is completely legal and the only way to prevent it is to manually check for 0 before you decrement, and make sure you do it in a thread-safe way. PITA.
  3. Lack of memory checking. If you allocate fifty bytes and then access fifty-one of them, that’s totally fine. Accessing that fifty-first byte may work, giving you random data, or it may crash. Writing that byte may work, overwriting some other variable and creating a terribly hard-to-find bug, or it may crash. Or even worse: it may overwrite some unused piece of memory, thus having no effect, most of the time (i.e. during development and testing) but then crash or overwrite memory occasionally (i.e. in customer deployments).
  4. Braces aren’t required for if statements. (and while statements, and for statements) This is just asking for trouble. I’ve trained myself to see and fix things like this:
    if( condition )
    statement 1;
    statement 2;
    statement 3;

    and some editors and IDEs will automatically re-indent, making the problem obvious, but you can still miss them sometimes. In my code, I almost always put braces anyway, except for the occasional thing like this:

    if( condition1 ) continue;
    if( condition2 ) break;

  5. Named structures and typedefs are different. This has confused me for years. You can have a structure with a name, and also typedef it to another name, or you can typedef a structure without a name. For example, all of these are legal:

    // defines a structure called myStruct. You have to type "struct myStruct"
    // to use it
    struct myStruct {
    int a;
    int b;
    };

    // also defines a structure called myStruct, but you can use "myStruct"
    // as a type now. Or you can continue using "struct myStruct". The two
    // names do not have to be the same.
    typedef struct myStruct {
    int a;
    int b;
    } myStruct;

    // No different from the second example
    typedef struct {
    int a;
    int b;
    } myStruct;

    The second and third examples are exactly the same, though I remember having to go through a bunch of code and change typedefs of the third type to have a name after struct because the debugger (CodeWarrior, if I remember correctly) didn’t understand them unless the struct had a name.

Halloween at Fern


Fern Resort is one of our favourite vacation spots. Is it as luxurious as a Carribbean all-inclusive or a Las Vegas casino resort? Well no, but the food is always great, the people are nice, there’s lots to do, and most of all it’s comfortable. We all know the place well enough and we feel safe enough there that we can give the kids more freedom than they’re used to, which makes them happy. It also means that Gail and I have some more freedom as well. We’ve been there every summer but one in the last ten years, and our week at Fern is something we all look forward to all year. We also went once during the winter, which was also a lot of fun.

This past weekend we tried something new – Fern in the fall. They had a special deal on for Halloween weekend where both kids were free, and they were also discounting the prices by 10% or so, and because we’ve been there so often in the past, we get an “alumni” discount as well, so it ended up being quite reasonable. They also had some special Halloween things happening, including a costume contest, so Gail got quite excited about that and spent part of a couple of weeks making costumes for the four of us.

The middle of summer is obviously their busiest time, and that’s when we generally go. When we were there in February a couple of years ago, we were amazed at how different it was when there were only about 70 guests instead of the usual 370 or so. This time, we arrived on Friday just in time for dinner and when we walked into the dining room, we were stunned by the number of tables set – maybe ten. We found out later that the actual count of guests for the weekend was 35. We asked how that compares to a normal Halloween weekend, and Mike the sports director said that they usually get around 100-120 people. He figures that the economic downturn is responsible for some of it, plus the fact that Halloween was on the Saturday night caused some people to stay home so they didn’t miss trick-or-treating. The lack of people made things much quieter than we’re used to at Fern. I think we might have been the only guests staying in the Main Inn – although that had its advantages too. We asked on arrival if one of the big suites was available and one was (I suspect that they both were), so they upgraded us. The fact that it was a suite was very nice, and while the balcony overlooking the pool would be great in the summer, we didn’t spend much time (read: zero) there this time. There were a few programs that ended up being cancelled because nobody showed up, so the sports director and youth director had more idle time than they are used to. It seemed that our family and one other family were involved in the programs, but I don’t know what the rest of the guests did all weekend. Other than bingo, the dance on Saturday night, and meals, we didn’t see them at all.

One of the neat ideas they had was a pumpkin carving contest – there was a pumpkin on our table when we arrived, and we had all day Saturday to carve it in whatever way we wanted. They awarded three prizes: most humorous, most creative, and scariest. We brought a bunch of templates and idea books and such, but we ended up just drawing a face freehand. We alsoOur pumpkin checking out the kids menu forgot to bring all of our pumpkin carving equipment, so we had to borrow a steak knife and a couple of spoons from the kitchen. Gail had the idea of painting the pumpkin black so that the face would really glow when lit, so we brought some spray paint and after cutting out the face, we went outside and painted it on the grass (we’ll have to check next August to see if there’s still a black spot there). The small crowd worked to our advantage, as we won the scariest pumpkin award, which was announced at dinner on Saturday night. We were happy enough with bragging rights (though bragging rights among people you don’t know aren’t worth much), but the dining room manager came around and told us that our prize was a bottle of wine plus a chocolate monkey (an ice cream drink with chocolate and banana) for each of the kids. When we told them we didn’t drink wine, they brought us a cocktail each – a Caesar for me (thanks for introducing me to those Jeff!) and a Smirnoff Ice for Gail.

The most popular non-food-related event was bingo, which happened a couple of times on Saturday and once on Sunday. Gail won a $5 gift shop voucher at one game, and Nicky won twice – his prizes were vouchers for Fern t-shirts.

We began brainstorming costume ideas a month or two ago, and the boys kept returning to Harry Potter. I half-jokingly said that one kid could go as Harry and one as Ron, I could be Dumbledore and Gail could be McGonagall. Gail thought about it for a minute and decided that it wouldn’t be all that hard to make robes for us, so over the three weeks before Halloween, that’s what she did (though she lost a week of that with a nasty cold). Saturday night after dinner we all got dressed and went over to Fireside (the building next to the Main Inn), where they had set up a haunted house / trick-or-treating area. About half of the rooms on the second floor had ghouls, goblins, or witches in them, scaring kids (and me in one case) and handing out goodies. Some of the goodies were your standard mini chocolate bars and such, but there was also some stuff from the bakery – some really good iced shortbread cookies and a big cupcake. Obviously the kids ended up with far less candy than on a typical Halloween, but they didn’t seem disappointed. We were also fine with it, since we normally end up throwing out at least half of what they bring home because they forget about it by mid-November. Our wizarding family

After the trick-or-treating, they had a costume party and dance over at Mary Lou’s, where Gail and I danced (I was very warm in the Dumbledore beard and hair, so I didn’t dance much – and had to pull the beard down off my face to drink my beer), Nicky danced a little, and Ryan stood off to the side – he kind of wanted to dance but was just not able to pluck up enough courage to actually do it. He never actually said any of this, but I know that’s how he felt because that’s exactly how I would have felt when I was ten. The time came to hand out the costume award and once again, they had prizes for different categories. This time it was most creative, scariest, and overall best costume. Most creative went to “Mother Nature”, a young girl who had stuck little paper butterflies and birds and (real) branches and leaves all over herself; a very clever costume. “Scariest” wasn’t that scary but was also creative – a boy of about twelve who made himself into RoboCop with lots of cardboard, duct tape, and flashing lights. The award for best overall costume went to a strikingly handsome man dressed as Professor Dumbledore. (sigh) No, there wasn’t another Dumbledore there, I am talking about myself. My prize was another Fern t-shirt voucher. I got the t-shirt (actually upgraded to a long-sleeved shirt) but Gail really deserves all the credit – she made my robes and hat (as well as the robes she wore), bought the hair, beard, and glasses, and even coloured my eyebrows – all I did was wear it. And as cool as my costume was, I think Gail as McGonagall was even better because she looked the part (though much younger) more than I did, and didn’t hide behind a fake beard.

So we were at Fern from Friday dinner until Sunday lunch and won three t-shirts, $5, and a round of drinks. And we had great food all weekend, and stayed in the nicest suite in the place, and played some games (throwing eggs at the archery targets was particularly fun), and for all that we paid about 25% less than the normal price and the kids were free. A great weekend all around.

Tool review: Microsoft Network Monitor 3.3


I have used Wireshark for packet sniffing and analysis for a number of years, starting back when it was called Ethereal. A little while ago I was using it to look at broadcast packets that our clients send out, and decided that it would be great if Wireshark could interpret our wire-level protocol and display meaningful information about the packets. After a bit of searching, I found that you can add plug-ins to Wireshark, allowing you to do whatever you want with the packet data. I found some detailed instructions on how to do this, beginning with:

  • Install a version of the Microsoft C/C++ compiler
  • Install a particular platform SDK
  • Install Cygwin
  • Install Python
  • Install Subversion
  • Get the Wireshark source
  • Configure the source
  • Build Wireshark

Once you’re done all that, you can start looking at building your plug-in in C. I set up a Windows XP VM and spent a day or two doing all of this, but never got to the point of actually creating the plug-in. A few days later we had a team status meeting, during which I mentioned this project. A colleague, Peter, asked if I had looked at Microsoft NetMon, saying that he believed it allowed you to add your own parsers as well. I downloaded it and took a look. Thank you Peter, for saving me days, if not weeks of development time. In less time than it took me to set up the VM in preparation for writing a Wireshark protocol analyzer, I had analyzers written for the majority of both our UDP and our TCP protocols.

Writing parsers

As a packet sniffer, NetMon is not really much different from Wireshark, though I find the interface a little more intuitive. This might be because I’m running on Windows, and Wireshark has always looked to me like a Unix program that has been ported to Windows rather than an application written for Windows. They both support both capture and display filters. NetMon has colour filters as well – particular packets or conversations can be coloured based on the filter results. You can view packets as they are captured, save them to a file, and load them back in again later.

But writing a parser is orders of magnitude easier than writing a Wireshark plug-in. You simply tell it what ports your protocol uses and what the protocol looks like in a proprietary language (called NPL – Network Monitor Parser Language) that’s vaguely C-like but very simple. Some properties of this language:

  • it handles bitfields, ASCII and Unicode text, and binary data, as well as various types of numeric values (8, 16, 32, or 64 bits, integer or floating-point, signed or unsigned, big- or little-endian)
  • you can define your own data types
  • there are a number of special data types built-in; if your packet contains a 32-bit IP address, for example, you can just specify it as IPv4Address and it will get interpreted and displayed as expected
  • you can make structs which group pieces of the data together, and arrays which hold collections of the same type of data
  • you use while loops and switch statements to modify behaviour. For example, your protocol might have a byte that indicates the type of packet, and then the structure of the packet depends on the value of that byte. No problem.
  • you can indicate both storage format and display format, so if you have a byte that’s 0 for a request and 1 for a response, you can display the words “request” and “response” rather than just 0 or 1. The rest of the code can reference this value by name and get 0 or 1. The display string can be as complicated as you want, even referencing other pieces of the packet by name.
  • it supports conversations, and there are variables that have global, conversation, packet, or local scope

The help file installed with the app describes each of the language features, and I found a document that describes an example protocol in great detail.

Drawbacks

The biggest drawback of this tool is the parser editor. It’s not very powerful – it makes notepad look feature-rich. I use Ctrl-Backspace (delete previous word) and Ctrl-Del (delete next word) a lot, since it’s supported in Windows Live Writer, Word, and emacs, but support is spotty – sometimes it works, sometimes it deletes the wrong word.

The main feature it’s missing is undo. It doesn’t even have a single-level undo. If you hit backspace one too many times, you’d better remember what that last character was because it’s gone. An editor that doesn’t support undo is pretty much unacceptable in this day and age, and I lost data more than once because of it. Once you realize that you can’t undo mistakes, you end up clicking Save a lot more often, and do things like copy the file to a backup file before you make big changes. I checked my files into source control and started checking them in periodically, which is a good idea anyway, but if the parser stuff wasn’t so damn cool, the lack of an undo feature might be a showstopper. Emacs supports Ctrl-A and Ctrl-E to get to the beginning and end of the current line respectively, and sometimes I instinctively use those keystrokes in editors where they’re not supported, like this one. Unfortunately, Ctrl-A here means “select all”, so doing that and then typing something is disastrous because there’s no undo, so you just lost your entire file. You need to quit the file (do not save!) and then reload it, losing whatever changes you had made. Even a single-level undo would save you from that.

The compiler has some problems as well – there were a number of times where I got compilation errors that were badly written or vague enough that I didn’t know what the problem was. It would point to what looked like a valid statement and say that it was unrecognized or invalid, and it turned out to be because of a missing (or extra) semi-colon on a different line, or a language rule that wasn’t obvious.

Once you’ve made the changes to your parser, you have to save it and then click “Reload Parsers”, which reloads all 370+ parser files it knows about. Surely there could be a way to just reload the one that I changed? Now, there are dependencies between files, so changing one file might require that a different file be reloaded, so reloading them all is the safest but it’s slow. Ideally, the tool should be able to figure out the dependency tree and only reload files that depend on the ones changed. And the tool should prompt me to save if I have an unsaved file and I click “Reload Parsers”.

If anyone from the NetMon dev team reads this, here’s a bug report: If I load a parser file, then paste some code into the file, it’s not marked as “dirty” until I actually type something. Also, if I load a display or capture filter from a file, this generally means “replace what’s in the textbox with the contents of the file”, not “insert the contents of the file into the textbox at the current cursor position”. I can see how that feature might be useful in combining filters, but it should not be the default.

As powerful as the NPL language is, there are things it simply can’t do. In my case, some of our packets can be encrypted or compressed, but the NPL language can’t decrypt or decompress them. It would be nice to be able to write a small plug-in that could do these types of things, but it’s not supported. The Wireshark approach would work for that.

Experts

For those analysis needs that are not satisfied by parsers, NetMon supports things called “experts”, which are external programs that can read the data from a capture file and analyze it in whatever way it wants. It sounds similar to a parser except that it’s written in C or C++ (or C#, I think) and has the limitation that it only works on saved files, so you can’t look at the results in real-time as you can with a parser. I’ve stared to write one of these to solve the decompression/decryption problem I mentioned above. There doesn’t seem to be a way to decrypt the data and write it out into a new capture file, but I can at least decrypt, parse, and display the data. I can reuse the parser code I’ve already written, since the program is dealing with pre-parsed information, but I have to grab each field individually and display it, so I essentially have to rewrite all the display code in C.

Summary

Overall, this is a very cool utility and has replaced Wireshark as my packet sniffer of choice. The documentation is pretty thorough and it includes some good examples. If all else fails, the parser code for all the other supported protocols is right there. There is a help forum to which I’ve posted a couple of questions and gotten quick and helpful responses. I wrote a while ago about how cool Windows Live Writer is, so kudos to Microsoft for yet another cool utility.

Amazing stats of the day


Before their win over Anaheim on Monday, i.e. over the first eight games of the season, covering almost 485 minutes, the Toronto Maple Leafs had played with a lead for a grand total of six minutes.


The last time Mariano Rivera gave up runs in different innings in the same game was June 1999, and he has never done it in the post-season (ref: Ed Price). His career postseason stats are unbelievable:

Division Series: 34 games, 51.1 IP, 0.35 ERA, 0.58 WHIP
League Championship Series: 30 games, 45.2 IP, 0.99 ERA, 0.83 WHIP
World Series: 20 games, 31 IP, 1.16 ERA, 0.97 WHIP.

Sure, he gets worse as the post-season goes on, but his “bad” is everyone else’s “amazing”. It’s people like him, Andy Pettitte, and Derek Jeter that make it harder and harder to hate the Yankees. But I’m doing my best.

PMH 5K Run 2009


Last year, I participated in my first 5k run, and almost killed myself doing it. This year, I decided not to let that happen again, so I’ve been training since July. As a result, not only did I feel fine the day of and the day after the race, but I beat my time from last year by almost five minutes. I finished 5km in 27 minutes 18.5 seconds, a pace of 5’50″/km. I was the 458th person (out of 2552) to cross the finish line, though that’s misleading because some people that finished ahead of me may have had a slower overall time. Unfortunately, that’s the way they order the finishers, so in terms of absolute time, I don’t know where I placed. I was 284th out of 930 men. They originally listed me as “Male under 24”, so my ranking there is meaningless as well, but doing the math myself, 25 out of 87 men in the 40-45 group finished with faster times than mine (one beat me by over ten minutes). These numbers assume that most people are listed in the right groups, though Nicky and both of my parents were also in the wrong groups, so who knows.Me and the boys with our medals (staring into the sun) I’ve emailed the people who do the stats, and they have already replied saying they can fix them, so I’ll check again before I post this and see if it’s been updated. Update from next morning: They’ve moved me over to the right group, but some other things must have changed too, because now I’m ranked 30th out of 88 men 40-45. Whatever.

It turns out that I wasn’t training quite as thoroughly for this race as I thought I was. I used my Nike+ iPod and it decided that the route was 5.49 km. Since I finished in 27’18”, that gave me a pace of 4’58”. I’m assuming the route was actually 5 km even, so I guess my iPod measures a bit long. It looks like those runs I did that were reported as 5.2 km weren’t even five and the 4.4’s were probably about four. The iPod reported after the race (with a message from Lance Armstrong!) that this was my longest workout to date, which means that none of the runs I did in practice was as long as the real race. Apparently the iPod gives you the ability to recalibrate it, so right after the race I should have selected “Calibrate” and then told it that I had just run 5.0 km, but it’s too late now. Sometime in the near future, I’ll have to drive around the block and measure exactly how long it is, and then run it and do the recalibration. Regardless, it was close enough that it didn’t really matter. I wasn’t in pain at the end of the race – I even had enough left in the tank to increase my pace (not quite sprint, but I definitely ran faster) over the last 50 metres or so.

This year Ryan and Nicky joined in the fun as well (Gail was away at a scrapbooking weekend). They walked the course with my parents and finished in about an hour. They seemed pretty excited about being part of the team, and having special t-shirts, and the sensor on their shoe, and especially getting a medal at the end (Nicky said that the 5K on the medal means that it was 5 karat gold).

To all of those who sponsored me, a huge Thank You! I raised over $300 myself, and our team raised over $3000 for gynecological cancer research at PMH.

I Believe in Our Saviour, The Brian


So the Leafs haven’t started the season so hot. In fact, they can’t really be any colder than they have been. Every part of the team is having troubles, and word on the street is that this is the worst team in the league, which means that the Leafs might have sent Boston a first overall draft pick in exchange for Phil Kessel. There’s been a lot of talk about some of Burkie’s deals, and the fact that he is so obviously building a team full of fighters and tough guys. But surely there’s a method to his madness: his teams in the past have always had tough guys protecting his skilled players and allowing them to do their job. Nobody was going to run Teemu Selanne because they knew Chris Pronger or Brad May or someone would be on top of him in a second. This gave Selanne a little extra space, which he used to his advantage. That’s the strategy that Burke is using in Toronto as well – get a bunch of tough guys to protect the skilled players. Of course the problem is that there are no skilled players to protect. That’s why Colton Orr is only averaging 7 minutes a game – he’s got nothing to do, so he’s always hanging around Phil Kessel’s house.

But if you are planning on purchasing a fifty-karat diamond, wouldn’t you get the state-of-the-art security system installed first? You’re not going to buy the diamond and then leave it on the kitchen table until the security system gets installed a week from Tuesday. You make sure that the security system is in place and working flawlessly before you go pick up the diamond. So when Phil Kessel returns and Burkie trades Lee Stempniak, Jason Blake, and a third round pick to Washington for Alex Ovechkin, he’s already got the protection in place.

Of course, that trade isn’t going to be quite that easy. Might have to bump the draft pick to a second-rounder.

Please note that this article might be one of the only ones written this season about the Leafs and Brian Burke that didn’t use the word truculence once. Go me.

Top Ten Rock Cover Songs


I had fun putting together the list of Top Ten Rock Instrumental Songs a little while ago, so I decided to do it again. This time, I’m listing artists that took a good song and did an great cover. Again, these are in no particular order.

  1. Manfred Mann’s Earth Band: Blinded by the Light. The Springsteen song is all right, but Mann’s cover blows it away. I wrote about this song a few years ago.
  2. Dream Theater: Funeral For A Friend / Love Lies Bleeding. I love the original Elton John version as well but Dream Theater’s live version on “A Change Of Seasons” is excellent. They also do a great version of Deep Purple’s Perfect Strangers.
  3. Aerosmith: Come Together. They didn’t make vast changes to it, but they managed to make it sound like an Aerosmith song. If only we could forget the terrible movie it came from.
  4. The Ataris: The Boys of Summer. Make no mistake, the Don Henley original is one of my all-time favourite songs, but I really like this cover. Weird – a one-hit-wonder band, and the one hit wasn’t even their song.
  5. Creedence Clearwater Revival: I Heard It Through The Grapevine. The original is a Motown classic, but the CCR version is a rock and roll classic – eleven minutes long with a number of guitar solos.
  6. Van Halen: You Really Got Me. I was a huge Van Halen fan back in the 80’s, and now whenever I hear the Kinks original, I just think “how lame”. Van Halen actually did a number of pretty good covers in the David Lee Roth days (i.e. back when they were good) – Where Have All The Good Times Gone (more Kinks), Dancing In The Streets, Happy Trails, Ice Cream Man, You’re No Good, Big Bad Bill, Oh Pretty Woman.
  7. Metallica: Turn The Page. I’m a fan of Bob Seger, and this is one of his best songs, but Metallica’s version kicks serious ass.
  8. The Tea Party: Paint It, Black. Of all the bands to take a song with a sitar in it and do a cover without one. They just made it a straight-ahead rock and roll song and did a great job.
  9. Queensrÿche: Scarborough Fair. Can a hard rock band take an acoustic Simon & Garfunkel song, add distorted electric guitars, and make it their own? Yup, turns out.
  10. Faith No More: War Pigs. I really prefer Faith No More’s version of this song to the original, though admittedly I’m not a huge fan of Ozzy or Black Sabbath. Faith No More also did a cover of Easy by the Commodores, but rather than doing a Faith No More version, their version sounds like the original.

Runners-up: U2: All Along The Watchtower, John Mellencamp and Meshell Ndegeocello: Wild Night.

Honourable mention: Seether: Careless Whisper. Started off as a joke during a concert, but they did a good enough job of it that the fans loved it, so they actually recorded and released it. Cool song.

iPod Meme Redux


I originally did this a few months after getting my iPod. Revisiting two years later. Old values that have changed are stroked out. Shortest and longest songs, and first and last artist and album have not changed. I’ve added over 850 new songs.

Attention facebook readers: You might want to click the “View original post” link at the bottom of this note to see it as I originally wrote it. Facebook sometimes messes up the formatting.

 

How many total songs?
6919 songs, 20.9 days, 41.79 GB
7773 songs, 23.4 days, 46.55 GB

Sort by song title – first and last
First: A by Barenaked Ladies
Last: 99% Of Us Is Failure by Matthew Good
Last: 999,999 by Nine Inch Nails

Sort by time – shortest and longest
Shortest: You to Me (0:04) by Bystander
Longest: Octavarium (24:00) by Dream Theater

Sort by Album – first and last
First: “Abacab” by Genesis
Last: “90125” by Yes

Sort by Artist – first and last
First: AC/DC
Last: 54-40

Top five played songs:
1. Fake It by Seether – 18
2. Be Yourself by Audioslave – 17
3. Found Out About You by Gin Blossoms – 13
T4. Like A Stone by Audioslave – 12
T4. White Shadows by Coldplay – 12
T4. High Class in Borrowed Shoes by Max Webster – 12
T4. Elderly Woman Behind The Counter in a Small Town by Pearl Jam – 12
T4. Emotional Rescue by The Rolling Stones – 12

Find the following words. How many songs show up?
Sex: 6 21
Death: 4 59
Love: 239 327
You: 535 822
Home: 42 48
Boy: 34 56
Girl: 60 80

First five songs that come up on Party Shuffle
1. Cesaro Summability by Tool
2. White, Clean and Neat by Robert Plant
3. Local Hero by Bruce Springsteen
4. Resist [Live] by Rush
5. Gimme The Love by Junkhouse

It looks like I’ve added a lot of “death” songs, but most of them are actually album names – “Death Magnetic”, “Live After Death”, “Life, Death, Love, and Freedom” (and the corresponding live album “Life, Death, LIVE, and Freedom”) , and “Viva La Vida or Death And All Of His Friends”. There are only 6 actual songs with “death” in the title.

Similarly, 15 of the 21 “sex” songs are on “Blood Sugar Sex Magik” by the Red Hot Chili Peppers and don’t have “sex” in the song title. There are only 6 songs with “sex” in the title, and two of them are “Sexy Sadie” by the Beatles (on different albums). I guess I’m just not that into sex. No wait, what I mean is… it’s not that… um….

European coaches in the NHL


Back in the 70’s and 80’s, there were only a handful of European-born or Russian-born players in the NHL, a few Americans, and a ton of Canadians. You had your Borje Salmings and your Peter Stastnys and your Jari Kurris but it wasn’t until the late 80’s and early 90’s (after the breakup of the USSR) that you really started seeing a lot of Russians and Czechs and Slovakians and such in the NHL. So over the last twenty years, there have been hundreds of European-born players in the NHL, and many of them have had long playing careers. Some have even made the Hockey Hall of Fame.

So where are all the European coaches?

Former players moving on to coaching is commonplace: of the thirty current NHL head coaches, twenty of them played in the NHL at one point. (In case you’re curious, the ten that have not are Paul Maurice, Ken Hitchcock, Peter DeBoer, Todd Richards, Jacques Martin, Barry Trotz, John Tortorella, Cory Clouston, Todd McLellan, and Andy Murray.) But not one of the thirty current NHL head coaches was born outside of Canada or the US.

Are Europeans simply not interested in coaching at the NHL level? Are they being discriminated against somehow? I don’t have any insight or opinions as to why this is happening, but I think it’s an interesting question.

Goodbye J.P.


J.P. Ricciardi was fired the other day as Blue Jays GM, which I am happy about. Ricciardi’s reign as GM resulted in no World Series victories, no playoff games, heck, not even anything close to playoff contention. His time had come, and the Jays now need to rebuild and go in a different direction. But that’s not to say that Ricciardi was a terrible GM. Here’s a list of his best and worst moves, and I’ll list my personal favourites (in both respects) below. Note for the record that I wrote well over 2/3 of this article before finding that link, so I’m not just summarizing it.

Ricciardi certainly made some bad moves. He negotiated an expensive contract for Alex Rios, then allowed Chicago to claim him on waivers, getting nothing back. He signed Reed Johnson to a contract and then released him a month later, only to replace him with Shannon Stewart, who got injured and released within a couple of months. He paid both B.J. Ryan and A.J. Burnett a ton of money – each had one great season and a couple of not-bad ones. He also released Ryan and Frank Thomas with a lot of money left on their contracts.

But he also made some good moves. Bringing in Overbay was a good move. He got Jeremy Accardo for Vinnie Chulk and the grumpy Shea Hillenbrand. He grabbed Matt Stairs, Joe Inglett, Scott Downs, and Rod Barajas off waivers. He traded two players I’ve never heard of for Marco Scutaro. Trading for Glaus was good, but then he wanted out. So Ricciardi turned him into Scott Rolen. Then Rolen wanted out, and he got a couple of young pitchers for him. He drafted Hill, Marcum, Litch, Lind, and Snider.

Some players didn’t work out (Royce Clayton, Tomo Okha, Victor Zambrano), but they were cheap anyway. Just about every pitcher spent time on the DL, but that’s not Ricciardi’s fault. In fact, I’m surprised there wasn’t an investigation of some sort into the Jays’ pitching coaches at that time.

You might notice that I did not include the Vernon Wells deal in the list of bad moves. You can’t deny that Wells hasn’t earned his eleventy gazillion dollar contract since it was signed three years ago. OK, so he hasn’t even come close to earning it. So from that point of view, this is a terrible deal. But nobody complained about the deal when it was made because Wells was coming off a couple of great seasons and looked poised for lots more. Three mediocre and injury-filled seasons later, it seems obvious that Wells is not the superstar we all thought he was at the time. He’s simply a very good player that had a couple of great seasons. Should Ricciardi have seen that coming? Maybe, but nobody else did. If instead of signing Wells he had traded him or let him go, he would have been ridiculed endlessly (which he likely doesn’t care about) and not taken seriously by other GMs (which he likely does). He had little choice but to sign Wells to the contract and hope that he wasn’t a flash in the pan. Oh well.

Ricciardi was touted as the next Billy Beane, an expert in the whole Moneyball concept, and should therefore be able to bring a winning team to Toronto without increasing the payroll astronomically. This was key because the Jays play in the same division as the rich Yankees and Red Sox, who have no trouble outspending the rest of the league, and seem ready to sign any and all free agents regardless of the cost. But eight years later, what did Ricciardi whine about the most? “We can’t win because we don’t have the payroll of the Yankees and Red Sox. I don’t have enough money to do what we need to do. We can’t win in this division without increasing payroll.” Um… isn’t that why we hired you and not someone else?

I think Ricciardi’s biggest problem was that he didn’t know when to shut up. Every time there were trade rumours, Ricciardi was right there telling everyone who’d listen who he was offering, who other teams were offering, what deals didn’t happen and why, and so on. He would talk to the media and tell them whether certain players were interested in re-signing after their contracts were up, even if the players hadn’t come to a final decision yet. That’s the kind of stuff that does not need to be published. He publicly questioned Adam Dunn’s work ethic and passion for baseball. Even if he was right (and I have no reason to believe he was), you don’t say stuff like that. When rumours started flying that he was shopping Roy Halladay at the trade deadline this year, Ricciardi didn’t deflect attention and didn’t refuse to comment – in fact, he talked on and on about it, and even gave a meaningless “deadline” before the real trade deadline. In so doing, turned the thing into a media circus. On the day of the deadline, the FAN was doing minute-by-minute reports on whether or not Halladay was still a Blue Jay. Then there was the thing with B.J. Ryan, where Ricciardi knew that Ryan required Tommy John surgery but told the media that the injury wasn’t that bad. When the truth came out and he was called on it, he famously said “They’re not lies if we know the truth”, which simply told everyone that they couldn’t trust anything he said.

Having said all that, Ricciardi wasn’t the worst thing ever to happen to the Jays. No, they never made the playoffs during his time, but at least he didn’t turn the team into a laughing stock (lookin’ at you, John Ferguson Jr.). They only finished last in the East once, even made second place once, and finished above .500 for four of the eight seasons Ricciardi was here. He took a mediocre team and turned them into… a mediocre team. There were times over the past few years that the Jays had the best hitting team in baseball, and other times where they had the best pitching staff. Unfortunately those times never coincided. He didn’t leave the team in total shambles – there are certainly some players that can figure prominently in the Jays future plans. They have some good young hitters, a really good bullpen, and if all the injured pitchers return next season (OK, that’s a big “if”), they could have an excellent rotation (how does Halladay, McGowan, Marcum, Litch, and Romero sound?). As I said before, Ricciardi has proven that he’s a pretty good baseball guy and I’m sure he’ll land on his feet somewhere. In any division other than the AL East, he might even be successful.