Skip to main content


Showing posts from 2012

Window Management Goodness for OS X

Tristan Hume has an excellent article on improving window management in OS X, using Slate . Well worth the time to read that and configure Slate to your liking. I'm already feeling much more productive, all without spending on window management software - Slate is free! Here's my .slate configuration file .

Google Maps, Heatmaps and Earthquakes

The US Geological Survey makes available a small dataset containing the M1+ earthquakes from around the world in the past 7 days . I used this data along with the heatmap visualization layer offered by the Google Maps API to present the earthquake data as a heatmap. Check out Worldwide M1+ Earthquakes, Past 7 Days . One caveat: due to cross origin issues, I am hosting a local copy of the data rather than getting it live from the USGS.

Fun With Google Maps

Ever wondered what's on the opposite side of the world for any place? Then check out the Opposite Of The World . It's a "Hello World" exploration of the Google Maps JavaScript API that I wrote for fun. You can scroll and zoom through either map on the page and the other map will show you the opposite side of the world. It's quite basic now but I'm going to add markers and other overlays to make it more fun. PS: You might be surprised to know that Malaysia, is on the opposite side of Ecuador!

Raspberry Power

After sitting on the sidelines of the Raspberry Pi revolution for a few months, I recently picked up a model B from Newark . (There were a 100 units in stock a few days ago but as of this time, they are showing 0 in stock.) I wanted to complete the accessory setup with minimal wires and maximum portability. Newark offers a host of suggestions for each accessory but I decided to get parts separately. Here's the setup I chose: SD Card: An old Patriot 4GB SDHC card but Fry's has a Samsung 8GB micro SDHC card (with the SD adapter) for $4.99. OS: Raspbian “wheezy” available from the Raspberry Pi downloads page . Keyboard/Mouse: The cheapest wireless keyboard/mouse combination at Fry's which happened to be an iConcepts 2.4GHz Wireless Keyboard and Optical Mouse for $14.99. The dongle that connects to USB is tiny! Wi-Fi: I decided to skip the wired interface and instead got the Patriot Mini Wireless-N USB Wi-Fi adapter for $14.99 at Fry's. The adapter is quite small (

Building QuantLib on OS X Mountain Lion

Here are the steps to install QuantLib , a free/open-source library for quantitative finance, on OS X Mountain Lion: Install MacPorts . Install Boost using MacPorts by running this command: sudo port install boost This will install Boost and its dependencies under /opt/local . Download and extract the QuantLib sources . Configure QuantLib by running: ./configure --with-boost-include=/opt/local/include --with-boost-lib=/opt/local/lib/ Run make , followed by sudo make install .

Future Proofing

I am always disappointed to see web programmers code pages which display messages like the one below. Safari 6 is the latest (beta) release. ING can do better, especially if they are the "rebel with a cause" - see The Orange Code: How ING Direct Succeeded by Being a Rebel with a Cause .

Battle lines for HTTP/2.0

Over the past month, several interested parties have revealed their expressions of interest regarding the proposals for the HTTP/2.0 standard. Under consideration are primarily the SPDY and HTTP Speed+mobility proposals. The battle lines have been drawn, and as usual Microsoft wants to push their own agenda. There's also an interesting debate about whether HTTP/2.0 should always use TLS.

Windows 8 - Delete Progress Dialog

Windows 8 has a fancy delete progress dialog window for long-running delete operations. It shows: the number of items being deleted, percentage complete, instantaneous speed of deletion (items/second), a graph of historical speed of deletion for this operation, estimated time remaining, and items remaining (count and size) Get your copy of Windows 8 here: Microsoft Windows 8 Pro Pack 5VR-00001 .

HTML5 Test - Safari on iOS 6

Safari on iOS 6 continues to improve on the HTML5 Test . With iOS 6 Beta 2, Safari scores 360/500. Major areas lacking are: Video subtitle support Drag and drop (probably intentional on the iPhone) Microdata WebGL 3D context Filesystem (again, probably intentional) IndexedDB Access to the webcam Web notifications Full screen support (not really applicable to an iPhone) For comparison, here's Safari on iOS 4 from over two years ago.

Objective-C Literals

Mike Ash has a really good article on Objective-C Literals . Good to see that we can finally have some abbreviated syntax for boxing, and array and dictionary literals. The syntax makes it very much like JSON. Waiting for these changes to appear in Xcode.


If you are using a Mac with a small-ish SSD these days, there's a good chance that you are running low on disk space. A fair bit of an OS X install is multilingual files and if you are using just 1 or 2 languages, you could get rid of the language support files for all other languages. Enter Monolingual , a tool which cleans up all the languages that aren't of interest. On an OS X Lion install, that's worth at least a couple of GB. Monolingual can also remove files for architectures that aren't in use (e.g. getting rid of ARM and PowerPC files on an Intel Mac. Download Monolingual here .

Employee Stock Options

Having gone through the CS193p course , I decided to build a simple iOS app and take it all the way through to sale (for free) at the Apple App Store. Turned out to be a pretty painless process and my app is now live on the App Store . The app tracks the value of employee stock options using live stock data from Yahoo! Finance (retrieved via the YQL data table ""). Here are a couple of screenshots of the app:

Fetching Stock Data From Yahoo For iOS Applications

Yahoo! provides a great service called Yahoo! Query Language (YQL) which provides a SQL-like interface to a whole bunch of Web services. YQL queries can also be performed via REST. A wide range of services can be accessed through YQL including Yahoo! Finance . A convenient way to play with YQL and explore the available Web services, is to use the YQL Console . The bottom right of the console lists all the data tables, grouped by provider. (Be sure to click "Show Community Tables" to view all the available tables.) The yahoo provider includes the data table . This table provides access to stock quotes from Yahoo! Finance. As an example, here's the YQL console showing a query for stock data for AAPL . The console helpfully shows the REST URL for the query at the bottom. Armed with the REST URL, it is trivial to write code in Objective-C/iOS to fetch quote data. Here's some code that takes in an NSArray of ticker symbols (NSStrings) and returns a

Arctic Woolly Bear Moth

The Arctic Woolly Bear Moth ( Gynaephora groenlandica ) is a fascinating creature. It is a moth that is found in the Acrtic circle. As a caterpillar, it emerges in spring and feeds on leaves during the short Arctic spring. Towards the end of spring, when temperatures start to drop, the caterpillar slows down its metabolism and practically freezes. It reawakens the next spring to repeat the cycle. This growth-freeze cycle continues for 7 to 14 years ! After a decade it spins itself a cocoon and then finally emerges as a moth. BBC's "Frozen Planet" showed this moth on episode 2 . Here are a few pictures of the caterpillar and moth from the show.

Amazon DynamoDB

Amazon has a added a new offering to AWS: Amazon DynamoDB . This is a fully managed NoSQL database. One of the most interesting items to catch my eye was this: "All data items are stored on Solid State Disks (SSDs) and are automatically replicated across multiple Availability Zones in a Region to provide built-in high availability and data durability." Does this mean that Amazon is now the largest owner of SSDs? I wonder who they buy from. Amazon's pricing structure for this service is a little weird. They have introduced the concept of "Write Capacity" (one write per second for items of up to 1KB in size) and "Read Capacity" (one strongly consistent read per second or two eventually consistent reads per second of items of up to 1KB in size). Why not just define pricing in terms of data reads and writes per second per KB? With the added bonus of Amazon Elastic MapReduce (EMR) integration, this should be a useful service for all NoSQL users.

Speed Test

Some speed test results on my Comcast connection after enabling their "boost". Comcast AT&T 26.16Mbps download, 4.12Mbps upload

Raspberry Pi

The Raspberry Pi is a credit-card sized $25-$35 ARM GNU/Linux computer that can be plugged into a TV and a keyboard. Here's a picture of the connectors on the device. The device is stil under development but here's a rendering fo what it will look like. Should be an interesting alternative to Arduinos but make take a while before it has a good community around it. There's already a lot of interest and activity on the forums . Looking forward to being able to purchase it.

10 Years of Blogging

Hard to imagine that it has been 10 years since I signed up on Blogger and started blogging! My first post, which has since been moved to a different blog, was on "War and Peace" and Altavista's Babel Fish. Surprisingly the original link to Babel Fish - - still works and redirects to Yahoo's Babel Fish . Yahoo! Babel Fish

Windows 7 on VirtualBox: Random Freeze

Running a Windows 7 guest via VirtualBox on OSX Lion, I noticed that the guest VM would periodically freeze up. The freezes occurred once every few minutes and would unfreeze within half a minute. It was quite annoying and after many months of back-and-forth on the VirtualBox forum, it seems like there is a solution . The solution is to use the Chipset PIIX3 (instead of ICH9) in the virtual machine's motherboard settings