Thursday, October 12, 2006
Thursday, October 12, 2006 10:29:28 PM (India Standard Time, UTC+05:30) ( )

Last night I had stayed at the office until after 11:00.  Harish, the last one out before me had told the guard to follow me and make sure I got a taxi.   Tonight, the guard assumed the order was still standing at 9:30, following me down, despite our mostly 1 word vocabulary discussion “It’s OK, stay” – “OK” -- “I’ll be OK”  - “OK” – “Taxi OK, not problem” – “OK”.    The first taxi was driven by some guy who didn’t look Indian at all, pasty appearance in the dim glow of the green flashing LED’s of the battery powered Durga statue glued to his dashboard.    Having learned to keep any ancillary words out of my speech, I uttered “Hyatt, 100?”.  He stared back at me as if I wasn’t speaking his language.  The guard leaned in and shouted “Hyatt Hotel” followed by something that sounded like “giddyup-kyah”.    I said again “Hyatt, 100 rupee?”  The driver nodded in that charming Indian head-nod and I climbed in.   Only then did I recognize him as that guy from the strung out on meth/crack/heroin movie (Trainspotting?).   Red eyes, paan stained red teeth, covered in sweat, crazy hair. 

 

A moment later he turned to me and said “Hyatt, 150 rupee”.   I laughed, waved my hand as if to say I would get out here.  He said “OK, 120” and stepped on the gas.

 

He turned up the radio to an ear splitting loud, turning on the inevitable Hindi movie soundtrack song.   Off we went, racing down the not yet deserted streets,  not avoiding any potholes, chasing old women out of the way.

We hit at least 50 mph by Nikko Park, honking a little Maruti off the road as the singer sang “Kali kee aah mee  a deeyaa” to a soundtrack that seemed suited for a 60’s western than “The Fast and the Furious:Kolkata”.   

 

We took the big wide turn onto the East Metro Bypass, under the flyover, without slowing.   A couple of teenagers on a big old bike fell over as we raced by them.  A newer, white Ambassador tried to pass us.  My driver spat out the window at it and coaxed the last bit of speed he could out of his ancient taxi.   We won the race right at the turn to the hotel, cutting off the other car behind a lorry.

 

I will take the taxi drivers of India any time over a theme park roller coaster, especially the Bengali drivers.

 

Comments [0] | | # 
Friday, October 06, 2006
Friday, October 06, 2006 7:36:24 PM (India Standard Time, UTC+05:30) ( )

After an extremely hectic week I am leaving for a weekend in the Ghats.  I love technology and gadgets, but they have conspired against me this week.  After 12 hours a day in the office, I return to the hotel. There I have wireless internet, Skype for making calls, and a Blackberry delivering a constant stream of emails from the other side of morning. 

I think I have gotten a total of about 12 hours of sleep all week.  I hope this is a good thing and will allow me to sleep on the train.  Usually I wake up at each stop, then as morning approaches I keep waking up wondering if I have slept thru my stop.

Anyway, it is now 19:40 I am sitting in the waiting area at Chennai Central Railway Station, waiting for my train to leave at 21:15.  An older man has just sat down besides me and is leaning in close as I type this on the Blackberry.  We'll see if his eyes work well enough to read this.  <Pause> after a quick glance from me he got self-conscious.

This Munnar trip should be good for a number of reasons.  First is that I am travelling with my Chennai based team, sedond I am finally getting to Kerala and third, it is really feeling good to hit the road (or rails) after a long week of work.

Shawn

Comments [0] | | # 
Monday, October 02, 2006
Monday, October 02, 2006 5:24:58 PM (India Standard Time, UTC+05:30) ( )

Expect many posts about ny hectic schedule on Monday.

1- Did a spot for the local TV news station, see me on the 9:00 news.

2- run off to Mahaballipuram for a party with 500 long lost friends.

3- Film my first Tolleywood music video.

4- Race back to Madras to hear a speech by the Prime Minister, Manmohan Singh (I think).

My attention needs to turn to work, but I will post the details as soon as possible.


Shawn

Comments [0] | | # 
Sunday, October 01, 2006
Sunday, October 01, 2006 8:57:10 PM (India Standard Time, UTC+05:30) ( )
The technical problems with my hosting provider are finally resolved.  
 
I am in Chennai, back for another trip to India.  The trip got off to a bad start because I hadn't properly reviewed my tickets.   I was originally booked to fly out on Lufthansa, but changed to Singapore Air to save money. When the switch was made I and the travel agent missed that I was booked on a flight from LAX to Singapore at 1:05 AM on the 29th and a US Airways flight from Phoenix to LAX at 7:00 PM on the 29th.  Can't be on two flights at the same time.    I tried to get on a later flight, but couldn't.   I quickly packed and left a day earlier than expected.  
 
