Wednesday, May 17, 2006

Day 20 - A world without underscores!!!

The beginning of a variable should not be an underscore - the first time I came across an underscore - as far as I can remember. Right from that day I hated underscores. Why does this world need an underscore? Couldn’t we have email ids if there was no underscore? Couldn’t we have variables without an underscore? Won’t we get free colour TVs if there were no underscore? Won’t we get rice at Rs. 2 per kg without an underscore? We would. Then why the hell do we need an underscore?

While I was working as a software engineer (we can have a separate discussion on whether it is right to call what software engineers do “work”, or whether it is right to call people in the software industry as engineers)… Ok. What was I saying…Yes, while I was working as a software engineer, I used to debug programs and create more bugs in the process. However what bugged me most during the process was underscores. Every program had hundreds of underscores. All variables were either read_data, write_data, customer_order, customer_name and hell lot of other underscored variables.

Why do you use an underscore when there is always an option of using a dot? I don’t understand. Here is a list of reasons why we should not use an underscore.

  • Effort: You have to press two keys to type an underscore, the shift key and the underscore key. Once you press the shift key, you have to keep it pressed till your index/ring finger (or any other thing that you use to press underscore key) reaches the underscore key. This requires a lot of effort every time. Pressing a dot requires no effort.

  • Efficiency: If we assume that for every variable, on an average we have one underscore, then for every variable we have in the program we can save one keystroke. Hence we can create more variables in the programs with the saved time and create more confusion.

  • Time_1: It takes more time to press an underscore. An underscore is at a distance of around 2 cms to 3 cms from the shift key in an ordinary keyboard. After pressing the shift key the index/ring finger (or whatever you use to press the underscore key) has to move the distance of 2 cms to 3 cms before the underscore key is pressed. This results in unnecessary wastage of time that is crucial in a software engineer’s life. The time can be used for reading useless blogs like this. It can also be used for writing useless blogs like this.

  • More_chance_of_Errors: If pressing the underscore is considered as a transaction, the transaction consists of two tasks. Either both the tasks should be complete or none should be complete (this is some atomicity principle). If the shift key alone is pressed, it will result in missing an underscore and if the underscore key is alone pressed it results in a dash. Hence there are more chances of errors occurring while coding if you use an underscore.

  • Sticky_keys: Many a time we find that while we are using a shift key a window pops up and says “Sticky Keys” … This might be a big problem for programmers who do not know what sticky keys are, why they pop up etc. They might become nervous, perspire and finally all keys may become sticky…

  • Time_2: The word Underscore takes more time to say than the word Dot. Hence if one of your friends asks you “Machaan, what is the name of the variable used in the sum function da?” you might find it temporally economical to say “Number dot one” than say “Number underscore one”.

  • Underscores_more_than_two: When there are more than one successive underscores present in a variable it is very difficult to identify the number of underscores. But more than one dot in succession can be identified. (Type two or more underscores in a notepad and you will find that you get a straight line - Type more than one dot in a notepad and you can clearly identify the individual dots. From this we also find that, a line is a combination of underscores and not a combination of points as we studied in class 5th).

All the above factors that were discussed for variables hold good for email IDs as well.

Leave all the above factors. What hurt me most was seeing comments like

/*This program was written by Siva_Subramaniam */
/* The consumer_utility module was last updated by Alex_Pillai */

Using underscores for writing names!!!

Hence I request all you programmers, email users and any other underscore users to stop using an underscore and start using a dot. Let us stop this whole underscore bungle. Let’s do that before we start answering interviewers “My name Sir, I am Harish underscore Venkadakrishnan and my father is a share underscore market underscore trader.” Let’s create a world where there are no underscores, only dots.

Leo da Mirci always dreamt of a world free of underscores. In his book “Programming in Fancy Sea” he says

“As a programmer, I want to underscore the fact that one should dot one’s i’s and cross one’s t’s but never use an underscore. An underscore can never become a dotted line. I do not dream of a world without war. I do not dream of a world without poverty. I dream of a world without underscores.”


Hope you all under….understood what I wanted to convey. Bye till next time.

18 comments:

Anonymous said...

Its like this dude.....
using an underscore is not the mark of efficency or the mark of making things simple...
Its just one of those things you do for the sheer joy of doing it...

a computer program without underscore is like watching a methodical game.. or a you-know-what-scene-comes-next movie...

underscores ..its like watching federer in action at his absolute best...its like watching brazil play football.. its like watching the westindies play cricket..

winning and losing become secondary when compared to the sheer joy of being part of the moment which is beyond the mind...

Priya said...

nice one after long i feel

Sathish said...
This comment has been removed by a blog administrator.
Sathish said...
This comment has been removed by a blog administrator.
Sathish said...

Thoo.. This is a very bad post.

How you can write so much thing about nothing...

moreover your logic of not using underscore is very bad. My reasoning, point by point are

1) See, All programs and CUI( Character based user interface) O/S's First started using underscore because…. They use the first letter as the system command and after a space there is an instruction/ parameter or data and if there is space between parameters or file names the system gets confused as to when the command ends and when the parameter or instructions starts. The Same holds true for file names too. ( but this prob does not exist in Windows OS which is A GUI O/s so you can create a life name called " Ashok blog post Sucks" instead of "Ashok_Blog_Post_Sucks"

2) Again your solution of using dot does not hold true since dot is used for file extensions. so you can have a file called ashok.kenayan so it has to be a underscore.

3) Moreover studies show that it takes person takes .005 seconds to .008 second to press a additional key, so even you if you look in a whole program the time wasted by pressing underscores should not exceed more than a minute. Which is miniscule compared the time which people waste in typing blogs, group mails, telephone calls to doctors etc.

