24 Dec 2006

Now I can create my blog posts from Google Docs! Google guys are awesome. Slowly, I am starting to like Google Docs. It didn't interest me much when Google Docs was introduced originally. Since I use many features of Microsoft Word, Google Docs feels like using Notepad with formatting abilities. Yes, I still miss a lot of features I am used to using. But I like Google Docs for at least these reasons:
  • I don't have to save my documents. It's done automatically.
  • Collaborating is really very easy. Multiple users can edit the same document simultaneously. To let someone view my document, all I have to give them is a link. Whenever I update the document, I don't have to send the new version to them; they always get the latest document.
  • I don't have to carry around my files. It's always there in Google servers (with enough backups :-).

Google Docs is in its infancy now. After a few years, I guess, I won't miss Microsoft Word!

PS: I used Google Docs to write this post.


My Own Sify Broadband Client

** Update: This project is now hosted on Google Code. See http://code.google.com/p/msify/wiki/GettingStarted for more information and to download the latest version. ** I just got a new Sify BroadBand connection. My experience with Sify Broadband proved again that using a non-Windows machine in India is not very easy. I will spare my Linux-In-India woes to another post. Now let me tell you about the tools I use to log in to Sify's network. All Sify customers are assigned a static IP address. To be able to use Sify Broadband, we have to configure our machine to use that particualr IP address. Sify provides different client programs for different operating systems. With these programs only we can sign into their network. Using their Linux client is a pain. The client program has two parts -- sifyd that runs in the background, and sifyconnect that we can use to log into Sify's network. I was not very happy with these programs because:
  • If something goes bad, sifyd dies. We have to manually spawn it again. And only root user can do that.
  • sifyconnect will not let me pass my user name and password in the command-line. Every time, I have to type my user name and password only when it's ready to accept my input. For obvious reasons, password is read from the terminal instead of standard input. Hence I cannot write a shell script to run sifyconnect and input my user name and password automatically.
  • I have to manually reconfigure my network to Sify-specified IP address etc. before I invoke sifyconnect.
It is fortunate that there is a third-party open source Sify Broadband client called EasySify. I downloaded its code to find what's happening underneath. With some small experiments I could understand that they are using a really simple protocol between the client and the server. In a few hours I could write my own version of Sify client. How is my client program different from Sify? The big difference (that matters for me) is that it delivers me what I want in the way I want it to be. :-) My client also has two parts (no, not in any way similar to sifyconnect/sifyd ;-). One shell script that reconfigures my network connection to match Sify's network and a Python program that actually talks to Sify server over HTTP. Both the programs take input from ~/.sify configuration file. My .sify file looks like this:
[network]
interface = eth0
localip = 14.44.23.101
netmask = 255.255.255.0
gateway = 14.44.23.1
nameserver1 = 202.144.10.50
nameserver2 = 202.144.13.50

[authentication]
username = my_username
password = my_password
Once this file is ready, all I need are set-ifconfig.sh and sify.py. I put both the files in ~/bin, which is in my PATH, and I am done! When I come back from office, all I have to do is to connect the network cable and run the command sify.py i to log in to Sify. To disconnect, I just type sify.py o. Life is easier now! If you are interested, you are free to download and use it. Before that, I must tell you a few limitations of this script:
  • Your password must be specified in the config file. If you cannot do so for security reasons, this script won't work.
  • You won't see good-looking output from the script. It spews out whatever XML it receives from the server.
  • It works only in Linux. (Check out EasySify if you use Windows.)
Changing the script to eliminate these problems is fairly trivial. But for my usage, current version is good enough. If you think you can use this script if at all it's a bit more friendlier to the user (with improved error-handling, easy-to-understand messages etc.), let me know. I will make the changes for you.

13 Oct 2006

What Microsoft taught me today?

