One of my friend reached out to me last week for help. The photographer she hired for her wedding had gone bankrupted. Since she has not gotten the album now she can't even get her wedding photos in either prints or digital form. All she has access to is the photographer's web site where the people can order prints from. She was hoping that I can somehow retrieve all the photos (~1220) from the site so that at least she would have digital copies of her wedding photos.
After poking around the site a bit, I found out that I was in luck. Sort of. All the photos are accessible but only in low resolution (500 x 366). But more importantly for me, the site developer had opted to have a nice AJAX interface and for some reason decided to include all the image URLs in the page!
So a plan of action quickly formed in my head:
1. Download the page source
2. Extract the image URLs from all the HTML/Javascript code
3. Download all the images, one by one
Initially I want to try out Automator on my Mac and see how easy it would be to do this, since this is exactly the type of repetitive tasks Steve Job told us Automator is perfect for! Unfortunately after poking around for 30 minutes, I quickly came to the conclusion that Automator is woefully inadequate for this task. So I turned to PowerShell on my Windows VM instead. Having used PowerShell 2.0 CTP a lot in my last project, I was able to quickly develop a script that extracts URLs from the page source, download the file, and save it to disk. In fact, the most time consuming part is to figure out the regular expression for URL extraction!
From start to finish, it took me around 90 minutes to get all the photos downloaded. If I didn't waste time with Automator and better at regular expression I think I can do it in 15 minutes!
Now my friend can have her wedding photos. She may not be able to print them out, but at least she can view them on a computer screen.
Tech book on Kindle
I met Brian Donahue at ALT.NET in Seattle a couple of months back, and earlier this evening he tweeted that he was curious how well code in PDF would display on the Kindle. So I replied and told him I'll try it out and show him the result.
The process of converting a PDF to Kindle format is very simple. Since I am at my computer I don't need to send the PDF to my Kindle wirelessly, so I emailed the PDF (5.6MB) to my 'free' Kindle email address: alexhung@free.kindle.com. I received back the converted .azw file (2.6MB) from Amazon within a couple of minutes. I copied it to my SD card, popped it into the Kindle, switched it on, and there it was right at the front page.
So here's a screenshot of the original PDF taken from Preview.app:
And here are how the roughly same page looks on the Kindle:
As you can see the colouring and the code font are gone, obviously, the line-break is off and the download links are gone too but these are to be expected. But overall, I am impressed by the quality of the conversion. The text is properly converted, i.e. not being displayed as a bitmap image. Even the table of content is navigable (it doesn't show up as in the Kindle menu though).
Despite the good quality, I am still not completely convinced the Kindle is a good way to read tech book. Simply because there is always a lot of flipping back and forth when I read tech book, especially reference books, and the Kindle page by page flipping is way too slow. But for regular PDF book, I think the Kindle works just fine.
(Note that I took the photos indoor with flash, at ISO 1600 handheld. Even with image stablizer on, there are still some handshakes.)
Canadian Grand Prix
The video cannot truly convey how fast and how loud these F1 cars really are!
Cooling down
Missus H. and I ate at a nice restaurant near Square Victoria called Bistro Boris. Believe it or not, the drink she is drinking is a lemonade!