4) Then if according your logic underscore is removed, then all other letters above numerals also should be removed such as dollar symbol ( which is a very very important symbol for US based accountants), brackets, etc. which will make life very difficult for everybody and the keyboard very lengthy

So I strongly argue that underscore is very necessary for the world and both your post and logic are utter crap.

PS: you can fool some ppl all the time, and all the ppl sometime, but not all the ppl all the time.


btw, did you notice the Anti synchronicity in the comments posted in your blog, hmm.. that’s life.

Sathish said...

btw one more thing, your blog didnt start with the letter "2006" as in post the first meeting, WHY??

Craze Maze said...

For the welfare of the general public, I am replying to Sathish's comment.

Only @ sathish
Some truths

1. Minutes before posting this comment Sathish called me up and asked a few things. In his own words "What is this "dir" called da. And what the thing that comes after dir illa.. "C:\foldername\ nu varumae.." what is that called... I told him that that the dir is a command and the other should be a parameter and the command itself could be called a paramter here... He misunderstood the whole thing. I am pretty sure he doesnt know what CUI, OS etc. are!!!

3. The whole purpose of avoiding underscores as indicated in the blog is also to save time so that we can waste more time reading and writing useless blogs like this.

4. $ cannot be replaced with anything else. We need dollars. Every other symbol has atleast one special purpose I can think of.

! - exclamation
@ - at in email ids/@ while replying to comments
# - number symbol
$ - dollars as in Us dollar
% - percentage
^ - power symbol
& - and
* - multiplication in programs
() - parantheses
. - end of a sentence
what purpose does an underscore serve except for naming variables.

See dont think this is a funny blog. This is a seriously researched finding. After months of reseach on undersocres I have written this blog. So give some respect to my research!!!

Makkal nalanukkaaha
Craze maze

Craze Maze said...

My last blog ended with "The beginning" :) Check it again!!!

Sathish said...

Ashok:
I oppose whatever you said, my call to you was on a totally different context and scenario.

so In this world, Vaayu irukudhu nrathukaga yaar venna yenna venna solida mudiyathu. - apadi sonalum athu unmai ayuda mudiyathu

net connection irukudhu nrathukaga yaar venna yenna venna blog post panida kudathu.

Sathish

Sathish said...

Moreover ( in lollu sabha style) na Oru "SOLUTIONS ARCHITECT" . Enna yaarum thappu solida mudiyathu.

Craze Maze said...

lets take it offline sathish...(ippo thaan first time i am using this sathish..evlo perumaiyaa irukku theriyumaa :))

SMS - Shanmugavel said...

The other day, I was telling my sister's email ID (which had an underscore) over phone to my parents, who dont have much of computer knowledge... They haven't heard of the term "underscore" altogether.. I was telling them char-by-char and when it was the underscore's turn, I was stuck.. I was trying to explain them in different ways - "Put a dash and move it vertically downwards... do something similar to underlining, but no character on top it.." A friend of mine who was listening to all these couldn't stop laughing..

Yeah, soon die the underscore! :)

Anonymous said...

Very very true...Filthy and tiresome underscores...Great analysis da...It does make things complicated at many a places...And that too when we are trying to get another person's email ids...Stumbling and struggling to spell them right with underscores...

Great post pal...I wonder as to how you get such strange ideas to blog about...

Keep blogging...

Anonymous said...

Okay. That’s really nice to hear the analysis done on a character (very special character).
As per your research you have mentioned that the usage of underscore is mere waste and also need to be chucked out.

Let me opine some points,

Whoever the researcher be, needs to provide the demerits of the analysis done on the element/ product, followed by the advantages of it, also how these difficulties could be overcome. You have proven only the drawbacks; utilize some more time to do the same as a researcher.

And also, If there are many disadvantage in anything, make use of advantage in it, try avoid difficulties…. Similarly usage of underscore consumes lots of (software engineer’s) time and energy, has some special properties I talk about one property, drawing a line (Consider Microsoft word tool, with other characters we can’t draw straight lines without splits I think, though we have the feature to draw the same but we can’t edit the line.) this can be used for some decorative purpose.

You have given the alternative that we can replace an UNDERSCORE with a DOT. As per your opinion while replacing all the underscore with dots may bear a new O/S. Let me consider an example, in a file name we can have some special character in it. In that underscore is allowed but not the dot, you are being a software engineer might know the reason of it. In addition to this, all the above keys in the keyboard serves their own purpose, like #, $, %, alphanumeric etc., except underscore what we are talking about. That may be the cause for _Underscore that serves different meaning in the computer world. So this might be the reason to have this particular character to be included to form a variable name.

If that convention is not comfortable for you, you can avoid using that by providing the well-versed alternate solution for that.

So whatever the thing being done, would hold a valid base. Be strong in that and proceed with your attitude.

Swapna said...

:) ... That was well written...

yetanother.softwarejunk said...

nicely written.

yeah you are correct, underscore need a bit more effort. But I slightly disagree with you.

You can not replace it easily with 'dot'. it has some another meaning. 'dot's are using for 'struct' parsing. You need to change the grammar of that language in order to achieve this.

If you are interested,
YouMayUseWindowsNamingStyle.
And
compare_it_with_unix_style.

Effort is same, but underscore brings the clarity.

Do you agree?

I was searching the blogger who wrote “From Chukku Kaapi to Cappuccino”
Great post man… keep going !!!!

Regards,
YaSJ.

Anonymous said...

good one ashok,
really intellectually stimulating points that u have underscored (shit!!)by using so many underscores in your post on underscores. keep underscoring!!

Anonymous said...

and I always thought line is a combination of dots! now I know.... time to revise our text books...