Wednesday, April 26, 2006

Mailbucket.org

Where do people come up with ideas like this - mailbucket.org - it is an experiment in alternative methods of email management. It basically converts the email to an RSS feed thereby allowing people to subscribe to it and recieve notifications of any update. I was browsing some sites and I came across a site that had information on how you can make blogger send out feeds for comments. Right now blogger has feeds only for the site, not for the comments. Interesting, I was just thinking about that yesterday and today I came across this site - the information is quite old though. Anyway, the concept of having feeds for your email is quite fascinating. Let me try and go over this and see if it is really useful for what I'm seeking.

Recover Sessions - Firefox

Today for whatever reason - my FF session crashed and it crashed big time. I had about 10 tabs open. When I reopened FF, it asked me if I wanted to restore my crashed sessions. Wow - that is something nice to have. I wish IE7 puts that in their official release. Maybe it is some add-on I added or does it come with by default with the FF version available for download? I don't know, but anyway its a nice feature to have.

Monday, April 24, 2006

Removing trailing and leading spaces in PERL

This was hidden somewhere in my forum and thought I would post it here:

I have something like this:

a231aaaa 321bbbbbbbb cccccccccc123

I have designed a parser with the space as the delimiter to accept 3 tokens.

The grammer is something like this:

/s*(.*)/s+(.*)/s+(.*)

The problem is after parsing I get spaces included in my tokens (original strin g had some trailing spaces). How do I get to remove the spaces out of the tokens?

Here is a small piece of code that does the trick for both ends.

Method 1:
$string =~s/^\s+//; -----> Front
$string =~s/\s+$//; -----> End

Some books even have this code:

Method 2: $string =~s[^\s*(.*?)\s*$][$1];

Method 1 is faster and much better than Method 2. There's a very good reason for that. The method 1 does not require any backtracking and can execute very quickly. The method 2 can involve a great deal of backtracking and, in the worst case, could take a very long time indeed. As a contrived example, run this:

$string = ' a' . ' ' x 100000 . 'z ';
print "Starting first trim method\n";
$string =~ s/^ +//; - FRONT
$string =~ s/ +$//; - END
print "Finished\n"; # Instantly

$string = ' a' . ' ' x 100000 . 'z ';
print "Starting second trim method\n";
$string =~ s/^ *(.*?) *$/$1/;
print "Finished\n"; # Six minutes later... zzzzzzz...

I understand the natural desire to express the conceptually atomic trim operation as a single line. One single line the method is:

s/^ +//, s/ +$// for $string;

Even better, this generalises neatly for more than one string:

s/^ +//, s/ +$// for $string1, $string2, $string3;
s/^ +//, s/ +$// for @whole_file_of_lines;

Credit duely given to all those who helped posting the answer on some other perl forums, Thanks!

Satellite view of Bill Gates Home

Was browsing the web and found Bill Gates address as

1835, 73rd Ave NE,
Medina, WA 98039

I got curious to map in on the satellite view on both Google Maps and Windows Live Local. Here are the snapshots from the two services:

From Google maps, satellite view


From Windows Live Local, satellite view


Oh, btw if someone doesn't know what Windows Live Local is - it is a launch from Microsoft in competition to Google Earth. The Windows Live Local is good - but the quality of satellite images from Google Maps/Earth is much better. You can see it from the pictures above. But there are some fancy stuffs in Windows Live Local, like cruising around in a car in San Francisco/Seattle, scratch pad, add push pin, et al. Thats something innovative.

So Microsoft's is Virtual Earth and Google's is Google Earth. Wow - Google does not consider its launch to be any less than the original Earth, why name it virtual? This competition ultimately makes people like me who use these services, win! Keep it up guys!

Friday, April 21, 2006

What I would like to see in my email client?

Today the web email world is split into 4 groups - Y!Mail, Gmail, MSN Hotmail and all the others. I have been an ardent user of all the 3 email clients. I started out with a Hotmail ID and at that time it was still Sabeer Batia's baby. Just before coming over to the US, I created a Yahoo ID. And of course when Google Mail was born I got an invite and created a GMail ID. So its almost 11 years of web email experience use. I would like to use this blog to talk a little bit about what I would like to see in my version of an email client and why not one email client can outbeat the other. They all have their features and flaws. Lets talk about the global version around the web today and not the new ones that Yahoo and Hotmail have made available as Betas.

