Wednesday, June 27, 2007

Ideal Programming Comments

Leaving proper and abundant comments in code has always been one of the most repeated programming tips.

We were discussing the inadequate commenting practice among team members at work, when I had this to say:

Ideally, comments left in a program should be such that if you filter out/hide all the code and read only the comments, that should give you a good idea of the logic of the program.

Sunday, May 13, 2007

Contacts Management System

Email and electronic address-books have been around for decades now. So, I am quite surprised that we still don't have a truly functional contacts management system (CMS), which uses the full power of the Internet.

A well-implemented contact management system should eliminate the need for us to ever remember anybody's phone number or weirdly-spelled email address. We should be able to contact people just by looking up their name. It should also eliminate the need for us to ever enter anybody's contact information into our address-books. The information would be automatically available to us, provided the person wants to share it with us.

There is a huge market of users waiting for anybody who implements a good contacts management system. This is truly a big untapped opportunity. I am surprised that nobody has already done this yet.

Here are five most important features that a good modern contacts management system should have:

1. The CMS should be a web-based database, built on a data-sharing model and it would be search-able. The web-based nature of the system should allow it to be accessible from any browser, running on any device. The data-sharing model would allow you to instantly share your contact information with others, instead of them having to get it from you and add it manually into their address-books.

2. The CMS should define a standard for storing, retrieving and updating contacts information so that it can be accessed using any application, on any device, which needs address-book functionality. Imagine being able to use a single address-book on all your email clients (Outlook, Thunderbird, etc.), all your web-based email systems (Gmail, Yahoo, etc.), on your mobile phone, home phone and any other place where you need an address-book. Imagine buying a new cell phone, logging into the CMS system using the phone and all your contacts being immediately available in the new phone, without your having to add them individually or import them from your old phone!

3. The CMS should not only be available online, it should also be download-able to the device or application of your choice. Further, the downloaded copy should have two-way synchronization with the online copy. Imagine being able to add or update information into the address-book on your phone, and the same update being propagated to all the copies of your address-book on all your devices and email systems.

4. Strictly speaking, there should be no need for you to update or add the contact details of any other person. You should only need to update your own contact information, and everybody else updates only their own information. The CMS gives everyone the ability to share their personal contact information with all the people who matter to them. Further, it also gives you flexibility on what pieces of information you want to share with whom. For example, you can define groups such as 'friends', 'family', 'colleagues' in your CMS. Then, you can choose to share your home phone number and home address only with 'family', your personal email address and mobile phone number with 'friends', your office phone number and business address with 'colleagues', and so on. You should even be able to choose what pieces of information you want to share with specific individuals - not just groups. Imagine not having to add all the contact details of your hundred or more friends, into your address-book. Imagine not having to ever give anybody your business card - all you do is add them to the 'business contacts' group in your CMS, and they will instantly have access to your contact information on their own address-books!

5. The CMS should give you the ability to 'push' your contact information updates out to people of your choosing. Suppose, you get a new phone number. Today, you have to email your new phone number to all your friends and family, and each person has to manually update their address-books. With the CMS, all you'd do is update your phone number just once on the CMS and then click a button to 'push' or propagate this new number to all the people who have your old number in their address-books. You should even be able to choose not to 'push' the update to certain people. And people who receive your updates would have the ability to accept or reject it. This way, your latest contact information is always available to people with whom you want to share it. Nobody ends up with out-of-date information because somebody inadvertently forgot to keep them updated with changed phone numbers or addresses.

Needless to say, a CMS with all the above features would become a massive global directory. More importantly, it would also have information about how people are networked, their relationships, etc. Imagine the potential! Whoever develops such a system could become a billionaire!

Thursday, May 3, 2007

Google Reader

If there are websites you like to check out frequently, and you visit each of them individually to look for new content, then you are wayyy behind the times. You are just not doing it right!

Recently, I gave a small presentation about RSS at my office, and here's what I had to say:
Imagine that when your friends want to send you an email, they compose the email and then keep it in their own mail box. They don't send it to your mail box. Then, when you want to check your emails, imagine that you have to visit each of your friend's mail boxes to see if they have left any mails for you. That's just a very inefficient and backwards way of doing things, isn't it? Yet, this is exactly how we access information on the Internet. We go to different websites individually, and check if there is information there which might be of interest to us.

