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] | | # 
Saturday, December 24, 2005
Saturday, December 24, 2005 1:35:37 AM (India Standard Time, UTC+05:30) ( Musings )

Wasting time before heading home for the Christmas weekend, I decided to see which Peanuts character I am most like.   I think many would agree that I fit this profile:

 

Lucy
You are Lucy!

Which Peanuts Character are You?
brought to you by Quizilla
Comments [0] | | # 
Saturday, November 12, 2005
Saturday, November 12, 2005 1:14:45 PM (India Standard Time, UTC+05:30) ( Musings )

Rubbing of name Michael M Woynarski from Vietnam War Memorial

 

Richard M Woynarski was born in 1946.  After enlisting in the US Navy he was assigned to VA-164, an A-4 fighter-bomber squadron embarked on the USS Oriskany.   In late 1967 the Oriskany was stationed off the coast of North Vietnam.  On October 16, 1967 his plane was shot down.  He was initially listed as MIA, later as KIA.

 

That is all I know of this man.   This morning I had never heard his name.   At lunch time today I went to Steele Park in Phoenix to see a traveling replica of the Vietnam War Memorial.  It seemed very appropriate to see the memorial on Veteran’s day.

 

I have seen the memorial in Washington DC.  Back in 1999 I was there in the fall.  The remnants of a hurricane were blowing up the east coast, and by the time I made it to the memorial a strong rain was falling.  For 20 minutes I slowly walked along the wall, alone in the pouring rain.

 

I don’t go to these memorials to mourn or remember anyone in particular.  In fact, I can find no evidence that anyone named Swaner has ever died in the line of duty.  Instead I go to remember people who I didn’t know who died for people they didn’t know. 

 

Today a volunteer asked if she could help me find a name.  When I said that I didn’t know anyone on the wall she suggested that I should do a rubbing anyway; to “show those on the wall that they are not forgotten”.    I chose a name at random.

 

As I look at the rows and rows of names my thoughts are focused on a rapid series of “what ifs”.   I look at a name and think “He would have been a school teacher”, “He might have been a great writer”, “He might have found a cure for cancer”.  My thoughts then turn towards the reality that this wall is a record of loss.   Of the 58,195 names on the wall, how many family and friends grieved and still grieved for their loss?

 

When I was in High School I wanted nothing more than to be a pilot in the US Air Force.   During my Junior year I borrowed my father’s Oldsmobile and drove to Hill Air Force Base for a recruiting open house.   I stood with a bunch of other teenagers in a hanger between two F-16 fighter jets.  After a stern warning about not taking pictures of the cockpit, we were lined up to climb inside one.  As I was about to climb the ladder, as captain asked how tall I was.  When hearing that I was 6’5” he said “Sorry son, the maximum height is 6’3”, you are too tall to fit in the cockpit.  That dream died that day.

 

A few years later I walked into an Army Recruiting office.  I had every line on the enlistment paperwork filled out except for the signature line.   Under intense pressure from the recruiter I got feedback from my parents and a professor.  Their influence convinced me to back out.

 

Then, two years after that, at a college job fair I asked the Navy recruiter for the enlistment forms.  He asked my major and when I told him that I was studying Philosophy he said the Navy only had openings for doctors and engineers.

 

I don’t know why I never talked to the Marines, but I think that if I had I would have signed up.   I went to see the movie “Jarhead” and it seemed so natural to me, almost familiar.  The only thing more powerful than the urge to join up now, before I turn 35 in January and become ineligible is the responsibility and love for my family.  As much as I want to sign up and request service in Iraq or Afghanistan, they are far too important far too important and they are my primary responsibility now, not my country.

 

I have often wondered why I have such a fondness for the military and a deep respect for those who serve, yet am so opposed to war.  The answer lies in the rows of names on a wall and the rows of crosses in a cemetery.   It brings to mind a favorite poem:

 

In Flanders Fields
By: Lieutenant Colonel John McCrae, MD (1872-1918)
Canadian Army

IN FLANDERS FIELDS the poppies blow
Between the crosses row on row,
That mark our place; and in the sky
The larks, still bravely singing, fly
Scarce heard amid the guns below.

We are the Dead. Short days ago
We lived, felt dawn, saw sunset glow,
Loved and were loved, and now we lie
In Flanders fields.

Take up our quarrel with the foe:
To you from failing hands we throw
The torch; be yours to hold it high.
If ye break faith with us who die
We shall not sleep, though poppies grow
In Flanders fields.

 

I am certain that Richard M Woynarski loved and was loved.  Now he lies in St. Patrick’s Cemetery in Hartland New York.  His life was cut short after 21 years.   Now, years later I look at his name and wonder what he would have become.   What experiences he was prevented from having.     It was an awful fate that he was killed on an October day 28 years ago.  Maybe it is fate that I tried three times to join the military and never did, but instead I have the freedom to live the “what-if’s” and experience the joys and sorrows that Richard and so many others never had.  It is the least I can do to honor and respect his and their sacrifices.

 

 

Comments [0] | | # 
Wednesday, November 02, 2005
Wednesday, November 02, 2005 11:53:24 AM (India Standard Time, UTC+05:30) ( )

I am testing out Blogjet, a blog editing program.  Seems to work very well so far.

Railway Platform at Egmore Station, Chennai
The platform at Chennai Egmore station on a slow Friday night.

First view of the Western Ghats, from the train.
I passed time in the morning reading, but when I took a break I got my first look at the Western Ghats out of the window.

An elephant on the streets of Madurai
You can see the sores on the side of this poor elephant.  It is considered good luck for an elephant to pat you on the head with its trunk.  As compensation for this service you are expected to hand a coin to the elephant.   The elephant, using its trunk, then hands the coin to the driver.  The driver of this elephant is obviously hard up, he is working this poor elephant past any point of decency.  Very sad.   This is, unfortunately, very consistent with all episodes of animal treatment I encountered in India.

 

Comments [0] | | #