Today morning I took out my backup CD-RW, which I burnt about 2 years ago to copy all the files to my laptop. I use a laptop that runs Windows XP on it. A familiar thing happened - since the CD was very old, a few parts of it were physically damaged. If you had ever copied files from an optical media like CD using Windows, you would have faced this: in the middle, Windows will show some useless message and will stop copying. A few files would have been copied to your hard disk when Windows fails to copy some file because your CD is bad. Windows, as a typical Microsoft product, blame you for the situation and stop copying (your disk is bad, what do you think I can do?). As a programmer, I happen to know that it's very easy to ask the program to skip the corrupt file and copy the other good files. For some reason Windows developers have been lazy or irresponsible or whatever, that they didn't do it. I wrote a simple Python script that copied all good files to the hard drive while skipping corrupt files. No, I am writing this post to bash Microsoft. I am writing what I learned from my today's experience. A few people know that my dream is to start a programming school. Today I made this decision about my school: in the school's lab, we would have machines that run Linux as well as some machines that run Windows. We would make sure that every student uses both Windows and Linux operating systems on their day-to-day activities in the school. Apart from the obvious reasons for asking beginning programmers to use different operating systems, I want to show my students how easy it's to develop hopelessly bad programs by being lazy while programming. Windows is a commercial operating system which users "buy" to use. And, it doesn't have a decent text editor (old DOS EDIT was reasonably good). Everyone who knows a bit of Win32 programming would know that Notepad is nothing but a standard text box with menus. Almost everything I see that comes bundled with Windows is primitive and useless. Users of IE would have noticed this. In IE, any ActiveX control embedded in a web page (including Flash animations) is not activated until the user goes and clicks on it. This is Microsoft's style of "security". When the user clicks on an ActiveX object in the web page, probably he knows that clicking on it will run that ActiveX; but how can a user know or guess what the hell that ActiveX is going to do? If that ActiveX does something bad, now the user has to blame himself. "Oh, if at all I had not clicked on that damn thing," he might think. My students, who use both Notepad and Vi, IE and Firefox, CMD (Windows shell) and Bash (Linux shell), can see the difference between these different software written for the same purpose. I guess, they would try not to be lazy while developing some new software. Thanks Microsoft, for you have taught me how painful to use a software written by a lazy programmer!

7 Sept 2006

Google helped me to help Yahoo!

I have always wanted to use the *latest* products. I don't generally mind using beta or even alpha versions of software. Here's my experience with Yahoo! Mail Beta and Yahoo! Help. I usually keep my mailboxes open in Firefox. Whenever new mails come to my mailboxes, I don't take long to check them out. Today, when the new Yahoo! Mail beta changed its page title to reflect the arrival of a new mail, I clicked on its Firefox tab to read the mail. There, I found the first bug. The UI was not consistent as you see in this picture. Well.. bugs are not unusual in any software. So, I wanted to report this bug to Yahoo! so that they can do something about this. I clicked on their Help link, and tried to figure out feedback page using their search feature. I typed in "mail beta feedback" as my query. And, here is the result I got: What the heck.. I am not searching for a person named "mail beta feedback." I had to get back to my trusted friend to search for Yahoo's feedback page. Oh yeah.. the first link Google suggested had the information I wanted. Now I understand why "googling" has become a verb in English, while other search companies are still struggling to get their place on the web. Thanks to Google!!

26 Aug 2006

Match factories in Kovilpatti use MNC approach!!

When I got my first job in that big MNC, I was happy. When I joined the company, I was excited. When I compared it with other Indian companies (especially those I hate), I was pretty much happy that I was in a good place. Of course, that's a good company, in its own ways. But a few things I noticed there were not very much different from a match factory in my native town (Management concept No. 1: வேலை பார்க்கிறவனுக்கு வேலையைக் கொடு, வேலை பார்க்காதவனுக்கு சம்பளத்தைக் கொடு). Those who "knows" how to work have to work day and night and make sure that schedules don't slip. Those who don't know how to code or don't care about the schedules can just come to office, relax, and get back to home earning their salary. Believe me, there are people who don't know how to code (I'm not talking about managers). (Once I had to work with a function that takes more than 135 arguments. True, ladies and gentlemen, people are getting paid to write such code; and it's happening in one of the monster MNCs). If the management believes that they need people in their team, they will recruit whoever is available. All they need is head count. Why bother about quality of the human resource, as long as they can be used to get money from the client. After all, they have few loyal team members who sacrifice their personal life and make sure that project schedules don't slip. Now, when I sit at my home and relax during the weekend, I see my old teammates being online. The whole "responsible" team is online 24 x 7. A few people in the team get paid well according to the company's standards (it's one of the stingy companies in India). Other employees still work for peanuts. (I got 1?00 rupees as my performance bonus for the first year.) Last week when I pinged a good friend of me on a Sunday, he said he was busy. He was there the whole day. For what? There was some project slipping schedules. 4 or 5 memebers of the team were in the office for the whole Sunday. You know what they will get for that? Ugh... let us not talk about that.. they might kill me if they happen to read it. What would happen if it just keeps going? Like me, everyone will quit, but the company's management won't bother. All they need is head count. Quality is something the management has no idea about. They do not know how to conduct interviews; they do not know how to find good people; they do not know how to retain good people. But for sure, they are doing good in the business; and they will continue to do well. It's just that their business model is different; they don't need to worry about quality at all.

