Back to normal

Posted 12-June-2008 by Miro Adamy
Categories: Mac

Tags:

So, after few days working diskless, I am back to normal operation mode. About time, we are late with last episode of screencast …

The copying of external disk went error free and took almost 5 hours (210 GB). Fortunately, the MBP was usable - I did not want to modify too many files, but it was perfect for Web research and writing in Google Docs.

After reboot, the TimeMachine decided that 85 GB needs to be backed up again. This seems like bug in TimeMachine, because I have not really changed much more than few gigs - 4-5 max during the few days.

Spotlight is also quite busy and completely confused - saying that I need to wait over minus two billion hours until it is done with indexing. That’s pretty long - or pretty fast, depending how you see it :-)

Diskless Macbook Pro

Posted 9-June-2008 by Miro Adamy
Categories: Mac

Tags: , ,

So, I have positive proof that the file system crash of last week was not a software problem in Leopard, but indeed caused by hardware failure. After restoring system from Time Machine, things looked pretty good - everything seemed to work. I was able to re-render the screencasts I have lost - I mean I have lost converted AVI files and MP4 files, not the “source” MOV files. I worked on Mac over Saturday and Sunday. Because my Time machine does not backup virtual machine images, I had even whopping 65 GB of free space :-). I saw a bit more of beachballs, but I thought (wishful thinking) it is because Spotlight is busy rebuilding index …

In some moment of bliss I have asked my son to get and build for me 250 GB external FireWire disk with this beautiful enclosure and on Sunday evening, I tried for the first time wonderful program Carbon Copy Cloner that duplicated the harddrive to external one, promising bootability.

On Monday morning, at customer location I tried to copy VMWare image from network. System froze with beachball and had to be powered off. Same result for the second and third attempt … with only difference that it did not boot back and hard disk started to make that weird clicking sound.

I brought it to Apple service center which confirmed the problem, took out the disk, ordered replacement part and asked me to come back tomorrow. That would cause a problem, as I am attending few meetings in Montreal in next 2 days and need my notebook with me and in working condition.

Fortunately, the bootable external drive trick worked perfectly. After power on, I need to hold Option key and select the external disk - and everything works just fine. I am actually typing this on my Macbook Pro :-). No observable difference in speed, the only annoyance is that I cannot really use notebook in train or anywhere where there is no power supply for the drive.

I am still amazed how flexible is the Mac hardware and how capable is the firmware. Being many years Windows user, before this, an idea of cloning disks and booting notebook from external hard disk seemed pretty far fetched. As they say in Germany - man lernt nie aus ….

OS-X near-death experience

Posted 6-June-2008 by Miro Adamy
Categories: Mac, lifehacks

Tags: , , ,

It happened on Wednesday afternoon. I knew something is wrong with my MacBook Pro immediately - when I saw semi-dark screen, unresponsive machine - even mouse cursor was frozen - and heard fans blowing full speed, making the strange, clicking noise coming from inside almost disappear …

OS-X does not freeze too often, but it can happen and as a matter of fact, I have seen it happen before during my almost two years with Mac, so I did not panic. As expected, the Alt-Option trick did not work, so all I could do was to force power off.

But then, after reboot and “bang” sound, neither the rotating circle nor the blue screen showed up. I mean the good blue screen, background color of booting OS-X, not THAT blue screen, of course. Instead, screen stayed grayish and showing No-Entry sign … And again and again …

At first I was pretty sure that the hard disk is gone. But after booting up from install DVD (hold C during boot) and running Disk Utilities “verify” and “repair” disk, it did not find anything wrong with it. It was - according to Disk Utility - perfectly good, healthy disk, which only boot stubbornly returned to the No-Entry sign with each and every boot attempt. It was obvious that I will soon have an opportunity to really test out the Time Machine restore capabilities.

Normally, I plug in the Time Machine backup disk every day after unpacking the notebook at home in my home office - and the magic of Leopard takes care of the rest. As Murphy wanted it, I had been working around the house and in the garden in last few days’ evenings, rather than in my home office where the backup disk is. So it happened that last time I had plugged the disk in was around Saturday night and all changes afterwards were not backed up. Bummer.