This is where RSS technology and RSS Readers come into the picture. Google calls its RSS Reader, "Your inbox to the web." It literally is. I have been using Google Reader for the past few months, and I am absolutely hooked. It helps me go through a lot of content very quickly. Of course, I give more time and attention to some content, than to others. Nevertheless, the amount of information I eyeball in a short period of time is just insane. I could never peruse so much information without my favorite Reader.

To subscribe to this blog's feed and open Google Reader at the same time, click here.

Here's a previous post on this blog about RSS: Web Feeds and Feed Readers.

Here's a a 10-minute video tutorial on using Google Reader (but seriously you could learn how to use it in lesser time on your own!):

Sunday, April 29, 2007

Height of tech incompatibility!

All of us have been frustrated at one time or the other by so many different charging cables and plugs for the different varieties of cellphones. Why couldn't all the cellphone companies have come up with a standard cable-and-plug combo to charge any and every cellphone? Is it really necessary to ship a separate charger (or two, if you count the car charger) with every single cell phone? It's ridiculous and such a waste!

As technology advances and big companies consolidate, the companies usually try to build their own universe of products, accessories and software. They jealously guard these from becoming interoperable with other company's products. These days, with DRM technologies, they are even trying to limit music and video to play within the borders of their own hardware and software. Such tactics are invariably driven by the management and marketing types who think it helps them make more money. They don't realize what the engineers, who have been at the forefront of technologies which have resulted in huge economic gains, have always known: easy interoperability is the real way to make your products popular, capture a big chunk of the market and rake in all that money!

Recently we came across what I consider to the be the height of incompatibility among tech devices, and which can't be explained even by the above theory of dumb managers and marketers: we discovered that the charging cables for the Thinkpad T42 model and T60 model laptops are incompatible! Yes, we couldn't use the T42's cable to charge a T60!! How the hell did that happen?

Friday, April 13, 2007

Google's 411 rocks!

I tried Google's 411 service yesterday, and was mighty impressed. Just dialled 1-800-GOOG-411 (1-800-466-4411), and I was connected to the business I wanted to talk to in around a minute. The system understood my responses the first time, every time! It was my best encounter to date with voice recognition software.

My past experiences with voice recognition response systems have sucked a lot. I have been much frustrated, yelling the same thing over and over into the phone before giving up with disgust. So, it was a pleasant change to use Google's system. And the fact that I don't have to pay for the 411 service (directory assistance number in the US & Canada, for those of you who don't know what that is) ever again, makes it even sweeter!

Normally, the 411 service costs $1.28 over a landline and $1.57 over the cellphone. And, I read today that 411 is a $8 billion market in the US! Now, Google is offering this service for FREE (regular phone call costs apply, of course).

This service is highly recommended! Be warned though, Google says this service is still in the experimental stage and may not always be available.

Saturday, February 17, 2007

Tracking BMTC Buses - Google maps mashup anybody?

Today's Times of India, Bangalore Edition, had a piece about being able to track the location of BMTC (Bangalore city's public transport service) buses using the cellphone text message service. From the article:

Now, all you have to do is SMS to find out the location of the bus. This facility, for now, has been provided to only the Volvo bus commuters.

The procedure is simple - if you're in Koramangala, and want to go to Electronics City, send an SMS message to 9945634666 reading 'Yi V356C U'. (where Yi stands for 'Yelli Iddira?', 'V365C' is the route number, 'U' stands for 'up'). Buses heading out of the 'starting station' are designated to as 'up' and buses heading towards the starting station are designated as 'down'.

Within a minute, you'll receive a reply stating 'Singasandra; Bangalore Dairy; Maharani's College', meaning there are three buses on this route currently, each of them approaching the stops listed, after having left the previous stops.

This BMTC new facility uses on-line GPS data.

It's great to know that BMTC has started tracking buses using GPS data. This gave me an idea for a new Google Maps mashup: Use BMTC's GPS data to create a constantly updated map of Bangalore, which shows the position of BMTC buses a user searches for. Buses travelling up and down can be differentiated by color codes. The user should have the option of being able to search for one, more or all buses for which BMTC has GPS data.

