Build there, check status everywhere

I've been using the iPhone SDK since its original release way back in March. Many frustrating moment in the beginning but the recent beta 7 and beta 8 release proved to be ready for prime time. Apple has added many helper classes or helper methods to classes to make it far easier to work with the UI components, which is by far the most frustrating things I encountered. I am still having problem wrapping my head around the idea of Interface Builder but since the apps that I am building do not involve very complex UI, I just hand coded all the UI instead.

To illustrate, the original iPhone app idea I had that I started developing using the original SDK is a mobile application for Mingle. The application would consist of a series of table views showing projects, cards, and card details, along with some network code to talk to the Mingle server through REST API. At that time, progress was slow because of many factors. First, learning Cocoa/Cocoa Touch API and Xcode at the same time was tough. Second, the Cocoa Touch API was a bit 'primitive' in the beginning. What I mean is that while the API provides all the necessary hooks for developers to create an iPhone app it does not provide many pre-build components, making it difficult and required lots more work from developers to re-create the look and feel of the built-in iPhone apps.

I was so put off by the initial experience that I skipped beta 4-6 and did not open up Xcode until last weekend. And what a refreshing change with beta 7! Now it is straightforward to make an app that looks and feels just like an Apple's one. I was so fired up that last Sunday evening I decided that I would try to create an app for an idea that one of my fellow ThoughtWorker suggested to me. Instead of days of tearing my hair out and got no where, I was able to create a almost features completed app within hours, using beta 8.
So what is this app? It checks the build status on the CruiseControl server. Just like CCTray (Windows) or CCMenu (OS X), it allows users to monitor their software build status. Following the convention, I am calling it CCPhone. The app isn't more complex than the Mingle app but the fact that I was able to almost match the productivity I normally get on my Windows development environment means that I was excited about working on the app rather than dreading it.
Now here are couple of screen shots:

  • Fix the build time being 1 hours off (probably day time saving bug)
  • Better status icons
  • Create application icon (currently it uses icon from CCMenu)
  • Finish coding the 'Force Build' functionality
  • Add startup screen bitmap (so it won't be just a black screen)
  • Add auto detect of CruiseControl server (Java, .Net, or Ruby)

Read and post comments |
Send to a friend

PowerShell rescues wedding photos

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.

Read and post comments |
Send to a friend

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: 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

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.)

Read and post comments |
Send to a friend

Website Built with

Up ↑

%d bloggers like this: