this, is bluesmoon
bluesmoon is Philip Tellis, a
geek living in Sunnyvale, California,
USA and working with Yahoo!.
He can be reached at philip@bluesmoon.info and his PGP public key
id is 1F14 0E17.
bluesmoon is currently jetblue's online checkin is fairly easy albeit long and verbose
I'll be at...
- Revival: an All-Star Tribute May, 10 in New York
- Gypsy Jazz Caravan at Garage May, 10 in New York
- The Queen's daughter at Manhat May, 10 in New York
- Sleeping Beauty at Algonquin May, 11 in Manasquan
Going to...
- New York, NY, United States May, 10 - 13
- Cold Spring, NY, United States May, 12
- Bombay, India May, 15 - 24
- New York, NY, United States May, 25
-
No travel and accomodation for speakers
Looks like the linuxsymposium conference in Ottawa doesn't cover accommodation and travel costs for speakers. This could be a problem.Leave a comment -
strftime in Javascript
As a follow-up to my last post about Javascript date functions, I went ahead and implemented strftime for javascript.Leave a comment
Have a look at the demo at the link above, and download the code: strftime.js. It's distributed under a BSD license, so use it and give me feedback. Post comments here for now.The code is documented using doxygen style comments.
You should also check out Stoyan's time input library that lets you do the equivalent of php's strtotime function. -
Javascript date functions
I keep forgetting what I can do with dates in javascript, so this post is just a list of built in date functions. I've also seen a lot of sites that do some terrible things with javascript dates including trying to parse it out of a string, or using getYear(). Don't do that.Leave a comment
I've also seen sites that contain arrays of calendar month names and days of the week. This is locale specific, so do it only if you're willing to make the array easily localised.
To create a new date object:var d = new Date;
Note: don't type that into firefox/firebug while editing a post on blogger - they have a global variable called
var d = new Date('2008/04/22');
var d = new Date('2008/04/22 01:03:31');
var d = new Date(1208758100000);dwhich is used to save your post.
Also don't forget thenewkeyword. Without that you'll just create a string containing the current date.
After this line,devaluates to a string representation of the date which isn't very useful for anything since it's almost always not what you want. You really want to get various parts of the date out. There's a whole bunch of functions to do that:d.getYear(); // deprecated function to get year. don't use this
All of these functions return the value for your current timezone. To get values in UTC, add
d.getFullYear(); // get four digit year. use this
d.getMonth(); // get the month 0 - 11
d.getDate(); // get the day of the month 1 - 31
d.getDay(); // get the day of the week 0-6 (Sunday is 0)
d.getHours(); // get the hour - 0-23. Note the s in the function name
d.getMinutes(); // get the minutes of the hour - 0-59
d.getSeconds(); // get the seconds of the minute - 0-59
d.getMilliseconds(); // get milliseconds past the second - 0-999
d.getTime(); // get number of milliseconds since the epoch. integer divide by 1000 to get unix timestamp
d.getTimezoneOffset(); // get offset from GMT in minutes - note capitalisationUTCafter thegetin the method name. There are also equivalentsetmethods, but I've never needed to use them.
One useful method isparse()which takes in a string representation of a date and returns the number of milliseconds since the epoch for that. You can call this directly on the Date class.
A useful page for javascript date functions is quackit.com
I mentioned earlier that you should not usegetYear();. This is so because this method is not quite Y2K compliant. It is sort of compliant, but browsers don't implement it in the same way. The standard says that it should return the number of years since 1900, which means 2000 would be 100 and 2008 would be 108. Netscape/Firefox does that correctly (possibly because they defined the standard back in the day), but IE decided to 'fix' it by returning 4 digit years for anything past 1999, which means that 1999 is 99 while 2000 is 2000. Your code gets unwieldy trying to manage it, so it's best to just use getFullYear().
I'd always thought about writing an equivalent tostrftimefor javascript, but never got down to it. In my mind, it would be something that uses a regex with a callback function, and I'd use the unique property of javascript that allows one to call an object's methods like keys in an associative array. Basically something like this:var fmt = {'Y': 'getFullYear', 'm': 'getMonth', 'd': 'getDate'};I'll have to build on that sometime.
Date.prototype.strftime = function(str)
{
var d = this;
var ret = str.replace(/%([Ymd])/g, function(m0, m1)
{
return d[fmt[m1]]();
});
d=null;
return ret;
}; -
More dopplr woes
This time I tried to post a comment on the dopplr blog, and I got an error telling me to make sure Javascript and Cookies were enabled on my browser. They both are. Then I did a view source on the blog post page to see what their javascript was doing.Leave a comment
It looks like a standard wordpress set up with WPSpamFree 1.6 for spam handling. The WPSpamFree link is /wp-content/plugins/wp-spamfree/js/wpSpamFreeJS.php. This is a PHP file that's supposed to execute on the server and print out Javascript.
The problem is that this isn't executing on the server. Instead of printing out javascript, the server returns the PHP file itself. The result is that the response of the <script> tag is a file with a php content type, and contains php rather than javascript. The browser cannot execute it, and skips it. The result, is that the wp-comments-post page does not get everything it was expecting from the comment submit form, and throws an error.
The fix would be to either move this script to a location where PHP is executed, or to turn on PHP for the directory where the script is.
I've already notified them of the problem.
IAC, the post I was trying to comment on is this one: Some good Heathrow news.
Update: It's been fixed -
Updates from dopplr
The dopplr folks got back to me. Matt Biddulph replied to my last post and they also sent me an email.Leave a comment
Apparently the problem is unique to me, but they're working on a fix. -
हायवे गोमांटक
No, that's not a mistake... the name actually is written in Marathi, and only Marathi. In fact, everything at this Gomantak restaurant in Mumbai is written in Marathi. They obviously cater to a very niche clientèle, but what they serve will satisfy any gourmand's palate.Leave a comment
The menu consists primarily of fish based dishes with everything from paplet and surmai to halwa and rawas. The main item is the fish thali, with your choice of fish - depending on availability of course, and the true connoisseur of fish can tell the difference between the different varieties.
The thali is served with one medium sized piece of curried fish, the type of curry depends on the fish, a bowl of rice, two chapatis, a katori of sol kadi, and a little pickle made of shell fish. The size of the thali is a tad small, but immensely tasty. A side dish of fried bombil is just about enough to push the experience to the next level, but throw in some baakri as well to bring it home.
The fish thali is priced at Rs.120/-, and although it's rather small in quantity, the crowd at this restaurant at lunch time proves that it's well worth it.
The sol kadi is a little light when compared with other konkani restaurants I've been to, but still has about the right flavour. I'd suggest getting an extra glass though.
Apart from fish dishes, they also serve mutton, chicken and fish kheema.
Blues rates it:
Food - Pretty darn good
Service - Okay
Price - A tad uppish, but worth it
Ambience - None whatsoever
Overall - great lunch place
Recommendation - definitely go there, go there often.
Getting there:
Highway Gomantak is a little hard to find if you haven't been there before. It's on the service road parallel to the Western Express Highway in Mumbai at the Kala Nagar Area. To get there, turn onto the service road from the Kala Nagar signal, and go down alongside the Kala Nagar flyover for about half its length. The restaurant should be on your right hand side, with a small Marathi-only name plate. -
My year in towns and cities
I travelled a lot in 2007. Here's the list of places where I spent at least one night:Leave a comment- Mumbai, India
- Irity, KL, India
- New Delhi, India
- Sunnyvale, CA, USA
- Kochi, KL, India
- Portland, OR, USA
- Vancouver, BC, Canada
- Toronto, ON, Canada
- Mississauga, ON, Canada
- Montreal, PQ, Canada
- Boston, MA, USA
- New York, NY, USA
- Fairfax, VA, USA
- Gurgaon, UP, India
- Naggar, HP, India
- Karkala, KA, India
- Mangalore, KA, India
- Chennai, TN, India
- Napa Valley, CA, USA
-
Bachelor's Ice-cream
Leave a comment
Sweet dreams with chocolate and ice cream, and a little falooda on the side. At two a.m. On Marine Drive. That's Bachelor's. Nestled in a nook beside the railway tracks at Charni Road station in Mumbai, this ice cream joint, milkshake and sandwich is a regular hangout amongst the evening crowd, racing down Marine Drive for kicks, stopping at Bachelor's to cool down.
Bachelor's is an experience that every visitor to Mumbai must taste to believe. Their unique flavours cannot be found anywhere else.
Open from five pm to the early am, Bachelor's is a great place to stop whether you're looking for a falooda on your drive home from work, a late night dessert, or even a large snack. The full experience largely covers all three.
Start with a drive or a walk down Marine Drive to build up the apetite. Skip the beach to resist the lure of the bhelwalla. Cross the road towards the entrance to Charni Road station, and head north a bit, or if you're driving, just pull over and park where the guard leads you. A waiter will take your order at your car.
Begin with a club sandwich. You may want to split it between two people, because it's large, and we wouldn't want to go filling up those bellies so soon. Wash it down with a chickoo milkshake or a mosambi juice, and savour the blend of flavours... the best is yet to come.
Pick next from their fine selection of ice creams. Highly recommended are the green chilly, ginger and ginger orange flavours not found anywhere else. The green chilly in particular, is a
sensation to be experienced rather than recounted, but we all try. Imagine something cold, and mildly sweet, mildly tangy filling up your taste buds as you draw from it. Then imagine a split second later a fire shooting up your throat and out your nose. Actually, just try it. If it's too strong for you, indulge in one of their chocolate flavours.
They also offer other standard flavours of ice cream for those with no adventure in their blood.
Ice cream done, we come to the last course of the meal. Falooda. A large chunk of vanilla ice cream with sago seeds, vermicelli and a host of syrups all immersed in sweetened milk, but nay. My words can't do justice to the presentation and sensation that is the Bachelor's falooda. Have a large one. Split it between friends if you've already had too much, but don't pass it for later.
Finish off the experience with a final drive around Marine Drive and head home with a smile on your lips.
Blues rates it:
Food - Excellent
Service - Excellent
Price - Easy on the pocket
Ambience - Open air, sea breeze, what more do you want?
Overall - Definite all thumbs up
Recommendation - Go there, go there very often
Getting there:
Bachelor's is about 20 metres north of Charni Road station on Marine Drive. If you're travelling by road, look out for the shop on the left as you pass the Café Coffee Day on Marine Drive (heading south). If you're taking the train, get out of the northernmost part (heading towards Grand Road) of the station on the Marine Drive side, and walk in the direction opposite to traffic for a few minutes.