The flight over was uneventful, just a long sequence of gourmet food on the airplane.   I can't say enough good things about Singapore Airlines. They are a flying version of Singapore itself.   Clean, organized and courteous.
 
I was surprised to be met at the airport by Manju and Thomas from my Chennai team.  Thomas brought along his daughter Tess.   I had suggested that I not be met because it is a holiday weekend and there was no need to have someone interupt their weekend for me.   But it was a nice gesture at just the right time.   I was very tired and had this feeling of "Why am I here, couldn't I have just done a Video Conference."   Seeing them reminded me how important it is to spend time in person with the developers on my team.   It has been a year since I was in Chennai and more since I was in Kolkata.   A long time to be away from friends, even though we talk regularly on the phone.
 
More posts tomorrow on my itinerary and a report on my first day walking and touring around Chennai..
Comments [0] | | # 
Tuesday, March 21, 2006
Tuesday, March 21, 2006 6:21:39 AM (India Standard Time, UTC+05:30) ( )

A sad day, my favorite web application is shutting down at the end of the month.   Oddpost was, in my opinion, the best example of AJAX technology, from a time long before the term “AJAX” had anything to do with http requests.   In addition, Oddpost was the ideal company; small, down to earth, run by real people with a sense of humor.   I don’t blame them for cashing in and selling to Yahoo, but out of all the products and sites that have dropped out of existence, I will miss Oddpost the most. 

 

 

Comments [0] | | # 
Thursday, January 12, 2006
Thursday, January 12, 2006 7:30:28 AM (India Standard Time, UTC+05:30) ( Musings )

One of the things I missed the most about being without an iPod for 6 weeks was not having podcasts to listen to on my 45 minute commute to work.  Coinciding with my return to the iPod club was the release of a new podcast by Scott Hanselman, the author of my favorite blog Computer Zen.   The podcast is called HanselMinutes and is produced by Pwop.com, the people behind two other podcasts that I listen two regularly, .Net Rocks and Mondays.  

 

Aside from a dopey introduction by the Pwop recording guy Lawrence (what happened to Geoff Maciolek?  Geoff is the Rodney Dangerfield of podcasting, gets no respect from Carl,  Richard Campbell or especially Mark Miller), the HanselMinutes podcast is a very well produced show.  Pwop does know how to make a good sounding recording.   I was, however, surprised that Carl Franklin hosted the show and led the discussion.  I had expected it to be a one-man show, similar to Adam Curry and most other podcasts.  The result wasn’t disappointing, Scott was so focused on what he wanted that a couple of times he steered Carl in the right direction.

 

The show covered various gadgets and cool software tools (Blogjet, Xbox 360, Twonky) and ended with a technical problem that Scott or his crew has faced recently.   Today’s problem was an issue with caching ASP.Net and culture specific formatting. 

 

Perhaps I am a bit biased because I am a daily reader of Computer Zen, but this podcast is clearly on my favorites list.   For the developer or aspiring developer I recommend this podcast and my other favorites:  .Net Rocks (feed), Polymorphic Podcast and Software as She’s Developed.

Comments [0] | | # 
Wednesday, January 11, 2006
Wednesday, January 11, 2006 11:52:30 AM (India Standard Time, UTC+05:30) ( )

I finally picked up my Christmas present.  After waiting an extra couple of weeks to see if Apple would announce an upgraded version at MacWorld Expo this week (they didn’t) I picked up my new iPod.

 

 

A 60GB iPod video.   First song on my new favorite gadget:  Comfortably Numb, by Dar Williams.  Comfortably ideal to describe how nice it is to have an iPod again.  Amy gave my last one to her dad when she went to visit him in Fiji.  I fully supported her desire to do this, because I knew that this day would come as well.  6 weeks without one was painful but worth the wait. 

 

What does it say about me that the indescribable joy of turning on a new iPod for the first time bears an eerie resemblance to holding a new born baby.  The baby is definitely better, but the feeling of holding that iPod in my hands was similar.  (more on this topic soon).

 

Now I am complete.  My essential gadgets are all here: iPod video, Blackberry, Motorola RAZR.  On the weekends, throw in my dirt lovin’ Nissan Frontier and my Garmin Rhino 210 GPS and I am happy.

Comments [0] | | # 
Sunday, January 08, 2006
Sunday, January 08, 2006 10:44:39 AM (India Standard Time, UTC+05:30) ( Musings | Technology )

