Archive for May 2008

Quote of the day


I’ve been writing a lot of code for the past 6 months. I have to admit, it is a welcome change from Word documents and PowerPoint presentations. Java, unlike text and graphics has a clearer definition of correct and finished.

From Software Is A Craft by Dan Pritchett

Unit testing debt


I had the pleasure to listen very interesting podcast where Scott Hanselman and Quetzal Bradley discussed unit testing named “Testing after Unit Tests“. To increase the Google Karma of the information discussed I have decided to rehash and sum up few main ideas of this discussion.

Quetzal introduced the idea of “negative coverage” – meaning that if you have 88 % test coverage, you should not see this as something positive you have achieved, but as something missing (you miss 12 % of completion) – thus the title of this post.

He also offered very nice mental model of unit tests: see all possible paths through your code as network of roads in a state. Your unit tests are like taking small car and start driving through these roads. If you go through 88% of the roads, you can at least tell that all these roads and bridges are finished and passable with the small car driving at normal speed, that there are no fallen trees on the road and so on.

You cannot say anything about the remaining 12 % roads and bridges you have not visited. They may not exist at all – or be only half finished. You simply do not know.

It is also important to understand that you do not now how many those 88% tested roads will still be OK when you try to drive through with a 18 wheeler truck – or at 250 km/h in a sports car (feel free to fill in your favorite racing car make …).

The parallel goes even further in matching the “freeways” and side roads with main execution paths vs sideroads (you have to take freeway in order to get to the sideroad) – but to get all, get a podcast, load it to your iPod (or Zune ;-)) to find out more.

I keep listening to Hanselminutes because I like the content and the style and also to keep a tie to Microsoft world during the periods I am working outside of .NET (like in last 10 months). But even if you are not developing in Microsoft environment, many episodes of Hanselminutes very often bring ideas with much wider applicability. This is one of them.


Fix for iDVD 08 crash after the start


Today I tried for the first time the iDVD 08 with intention to create DVD version of the screencast – just to find out that the application dies right after the start. From the error report (thanks for that) the problem was in missing dependency Oxygene framework – a module similar to Windows DLL. Here is the error message:

Link (dyld) error:

Library not loaded: @executable_path/../Frameworks/Oxygene.framework/Versions/A/Oxygene
Referenced from: /Applications/
Reason: image not found

The solutions described in the Apple discussion groups revolved around using shareware tool Pacifist – something I did not like particularly. The plain reinstallation of the DVD did not help either.

What worked for me and solved the problem was complete removal of iDVD and subsequential reinstall. I used AppZapper to remove the application, but it also can be done manually by deleting the application bundle from /Applications, removing all iDVD receipts from /Library/Receipts and all content from ~/Library/iDVD and ~/Library/Preferences (which is in a nutshell all AppZapper did).

Right after removal, insert Installation disk 1, select Install Bundled Software Only, press Customize and uncheck everything except iDVD. The program starts fine after installation finishes.

One more minor hickup after reinstall was that the Theme introduction would not play in preview – all the application showed was black screen with background music. This was resolved by selecting ‘Check for updates’ and allowing installation of the update. Afterwards, I was able to start working in my first DVD :-).

iMovie 08 and mystery of disappearing Project Library


As if the yesterday’s Firmware update issue was not enough, I had very strange experience with iMovie 08. Suddenly, for no obvious particular reason the user interface became very unresponsive, I was not able to select project in project library. Switching Event library and Project windows on or off stopped working. Windows were not redrawn properly. Creating new project had no visible effect. I could not click on project to select it (well, technically I *could* click, but nothing happened). The time sliders in Events and Projects were either disabled or invisible …

Here is how the iMovie looked like most of the time:

I tried multiple things to fix that: Logout and re-login – no change. Reboot (remember, I came from Windows where this very often used remedy ;-)). No luck. Check and repair the permissions using Disk Utility. No improvement. Verify disk. No errors and still no improvements.