What I don't like of Hotmail:
[1] Interface of Hotmail is buggy and static. Why buggy - If I delete some emails and go back to my inbox, I still see the emails. It suddenly vanishes after some time
[2] There is only 250 MB of email space
[3] Lousy junk mail filter. I get about 200 junk emails everyday in my inbox and about 100 in my Junk mail folder. Wow, what a wonderful junk mail filter!
[4] Lot of browser space is wasted on ADs - invariably when I open an email I have to scroll down a lot to even start to read it
[5] When multiple pictures are sent in as attachment, the receiving person has to click on each picture and save it manually
[6] Add attachments takes you a different page and you have to click on too many buttons to do a simple task
[7] "Find" feature sucks - It can search only From, To and Subject fields
[8] Picture attachments are either shown completely loaded or as links - there is no thumbnail feature, what a bore!
[9] No confirmation to discard message when I suddenly click elsewhere during composing a new mail
[10] I have to click on the Subject field only to open a message

What I like about Hotmail:
[1] "New" pulldown menu - It is much like outlook.
[2] "New Mail" compose interface is good with the favorites contacts on the right - one click on the contact gets their email address in the To/CC/BCC field. That's intuitive. I like that.

What I dislike about Y!Mail:
[1] Interface is too blocky, old and static
[2] The Rich text editor is buggy - when I try to backspace erase some characters, they do not get erased until I hit another character. The rich text editor is very slow and not a selling point for Yahoo Mail
[3] Hate the confirmation after each action - send a new mail, it confirms that it is sent, cancel a mail message it confirms I cancelled it, Aurghhhhh!
[4] Lot of browser space is wasted in ADs and also there are mails with ads as footers (those who send email with attachments from yahoo id)
[5] There are only 15 filters available for use. How dumb - When Yahoo owns Yahoogroups, how can they expect people to live with 15 filters. I'm a part of probably 15 to 20 yahoogroups. Why, Why Why Why why why why why...
[6] When I send email to myself it is not always instantaneous - what the hell dudes?
[7] Many times pictures go in as plain text/zip files. The receiving party's email client will choke with all the funky cntrl characters in the email as plain text.
[8] Add attachments takes you to a different page and you have to click on too many buttons to do a simple task
[9] Cannot send a message without the TO field - I have to enter the TO field
[10] Have to download multiple attachments by clicking on each of them
[11] Download an attachment will take you to another page and there you have to click on save attachment. This is really annoying if I have to download like 10 attachments in an email
[12] When I login, it does not take me directly to my inbox, instead it displays a summary and then I have to click on the inbox to see my emails in my inbox
[13] I have to click on the Subject field only to open a message

What do I like about Y!Mail:
[1] It is robust - I know I can get my emails correctly. In short I trust it
[2] There is something called "folders" and I can move my mails around folders easily for clarity of inbox and maintenance
[3] The new search feature is good
[4] I like the spam filter of Yahoo. It has almost so far has correctly delivered the mails to their respective places
[5] It shows thumbnails of pictures so people can have an idea of what they are seeing before downloading the picture
[6] Autocomplete of addresses

What I don't about GMail:
[1] There is no concept of folders. Everything is labels. Its a little annoying as everything sits in the inbox
[2] Chat through email is a little buggy - its a new feature, so lets wait and see how well that one goes