18 Jul 2006

What do ye like -- to go out or to sleep?

For the past two days, I didn't go out for dinner. I myself prepared (cooked?) noodles and ate it. For me, it's more convenient to take noodles than to go out to a restaurant to get something. Of course, I will get a lot of variety to choose from and the quality and taste of the food would be very good in the restaurants. But still, I don't want to go out for my dinner. I am more happy with my noodles. What could be the reason behind it? I know very well that I am lazy. In my family, I am quite often called somberi (Tamil word for a lazy person). I wonder if my being lazy is the reason for me to prefer home-made noodles than any restaurant food. I always like to have freedom; and I want me to hold control of what I do. Can this be a reason for me preferring noodles? When eating from home, I am free to choose when I want to eat. I am free to choose if I want to use my computer or I want to read a book while eating. I can eat in the bedroom, kitchen, hall, wherever I wish. So this could be a reason. Now one more thing comes to my mind. Though I like to go out and visit places, I am happier if I relax in my bed room reading something or browsing the net or sleeping. Even when my friends went to the independence day celebration in San Francisco when I was sleeping, I didn't feel bad. I didn't think for a moment that I missed the opportunity to see those celebrations. I have always been like this. I like to relax rather than to go around visiting places. Is it because I am lazy? Or is it because I am matured enough (like a saint) to be not interested in such amusements? Whatsoever it is, I haven't seen someone like me. If any of you are like me, please let me know. I want to discuss this with you. I am curious to know why I am like this....

28 Jun 2006

My New Article

I just wrote an article after a very long time. This article, titled "On OOP Again," is targetted at beginners. It talks about static members of a class. You can read the article at http://wonk.netfirms.com/art/oop-again.html.

26 May 2006

Microsoft's New Products

Just out of curiosity, I installed Internet Explorer 7 on my computer. Almost all the features Microsoft had introduced with this update were copied from Firefox. And that too, they didn’t do their job well. The code is quite buggy. I just don’t understand one thing – they don’t have any idea to improve their product. Ok, that’s understandable. But when copying somebody else’s idea, can’t they even write some good code to implement those features? I don’t think they will be able to get back their browser market share (at least with IE 7).

I came to know that Microsoft Office 2007 beta is available. For office suites, I do prefer Microsoft Office than anything else. But before saying my comments about office suites, I must tell you my usage pattern. Predominantly I use the word processing application only. Very less frequently I use spreadsheet application. In the past two years I have hardly prepared 2 or 3 presentations. As I am a developer, I don’t like to use any small scale database applications (like MS Access). So it would now be obvious that if I say something about Word, it’s worth listening to.

I have used MS Office, OpenOffice, and Lotus SmartSuite. Of these, MS Office is the one I have loved to use. OpenOffice is good in some ways, but it still has a long way to go. They have to implement many new useful features and introduce all good Microsoft features like smart tags, and the like. Till they do something to make it better than MS Office, I’m gonna continue to use MS Office.

The new version looks so promising to me. The UI is so great. Now we can perform all the trivial jobs without having to go to a dialog box. Menu bar and tool bar are kind of integrated. Very rarely only we got to open up some dialog box. Otherwise it’s pretty much easy and cool. Other office suite vendors will have some tough time competing with MS Office 2007.

After typing all these and saving the file, I noticed that they use a different file extension: .docx. I got curious again and tried to open the document with 7-Zip. Microsoft is now following the same approach OpenOffice is also following: they save all the data in XML files and put all the XML inside an archive (maybe a ZIP file. I don’t know). Good. Microsoft goes on doing well with their new Office suite.

