Saturday, January 31, 2009

Ship it now, test it later

There's a question on StackOverflow entitled "What real life bad habits has programming given you?", which is quite hilarious for programmers. Answers include things like thinking 256 is a nice round number, wanting to use Ctrl-F on an actual book, or starting to count items at 0 and ending up with one less than everyone else.

This may seem unrelated, but bear with me. Shortly after Ryan was first born, I decided that children, particularly babies, were badly designed:

  • babies need to eat, but don't know how right away, and frequently spit up what they've already eaten or refuse to eat. It takes years before a child can even make himself a bowl of cereal.
  • babies need to sleep, but getting them to go to sleep (or stay asleep) can be challenging. When Ryan was a baby, he wouldn't go to sleep by himself; we had to walk with him until he fell asleep in our arms and then gently put him in his crib. If he wasn't sufficiently asleep (read: unconscious), he'd wake up and you'd have to start all over. Sometimes we'd have to walk with him for 45 minutes before we could go back to sleep ourselves.
  • babies can't roll over for a few months after they're born, can't crawl until six months, and can't walk for the better part of a year. Baby deer are walking within minutes of birth.
  • children are self-centred. They have tantrums when things don't go the way they want, even if the circumstances are beyond anyone's control, or if getting their way would inconvenience or even hurt others. Older kids have been known to give their parents attitude (and I'm one of the lucky parents whose children have reached that stage), and teenagers sometimes take "attitude" to a whole new level.
  • some babies in the animal kingdom are on their own from the moment they are born. Others are under the care of their parents for a few years. Human children frequently live with their parents for twenty years (sometimes more), or about 25% of the average human lifespan.

Despite these challenges, parents continue to love and nurture their children, so obviously parents are generally better designed than children. However, children turn into parents without having been "re-designed", so it occurs to me that the real problem is not with design, which means it must be implementation. Obviously babies are born before they're really ready — before all the bugs have been worked out, before things have been streamlined and optimized.

The real problem is that babies are shipped while still in early beta.

Wednesday, January 28, 2009

Games people play

I read an article on BoingBoing today called "The case against Candy Land". The author writes (somewhat tongue-in-cheek) about how video games are far more educational for kids than some classic board games like Candy Land, where whether you win or lose depends entirely on the random arrangement of the cards, and not on any skill on the part of the player. If I play chess with my six-year-old, I can almost guarantee that I will beat him every time, because I have some skill at the game — very limited skill, admittedly, but more than him, which is all that matters. If we play Candy Land, however, he is just as likely to win as I am, since no skill is necessary. You don't even have to know how to count. In particular, there are no decisions to be made.

I have noticed this with my kids' games as they get older. The older the kids at which the game is targetted, the more decisions they need to make to be good at the game. As a kid, my sister and I played a card game called "war". You shuffled the deck, then dealt out half the deck to each player. Each player turned over a card and whoever had the higher card won both cards. When you run out of cards, you take the cards you've won, shuffle them up, and keep going. If you both put down the same card, that's a war. Each player deals out three cards face down, then turns one over, and the same rules apply. First one out of cards loses. It didn't take long before I got completely bored with this game because even as a kid I realized that nothing I did mattered. There were no decisions to be made. Other than the speed at which I could deal the cards out or turn them over, there was no "getting good" at war. Candy Land is the same, as is snakes and ladders.

A game like Sorry or Trouble, or a similar game we like called Aggravation, also involves counting, but some decision-making as well. When you roll a one, do you bring out a new piece, or move an existing piece one space? If you have more than one piece out, which one do you move on any given turn? If you have the chance to either take someone out ("Sorry!") or move one of your pieces into your safe area, which do you do? I really noticed the difference when playing snakes and ladders one day with Gail and Nicky. The phone rang and Gail went to answer it, asking me to play for her. I did and after three or four turns, she returned. It had never really occurred to me before, but that's when I realized that the outcome of the game was going to be exactly the same whether I played her pieces or she did.

Ryan is starting to figure this out. There are some games, like snakes and ladders, that he used to like but doesn't like so much anymore. I'm sure if I asked him, he couldn't say specifically why; he'd just say that it's a game for younger kids and he wants to play older kids games. I'm sure that the real reason is that he realizes at some level that what he does has no effect on the outcome of the game. When playing snakes and ladders once, I told Ryan that I could write a computer program to play this game and it would be just as good as any human player. I think he was impressed by that, but someday he'll realize that it's really not that impressive. It's not that I can do it because I'm a great programmer — I couldn't write a similar program for Monopoly, for example — but because it's purely an algorithm with no decisions. Pick a random number from 1 to 6, move that many squares, go up a ladder if you're at the bottom and down a snake if you're at the top, and repeat until you get to the top.

As you get older, you get into games where more decisions are necessary, from Uno to checkers to Monopoly to backgammon to the game where all you do is make decisions, chess. In fact if you get to a point in a chess game where you don't have a decision to make about what to do, you may be in check and are very likely in deep trouble.

Of course, this doesn't mean that games such as Candy Land serve no purpose. They teach things like playing nicely with others, taking turns, and how to win and lose graciously. But if you're over the age of 6 and looking for a challenging game, Candy Land may not be the one for you.

Monday, January 19, 2009

The Rock needs a Brian

A couple of years ago, the Toronto Raptors hired Bryan Colangelo as their new president and general manager. Colangelo was a successful GM in Phoenix, and is widely respected throughout the league. He replaced Rob Babcock, a rookie GM who did a lousy job with the Raptors and made them into a laughing stock. Hiring Colangelo was seen as a very important move for the Raptors, showing that they were willing to spend the money to hire the best person to rebuild the team, regardless of how much it cost.

This past month, the Leafs hired Brian Burke as their new president and general manager. Burke was a successful GM in Anaheim, and is widely respected throughout the league. Ignoring Cliff Fletcher's brief stint as interim GM, Burke replaced John Ferguson, Jr., a rookie GM who did a lousy job with the Leafs and made them into a laughing stock. Hiring Burke was a seen as a very important move for the Leafs, showing that they were willing to spend the money to hire the best person to rebuild the team, regardless of how much it cost. (It also showed that they were willing to give Burke complete control over the hockey operations, something that Ferguson did not have.)

The Toronto Rock currently have Mike Kloepfer as general manager. This is his first such job in the NLL (i.e. he was a rookie GM when hired), and he has done a lousy job with the Rock, turning them into a laughing stock. Superstar Colin Doyle was traded away because he didn't get along with rookie coach Glenn Clark — this before Clark had ever coached an NLL game. In return, the Rock got Ryan Benesch, who went on to be named Rookie of the Year in 2007. But Benesch was inexplicably benched for the last two games of 2008 and the first two games of 2009, and then traded to Edmonton for draft picks. Once in Edmonton, Benesch admitted that he had also had disagreements with Clark, and so he was also shipped off. The inescapable conclusion: "Disagree with Coach Clark, and you are outta here. We got rid of Doyle and Benesch for doing it, so don't think your job is safe, regardless of how good you are." The Rock are in trouble if Luke Wiles or Lewis Ratcliff (or, God forbid, Bob Watson) have issues with Clark. I wonder if Rock management has considered the possibility that if both Doyle and Benesch had issues with Clark, maybe it's Clark who should have been fired?

See a pattern here? In all three cases, a rookie GM took over and screwed up the team. In two of those cases, he was then fired and replaced with someone who is successful and respected. And the guy's name was Br[i|y]an. We can only hope that the Rock will follow the same pattern (even though they're not owned by MLSE like the other two). So who's the Rock's Br[i|y]an?

