Friday, March 30, 2007

Transatlantic with Google Maps

Ever wondered what Google maps would do if your route spanned water bodies. That's what we precisely did today and discovered some amusing things. We entered Cleveland,OH to London,UK and Google Maps did plot us a route across the Atlantic.

And how exactly were we supposed to cross the Atlantic. SWIM ...LOL
And how long was this going to take ... Only 29 days 17 hours.

Afer a hearty laugh, we sat down to dig a little deeper. It seemed to work only from a destination in US to select destinations in Europe across the Atlantic. We tried South America, Europe, Australia, Asia with no luck. Another thing we observed was, a transatlantic "swim" would always take you along the same path in the Atlantic as shown by points 36 and 38, irrespective of the source and destination. Thats how the algorithm seems to work.

This means a traveler from Miami,FL to London,UK will have to go to Newyork, swim across to France and then cross the English Channel. haaa haaa.. God help the guy !

BTW, have your swimsuit ready to plunge into the frigid, shark infested Atlantic waters with Google Maps.

Saturday, March 24, 2007

Life Savers [ Google Bookmarks ]

With millions of sites and gazillions of web pages, it is sometimes hard to land on the perfect page you are looking for. Once you find it, any sane user would be sure to bookmark it(add to favorites).

But the increasing dilemma users like me are facing is how to consolidate everything that has ever been bookmarked. Most of the time I end up emailing myself all the links I have discovered so that they are accessible to me at a later time.

Enter Google Bookmarks... and life is a lot better
Login to your google account and viola all your bookmarks are there . BTW you have to have Google Toolbar installed to access the bookmarks feature, which takes only a couple of minutes to download and install.

You can create labels to organize your bookmarks.It will also allow you to import you exising browser bookmarks. The bookmark organization page allows you to save some comments for each of the links which is kinda cool.

But the last time I checked, It was still missing a lot of good to have features which might be coming in future upgrades of the toolbar. You cannot nest labels right now. Once you add a bookmark, you cannot push it to a different label without actually removing it and re adding it. The online organization page is also rudimentary at best. Given google's fixation for drag drops, may be the page should feature a drag drop interface to reorganize bookmarks.

del.icio.us is another great place to store your bookmarks and extensions are available to use it from the comfort of your toolbar. A lot of other websites have popped up with similar concepts but I believe we still have a long way to go...

Saturday, March 17, 2007

Sand Dunes : Namibia

Nature never ceases to amaze me. Look at these 12000 feet vistas of sand in Namibia. You are sure to gape in awe and wonder at the wonderful artwork of nature.


I first took notice of the mammoth size of these in the Where the hell is Matt? video. Then yesterday a photo of the dunes popped up on BBC photo section.

if using firefox, google map image of Namibia will be displayed
in the div below

la natura, li saluto !

Image Courtesy : Wikipedia and BBC

Friday, March 02, 2007

Life Savers [ BEGIN TRAN ]

Starting with this post, I am planning to do a series titled 'Life Savers' ... tips, tricks, helpers that I learn over the course of my life that are simple, small and yet powerful. I use them day-in and day-out..make my life so much more efficient and managable.

Simple Problem Scenario :
You are to run an UPDATE statement in the Query Analyzer to change the address of a person with AddressID = 1

You try to craft the UPDATE query. Before you do that, it is always a good practice to do an equivalent SELECT statement. So our SELECT query is going to look like this

USE AdventureWorks
GO

SELECT *
FROM Person.Address
WHERE AddressID = 1

(1 row(s) affected)

Now for the UPDATE query

--SELECT *
--FROM Person.Address
UPDATE Person.Address
SET AddressLine1 = '6553 MapleWood Dr '
WHERE AddressID = 1

You run the update and the result window shows
(19614 row(s) affected)

Oops! You were expecting only one row to get updated. To your anguish you realize you forgot to highlight the filter part when you ran the update. Alas ! you are in a big mess now and potentially looking at a long day ahead of you.

Now for our little trick that would have avoided this pitfall.

Before you do any database UPDATE from Query Analyzer, ALWAYS ALWAYS start it with a BEGIN TRAN

BEGIN TRAN

--SELECT *
--FROM Person.Address
UPDATE Person.Address
SET AddressLine1 = '6553 MapleWood Dr '
WHERE AddressID = 1

-- COMMIT TRAN (Or) ROLLBACK TRAN

If the number of rows affected are equivalent to what the SELECT statement gave you, go ahead and do the COMMIT TRAN.

If you see unexpected results like above, do a ROLLBACK TRAN instead.

These 3 simple, amazing lines prevent accidental UPDATEs and can save you tons of time and headache.

Always Recommended.

Update 2007.04.07 : I re-thought about the 'Life Savers' title and in retrospect it seems a little too intense for the topics I am planning to cover under this series. So I will probably be dropping the naming convention in future posts and use something of a milder nature.