I even resorted to reinstallation of iLife 08. The only effect I achieved was that I got back trial version of Office 2004 which I deleted right after installing Leopard and had to download and install several updates for Garage Band and iWeb – but iMovie still did not work. Installation of iMovie HD (from iLife 06) worked OK as well did the iMovie 06 – but that was not much help because I did not want start from scratch and iMovie 08 with all its bad features is still able to accept way more input formats than ’06.

After killing well over three hours that was supposed to be spent on finishing the screencast, I started to delete all iMovie project files and even libraries from previous attempts. And suddenly, iMovie sprung to life and was as before.

I think that reason for the issues was moving the Events library for some of the older screencasts to external disk, but leaving the Project files in iMovie. Somehow this must have confused the program and the non-responsiveness could be caused by trying to connect the thumbnails and file references from the projects to the not available source clips from event library.

Lesson learned: whenever I move done an event library used in the screencast to external hard disk, it is probably safest to backup and remove the project as well. In other words – keep these two words separated and disjunct.

But of course – this can also be a pure coincidence and everything can have completely different cause. Time will tell. Too bad that Premiere Elements does not exist for Mac platform. Maybe I should seriously consider looking at Final Cut Express ?

Mac firmware update


Today I (finally) found out that Apple pushed the long expected Java update with Java 6 for OS-X. Together with this update was another one – Firmware update. I installed both, but on next login, the same firmware update showed up again and checking the firmware version with System Profiler has shown that it was not updated.

So I installed firmware update again, and rebooted. But nothing happened again.

After some googling, I found out that the Firmware update – unlike all other updates does NOT really install itself. What it does is to download the Firmware update program. After you start this program (you can locate it by Spotlight), it will display instructions and asks for initiating shutdown. When machine reboots, you need to press and hold power button while it boots – until hearing long beep sound or seeing the sleep light rapidly flashing. After this, system shows update progress bar under grey apple and on finishing the update reboots again. Having done this, firmware is finally updated.

From technical point of view it makes lots of sense to perform firmware update this way, but it would be very helpful if Apple would at least TELL the users what they are supposed to do. This was so un-applish user interaction experience like none before …

Catching up with Hanselminutes


Thanks to great weather, the walking season is in full progress 🙂 and that means I was able to add some more listening material to my podcast collection. I still keep track with all part of TWIT network – This week in tech, Security Now!, MacBreak Weekly and Windows Weekly – but that is nowhere close enough for both walking and driving …

I have returned back to listening to Scott Hanselman blog (Hanselminutes) – mostly out of curiosity how did working for Microsoft change is very balanced and realistic view of technologies.

Fortunately – it did not.

Scott is still same great, very open minded developer that can see value and strength as well as issues and problems in technology regardless of its origin. It speaks a lot positives about Microsoft as well – by allowing this to happen.

Very good episodes are (back from 2007) from my personal point of view were:

I was pretty intrigued with the title of the episode “The Worst Show Ever with Chris Sells and Rory Blyth” – which is Episode 112 and I have to agree, the title was pretty descriptive 🙂 – but it was at least reasonably funny.

I am looking forward catching up with rest of the year, which according the Weather Network should not take too long.

Thanks, Scott. Keep up the great content coming.

Cocoa Programming for Mac OS X, Third Edition is out


as long as you are Safari Books online subscriber – see it here.

Completely updated with XCode 3.x and Objective C 2.0. The screenshots even show the iPhone project templates, indicating the XCode 3.1 in some places. So far the only difference against reality I have found is not covering the XIB resource format (which is generated by default) and sticking with NIB. This blog entry has good explanation of the difference.

If you are fan of dead tree-ware books, the official publication date is May 2008, so expect it any day :-).

Strangely enough, as of May 4th, the author’s web (The Big Nerd Ranch) does not really advertise its availability (yet)

Rogers, Bell and Net neutrality


I do not blog on political issues, but this one is kind of different.

Couple of weeks ago I received a letter from my ISP provider (Rogers Cable), stating that days of unlimited downloads are over. More or less. Rogers capped the monthly transfer depending on your subscription plan, which in my case means maximum 95 GB / month for sum of upload and download.