The best GMs in the league right now would have to be Darris Kilgour and Marty O'Neill. Darris (who's a helluva coach as well) is likely a Bandit for life, and I can't imagine the Rock being able to lure him away from Buffalo, so count him out. Marty O'Neill has been named GM of the year for two straight years. He's the original GM of the Minnesota Swarm, and they have improved every year. It's likely that O'Neill won't want to leave Minnesota while the Swarm are still improving, so until they've peaked he's not likely going anywhere. Now, it's possible that having my vote to win the west this year is not what O'Neill would consider to be the aforementioned peak, so he is probably out until at least the end of this season.

Would the Rock follow their fellow Toronto teams and grab a name from the past (Cliff Fletcher, Don Matthews, Cito Gaston)? There are three former Rock GMs currently in the NLL: Ed Comeau in New York, Johnny Mouradian in San Jose, and Terry Sanderson, who's an assistant coach in Calgary. It's unlikely they'd go back to Sanderson (who'd immediately trade for Josh again) since they only fired him two seasons ago and replaced him with the current guy. Comeau was never really given a chance — after only six games, he was fired and replaced with Sanderson. Mouradian is the only real possibility here, since he is the only one who wasn't fired; he left to become the San Jose GM and coach. He's since been named GM of the year and inducted into the NLL Hall of Fame.

Other possibilities:

  • there is a Brian that has experience in the NLL — Brian Silcott. He's never been a GM, but he has been an NLL and MLL player and MLL head coach, and he is the VP of the Portland LumberJax.
  • Brian's brother Kurt Silcott was the GM of the both the Buffalo Bandits and the Calgary Roughnecks. He's currently employed by the Knighthawks, though not as their GM.
  • Jamie Batley was GM and head coach of the Chicago Shamrox, and has also been the coach of the Colorado Mammoth.
  • Chris Hall was the head coach of the Calgary Roughnecks for several years, though he's never been a GM.

I know! I have the solution. It's foolproof. Hire Whoopi Goldberg and have her channel the spirit of the late Les Bartley. She'd have to change her name to Brian first.

Update: Less than four hours after I posted this, the Rock have fired Glenn Clark and hired Jamie Batley as head coach. No mention of replacing the GM, and no mention of what's happening to assistant coach Jim Veltman.

Friday, January 16, 2009

The planet's really bad now because of the Dark Side

For any Star Wars fans out there, like me, this video really made me laugh. It's a video of someone who hasn't seen Star Wars ("I've seen bits of it") telling the story of Star Wars. Her retelling of it is very funny, but the animation is priceless.


Star Wars: Retold (by someone who hasn't seen it) from Joe Nicolosi on Vimeo.

Wednesday, January 14, 2009

Another stupid trade

The Rock made another stupid trade today. 2006 2007 Rookie of the Year Ryan Benesch, who the Rock received in the Colin Doyle trade, and solid defender Derek Suddons were sent to the Edmonton Rush for a couple of draft picks. Benesch was benched for the last two games of last season and the first two of this season, but during the off-season, Rock GM Mike Kloepfer was quoted as saying that there was no problem with Benesch, and he was an important part of the Rock's future. Guess not.

I don't understand this move at all. First off, Benesch had a great rookie year (did I mention he was Rookie of the Year?) and his numbers did drop last year, but it's not like they fell off substantially. He was still the third leading scorer on the team. Good defenders are never flashy and don't put up big numbers, but Suddons was one of the better defenders on the team. And yet all the Rock get in return are two draft picks? Granted, next year's draft is said to be one of the strongest ever, but still, you never know what you're going to get with draft picks. And now, what do the Rock have to show for getting rid of Colin Doyle (who, incidentally was recently ranked number one on NLLInsider.com's top 50 players in the NLL)? Chad Thompson, Cam Woods (traded for Kevin Fines) and a few draft picks. Thompson is decent and Woods is a very good defender, but I'd take Doyle over them any day of the week and twice on Sunday.