The system did not allow Archive and Install option (which copies user data away before install) - it was too little space left, so only option was erase the disk and loose last few days worth of data and changes. Most of the chnages was either stored elsewhere as well (Gmail attachmanents) or at least redoable (some rendered screencasts), but last day work was nowhere else :-(

The good fellas at Carbon Computing (my nearest certified Apple service centre) made me aware of the FireWire mode: you press T during boot and Mac makes the hard disk available as external FireWire device, which can be attached to another Mac and read from it as from any external disk. This feature is supported by firmware and does not need any system installed. I tried it and it indeed worked, but the damage to the file system must have been fairly large, because I could not navigate deeper into the home directory.

After I accepted that one and half day of work is lost, the reinstallation of the OS-X from scratch was very smooth and very fast experience - it took about 35 minutes. After booting up, system offered restore from TimeMachine and after another two hours, almost 180 GB of stuff was back on Macbooks harddrive. My Mac was almost exactly like on last Sunday morning .. The “almost” means that Time Machine does not quite restore every bit and piece because after system update check, Mac downloaded about 1 GB worth of patches from Apple side and required restart after install. The size of the patch indicates that it were most likely roll-ups of the updates from 10.5.0 t 10.5.3 - certainly more that could be missing in last few days - which would mean that TimeMachine does not really backup system files. I also had to re-enable root access and modify my /etc/hosts file to enter symbolic names for the VM’s.

Because I have left out the podcast from the backups, it was pretty annoying to get my iTunes subscription back to normal: the downloaded but not yet listened to podcasts all had exclamation marks, because the iTunes library file was referring to non-existent files, but - because they were in the list, it did not re-download them. I had to delete podcast, resubscribe and re-download the episodes. Oh, well …

I am now back up and running and without any lost files other than those who were lost because of my laziness to plug in the disk. I think I start to see selling point for Time Capsule :-). Time machine is still working and I was listening to loud fans for quite couple of hours while Spotlight indexed all restored content again.

I still do not know what caused the crash: I was doing lots of video re-encoding, so maybe overheating together with very little free space (I was twice close to 99.5% full disk). And maybe there is really something wrong with the disk.

I have read somewhere that people that went through the near-death experience often change their priorities and behaviour. This certainly true with me after this cold shower. My trust to hard disks (in general) is even lower than before - and in panic, I have already caught up with delayed backups of the home server to two separate external hard disks. I will be also setting up bootable copy of the Mac disk (using CCC) as soon as Yan builds for me 250 GB external FireWire disk - I do not want risk that the disk will die again .. And in the meantime, my plugging discipline will certainly be flawless ;-)

I have chatted about this with a friend and he asked whether I do not consider returning back to Windows, now when Mac disappointed me so badly and did let me down …

Well - combination of OS-X and Apple hardware is pretty solid combination, but certainly not as rock-solid as Apple marketing would like to make the world believe. I have just experienced a real-life proof that it can crash pretty badly. But I still believe that it is by far the best available option currently available. For variety of reasons.

First of all, the most troubles I had, was caused by me not having good enough backup system. Every system is only as good as the weakest link, which is in most cases the human part of the workflow. If I would have used Time Capsule or at least plugged the disk every day, there would be no loss of data, just about 3-4 hours wait until being operable again. Which is much less than I have spent any time while rebuilding Windows machine. With Windows it took me 2-3 hours to install XP  - with all three hundred twenty seven updates, thirteen reboots and lots of surfing to find latest drivers for all devices from vendor’s sites. And then usually at least one full day to reinstall development environments, java, Visual studio, Office, tools etc from scratch.

Secondly, I never had really good backups while working on Windows - mostly because doing backups was never as easy as connecting a hard disk. As result, I had much larger gaps between backups as nowadays. And considering how much work it was to selectively restore the data … To sum it up: if this would happen on Windows machine, I would probably loose week or more of data not 1.5 days and to be back operational would take at least 1-2 days, not few hours.

And third - while the OS-X was being installed, I was working on my old, beaten Fujitsu LifeBook - and I realized I how much I actually I miss the tools and overall user experience of the Macbook Pro.

On the positive side: now I know from the firsthand experience that Time Machine works (including restore) and I have learned couple of new neat features of Leopard. I never completely realized the possibilities of booting and running system from non-local disks. And I have now very good incentive to fix the broken automatic backups to Amazon S3 - at least as plan B until I buy Time Capsule …

DMCA for Canada ? Act now !

Posted 2-June-2008 by Miro Adamy
Categories: Business

Tags: , ,

