M G Harish

Friday, June 29, 2007

Life on Fast track - Coffee or Cup

It has just been one month since our BE exams finished, but the life thereafter has been boring and confusing enough to worry about the future! It has been really hard to say Good Bye to the friends who were together for four years and all those conversations, teasings, tauntings, parties, treats will surely haunt, at least until we get drenched in the undulation of the real world.

However one can't keep lamenting! Destiny takes everyone where one supposed to go. But the problem is, life is a teacher who teaches lessons by giving tests.

Learning from experiences is good; but learning from others' experiences is better. I want to share a mail I got from my friend SN, who told he received it from a Swamiji of Ramakrishna Mission. Although it is not exactly an experience, it does allow us to previse the bitter truth of life:
A group of alumni, highly established in their careers, got together to visit their old university professor.

Conversation soon turned into complaints about stress in work and life. Offering his guests coffee, the professor went to the kitchen and returned with a large pot of coffee and an assortment of cups porcelain, plastic, glass, crystal, some plain looking, some expensive, some exquisite - telling them to help themselves to hot coffee.

When all the students had a cup of coffee in hand, the professor said: "If you noticed, all the nice looking expensive cups were taken up, leaving behind the plain and cheap ones. While it is but normal for you to want only the best for yourselves, that is the source of your problems and stress. What all of you really wanted was coffee, not the cup, but you consciously went for the best cups and were eyeing each other's cups. Now if life is coffee, then the jobs, money and position in society are the cups. They are just tools to hold and contain Life, but the quality of Life doesn't change. Some times, by concentrating only on the cup, we fail to enjoy the coffee in it."

Don't let the cups drive you... Enjoy the coffee instead


I enjoyed and learnt something from the mail and I hope you did too.

Tuesday, June 19, 2007

Why can't we create a folder by name CON?

I've been asked this question many a times: Why can't we create a folder by name CON? Although it seems a wonder or magic that we can't create a folder by that name, in reality, it is not so. It has a definite reason, and in fact, a folder can be created using that reserved name.

Gone are the days when computers had only CUI OS, that is, Character User Interface Operating Systems, like MS-DOS. When I joined my first computer course nine years ago, Windows 95 was ruling. You could see Windows 98 here and there. We were in 8th standard, and working on a computer was like a dream coming true. Microsoft's Paint Brush was the only known (for us) GUI software and was the greatest means of entertainment. The instructors taught us only MS-DOS commands and how to Shut Down the computer. Remembering such weird names as DIR, CD, MD, RD, CHKDSK, FDISK, VER, ATTRIB, REN, DEL etc. along with their syntax and usage was a great accomplishment. But I had a problem understanding this: DOS has a separate dedicated command for every action; literally every action, except... creating a file!

Yes, we used COPY CON filename to create a file with name filename. Anyone can say that it is a form of COPY command. So, why was creating a file different than all other commands? I didn't understand it, till I found out how to print using DOS, almost four years later.

DOS uses different names for the attached devices, I learnt. PRN was one such name. TYPE filename would display the contents of a file and TYPE filename > PRN would print it instead of displaying. Curiosity brings many hidden matters out. PRN would surely mean Printer and will redirect the output to the printer instead of console. Console (monitor) is the implicit default output device, and it can be bypassed if needed. So, how to put it explicitly? There must be some means to do that. Yes, there is! TYPE filename > CON performs exactly same function as TYPE filename. These special names for the devices really mean something special for the operating system and those names can not be used as folder or file names: CON, PRN, NUL, COM1 to COM9, LPT1 to LPT9, which stand for CONsole, PRiNter, NULl, serial COMmmunication ports, Line PrinTer ports.

The time has changed and Operating System can also be fooled! But still, many people think that it is not possible to create a folder by name CON. Using the path of network drive, these special names can also be used as folder names! Here is how:
  1. Goto DOS
  2. Type MD \\.\C:\CON. The folder will be created. You can check it in Windows Explorer also, but you can't access it
  3. To delete the folder, type RD \\.\C:\CON
In short, use the network path syntax instead of absolute path syntax.

Now on to the practical aspect of this. Why can't we create it directly but using the network path syntax? The answer is simple. A computer can have only one default console, printer, null etc. So, if it is accessed from a network, theoretically, the console should belong to another node in the network. Since that node may not have a device which can be referred using the name CON, it will no longer be considered as a reserved name. Hence, the folder can be created.

The next time when someone asks the question why we can't create a folder by name CON, say with confidence that it is not true...

Sunday, June 17, 2007

Hidden Files Not Shown

Recently virus programmers are becoming smart. A worm w32.USBWorm which attacked and banned Orkut, has left one more problem. (Here are the steps to remove w32.USBWorm). You will not be able to see the hidden files. Even if you change the setting in the folder options, it will not show the hidden files. So here are the steps to remove that problem and make the hidden files appear as before. I got the solution from one of the comments on my previous posts.
  1. Go to Start --> Run, then type Regedit
  2. Navigate to the registry folder HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
    CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL

  3. Find a key called CheckedValue.
  4. Double Click CheckedValue key and modify it to 1. This is to show all the hidden files.
Now you should be able to view all the hidden files, and also to alter its status from folder options.

This is where I found the solution.

UPDATE
If the virus is still present, this solution may not work permanently. Once you restart the PC, the hidden files will be concealed once again. I recommend using Avast antivirus, but remember to change security level from Medium to High after you install it.

You can see more tips about securing your computer here.

Saturday, June 02, 2007

Somewhere, something went terribly wrong

There are some pictures which are equivalent to thousand words. Some pictures are just for fun, and some put you in serious thinking. Here is rare image belonging to both of these categories, which I saw first on my friend's (MAP) T-shirt:




Then I googled for more of this, and found many websites. Also a colourful image:




I found it wonderful. In this world, in which everything is being be forgotten because of the Internet, in which the difference between man and machine is becoming narrower day by day, I think the title Somewhere, something went terribly wrong matches the present condition and the image reflects the situation. What went wrong? Whether it is really wrong? We might never know. What is your opinion?