I didn't have a problem with the Wilson/Wiles/Hoar trade this past off-season, but after the Doyle/Benesch one, this one ranks right up there with the dumbest trades in Rock history.

Friday, January 09, 2009

Movie Review: Eagle Eye

We watched Eagle Eye the other night. I was looking forward to it since it looked like a pretty good action flick and from an action point of view it certainly fit the bill. From a plausibility standpoint, however, it was just way the hell out there. I understand about suspension of disbelief and all that, but holy crap.

Without giving away too much, some of the things the lady on the phone is able to do are just way beyond belief. She can control every cell phone and security camera in the country, not to mention street lights, construction cranes, subways, and even the demo TVs at Circuit City. At one point Jerry (Shia) turned his phone off, and within seconds, the phone of the guy sitting next to him on the train started to ring. To make that work, she'd have to:

  • have a high-quality camera in the train car
  • use it to take a picture of the guy's face
  • use facial recognition software to figure out who the guy is, with an accuracy of one person out of 350 million
  • find that person's cell phone number

Or maybe she could analyze the GPS coordinates of every cell phone in that area and figure out which one was physically closest to Jerry's. Which is off. On a moving train.

In another scene, she kills someone by somehow causing a power line to break. The broken wire falls and fries the guy. Even with complete control over the power grid, how could she cause a power line to break? And assuming she could do that, how could she do it in such a way that she knew that it would fall and hit the guy, who happened to be running at the time? Later she has Jerry and Rachel rob an armored car for a briefcase with a time-release lock that they risk their lives several times to try and protect. And when you think about where they are when it opens and what's in it, you realize that there were a thousand simpler ways to do it, all of which are less likely to fail that the one she chose.

One of the reasons she needed Jerry in the first place (to impersonate his twin brother) is moot, since the FBI would have revoked all of his security codes once he died. This part did make me wonder, however, if the real-life military (or CIA or FBI or whatever) would give top secret clearance to someone who had an identical twin, just for this reason. Their fingerprints and retinal scans would differ, but their DNA would be identical. Don't know about voice prints or even how accurate voice print identification is.

Anyway, LaBeouf was pretty good, though his character seemed unnecessarily abrasive at times. If someone put $750,000 in my bank account and filled my apartment with stolen military stuff and then I was arrested because of it, I might decide that being a dick to the FBI agent who's interrogating me would be a bad idea.

Having said all that, I have to say I did enjoy it. There were lots of car chases and explosions and overall, it was fun, if silly.

On a side note, I cannot watch a Shia LaBeouf movie without thinking he looks like Wil Wheaton:

Shia LaBeouf Wil Wheaton
Shia LaBeoufWil Wheaton

Geek humour

How cool is it that my StackOverflow reputation is exactly 4k? Answer: very cool.

Thursday, January 08, 2009

The Harry Potter-a-thon

On New Year's Eve and New Year's Day, Gail and the boys and I had a Harry Potter marathon. We watched all five movies back to back, and Gail had fun making Harry Potter-themed snacks. We're all big fans of the Harry Potter series, but as with Star Wars, when you see a movie enough times and get to know the characters well enough, you start to notice little things that don't make sense. I have fun coming up with these things. These are not a knock on the movies — I know that they are fantasy and that they don't need to be 100% realistic to be enjoyable, in fact, any fantasy movie that's 100% realistic isn't really fantasy, now is it?

Philosopher's Stone

  • Hagrid says about Gringotts "ain't no place safer! Not one! 'cept perhaps Hogwarts." Rrrrright. Hogwarts is guarding possibly the most important and valuable object in the wizarding world, and three eleven-year-olds — including one who's only known about the wizarding world for less than a year — are able to get by the traps. Not to mention the fact that when Harry finally does arrive at the end, Quirrell is already there, which means that he got by all the traps too — and Harry had help, while Quirrel did it by himself. Hey, bang-up job on those traps, Hogwarts professors.
  • Nicolas Flamel has had the stone, presumably in Gringotts, for well over 600 years. Why did they decide to move it to Hogwarts? Ron makes a good point about keeping a creature like Fluffy in a school. Surely they suspected that Voldemort might try to steal the Stone, so why bring it to Hogwarts and put the students in danger?
  • To get into the room where Fluffy is guarding the trap door, Hermione performs a simple "alohomora" spell. Shouldn't the teachers have magically locked that door so that simple spells wouldn't open it?
  • Similarly, if the restricted section of the library is truly restricted, surely the gate should be magically locked.
  • When Voldemort tells Quirrell to kill Harry, why does he attempt to choke him? Why not just use avada kedavra? And why is he able to touch Harry's throat, but turns to dust when Harry touches him? Quirrell says he tried to kill Harry a number of times previously as well — why use a complicated curse to make Harry's broom fly all over the place and not just use the killing curse? He had plenty of opportunities...

