The recent unveiling of the Apple iPad is portent for the evolution for Mac OS X towards the iPhone OS. Existing iPhone apps will run on the iPad, with presumably the same App Store model. Apple has also (carefully, purposely) not included Adobe Flash support for the iPhone and now the iPad. This implies that Apple is deadly serious about creating a third party developer ecosystem that is tied to its own SDK, licensing, runtime and payment mechanism.
While Webkit and Safari remain at the forefront of web, HTML5 and Javascript support, given the evolution of Apple devices and custom interface gestures (e.g. pinch, expand, hold, etc.) as well as new revenue models through App Store downloads and in-app purchases, there is an emerging Dilemma for software developers and small companies to consider.
Do you want to be in the cloud or on the device? Read the rest of this entry »
Posted on 30th January 2010 in ideas, insights | No Comments »
For most people, backing application databases is usually (touch wood) a one-way operation. You take your precautionary measures, employ some kind of hosted or scripted backup solution, and hope that you only infrequently, if ever, have to restore from an old database.
But, what if you want to take a database snapshot at any time, keep a list of such snapshots and restore at will from any of them at any time? And you want to do it from the UI? Sounds far-fetched?
Here is one scenario.
- Your sales guy has lined up multiple demos for your app and he wants to tailor the data and demo aspects for each client.
- Your dev team is too busy to spend time crafting a whole new admin console just to make a whiz-bang demo.
- ssh? mysqldump? redirect output? >, < #@*?
With Rails and Rake, here is how you can make your sales guy happy and get him to buy you some Mai Tais. Read the rest of this entry »
Posted on 7th January 2010 in hacking | No Comments »
Some people love the drop-down, drill-down fly-out menu, which is now working its way into the official jQuery UI code-base.
The menu looks great, but is a bit tedious to construct. In fact, its downright onerous for the railszers used as we are to select_tag and options_for_select.
Ruby to the rescue!
The rails-jquery-dropdown helper generates the drop-down HTML markup, places menu items and values and optionally sub-menus using a passed-in Array, and wires up the Javascript behavior using jQuery.
Get it from GitHub:
http://github.com/dkeskar/rails-jquery-dropdown
Posted on 22nd November 2009 in hacking | No Comments »
The TiE Oregon event on Unfolding News was a frank and insightful discussion anchored by newspaper veteran Peter Bhatia and news entrepreneur Steve Woodward.
News about newspapers is either increasingly dire, or dramatic. The list of defunct newspaper continues to grow. Online, a news mogul mulls withdrawing news content from the Google index. Sitting face-to-face and talking with thoughtful people with real stories from the trenches quickly brings into focus the salient issues.
Here are some of the key points from the discussion. Read the rest of this entry »
Posted on 14th November 2009 in insights, media, thanks | 1 Comment »
In some cases, it becomes necessary to have additional attributes associated with a many-many relationship.
This is typically true of “has_and_belongs_to_many” associations which end up mirroring some kind of “membership” between the joined models. For example, a library system might track borrowing of books by patrons, with extra attributes for return dates and accrued fines.
The Django guys have a handy example about musicians and bands with extra attributes such as the membership role and date of joining. In my case, I needed to track sharing status of Photos across Photosets.
AirDB now has support for such join table attributes. Its a bit of a hack, in the interests of time, code size and abstraction concessions. The new things, which make it all possible include:
- An optional argument to Migrator.joinTable()
- DB.execute(sql) to allow tweaking an existing join table.
- Associator methods: setAttr, findAllByAttr, countByAttr, getAttrVal.
Here are some actual code excerpts (in the Photoset model) Read the rest of this entry »
Posted on 13th November 2009 in airdb, hacking | 2 Comments »
I stumbled upon jQuery when it was still in its early stages when all it did was offer powerful CSS and regexp style selectors. It immediately made DOM manipulation from within JavaScript easy, simple and reliable.

Within a few months of my discovery, jQuery had fixed cross-browser issues, and actually made it the choice for ensuring cross-browser support.
Here are some of the things that led me to consistently choose jQuery over Prototype, even if it meant eschewing the Rails/Prototype coupling and doing things the hard way.
- CSS-style and RegExp selectors.
- Light-weight – smaller file size, faster download, quicker load.
- Plays nice with others - jQuery.noConflict();
- Many powerful mechanisms for traversing and manipulating the DOM.
- Queue up onload logic from multiple places with jQuery(document).ready()
- Convenient call chaining - jQuery(‘#thing’).doThis().that().more();
- Extensibility and lots of plugins.
- Excellent, fine-grained AJAX support.
With such features, it is no surprise that the jQuery has evolved into a thriving, distributed ecosystem providing innumerable plugins and UI and effects frameworks on top such as jqueryUI.
Thanks to all the contributors who make it happen.
jQuery("#resig,plugin.writers,.contributors").thanks();
Posted on 11th September 2009 in thanks | No Comments »
People who earn a living writing software tend to describe themselves (and be described) in myriad different ways. Whether in blog posts, job boards, business plans and discussion forums, a few distinct terms and usage patterns emerge.
All too often, names and labels end up defining, more than just denoting something. Perhaps Shakespeare was being ironic when he gave the quote about roses for Juliet to say, who then suffers so famously. Most programmers would agree that it is better to have meaningful variable names. Why then, should we not give careful considerations to how we describe ourselves? Read the rest of this entry »
Posted on 10th August 2009 in investigations | No Comments »
Today I got a really cool poster for the upcoming Iron Man sequel, which shows the Iron Man Mark 1, 2 and 3 models.

Iron Man Mark I, II, III and IV
As a kid, I was not a big Iron Man fan. I did like the movie, and I had always liked the way they picked that old song for the movie theme. (What’s your FlixIQ on that?)
But to me, the poster clearly showed product evolution in action. You only have so much time, limited resources, and few friends. You build what you can build to break out. As long as you survive, you can make improvements. But you have to keep testing and making refinements, before you get that super-cool and powerful product. It worked for Tony Stark, and it is a good visual for product evolution.
Posted on 3rd August 2009 in ideas, insights | No Comments »
Give the Clue, Flix I Cue. That’s FlixIQ. And it is now live at http://flixiq.com
If you have not yet clicked to see for yourselves, here is some wordiness.

FlixIQ lets you cue a video clue to create and share quizzes. We are talking video clues here, which means movies, music, sports, or anything where images flickering 24 times a second (a.k.a flix) trigger some memory or mental connection.
So, show off your total recall by answering those questions. If that’s too easy for you, stump others by finding a telling scene, and create tough challenges for others.
Verdomme, dat is kicken.
Posted on 2nd August 2009 in hacking, ideas | No Comments »
Late in February, at the Recent Changes Camp, I noticed some familiar faces and so walked into the Calagator Hacking session, hoping to spend a few hours learning and contributing to the code.
Alas, I was ill-equipped, lacking git. I had heard several people evangelize git, hold training sessions and in general rhapsodize about it. All the cool kids were using it. For several time and efficiency reasons, I had put off switching to git. Meanwhile, I was dealing with the practical annoyances, since many of my svn:externals were deserting to git repositories, forcing me to download tarballs.


So that day, with some help from some of the friendly Calagator folks, I got myself git. From there it was a short step to using github, and short time before I switched multiple client and project repositories to git.
As a result, my coding workflow has improved tremendously.
Sometimes, we need a nudge to stop putting things off and start doing something that improves our lives. And community meet-ups such as RCC, BarCamp, and OSBridge, are great at connecting and catalyzing people to do just that.
Thanks to all the great folks who infuse Portland with this community spirit.
Posted on 30th July 2009 in thanks | No Comments »