My Sunday night hobby for the past couple of months is to try and programatically solve the NPR Sunday Puzzle.   Each Sunday morning on Weekend Edition Sunday Will Shortz and Liane Hansen offer a puzzle.  I have been a fan of this for well over ten years, but recently started using it as a way to have fun programming.  Most of the recent puzzles have involved words of a certain type (such as job titles or animals).  Since I don't have a complete database of words in a particular category, my resolution of the Sunday puzzle has not been complete, (i.e. to the point of saying "The Answer is: x").   After 5 or 6 weeks of getting a range of possible answers they finally gave me a puzzle that could easily be solved.

I missed last weeks puzzle because I didn't wake up in time, but remembered on Saturday night just in time to solve it before waking up to the answer tomorrow morning.

Last weeks puzzle is:

From Ed Pegg, Jr., who runs the Web site mathpuzzle.com: The numbers 2, 4, 6 and 30 are the first four numbers whose names lack the letter "E." What is the 23rd number whose name lacks an "E?"

I had wondered what the significance of the 23rd number was, if I was more quick witted, that alone should have been enough of a clue to solve the first puzzle of the new year.

Instead, I decided to use T-SQL as the language for this, in part because I think that the .Net Framework has a function that does what I did in the function below, taking the fun out of it.

So, here is the T-SQL code.  I know it is choppy and clunky, and the variable names don't make sense, but it works really well (for numbers up to 4 digits long) and was very easy to write.  In addition, it is a nice example of recursion, which makes me feel good after reading this post by Joel Spolsky.  I noticed as I pasted the code into this post that I have done a number of implicit variable conversions, this code would not hold up well in a code review, but it got the job done.

create function fn_NumberToText(@value int) returns varchar(100)

as

BEGIN

-- ********************************************************

-- * CODE COPYRIGHT 2006, Shawn Swaner *

-- * http://www.shawnswaner.com *

-- * Published under *

-- * Creative Commons Attribution Share-Alike 2.5 License *

-- * No warranty, express or implied is provide by author *

-- ********************************************************

declare @name varchar(100), @valueText varchar(9),

@Left1 char(1), @RightOrdinal char(1), @RightPair char(2),

@RightTrio varchar(3), @Left2 char(2)

set @valueText = Convert(varchar(5), @value)

if LEN(@valueText) = 4

BEGIN

set @Left1 = Left(@valueText, 1)

set @name = dbo.fn_NumberToText(@Left1) + ' ' + 'Thousand'

set @RightTrio = RIGHT(@valueText, 3)

set @name = @name + ' ' + dbo.fn_NumberToText(@RightTrio)

END

if LEN(@valueText) = 3

BEGIN

set @Left1 = LEFT(@valueText, 1)

set @name = dbo.fn_NumberToText(@Left1) + ' ' + 'Hundred'

set @RightPair = Convert(varchar(2), Convert(int, right(@valueText, 2)))

set @name = @name + ' ' + dbo.fn_NumberToText(@RightPair)

END

if LEN(@valueText) = 2 and LEFT(@valueText, 1) <> '1'

BEGIN

set @Left1 = LEFT(@valueText, 1)

set @RightOrdinal = Right(@valueText, 1)

select @name = case @Left1

when 2 then 'Twenty'

When 3 then 'Thirty'

when 4 then 'Forty'

when 5 then 'Fifty'

when 6 then 'Sixty'

when 7 then 'Seventy'

when 8 then 'Eighty'

when 9 then 'Ninety'

end

select @name = @name + ' ' + dbo.fn_NumberToText(@RightOrdinal)

END

if LEN(@valueText) = 2 and LEFT(@valueText, 1) = '1'

select @name = case @value

when 10 then 'Ten'

when 11 then 'Eleven'

when 12 then 'Twelve'

When 13 then 'Thirteen'

when 14 then 'Fourteen'

when 15 then 'Fifteen'

when 16 then 'Sixteen'

when 17 then 'Seventeen'

when 18 then 'Eighteen'

when 19 then 'Nineteen'

end

if LEN(Convert(varchar(4), @value)) = 1

select @name = case @value

when 1 then 'One'

when 2 then 'Two'

When 3 then 'Three'

when 4 then 'Four'

when 5 then 'Five'

when 6 then 'Six'

when 7 then 'Seven'

when 8 then 'Eight'

when 9 then 'Nine'

when 0 then ''

end

return @name

end

go

-- test statement

-- select dbo.fn_NumberToText(1111)

-- script to solve the problem

declare @iter int, @match int, @text varchar(100)

set @iter = 1

set @match = 0

while @match < 23

BEGIN

set @text = dbo.fn_NumberToText(@iter)

if charindex('e', @text) = 0

BEGIN

set @match = @match + 1

if @match = 23

print 'The Answer is: ' + @Text

-- TESTING CODE -- print Convert(char(2), @match) + ': ' + @text

END

set @iter = @iter + 1

END

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Comments [0] | | #