24 May 2006

I hate (the idea of) IT Superpower

You know what? I don't like the fact that India is IT superpower. Whenever something gives a good opportunity for people to make money, it just becomes a commodity. It's seen only as a tool to derive money.

This person, Rahul* is my neighbour. He is an MCA and work for a big Indian software company. He's quite close to me, and we use to chat when we get free time. He recently got married. His wife is also an MCA. A few days back when I was talking to him he told me that he particularly wanted to marry an MCA or BE Computer Science girl. He wanted his wife also to earn money for the family. He wanted her to search for a job and start earning ASAP.

He was quite unhappy about his wife. He said, “Payal* (his wife) doesn't remember anything she studied in the previous semesters. Even when I ask her to study certain concepts, she doesn't. I told her that those are really important concepts. But still she doesn't care to learn them. I hate this girl.” He continued, “We can study only when we are in college. That's when we get time. After getting a job, the whole day is absorbed by office and in the evening we really need some rest. I know a lot of people who has never touched a book after completing their college. But I am serious about my career. I go on studying new technologies. Even after 6 years after my college days, now I am continuing to learn.”

I was a bit confused now. He started off with blaming his wife. Then he said, unlike everyone else he continues to learn. I was not sure if both are related or not. (I know very well how he “learns” new technology. I never had respect on his technical skills. Quite often he proves that my assumption about his “knowledge” is not wrong.) I told him, “Oh really.. that's great. I completed my college only last year. Now I cannot even spend 15 minutes continuously in a book. If you are still learning technology, that's really good.”

He said, “At least you have worked for a year. Payal has not even completed her course.” I interrupted him, “Is it? When is she completing her MCA?” “This is her final semester,” he replied.

“She has to get a job soon. I asked her to learn J2EE,” he said.

“Yea.. that's a nice thing. Nowadays J2EE people will get a job easily,” I said.

“She asked me what J2EE is. I was really irritated. She is in college and she doesn't even know what J2EE is. Controlling my anger, I asked her if she studied about Java servlets, JSP, or EJB. She said that she studied only those things covered by Java Complete Reference.”

“Quite a lot of people only use that book. But I hate that book,” I said.

Without even caring what I was saying, he continued. “I told her that she had only studied Core Java in her syllabus. So, I asked her to start learning J2EE. I asked her to start with servlets.”

“Oh good. Is she learning that now?” I asked him.

“No, she always has some reasons for not to learn new things. She says she's not able to understand anything in that. And she says though she had Java in her syllabus she doesn't know Java. So it's very hard to understand the high level concepts without knowing the basics.”

I was about to say something supporting his wife. But thank god, I didn't say anything.

He continued in his flow. “She wants to learn everything from scratch again, starting from Hello World. I told her that it's not going to help her. If she starts to learn everything from the basics, she would need at least three months for Core Java alone. When can she then start to learn other things? Before going for an interview she must know J2EE, .NET, and Oracle at least. I told her to take 30 days – 10 days for each. But she is not at all understanding that it's urgent. She says the same thing again and again that she wants to learn the basics first.”

Let me pause the scene at this place and start my commentary. Most of our neighbours and friends are like this only, no? Why we don't want to learn from the basics? Are we seeing technology as just a tool for making money? All this shit is just because software engineers gets a “lot of money” at the end of the month.

When somebody asks me how they could learn some technology, I would advise them to spend a lot of time in basics so that the higher level concepts are obvious to them. But how many software engineers understand machine language? How many of us know why our OS books say “if we allocate the CPU to another process while one process is doing its I/O, we can improve throughput”? How many of us at least thought once in our life time how does our Pentium-4 CPU understand Java objects?

I have seen people who has learned (or at least tried to learn) how is break statement different from continue statement without knowing how for statement works. All that's because, in an interview we may be asked how break is different from continue. But we don't usually expect the interviewer to ask us how for loop works. I don't get surprised when they're not able to implement a very simple function later in their job. But the irony is that we can manage to survive in the industry even if we don't know how a constant is different from a variable.

Yes, I hate the fact that India is considered as IT superpower (at least by Indians).

* Names I have used are fictitious.