What I like about GMail:
[1] Interface is dynamic, quick and very intuitive with keyboard shortcuts
[2] Searching is amazing - you get the same QoR as in Google Search for the web
[3] E-mails are maintained as conversation. You open a conversation and you can find all related messages to it. You don't have to scrum through your inbox to search what reply was sent for this email. And you open an email you have replied, you can see your reply at the end of the mail. How intuitive!
[4] Add attachments is dynamic in the same page and no navigation to any other page and then clicking on Continue to Message...
[5] Total space is over 2 GB and growing every instant
[6] Autocomplete of addresses
[7] Multiple attachments can be downloaded as a single zip file and no more than one click to save the file
[8] Pretty good spam filter
[9] The timestamp for a conversation (it automatically offsets the timestamp based on current time). We will know exactly how many minutes/hours/days ago the mail was sent
[10] Conversations have preview texts next to them making it easy to know the few words of the conversation before opening
[11] Take your mouse cursor over the attachment icon of a conversation, it will tell you what those attachments are rather than "View details of attachments"
[12] No wastage of browser space by displaying blocky disgusting ADs on top and bottom
[13] A tiny bar of dynamic information such as news, quotes etc., that refreshes itself
[14] Quick contacts on the left make it easy to do one click email to friends
[15] Since it uses JavaScript a lot, it can remember my updates when I navigate from one page to another - If I have certain mails checked and I click on another email and come back to the inbox, I can see my original checked items still checked
[16] When I login, it takes me directly to my inbox
[17] When I send mails to myself - the mail is sitting in my inbox instantaneously
[18] I can click anywhere in the message header and it opens up the message, not forcing me to click on the subject only
[19] I can send mails using BCC only and I don't need to type in the TO field as required by Yahoo
[20] Conserves lot of space by automatically hiding what ever doesn't need to be seen so often like email headers
[21] Unlimited # of filters can be created

I can go on and on, but lets come back to the original discussion of this blog entry - If I were to design an email client what would its recipe be?

[1] All the features of GMail
[2] Spam filter and folders from Yahoo
[3] Hotmail's New Message compose that shows the contacts on the right (make it floating and not docked)
[4] Of course give the entire thing an outlook like interface that will not be too blocky or a killer on the client side

Wasn't that recipe easy? Maybe you can say I'm a fan of GMail and I'm kind of loosing interest in the blocky Y!Mail (they have a waiting list for their Beta mail, who cares now) and I have stopped using Hotmail almost for all practical purposes.

Disclaimer: This is my personal opinion and my personal choice. So all the Yahoo and Hotmail fans please don't flare up, chill out dudes and pour in your comments about the 3 giant web email services.

Thursday, April 20, 2006

I still like IE

Ok guys, don't hit me. I did try Firefox and I don't like it so much as IE. Especially IE7 Beta 2 is awesome and is going to give FF some ass-whipping. Before all the FF folks shoot me down, can I be given a chance to explain why my experience was otherwise good with FF other than the fact that I will not replace it with IE?

Here are some of the quirks I found with FF (latest version and no fancy add-ons) and I'm comparing it with IE7 Beta 2 from Microsoft:

[1] The "New Tab" button that appears just below the Back button is not positioned correctly. The tabs open from left to right and the new tab button is located on the extreme left. I have to go all the way to the left and then click on the button and then traverse to the extreme right (I have lots of tabs open) and then start browsing in that tab

[2] Each tab needs to have a close button associated with it. The "close" button cannot be universally sitting in the extreme right. Agreed it is context sensitive to the tab open but still I had to move my mouse around a lot to create/browse/close tabs. If I add some fancy add-on then FF has the close buttons for each tab. What a bore - how would anyone know that there is an add-on like that?

[3] Showing download manager by default sucks big time - I have to go and disable it from the options menu. Why can't it be disabled by default and then if users want it, they can enable it

[4] There is no thumbnail snapshot of all my open tabs as in IE7. This is really good if there are many tabs open and that it is not possible to read the title of each and traverse

[5] In IE7 I have a nice feature for bookmarks/favorites -> I can either dock the favorites or leave it floating and IE takes it off once until I select a site. In FF it is always docked by default

[6] So what if FF has a drag and drop customization of toolbar items? I still need to be able to resize the entire toolbar either to the left or right by dragging it like in IE. If I were to add all the items then my toolbar is cluttered and my address bar gets shortened in length. I cannot even put the address bar below to enter long website addresses. Why is the address bar locked?

