10/2/12

St Pancras rail station and a clarinet adventure





Normally I travel with my climbing shoes - finding climbing gyms more interesting and friendly than 
a bar while traveling solo on business (I've never figured out bar culture - usually end up sitting around breathing someone else's cigarette smoke). This time I brought along a new travel companion - my clarinet. In spite of the added burden of carrying the darn thing around it proved an excellent addition - not only did I get to play some cello/clarinet duets with my cousin (whose Lonsdale road Victorian music room happens to reverberate at a perfect concert F) but I stepped briefly out of the role of 'traveler passing through' and into that of a traveler stepping in.

London station St. Pancras is one of my favorite rail stations in the world - not only is a relative rumored to be buried beneath one of the platforms, but the architecture is fantastic. It always feels like I've stepped into some old fashioned novel when I walk through the stone arches and across the worn platforms. High ceilings hang overhead and the echo of years of goodbye's and journey's begun hangs in the air with an almost palatable air. I can easily imagine my grandfather and great grandfather walking just ahead in a building like this - just before leaving London for the last time.

While standing in line to purchase my ticket to Nottingham my ear is caught by the echoing voices and live acoustics. When played by itself, a live room is the perfect space to play a clarinet. While dropping my luggage off to do some shoping I meet Hass behind the counter. When I ask about luggage insurance, not being used to leaving my buffet with a total stranger, Hass asks to see the instrument. Hass hasn't seen a clarinet before (he called it a trumpet) - I offer to play him a tune when I come back from shopping.

Later that afternoon I come back to St. Pancras and Hass and I begin to chat. He's worked for the railway for 17 years, 12 in the little left luggage room. He has a great oulook on life - amazing to find such optimism on the part of someone who works in a windowless room surrounded by other peoples luggage every day. Hass offers to trade me a cup of 'proper Indian tea' in return for a song. "for proper Indian tea i'd play three songs" I reply, and the deal is done. Hass brews me a lovely cup of tea (the secret he says is to boil the milk with the water for a moment - then take your tea with two sugars - a wonderful cup of tea). A proper cup of tea from a real mug, sitting momentarily sheltered from the mass of humanity that fills London ,chatting about life in Rhodesia with Hass - I've stumbled into one of those rare moments that makes the difference between floating through a foreign land, and actually visiting one.

The cup of tea ends, and I have 15 minutes to catch my train. I warm up the clarinet, and head out into the alcove. Only a few people are standing around now - muted voices bouncing around high overhead. I'll play three songs as promised for Hass. I always start Send in the Clowns low - I don't care much for the vocal version - but on the clarinet it usually works. The acoustics of St. Pancras are perfect - the low notes hang like heavy perfume in the air, while the upper register flits from floor to ceiling like hummingbirds. The clowns are followed by a bit of Mozart's clarinet concerto (third movement)- nice fast peppery notes punch through the echoes and join the birds. The last song is one of my favorites - perhaps because my classical teachers hated it so - I ease into benny's version of Moonglow and let the notes fly. Finally in honor of the train station, I play the intro to Rhapsody in Blue (which was inspired by a train ride - listen sometime for the rhythm of the train in the melody).

Hass and I shake hands, and part as friends. Next time I’ll play him some Brahms.

9/17/12

Build your own free iPad stylus

OK - not totally free - but pretty darn close.

Before buying a fancy stylus I wanted to try one out with my new iPad. A quick google search pointed me towards sponges (nearly any sponge will do as cellulose retains the moisture needed to be conductive) as the conductive material of choice - but i wanted to have a larger pen shaped stylus.

I ended up hijacking one of our sharpie markers with the retractable points and turning it into a pretty nice stylus by cutting a triangle shaped piece of sponge and stuffing it into the end - and trimming to shape.

After I had the point shaped to size I then took a paperclip - and bent the end so that I could hook it into the same space as the sponge. This is necessary to get an electrical contact going between my hand and the sponge stylus tip.

The result?

Tip of the stylus showing the sponge and tip of paperclip
The all important sponge - showing the corner I cut off to make the stylus tip
Stylus overview - showing the paper clip wrapped around the pen body and inserted into the sponge end



8/13/12

Getting started with Chrome Extensions

Creating a dynamic chrome extension




Upon hearing that iGoogle was going to be mothballed by the omnipotent google (What's happening to iGoogle) those of us who have come to rely on iGoogle to support a variety of widgets and gadgets were left scratching our heads. One of the recommendations from google was to create a chrome extension as a replacement for gadgets.

The obvious drawback to this solution is that it is exclusively a chrome browser solution - the other problem was that I didn't know how to do it - nor what the options were.

A couple of hours of dev work and the result was a fully functional store available chrome extension.

How does the extension look in practice? The extension  - when added to the Chrome browser causes a small icon to appear next to the "favorite star" in the chrome browser. Clicking on this icon spawns a small pop up panel - which in turns loads logsitall content. There are two ways to setup the extension - one simply adds an icon the the favorites (extensions) that appear when a new empty tab is opened in chrome - the other adds the icon to the tool bar. I chose the tool bar option.


I was ahead of the curve a bit - since I had already created a mobile (small window) friendly version of logsitall - which turned out to be perfect to this application.


How to get started building a chrome extension that loads external content

1. First step is to visit the chrome developer site: https://chrome.google.com/webstore/developer/dashboard

This is where all the action happens - you upload your extension code (via a zipped folder) and then configure the listing options. In addition to name and keyword you can also attach a youTube video link to show the extension in action (highly recommended - use cam studio to create simple screencast files and then upload them to youTube).

2. Then you are ready to create the basic elements of the extension folder: manifest, icons and popup.

manifest.json:

{
  "name": "LogsItAll.com",
  "version": "1.1",
  "manifest_version": 2,
  "description": "LogsItAll.com",
  "browser_action": {
    "default_icon": "L-icon.png",
    "default_popup": "popup.html"
  }
}

popup.html:


For the pop i cheated - instead of trying to call remote content using js - i just used a simple iframe:


iframe width=375 height=590 src="http://www.logsitall.com/m"

(poor man's js/ajax...)


After that you just have to create the icons that your extension will call and add them to the folder on your computer that contains the various files. Zip them and then upload the finished zip folder using the developer site.

The only other important point is that there is a $5 fee to become a "google extension developer" and gain access to the store. Compared to apple dev fee this is a bargain.

The result? Too soon to tell - I think it is unlikely that hordes will find and use this extension - however it will be a nice service for a few hard core logsitall users.

Reference links:
1. https://chrome.google.com/webstore/developer/dashboard
2. http://code.google.com/chrome/extensions/getstarted.html
3. http://snippetspace.com/portfolio/iwebkit/ (create mobile web apps)

Good luck and happy coding.