Chamber of Secrets

  • If Hagrid was at Hogwarts when the Chamber was opened fifty years ago, that would make him between sixty-one and sixty-seven years old at the time of this film. Does Hagrid look that old to you?
  • On a similar note, Professor Dumbledore had a fairly long grey beard in the fifty-year-old flashbacks. My beard has a fair bit of grey in it, and if I hadn't shaved in ten years, it could be that long, so it's possible that Dumbledore is as young as forty in the flashback, but likely older. That makes him at least ninety now.
  • Gilderoy Lockhart is a fraud, and yet he takes a number of opportunities to perform spells in front of people, with disastrous results. If I were pretending to be awesome when I really wasn't, I'd try to avoid performing in front of people, lest my inadequacies be publicly displayed. Why would he choose to try to fix Harry's broken arm? Why would he choose to start the dueling club when he knows he can't fight? For that matter, why would he take this teaching job in the first place?
  • Speaking of the dueling club, Snape says "perhaps it would be a good idea to teach them how to block unfriendly spells", to which Lockhart answers "An excellent suggestion!" and then doesn't do it. He picks two students and basically says "go!" without any advice on what to do.
  • Why do some "expelliarmus" charms flick the victim's wand away harmlessly (Lupin on Snape) while others (Snape on Lockhart, Harry on Snape) knock the victim twenty feet back?
  • When trying to stop the flying car, Ron pulls out his wand and taps the steering wheel saying "Stop! Stop! Stop!". He's been around magic all his life — does he really think this will work? I know it's a plot device to have him break his wand, but it could have been done better.
  • Is "eat slugs!" really a spell, or did Ron just say that out loud and then do a non-vocal spell, something they don't learn until sixth year?

Prisoner of Azkaban

  • Fred and George said they took the Maurauder's Map from Filch's office during their first year, which means that they've had it since before Ron arrived at Hogwarts. During that time, if they had looked up the Gryffindor dormatories, they'd have seen the name "Peter Pettigrew" on the map because Scabbers lived there. Either they never looked up the Gryffindor dorms in that time (which seems unlikely), or they never thought it weird that the name of a person who they didn't know kept showing up in the Gryffindor dorms.
  • Sirius got past the dementors and into Hogwarts, presumably, because he was an animagus and turned into a dog. Are dementors really fooled by animagi? The Maurauder's Map isn't. Wouldn't this mean that any animagus sent to Azkaban could simply transform and walk out?
  • Hermione says something like "Bad things happen to wizards who mess with time". If that's the case, why would a professor give a time-turner to a thirteen year old witch just so that she could take extra classes? Doesn't this seem dangerous?

Goblet of Fire

Order of the Phoenix

I've only seen this movie two or three times, so I don't really have any comments about this one. One thing I do want to mention is that the character of Luna Lovegood was perfectly cast. She is exactly how I pictured her when reading the books, seemingly kind of ditzy, but sweet and strangely wise. She's got the right dreamy sort of look and voice.

Monday, January 05, 2009

Updated NLL predictions

Since I posted my predictions of the NLL East and West divisions, there have been a few changes in the league. The team rosters have been released, a number of players have announced that they will not play in 2009, but most importantly the Chicago Shamrox have ceased to exist, and their players scattered to the four winds in the umpteenth NLL dispersal draft. Here are my updates to my previous comments:

East

Toronto

All the rumours I've read about Craig Conn say that he'll be ready for action mid-January, so me might miss the first two or maybe three games. If he's fully recovered and as good as he can be, he's a big addition for the Rock. The Rock also picked up Bill McGlone from Chicago, and I know nothing about him. He had 40 points in 16 games in 2007, which is hardly MVP-worthy but pretty decent, though his production dropped by 50% in 2008. Goaltending is still a concern. I watched the first game of the season, and the Rock's offense looked pretty solid, even without Conn.

Buffalo

They've lost Brett Bucktooth, possibly for the year, and I forgot that they will now have Sean Greenhalgh, who missed all of last year.

Rochester

So much for "not many changes". Grant is still gone, but so now is Scott Evans, and the Gaits reunite once again as Gary's twin brother Paul is the new head coach. As far as I know, Paul has zero pro lacrosse coaching experience, so that will be interesting.

Philadelphia

Athan Iannucci had surgery in the off-season, and from what I heard, was supposed to be out for a couple of games at most. Now there are rumours that he should be back mid-season, and I've read at least once that he may be out for the entire season. Losing the reigning scoring champ and league MVP is a pretty big blow.

Also Peter Jacobs retired.

Boston

They were going to be a pretty decent expansion team anyway, and now adding former Goalie of the Year Anthony Cosmo makes them even better. Jake Bergey chose to sit out the year rather than play with someone other than the Wings. I think this is odd, considering the Wings have twice left Bergey unprotected in expansion drafts, and he was chosen by Boston each time. The first time he was traded back to the Wings, this time he decides to sit out. Perhaps the Boston GM shoud have given Bergey a phone call before picking him?

Chicago

Ummm, gone.

Prediction

Losing Iannucci is major, so Philly is no longer my pick to win the division. I'm a little more optimistic on Toronto and a little less on Rochester. Chicago was last anyway, so that doesn't really affect anything. Boston got better, but I don't think they improved enough to put them into the playoffs. End result:

  1. Buffalo
  2. Philadelphia
  3. New York
  4. Toronto
  5. Rochester
  6. Boston

West

Calgary

One thing I missed that's different about 2009 for the Roughies is the return of captain Tracey Kelusky, who missed half of last season. Shawn Cable is not on the roster, but he only played 7 games last year (for 5 points), so that's not much of a loss points-wise. Avery was released, so it's only Campbell and King in goal.

San Jose

Much-hyped rookie Paul Rabil has been signed, so add one to the list of potential offensive stars on the Stealth.