[7] I usually listen to lot of audio online. I could not get FF to play music from www.musicindiaonline.com. It just refuses to play. From IE, everything is a breeze. This may be a localized issue but still this is a needed fix if I have to continue using FF

[8] How to get the "Go" button to disappear?

[9] The most annoying thing in FF is the incapableness of FF's Find to search within text boxes in a browser. Ok, I have a form with a text box and some text. I hit F3 to start searching for some string - the damn thing cannot go into a text box and search for that text even if my context is within that text box. How saddening? IE can search in text boxes just fine

[10] There is no inline autocomplete. I have to use the down arrow keys to select whatever choices show up there in the address bar

The list will build if I continue using it. I'm forced to use it for one reason - somehow Google's blogger works a little better on FF than IE for images. So sometimes I have to blog off from FF. Other than that, IE7, I love you. Everything in IE7 is very intuitive. Things are there, where the eyes and hands go for, not somewhere at the extreme ends. I rest my case - Can I be excused, please?

Thanks!

Tuesday, April 18, 2006

Embedding audio in your webpage

A very simple way to embed audio into your webpage

Your web server needs to support the audio mime types to decode this line and play. I think lots of web servers out there do support these types. Go ahead, use them and enjoy.

You need to make sure that the audio file does not sit on your own local hard drive, instead it should be accessible to all in an Internet web server. Try out www.ripway.com to get your own free disk space and upload your audio files there to embed that link in the code shown and NOT your local address where the file is sitting. (Thanks Jenny, for pointing that out as you bumped into this issue!)

Please be careful about using this as background music for your webpage as in ripway, if you use large mp3 files, then you might end up using uo the bandwidth that is allowed per day. Use small files and that too only for background music. If you need to embed audio with a player plug-in then you would need to use special tags to embed the classid of the player that will be discussed in another blog entry.

Monday, April 17, 2006

GNU Make: Space vs TAB

How much more dumb can the designers of GNU make be to make the GNU Make utility sensitive to SPACE/TAB? I was modifying a makefile now and I hit make ALL and splat - it spit back at me telling me the following:

makefile:112: *** missing separator. Stop.

What the hell does this mean? Hmm, you will understand it better if you use an editor that gives you the option to turn on Tabs and spaces markers. The GNU make system requires you to have a TAB at the beginning of the line and not a space. If you do not have either of them and start from column 0 - its fine but you just cannot have space(s) at the beginning.

Make sure you remove that space and replace it with TAB and voila - make ALL works like a charm. FYI, I use editplus from www.editplus.com, and its feature of turning on TABS and SPACES came in handy today to recognize the space and tab in the file. There is a utility in /usr/bin called "unexpand" that converts spaces to tabs. Use that if you cannot use a good editor, to have your makefile mean sense to the GNU system.

P.S: I do like GNU make, just that these little quirks put me off...

Friday, April 14, 2006

How to bring your company network down

Today at work my network started acting crazy and none of the websites were loading up. I thought maybe it was one of those friday afternoons where Windows needed a hard kick in the butt. So I restarted my machine and I could hear the warm purring of the hard drive booting up my Windows. I get the login prompt and it took almost 10 minutes to log me in and then boom - nothing works. My outlook crashed, "My computer" did not open, IE went bonkers opening a web page. So I get up from my desk and ask my colleagues if they are facing a similar problem - YES they were. Sometimes it helps to ask - so all of us started playing with darts :) as the entire network was down.

Ethereal, revealed some interiors of what was happening - Some TCP packets were in the queue for retransmission. Retransmission was for every 1/5000th of a second. Wow - the network quickly got overloaded with a zillion retransmission requests from a particular source to a particular destination. We tracked down the source and asked the person to shut off the computer. Now some other source->destination packets started retransmission requests and all this was happening so fast that slowly the entire network was brought down one by one.

Now, all the computers were shut off and there was still something fishy happening. How could something be happening when all the computers have been powered off? Funny right - wait till you know what the cause of this was - one of my colleagues had shorted 2 ports of a network switch by mistake. By short I mean, connecting an Ethernet cable from one port of the switch back to itself to another port. In short and sweet words - good 'ol local loopback that just went bonkers and kept itself in an unbreakable infinite loop.

