Someone posted on Slashdot today that Google started a new blog on the all-important subject of the software testing. Cutely named, "Testing on the Toilet", the blog will feature weekly episodes of improving testing coverage by presenting some not-so-obvious examples in which perfectly innocent looking code can fail.
Writing testcases is probably one of the most daunting tasks in any software project. As a developer, I always have a hard time coming up with good set of testcases for any code I write. You usually design code so that it's elegant, modular, and efficient. Unfortunately, more often than not, there are bastard edge cases which crop up after I declare the code "perfect". Fixing these "bugs" often makes my code look fugly. :( Knowing how poor of a tester I am, over the years, I have learned to appreciate the awesomeness of a good test team.
The first "project" in which I paid dearly for the lack of good test coverage was in some 400 level semester-long project in university. While I won't mention much specifics, it didn't really help that we were pulling consecutive all-nighters, and were writing weird code like:
while(true) {(Somehow, this code was claimed to have "worked")
if(xxx)
if(yyy)
break;
}
A little disappointing in the end. Our program was able to run all the simple testcases, but failed spectacularly on the final set of benchmarks (I think it was 0/8). However, I would have to say we got our "revenge" the following year. ;-)
Recently, I cooked up a little Firefox extension. When I decided to make it generally available, I wasn't sure how I was going to sufficiently test it. The only saving grace is that my extension was provided AS-IS, with absolutely no warranties. If there was a bug, I wasn't necessarily going to have to fix it. While I was fairly confident in my code, some weird bugs slipped through. Someone had issues with the extension on Linux (that somehow resolved itself after uninstall/reinstall about 8 times). I don't even have a linux box.. no way I was going to figure this one out. Another case was when all the UK folks reported extension problems. Weird that only UK people had problems, until I realized I had set the en-GB manifest to a non-existent set of locale files. I had tested en-US, fr-FR and zh-CN. I wrongly thought that since en-GB used the same set of files as en-US, it can never be busted (unless I pointed to non-existent en-GB files.) :)
Now that I'm working on a much larger project, with dedicated test teams, I have really learned how important it is to test your own code before your release it. You really don't want to waste the testers' time with simple problems that you should have caught. Usually, by the time they flag the bug and go through all the process of documenting how to reproduce the failure, the bug has already been fixed.
On these large projects, the most amazing thing is when the testers stress test your program with these super duper test cycles that include runs for hundreds of hours. It's always an anxious time waiting for the results from these runs. If our program survives the testing,everyone's off partying. If it doesn't.... (/cry and cancel those weekend plans).
Following in Kung's theme of posting happy stories, I was surprised today with a similar sort of kindness. After co-authoring a paper, getting it accepted and presenting it at a conference last year, the bosses from above decided to reward little Tochi with a small bonus. This extra padding in my depleted piggy bank will definitely help cover any Wii bundles and GH expenses. :)
While on this topic, the Toronto Star has a daily section called Acts of Kindness. After discovering this section last year, I spent afternoons reading these heart-warming stories. Definitely a section I would recommend for any out-of-towners with free time on their hands.
Switching topics now. Today, I discovered two interesting tidbits:
- The company that owns the contract to maintain TTC bus stop shelters is actually owned by CBS. Yes, the same CBS that most people know as a broadcasting network. Apparently, they own the right to sell any advertisements on the shelters. I have always wondered why I see so many CBS news billboards and posters in T.O. Who watches CBS here (I don't even know what channel CBS is on)?
- Canada now has only 1 real theatre chain, ever since Cineplex brought out Famous Players. Anyway, I was over at Tribute.ca looking up movie times for Paramount Toronto, one of the better theatres downtown. For some reason unknown to me at the time, I could not find any of the Paramounts. I mean, I know my alphabets and PARAMOUNT TORONTO should definitely be between OSHAWA CENTER 8 and PICKERING 8. After going over to Cineplex's official site, and looking up the theatre there, I found out that Paramount Toronto is now known as ScotiaBank Theatre Toronto. Apparently, according to CBC, ScotiaBank paid an unknown sum to get their names onto the theatres. I didn't know Cineplex was that cash-strapped.
Kung introduced me to Ouverture Facile a little while back. Needless to say, there's nothing facile about this. After many hours of wrecking our brains, we finally got to level 48. The puzzles are getting harder, and the clues on the help forums are getting fewer. There are at least 61 levels, and I heard there are over 95 levels in the French version. Halfway there!
Two of the recent levels revolved around these keywords - "mouse" (plural) and "history" (0000). These words reminded me of a copy of the Oct 1996 edition of Popular Science I had found while rummaging through my basement. Their 1996 "What's NEW" section featured an (the only) awesome product from M$ - the rolley button mouse! For the unbeatable price of $79, you can get a wired, rolley on top, rolley on bottom, 2 button mouse!
10 years is a long time. To put things in perspective, from the same issue of Popular Science, the Computer for Gamers!
FOR SERIOUS PC GAMERS LOOKING for fast action, the Compaq Presario 8000 series offers 6 MB of RAM for graphics alone. The total memory ranges up to 32 MB and the hard drive is a whopping 3.8GB. Other speedy features: Intel processors blaze away at up to 200 MHz, a DSVD modem sends voice and data simultaneously... Price range from $2,500 to $3,200.Final interesting thing from this issue of PopSci is a small blurb about the advent of the digital versatile disc (DVD).
The new format for home video and computers is designed to deliver unheard of picture quality and storage capacity. [So true!] Well, kids, you can scratch DVD off your Christmas list. In all likelihood, the format won't make it onto store shelves until next year (1997). The big holdup? The pople who'll be supplying the software - namely the movie industry - want some type of data encryption to prevent unauthorized copying. [erm].
Whenever I go stateside and introduce myself as a Canadian to people, 9 out of 10 times, they would flaut their Canadian knowledge (I bet mostly from South Park) by citing some fancy tidbit about Canada. People usually mention either our hockey prowess or the Royal Canadian Mounted Police (R.C.M.P.) a.k.a. a Mountie. On the odd occasion, someone would metion a mooooose.
Perhaps the single thing that makes Mounties an international icon is their red serge uniform. Those sharp red riding suits and the flat brim hats definitely look spiffy. However, I must admit, I cannot imagine any officer catching thiefs in that uniform. Interestingly enough, these uniforms were the subject of a recent Toronto Star article that detailed the cost of dressing up one of these mounties. In the past five years, the Royal Canadian Mounted Police has spent $58.4 million – or about $11.6 million a year on average – to outfit its members. ... it costs, according to the RCMP, an average of about $3,500 to dress an [new] officer with the standard clothing kit.
Woah. $11.6 million to suit them up? $3.5k for a new mountie? If people can put national pride aside for a second, perhaps it is worthwhile to consider some Made-In-China options. $11.6 million can go a long with for other parts of our national defense strategy... like the Royal Canadian Air Farce. According to CBC, our Air Force, along with our navy, are facing a budget shortfall. While no missions are going to be cut (so they claim), I would hate to see our fighter jets not equipping missles in Afgan or our navy not having enough sailor hats to go around, due to the spending cuts.
Well, at least our Mounties have enough clothing to survive the winter.
After months of an extended summer and reading about other's winter plagues, Toronto finally got her first dose of winter today. All in all, we only received at a very modest 5-10 cm of snow, but the combination of freezing rain and rapidly dropping temperatures made conditions rather treacherous.
By the time I got up this morning, the radio had reported over 250 accidents already. A quick email check showed most of my lab-mates were too afraid to make the drive, and had taken the initiative to reschedule meetings and appointments. The signs couldn't be clearer - it's a work from home day for Tochi.
As the day wore on, more and more accidents were being reported. The first cold weather alert of the new year was issued, with temperatures expected to drop to -13C tonight, feeling like -22C with windchill. While this sounds horribly cold, given the warm 2 to 10C temperatures we've been enjoying lately, the seasonal temperature at this time of year should be -10C.
The most spectaular news of the day is definitely the closure of Hwy 400 between Finch and Hwy 7. A tanker carrying liquid O2 flipped over and started leaking its load. I find it hard to believe that the thing didn't blow up. Though in a way, I'm kind of glad it didn't, since a crater in the highway would have been very costly (taxpayer $$) to repair.
The 2nd most spectaular news is that Tochi-mobile's garagemate couldn't get up the driveway today. The driveway has a modest incline of at most 20 degrees, but given the multiple layers of ice, the tires just couldn't get any traction. Pumping the gas pedal didn't do much, and eventually I got this burning smell, which scared the shit out of me. I didn't know if it was the engine or the tires. Either way, their lifetime just got shorten by months from this experience. This is the first time in Tochi's recollection that he had so much trouble backing a car into the garage.
Onto more happier news, the winemakers in the Niagara-on-the-Lake region must be jumping with joy. Their 3 days of cold weather are finally here. Unfortunately, I've heard the yield won't be very good or plentiful this year. Many grapes have either rotted and were vulched by birds, bears, wolves and reindeers.