October 13, 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!