This could be a very useful service, and a great idea for an engineering student project. The Google maps API is easily available. It's just a matter of tying that up with real-time GPS data from BMTC's systems.

Any engineering students in Bangalore up for the challenge?

Thursday, January 25, 2007

Do you Paypal?

Does small cash pass back and forth often or occasionally between your friends and you? Is this cash in any of these currencies? Do you live in any one of these countries and operate a bank account there? If you answered yes to all these questions, you should immediately sign up for Go ahead and just do it. Seriously. And, get your friends to sign up also.

Warning: This is an unabashed and unpaid advertisement for

Paypal is such an incredibly convenient free service, I don't know why more people don't use it. Suppose you go out for lunch with a friend and s/he pays the bill at the restaurant. Your share of the tab is $7.17 and you need to give this money to your friend. Now imagine that you have a personal secretary who will go out to the bank, withdraw the exact $7.17 from your checking account and pays it to your friend, without you writing a cheque or handling cash or dealing with the hassles of finding the exact change, without even your leaving the seat! In a similar vein, suppose your friend pays you a certain amount of cash and you want to deposit the money in your bank account. Imagine having a secretary who will get this money from your friend, then go out and deposit it into your bank account, without your having to fill out a deposit slip or leave the comfort of your home or office. To add more more fun to these imaginary scenarios, suppose that your friend is in another state or country, and you need to send money to her or get money from him. Imagine that this secretary's services include giving money to or getting it from this distant friend of yours, instantly, without any money orders or mailing of cheques or waiting periods involved. And best of all, imagine that the services of this secretary are absolutely free! Sounds too good to be true, eh? Yet, this is exactly what Paypal does for you.

Paypal is an online service to which anybody with an email address (and lives in these countries and does transactions in these currencies) can sign up. Then, you register your bank account information with Paypal. Soon after your bank account is registered and confirmed, you are in business. All you have to do is logon to to initiate withdrawals and deposits into your bank account, to and from anybody else who uses the Paypal service. And as long as the transactions are all personal (meaning, no buying and selling from or to the other party of the transaction) and the total amount of your transactions is within a certain limit, it's all free.

So, if I have to pay $7.17 to that friend who paid for my lunch, all I have to do is log on to and initiate a 'Send Money' transaction to my friend. The amount will be withdrawn from my bank account and sent to my friend's Paypal account. My friend can then have the money transferred from her Paypal account to her bank. Everything done online. Nobody handles cash or cheques, nor deals with trips to the bank or ATMs. It is as simple as that. Now you can even use the sms service of your cell phone to do Paypal transactions.

A sole bank-only transaction on Paypal takes about 2-3 business days, which is the same as depositing a cheque and waiting for it to cash. If the bank account registered with Paypal has a backup funding source such as my debit card, the transfer of funds is instant. As soon as I hit the send money button on, the money is transfered to my friend's Paypal account that very instant.

I have a bunch of friends with whom there is always some monetary transactions going on: somebody picked up the tab during a group lunch, somebody bought movie tickets to the whole group, somebody bought a group gift for someone's birthday. We need to pay money to all these different people. When there are anywhere from 5 to 20 people in the group, all those transactions can become a hassle when dealing with cash and small change. Getting so many cheques and depositing them is also a chore in itself. This is where Paypal is such a big convenience.

Whether you do small cash exchanges frequently or occasionally, give Paypal a try. You will definitely thank me for it.

Note: When I recommended Paypal to friends in the past, some of them expressed concerns about Paypal's security. All I can tell such people is that I have been using Paypal regularly for almost five years now, and I have never had any problems with their services or security. I have read about some phishing emails which were sent to Paypal customers. These emails looked like official emails sent from Paypal, but they were actually sent by some scammers who invited gullible people to click on a link and enter their Paypal login and password. The scammers were going to use this information to steal money from people's Paypal account. But then such emails have been targetted at Citibank, Wells Fargo (I personally received such a phishing email targetting Wells Fargo customers) and other banks' customers. The bottomline is that, signing up for Paypal's service does not make you any more vulnerable than doing online banking transactions with your traditional banks. As long as you are careful about what you do online, using Paypal is as safe as using your bank's website for online transactions. Probably, safer!