Portland

The only change here is that Dallas Eliuk has now officially retired. No big surprise, and he wasn't going to be playing anyway.

Prediction

No changes.

Saturday, January 03, 2009

The NLL season is on...

...and the Rock are tied for first overall! And that's after the game! A few thoughts about the game:

  • Great that we could watch it for free through nll.com!
  • The video quality wasn't any worse than the $7 B2 games from last year, I didn't think. Not bad in a small window, but not really watchable full-screen for any length of time.
  • Nice to see the Rock offense spread around — hat-tricks by Manning, Biernes, Wiles, and Ratcliffe. McGlone's goal was very nice, and Manning's seeing-eye goal to win it was nice too. Crosbie with 6 assists, Ratcliffe with 5, Wiles with 4.
  • No Craig Conn. No big surprise.
  • More of a surprise: no Ryan Benesch. He was benched at the end of last year, but Mike Kloepfer said during the off-season that there's no problem with Benesch and that he's a big part of the Rock's future. Then he doesn't play the opener. An upcoming trade, perhaps?

Tuesday, December 30, 2008

Buzzword overload

There's a question on StackOverflow about the best source code comments people have seen or written. My favourite answer is this one, which doesn't require any programming knowledge to understand, since it's impossible to understand anyway. I found it quite hysterical:

/**
This method leverages collective synergy to drive "outside of the box" thinking and formulate key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive down the bottom-line. I really wanted to work the word "mandrolic" in there, but that word always makes me want to punch myself in the face.
*/

Nothing about "solutioning", though; perhaps it's out of date. I'd never heard the word "mandrolic" before, so perhaps I'm out of date.

Gail has on occasion actually used some of these words, particularly "synergy" and "solutioning", and doesn't understand why I laugh every time. I have an idea what it "means", or what it's supposed to mean, but to me, "synergy" is just the quintessential buzzword that doesn't actually mean anything.

Monday, December 22, 2008

Failure is not an option

Our camera stores pictures on a compact flash memory card. The other day when changing the card, Gail managed to bend a pin inside the camera, so it wouldn't recognize any card. We took it into a camera repair shop yesterday, and it's going to cost us $200 to get fixed. The repair guy said that Gail likely tried to put the card in sideways or backwards or something and that it's not that uncommon. For a fairly expensive piece of equipment, this seems like a blatant design flaw. If a card should only go in one way, why can't they design them so that it's physically impossible to put it in wrong? Make it so that it's impossible to screw it up. Failure should not be an option.

We had the same problem with an old wireless PCMCIA card. We had a PCI card in the computer, and that card had a slot that the PCMCIA card could slip into. But it was entirely possible to put the card in the wrong way, in which case it simply wouldn't work. (Luckily it didn't damage the card.) Unfortunately, it wasn't plug and play, so you had to shut the computer down, put the card in, and boot it up again. If you got it backwards, you'd have to shut the computer down again, reverse the card, then boot it back up.

The designers of the SD card that's in my kids' $89 cameras seemed to get it right:

  1. Make it a rectangle that's longer than it is wide, so you can't put it in sideways
  2. Put a notch in one corner so that if you put it in backwards, the notch makes it not fit before the card gets to the pins.

Update: I wrote the above before talking to the camera guy. Turns out it is impossible to put the card in backwards or upside down, but it is not impossible to put it in sideways. If they had made it "portrait instead of landscape" as the camera guy said, this possibility would have been removed as well.

Friday, December 19, 2008

Raindrops on roses and whiskers on kittens

I'm not a big fan of the snow. I go skiing once or twice a year, maybe more in the future because I took the boys last year and they enjoyed it, and tobogganing and making snowmen with them is fun too, but other than that, I'd be fine living somewhere that never got snow.

However, and I can't explain this, one of my favourite things is a work-from-home day when I sit down at my laptop, sip a mug of hot chocolate, and watch a huge snowstorm outside. Maybe it's the knowledge that I don't have to navigate the roads, or maybe it's just the fact that it's cold and nasty outside and I'm toasty and warm inside, but I love that feeling.

It's snowing like crazy outside, and I just finished my hot chocolate. I might make another cup. It's a snow day today so the boys and Gail are home, but I'm warm and cozy inside and have no plans of venturing outside today (except maybe to shovel later on but I won't think about that now). <Happy sigh> Suddenly my TLS certificate validation problem on the Mac just doesn't seem so daunting.

Saturday, December 13, 2008

The might know science, but they don't know web programming

While trying to buy tickets online for the Ontario Science Centre, I saw this:

Seriously, how hard is it to accept a postal code without a space and add it yourself?

Later on in the transaction, I hit an SSL error because the certificate was valid for "www.ontariosciencecentre.ca" but I happened to type "ontariosciencecentre.ca" into my browser, and none of the links after that redirected me to "www.". If their certificate relies on the "www." prefix, then their web server should be redirecting me.