They started to monitor the traffic in December and will start charging for the transfer exceeding the cap in June.

After overcoming feelings of being cheated (after all, I signed up for “unlimited” service and that !@#$ ISP did change the level of the service unilaterally) and discovering there is probably no real alternative (I could not find reasonably priced ISP that would not be reselling Bell ADSL service), I started to think about what does this actually mean and what are the consequences.

If you have limited capacity resource (like bandwidth) and potentially unlimited demand, some measures must be taken. In ideal world – when the number of subscribers is optimal with respect to capacity and their behaviour is not trying to consume as much bandwidth as humanly possible – you may get by without restrictions.

In real world where some people are downloading movies in hundreds of gigabytes, this approach does not work quite so good. Limiting consumption of the bandwidth is the solution most providers end up implementing.

This can be done two way: transfer cap and traffic shaping. In transfer cap, ISP measures the total volume transfered. In traffic shaping the ISP goes after protocols that usually related with really high volumes and try to throttle them. Usual victim is Bittorrent, which is quite often used to download illegal copyrighted content in form of movies and music, as well as other Peer-To-Peer protocols used in file sharing.

It is not easy to choose between these two bad (from consumer standpoint) solutions to congestion problem. I am no way a Rogers fanboy (despite of – or because of – being their customer for almost 10 years), but I think that their solution is better one.

I do not download movies or MP3 from torrent sites, but I have two large issues with traffic shaping approach. First, who decides which traffic is being throttled and how ? Torrent is preferred way how to distribute large binary images of Linux distributions or VMWare appliances, and targeting torrents significantly affects the open source communities, which cannot pay for data bandwidth and host the downloads on sites like Amazon S3. These projects are put into same category like PirateBay just because they use same protocol – so this approach is violation of the presumption of innocence.

To make absurdity of the approach more obvious, this is same logic as if somebody would start dropping HTTP just because there are sites on the net that are providing illegal or dangerous content: viruses, exploits, pornography … For the argument that (unlike in HTTP case) most of torrent traffic is illegal (which is an assumption, because nobody has really good data), let’s have a look at email: assumably around 90% of all email traffic is spam. Why not fight the bad guys by crippling SMTP/POP3 traffic, if we use same logic ?

My second issue is that, once the traffic shaping is acceptable business practice, who guarantees that only reason for throttling is to (assumably) limit possibly illegal content and not e.g. hurt the service of competition providing e.g. VOIP services ?

Recently the whole issue of traffic shaping got lot of attention in Canada – read the excellent blog of Michael Geist. There are even plans to organize a Net Neutrality rally on Parlament Hill – see the – so if you are in Ottawa on given date, give it a thought.

So however I hate Roger’s cap, I have to agree that this time, they approached the problem correctly. Only two concerns: with more and more services moving online, the 95GB is definitely not enough. I am subscriber of MSDN/Technet as well as Apple Developer’s Connection and with updates, patches etc I can easily need 40-50 GB a month just for the downloads they provide. Also more and more audio and video is delivered online – I just checked the size of Movies folder in iTunes, containing only video’s of Apple developers series and few selected videocasts and it has well over 120 GB. Add using YouTube,, Safari books online and similar and the final number will be well above. Unless the monthly allowance will increase, we will run out pretty soon.

Second concerns is about reliability of the traffic data. I am not measuring my internet traffic, but quite often I think there may be pretty large gap between what I was doing online and what daily meter (available from Roger’s website) reports.

I think that what we in Canada really need is more competition in the telecom and ISP area. The comparison of what Canadians can get for their money to USA in data and wireless plans looks pretty depressing – and do not even try to compare with Scandinavia or some Asian countries. Unless there is real alternative to Rogers (other than Bell), there will be hardly any pressure on prices and services offered. Maybe we should think about opening the regulation of the telecom market and allowing more foreign competition during next election campaign ?

Oh, one more thing: Steve Gibson of Security Now! fame did excellent coverage of the issues network capacity and network congestion. I highly recommend to listen to this episode if you haven’t done so.