I have got a letter from Online Rights Canada. I believe that what is about to hapen, may have pretty deep implications down the stream. Minimum thing I can do is try to help spreading the word.

Here is the message:

Dear Online Rights Canada Supporter,

We understand that the government will imminently introduce legislation to amend the Copyright Act - and it intends to push it through quickly. We at Online Rights Canada wanted to let you know what was ahead in the next few weeks, and what you can do to protect Canada from a new DMCA.

When we do get a copyright bill, we need a period to study the bill, and we need thorough Committee hearings that offer a wide range of stakeholders the opportunity to present their views to the Canadian government. We need to challenge Parliament to give provide oversight. If the current government tries to rush this bill through the Summer, we need to stop it in its tracks.

All the signs suggest that the bill will be a Canadian version of the American DMCA with a veneer of consumer concessions. The bill will likely include laws modeled on the DMCA instead of the approach adopted by earlier Canadian proposals. Concessions may include a time-shifting right and a format-shifting right, legalizing consumer use of the VCR and iPod after all these years. However, by protecting DRM at the same time, the government kills those consumer rights anywhere the content is locked down!

What can you do? Advocacy! Contact your MP - use the advocacy tools at http://www.CopyrightforCanadians.ca and the Facebook group, Fair Copyright for Canadians http://www.faircopyrightforcanada.ca/ to make sure Ottawa knows your views.

And get others to do so, as well - we’ll need a summer full of copyright activism to make sure that Ottawa knows that Canada’s copyright laws have to put Canadians’ interests first!

To start, take two minutes to send our first letter to MPs about the impending bill.

Just visit:

http://www.onlinerights.ca/get_active/copyright_for_canadians/

and start spreading the word to your Member of Parliament!

Thanks again,

Online Rights Canada

Mac Gems: VisualHub

Posted 1-June-2008 by Miro Adamy
Categories: Mac, lifehacks

I had this discussion with a friend where we both found out that there is surprising amount of very useful little apps and tools in Mac’s software world that people use on daily basis and which are worth of spreading word about. Here is first of the programs I did not know about few months ago - and today I barely can imagine working without them.

VisualHUB is simple but very powerful video convertor for Mac. It is simple in the user interface:

All you have to do is to drag and drop source files into the file area and select the target format and parameters. Then press Start and wait - surprinsingly short time. VisualHUB is very fast - the duration depends on the source format and the destination but  (unlike with iMovie) it does not take hours to render 20 minutes movie …

It supports all usual formats - MOV, MP4, MPEG as well as AVI and what I find very useful is suport for PSP. The VisualHUB is the easiest and most reliable way I have tried so far to transfer the DVD movie to the PSP - for the kids to watch in the car.

What we use it for to transform the source files for screencast generated by CamStudio on Windows (AVI) into the format that can be loaded into the iMovie (which happens to be MP4 with H264) so that clarity of screen is retained. We also use it to produce AVI version of the screencast playable on Windows Media Players - for the Windows users stubborn enough to resist installation of Quicktime or free players such as VLC. Before this, I have tried few other options, none of which really worked. VisualHUB does pretty good job at compression - the 420 MB MOV file got compressed into under 100 MB file AVI (with very acceptable loss of quality). The result of exporting the same MOV file into AVI with Quicktime Pro produced over 600 MB that was visually worse than the VisualHUB AVI output.

I am not an expert in video formats and video conversions (therefore it is quite possible that I could have done it better with some more digging with QT Pro) - and I do not plan to become one. Which is why the VisualHub is such a great tool for my needs.

Highly recommended - and thanks to Gabo who introduced me to this little gem.

Disclaimer: I am not affiliated or anyhow interested in sales or marketing of this product. The only reason I am recommending it is because I like it and find it useful.

Quote of the day

Posted 21-May-2008 by Miro Adamy
Categories: Uncategorized

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

Posted 19-May-2008 by Miro Adamy
Categories: Uncategorized

Tags:

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.

Recommended.

Fix for iDVD 08 crash after the start

Posted 15-May-2008 by Miro Adamy
Categories: Mac

Tags:

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/iDVD.app/Contents/MacOS/iDVD
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

Posted 13-May-2008 by Miro Adamy
Categories: Mac, lifehacks, podcasts

Tags: , , ,

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

Posted 12-May-2008 by Miro Adamy
Categories: Mac

Tags:

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 …