They might know everything there is to know about science (and they do, I've loved going to the Science Centre since I was a kid), but their webmaster has a few things to learn.

Update: As you can see in the comments, Ken Huxley from the Science Centre has fixed the postal code problem and is working on fixing the SSL problem as well. Kudos to him, and my apologies for my condescending "has a few things to learn" comment above (not to mention the title of the post). When he mentioned that he was going to reconfigure DNS to fix the SSL problem, I realized that I understand at a high level what he's going to do, but I have no idea how to actually do it. I guess I have a few things to learn as well. But if I hadn't whined written about the problems I found, they wouldn't have gotten fixed, so it's nice to know that my blog has made the world a better place.

Tuesday, December 09, 2008

Stability in the NLL

OK, this is getting ridiculous. There's a news report saying that the owner of the Chicago Shamrox is trying to sell the team, and they might fold (as early as this week) which would require yet another dispersal draft. Is anyone else getting tired of this? The last time an NLL season began with exactly the same teams as the previous year (in the same cities) was 1993. Here's what's happened since:

  • 1994: Removed Pittsburgh
  • 1995: Added Rochester, removed Detroit
  • 1996: Added Charlotte
  • 1997: Removed Charlotte
  • 1998: Added Ontario and Syracuse, removed Boston
  • 1999: Ontario moved to Toronto
  • 2000: Added Albany, Baltimore moved to Pittsburgh
  • 2001: Pittsburgh moved to Washington, Syracuse moved to Ottawa, added Columbus
  • 2002: Added New Jersey, Montreal, Calgary, Vancouver
  • 2003: Washington moved to Colorado, removed Montreal
  • 2004: New Jersey moved to Anaheim, Albany moved to San Jose, Columbus moved to Arizona, removed New York and Ottawa
  • 2005: Added Minnesota, removed Vancouver
  • 2006: Added Edmonton and Portland, removed Anaheim
  • 2007: Added New York and Chicago
  • 2008: Removed Arizona
  • 2009: Added Boston, removed Chicago?

Sometimes franchises fail because lacrosse just didn't sell in that city (Ottawa, Anaheim). Sometimes they fail because of corrupt or incompetent ownership (Vancouver). In the case of Arizona, it was some mystery reason that made no sense — they shut down operations because the season was cancelled, but then the season was resurrected two weeks later. Arizona management announced that they had already shut everything down and couldn't restart it in time (though every other team managed it), so they'd just sit out 2008 and return in 2009. Of course they didn't return at all, so it sounds to me like they used the season cancellation as an excuse to fold up operations since they weren't making much money. This is too bad (particularly for Arizona fans), since they had a very good team that made the finals twice in three years. The Chicago thing sounds like another mystery reason — their owners say that it's just too difficult to manage the team in Chicago from their offices in Atlanta and LA. Mmmmmmkay. Never heard of phones? Email? Video conferencing? Hell, hire someone who lives in Chicago that can run things.

What the hell ever happened to due diligence, not only on the part of NLL ownership groups, but on the part of the NLL itself?

Apparently the Chicago owner announced that he wanted to sell the team during the middle of last season, which means that less than two seasons after he bought an expansion franchise, he's trying to sell it. Did he not consider the "difficulty" of running a team from a thousand miles away before spending $3 million to buy an expansion franchise? Did the NLL not ask him how he intended to run the team from a thousand miles away?

Twenty-one NLL teams have folded or moved since the league was formed in 1987. Of those, four only lasted a single season. Compare that to the NHL, where a total of eighteen teams have folded or moved since 1917. Three cities (Pittsburgh, Washington, and New Jersey) have had NLL teams fail twice, and the New York Titans are threatening to make it four. Does this sound like a good league to purchase a franchise in?

Having said that, the Toronto, Colorado, Calgary, Philadelphia, Buffalo, and Rochester franchises are all healthy. I don't know about Edmonton, Minnesota, Portland, or San Jose, and I haven't heard too much lately in the way of negative rumours about those four. I really hope that the late 90's and early 2000's were a kind of experimental phase for the NLL, where they tried lots of new markets, many of which failed. Now that they have a core of seven or eight franchises that are doing well and are unlikely to fold, perhaps we'll see a little more stability.

Thursday, December 04, 2008

On rebuilding

I read an article on general borschevsky's Maple Leafs blog the other day that contained the following text at the bottom:

Brian Burke believes Mats Sundin is not interested in returning to Toronto. No one seems to mind. Despite the obvious need for a top line centre, despite the need for veteran leadership, despite the fact that this team is already better then last year's team and that the playoffs are just a short win-streak away,...

As soon as I saw the line about "the playoffs are just a short win-streak away", I cringed. I immediately commented on the article, saying that this is why many people think that Leafs fans are stupid. No matter how bad the team is, these die-hards always seem to think that if we just make the playoffs, the Cup is ours. Or that making the playoffs, even if you get swept in the first round, makes the season a success. I wrote a little while ago about delusional Leafs fans who think that every year is the year. I, on the other hand, have accepted the fact that this year's Leafs are not a contending team, and are likely not even a playoff team. In the long run, this is probably good, in that they will get a higher draft choice, and Our Saviour will pick the next Sidney Crosby.

For the record, general borschevsky is neither delusional nor stupid. He responded to my comment, saying that making the playoffs may not mean a Cup victory, but it does mean that we'll be watching the Leafs in the playoffs, and it'll be exciting and entertaining. And for those of us not employed in the sports industry, that's what sports is, isn't it? Entertainment? This is a good point — neither Toronto nor Pittsburgh won the Cup last year, but I am quite sure that Pittsburgh fans enjoyed last year's playoffs a lot more than Leafs fans did.

There are three reasons a team misses the playoffs:

  1. Your team sucks because you are rebuilding, and after a few years, you will be a contender.
  2. Your team sucks because you are rebuilding, but after a few years, you will still suck.
  3. Your team just sucks.

Of course, the difference between groups 1 and 2 can only be seen through hindsight. The Leafs have missed the playoffs three years in a row, and I think they were squarely in group 3 during that span. They were not rebuilding — you don't trade away a prospect and a draft pick for Yanic Perrault if you're rebuilding. But the Leafs are clearly rebuilding now, so if they miss the playoffs this year, it will be because they have moved to either group 1 or group 2 — only time will tell which one.

I have been a Leafs fan my whole life. In that time, I have never watched a Leaf game hoping that they lose. So why is it that I cringe when someone suggests the possibility that the Leafs might make the playoffs this year? Because I have managed to convince myself that in order to get good, the Leafs will have to suck for a while. I mean really suck. It'll be a tough couple of years (or more), but if Our Saviour does what everyone seems to think he will do, the Leafs will be a really good team in four or five years. I know that there's no guarantee (losing is a necessary but not sufficient condition for building a winning team), but I have some confidence, so I'm willing to put up with the sucky years, mainly because the only other option is stay mediocre-at-best for the rest of whatever. So I've convinced myself that the Leafs will suck for a few years but in the long run, this is a good thing. I've braced myself for the pain. Then someone says "the Leafs could make the playoffs!" and I realize that if that happens, the pain will likely still come, it's just been postponed.

I love analogies. I'm not always good at coming up with them, but I love them. So here's my analogy. Sorry if you're reading this over lunch.

You went for dinner at the local greasy spoon and had the monster chili burger with onion rings and big piece of coconut cream pie. And a Diet Coke. Man, was that good. But a couple of hours later as you're sitting down to watch the Leaf game, you realize that the Diet Coke just isn't sitting well. Damn, shoulda had the chocolate shake. The discomfort turns to pain, and a few minutes later, you start to wonder if your dinner might, ahem, come back. Twenty agonizing minutes later, you're now hoping it will come back, since that will likely make the pain stop. You make your way to the bathroom not looking forward to what's about to happen, but ready for it. But when you get there, the bathroom door is locked — your roommate, who went for dinner with you, is in there already with similar issues. Do you bang on the door and thank your roommate for allowing you to put off the inevitable upchucking? No, because as unpleasant as it's going to be, you know it's necessary, and you've braced yourself for it.

Dumb analogy? Well, sure it is. Dinner is likely coming back up anyway, whether the bathroom door is locked or not, whereas the pain of not making the playoffs but not getting any better either can continue indefinitely. So here's another one:

You're in the dentist's office getting a filling. The dentist is about to stick that four-foot needle in your mouth (and then wiggle it around just in case you can't feel it). You grip the armrests, leaving visible dents that patients that use that chair the next day can still feel, bracing yourself for the most unpleasant part of any dentist visit. (Aside: I've had many fillings and four or five root canals and crowns, and for me, the needles are always the worst part.) Just before the dentist gives you the needle, he remembers something. "Oh, hold on" he says, puts the needle down, and starts fiddling with some other equipment. You breathe out, having been given a little reprieve. A minute later he picks the needle up again and says, "OK, I'm ready now". You grip again, and again he says "Oh, wait a sec" and puts the needle down. Now say he keeps doing this, several times. First off, you might want to find a less forgetful dentist. Secondly, by the seventh time he does this, you're ready to yell "Just give me the damn needle, will you?" Do you want the needle? No, but you know it's necessary and you've braced yourself for it.

So when someone suggests that the Leafs might make the playoffs this year, I say no. Not because I want them to lose, but because they are rebuilding and they need to lose for a while in order to get better. It's necessary, and I've braced myself for it.

Thursday, November 27, 2008

That was random

One thing that computers are really bad at is coming up with random numbers. You ask the computer to do something specific and tell it exactly how, and it will do it exactly right every time. But ask it to come up with a random number, and it will ask "how?" Well, there is no "how" for that question, you just pick a number at random. A human can do it better, but even we're not that good at it. If you ask a million people to each pick a random number between 1 and 1000, the number of people who choose numbers less than 10 or greater than 990 should be around 2% but is likely to be much less. And who's going to pick 500? Or 666? That's not very random, right?

In recent years, some computers have been built with real random number generators; these use things like thermal noise generated by the processor itself to come up with truly random numbers. In the majority of cases, though, this isn't available, or at least it may not be so you have to assume it isn't. You are then forced to use a pseudo-random number generator (PRNG), which gives you a sequence of numbers that appear to be random, but are actually completely reproducible if you "seed" the generator with the same value each time. This is helpful for us programmers when trying to reproduce a problem, but in general you want your pseudo-random numbers to be closer to real randomness, so you need to seed the PRNG with a different value each time. Coming up with enough entropy in your PRNG seed can be a difficult problem.

Many programs choose the number of seconds since midnight January 1, 1970, since it's a fairly easy number to obtain in the C language (for historical reasons that I am not going to go into here, mainly because I have no idea what they are). However, if you have multiple programs starting at the same time, they can end up using the same seed and therefore the same sequence of pseudo-random numbers, which can be a serious security hole. So some programs go much further in picking a seed — combining the current time with the process ID or some other piece of data that changes frequently in an unpredictable way. I have heard of programs that ask the user to type a sentence, and calculate entropy by analyzing the typing pattern of the user — the average number of milliseconds between keystrokes and stuff like that.

The end result is that programs sometimes have to go to a lot of trouble to come up with a seed for the PRNG that has sufficient entropy. Essentially, you need to come up with a good pseudo-random number in order to generate pseudo-random numbers.

Straight outta left field

Just announced: Brian Burke is the new Leafs President and GM. Wow, didn't see that one coming.

I was going to call it the worst-kept secret in sports, but I don't think anyone attempted to keep it secret, even when Burke was still employed by the Ducks.

Now that Our Saviour has come, the Leafs are a lock for the Stanley Cup within three years, right? If you believe the Toronto sports media who have been going apeshit over Burke for a year, you might believe that too. Personally, I will reserve judgement for a while. At least let the man arrive in Toronto before you start planning the Stanley Cup parade.

Wednesday, November 26, 2008

NLL West 2009 predictions

I did my analysis of the NLL East two weeks ago, so now I'll do the NLL west. I realized after I posted the east review that I should probably have waited for the rosters to be announced. I know about the major trades and such, but there are always players that are released and free agents signed that either aren't announced or are announced quietly, so I'm partially going by last year's rosters. Once the rosters are announced, I'll look things over and post updates if necessary.

Calgary Roughnecks

2009 will be Calgary's first full season with Josh Sanderson. Sanderson joins an already potent offensive group with Kelusky, Toth, Ranger, Cable, and Curt Malawsky, and they also signed Kyle Goundrey. The Roughnecks went 8-10 last year including the playoffs, but 4-2 with Sanderson in the lineup. Shooter is an impact player who will definitely have a positive impact on the 'necks. The loss of veteran Steve Dietrich won't make too much of a difference, since he played less than Pat Campbell last year anyway. The Roughnecks have both Ryan Avery and Matt King, both decent backups to Campbell.

Colorado Mammoth

In the past, trading Gary Gait away would be considered a major move for any team, but it's almost a non-issue for the Mammoth since he's been retired for three years. Actually, losing Gait is a plus for the Mammoth, since they picked up Andrew Potter and two first round draft picks from the Knighthawks essentially for nothing. Gee Nash is a top 5 goalie in the NLL and now has Andrew Leyshon backing him up. Gary Rosyski joins Gavin Prout, Dan Carey, and the always fun to watch Brian Langtry on the offense. This franchise has been at or near the top of the pack since they were in Washington, so it would be a mistake to count them out.

Edmonton Rush

The people who sew the names on the back of Edmonton Rush jerseys have really been earning their money in the past year. They made five trades in March alone last year (four on trade deadline day), and have made eight more since the season ended. In are veteran goalie Steve Dietrich, Spencer Martin, Cam Bergman, Andrew Biers, and Lindsay Plunkett, and out are Brendan Thenhaus, Kurtis Wagar, Matt King, Kyle Goundrey, Ben Prepchuk, and Dan Stroup. They also traded Troy Bonterre, but signed former Rock Tim O'Brien to play the same goon role. I'm surprised they released Stroup and losing Prepchuk will hurt as well. They also lost Mike Accursi who played part of last year with the Rush. Goaltending looks solid with Dietrich and Palidwor, but that's a lot of offense to lose, especially for a team that was 4-11 and last place overall last year. Barring yet more trades, I don't see the Rush contending anytime soon.

San Jose Stealth

Big changes for the Stealth! Former goaltender of the year Anthony Cosmo is gone, as are Gary Rosyski, Luke Wiles, Paul Dawson and a bunch of others. In are Peter Veltman and Matt Roik and a bunch of young kids. Colin Doyle posted his opinions on his blog after week 1 of training camp; he didn't say whether they'd be better or worse, but he did say they'd be "bigger and a little more athletic", and that the offense will "have a different flavor to it". Not sure what he means by that exactly. Lots of the defenders are American rookies, and American lacrosse players tend to start with field lacrosse and learn box later. As Doyle says, "the learning curve will take some time". With this many changes to the roster and this many American rookies, I don't see the Stealth repeating as Western division champs.

Minnesota Swarm

The Swarm move from the East to the West division, and might be poised to take over the west. Goalie Nick Patterson showed he was the real deal last year, Craig Point was Rookie of the Year, and Ryan Cousins was Defensive Player of the year. The Swarm was third in the NLL in scoring last year, and had five players over 50 points, all of whom are returning. If the sophomore jinx doesn't hit Point like it hit the previous ROTY, Ryan Benesch, I see the Swarm being a major player in the west.

Portland LumberJax

The LumberJax won the division in their first season, and then sucked rocks in their second season. Last year, they were pretty ordinary in the regular season, just squeaking into the playoffs, where they caught fire and went to the Championship game. Given all that, I have no idea how to predict what the Jax will do this year. The Jax lost Dan Dawson to Boston, and with all due respect to Brodie Merrill, he was their franchise player. Future Hall of Famer Dallas Eliuk has retired (or at least won't be playing this coming year — there are rumours that he has not retired and may play in 2010, but he's 44 now so I doubt that), but he wasn't their starting goalie last year anyway. They did sign Dan Stroup and traded for defender Brad MacDonald, but the loss of Dawson might just push the LumberJax back down into "sucks rocks" territory.

Summary

New kids on the Western block Minnesota should take it. San Jose won't repeat, but will still make the playoffs. Calgary and Colorado will be there too, as always, but there might be a pretty big gap between fourth place and fifth, with Portland and Edmonton finishing out of the playoffs.

Prediction:

  1. Minnesota
  2. Calgary
  3. Colorado
  4. San Jose
  5. Portland
  6. Edmonton

Update: After Chicago vanished and the rosters were released, I updated my predictions.

Tuesday, November 25, 2008

Dues

An actual conversation at our house tonight:

Nicky: Ryan, what's the money you have to bring to Cubs called?
Ryan: Dues.
Nicky: You don't have to go get dues today. Here. <Gives him a toonie>
Ryan: Where'd you get it?
Nicky: From my piggy bank. It's my only toonie.
Ryan: That's OK, Nick, you keep it. I'll get one from my piggy bank.