Finally the loop was broken and voila - the network made perfect sense again. All computers purred to their usual startup sounds and Windows worked like a charm. I sometimes wonder - is it this easy to bring the entire network down? Why isn't there something that can detect such infinite loops and have some sort of a network sniffer that can break these loops or warn the admin what the heck is going on rather than going around to everyone's computer and seeing if amy faulty network connection is made. Come on guys - it is the 21st century where we have martian robots collecting information for us from Mars, can't we design a fault-tolerant network that will not allow itself to be self-shorted infinite loopback. Maybe there is something, I don't know.

Friday, April 07, 2006

Whatever happened to local loopback in email?

This is a very funny find. Today the most common email clients people use are: MSN Hotmail, Yahoo and Google Mail (Gmail). The most important thing an email client needs to offer, besides being nice to look and use, is its robustness in sending emails even during the most busiest of times. So I did a simple sanity check - What happens if I send an email to myself from my own inbox? I used all the 3 clients and did the sanity check and here are my results:

Gmail: Instantaneously (The new mail counter next to Inbox increased the moment I hit send and this test was repeatable and it behaved the same way everytime I performed it)
Yahoo Mail: Almost Instantaneously. I repeated the tests and found varying results but it is livable
MSN Hotmail: The mail was cold when it arrived. It took a whopping 20 minutes to arrive

So my question to Microsoft - why are you guys choking Hotmail and making it the worst email client a person can regretfully use for the rest of the Internet era? Get over the clumsiness and make it more robust and active. Its after all a local loopback to my own inbox. Why does it need to make a trip all around the world and then realize that it was originally intended for the same inbox it left about half hour ago. Wake up guys, the new Yahoo Mail interface is going to kill you guys...For now I'm enjoying with Gmail and YMail. Good riddance to hotmail.

Sunday, April 02, 2006

Windows XP Encryption

I did learn something new yesterday. I had to copy certain pictures from my camera to my portable hard drive. Obviously I was away from my computer, so I went over to my relative's place and used her laptop to copy the pictures. I was so happy that I had dumped all the pictures to the hard drive and that I could clear my memory card for taking further pictures. I happily discinnected my hard drive and camera and headed out thanking her for the help.

The next day I connected my hard drive to copy the pictures and start uploading them. As soon as I connected the hard drive, that particular folder was green in color. I wondered why it was green in color and not the usual black. I have not changed any settings to have different font colors. My curiosity grew when I could not view the folder contents. I was able to see that the folder had about 70 pictures but I could not preview them or view any thumbnails. All I saw was green colored font for all the 70 pictures. I did not know what to do as somewhere in mind I was getting scared thinking about having lost all the 70 pictures and that there was no way of recovering them.

I thought for a couple of minutes and then I said to myself - If the files were not copied properly then why would they have green color and why would the folder show all the picture names without any thumbnail. Then I right click one of the pictures and see its properties - I tried to uncheck the Read-Only attribute and found that I was not able to do so. Ha Ha - that intrigued me - I checked the advanced properties of the file. The file was ENCRYPTED!

I thanked God for there was some ray of hope of recovering the encrypted files and that I have not completely lost all the files. Googled on Windows XP Encryption and read some literatures about it. The most interesting one amongst them was the Microsoft's MSDN article about the WinXP excryption: http://support.microsoft.com/kb/308993

It said the following:

Only the following people can decrypt an encrypted file.
• The user who encrypted the file
• Any user who was designated as a recovery agent before the file was encrypted
• Any user who has the public key or private key for the recovery agent or the user that originally encrypted the file
• Any user who has been granted access to the file

I immediately called my relative and asked her to please keep the laptop that I used for copying the pictures and explained the entire mess I was in. I went over tonight and decrypted the pictures. I came back home and checked the pictures - Indeed the encryption was not there. Whew ! What a relief. Sometimes the measures you take in preventing fraudulent activites on your computer can be very irritating and time consuming process to recover certain documents for others to use. All in all I learnt something new yesterday.