Monday, December 26, 2005

Hey, Good bye nanba

the sky is always blue, the sun does always shine,
just that, there is something inbetween sometimes
that obscures the sky and blocks the sun shine
but tis transitory, like the ephemeral breeze
like our togetherness,
memories of which are always fresh,
space might part us now,
but tis transitory, tis ephemeral

forevers too long to wait to see you again,
may the angels hear this voice from my heart,
and let they conspire to make us meet again,
so we may spend those evenings together,
n share those deepest feelings together,

manathinilo unarchigalin tsunami,
vaayinilo vaarthaigal vara villai,
eluthinaalum yenna eluthuvathendru theriyavillai,
entha mozhiyilum thondravillai,
namba mudiyavillai, innum naangu natkal thaan,
sendru vaa nanba, sendru vaa,
good bye nanba, good bye, meendum santhipom

Tuesday, November 22, 2005

Will it be back to the glorious days of Nalanda again???

Certainly not. One should be a downright moron or the quintessential novice in Indian politics to expect Bihar to do a phoenix. Even the most die hard Nitish Kumar fan wouldnt expect that to happen. But with the man
. who said "my people have been under-developed for millenia and hence they dont care about development"
. who said "IT is totally not needed in India today"
. who broke the will of some of the most committed IAS officers in India and brought them to his side
. who took decency in public life hitherto to unknown depths
. who made a women who knew nothing but to reproduce and cook the CM of a state
out of the way, one can certainly expect a semblance of a functioning government in Bihar.

As things stand today, at best, the Bihar government rubs shoulders with the governments in some of the banana republics across the globe. With kidnappings, rapes and murder the order of the day, with the most wanted criminal becoming an MP from the state, with the state consistenly obtaining the last spot in almost all development indices, things certainly cant get any worse. All this, with Bihar being one amongst those states that contain a plethora of natural wealth. There is a difference between a badly managed government and an intentionally pathetically run government. Bihar certainly comes under the second category, probably even worse.

Remember Nalanda. One of the greatest of all ancient universities. Heres were the best of the worlds intelligentia used to come to learn. But today, Bihar is the butt of all jokes. To insult someone, all you need to do was to call him a Bihari. This despite the fact that a disproportionately large number of students in the IITs are from Bihar. Can Bihar undo the damage done to it by Laloo? Can Nitish Kumar do something about it?

My opinion is that most politicians are goons and all political parites have a large number of criminals in them. So to expect Ram Rajya to blossom under Nitish Kumar would be stupid. But with the bar for governance set at such an abysmally low level by Laloo, even if Nitish does not do anything constructive, his government would fair better than that of Laloos. If by gods grace Nitish does do something good, Bihar is certainly in for some good times. I do hope Nitish does something to pull Bihar out of this mess that it finds itself today. It is certainly very difficult. But with some of the most intelligent and extremely hard working people in India, it might just be possible.

At this moment I really want to salute two people. These are people who had the guts to take on Laloo in his den.
1.) C.K.Anil, district Magistrate of Siwan. This man had the guts to take on Shahabuddin, the biggest of all goons reporting to Laloo and an MP from Bihar.
2.) ***. I dont remember his name right now. This is the guy who was responsible for making the current elections in Bihar peaceful and honest.
India needs more such people.

Lastly, I do hope that Dr.Manomhan Singh does not fall prey to any tricks from Laloo and thereby prevent the formation of a better government in Bihar.

Sunday, October 30, 2005

Sariya Thavara aka Right or Wrong

The protagonist in the tamil movie Indian (Hindustani in Hindi) steadfastly refuses to bribe and as a result indirectly causes the death of his own daughter. Obviously no sane person would do this. On the other hand, we dont go around bribing every single person we meet to achieve our objectives. Why?? We believe that the former is right and the latter is wrong though either case involves the same wrong act aka bribing. So what is the difference? Where do we draw the line?

The only difference that I can see is the objective of the action. Now that brings us to the question of whether the end result / aim of the action justifies the action, no matter what it involves. I certainly dont have an answer. There are a lot of factors that come into play here and there simply cannot be an answer here for all situations.

Whilst I was working in Soliton I had an accident. Thankfully I escaped with minimal hurt but my bike was badly damaged. I had to change the chassis of my bike. When this happens, one needs to re-register the chassis number of the bike with the RTO. Now take my word for this, dealing with government employees (the rare exceptions in govt service, please excuse me) is probably the most painful task one can ever embark on. There are a hell of a lot of procedures and you will need to run around a lot. You have to go to the RTO office / insurance office / office of the financier who funded your bike a lot of times to get things going. Now I had a great team in Soliton and they allowed me to step in and step out of the office any time I liked. So I was able to run around personally and get things done without having to pay a single paisa in the form of bribe. What could I have done if Soliton hadnt permitted me to do that or if there was some other thing that resulted in me not being able to run around?

After I had resigned from Soliton I had to shift to Chennai to take up a job in HCL. I had to re-register my bike with the RTO Chennai and had to get an NOC within 5 days from the Bangalore RTO. Had the govt mechanism been efficient I could have got it done. We all know how the RTO office functions and hence to get the job done in 5 days, I had to bribe someone. I really couldnt bring myelf to actually diong the act of bribing someone and hence I got an agent to obtain the NOC. The agent is also going to pay commision to the RTO folks. So, indirectly I am a party to a wrong act. Not doing the actual act does not absolve me of guilt as I was the trigger for the act. But I had only 5 days to get the NOC. So the only option left to me was to go to the agent. Now is this wrong? Having given homilies to many people on the importance of being upright and straight forward, what have I done now? Isnt this hypocisy at its best?

There are a lot of such things that we come across in our everyday acts. Another common example is when students aspiring to study abroad get financial statements from agents. American universities expect the applicants to show cash reserves of close to Rs.20 lakhs which is simply not possible for the vast majority of Indians. Only NRIs and the extremely rich would have such resources. Even many of the upper middle class people might not have so much cash resources. All their resources will probably be in the form of property. So what do the aspiring students do? Do they have to abandon their hopes of higher studies for the sake of not doing anything wrong. They simply get the job done from an agent. Is this right? Does the end justify the means?

After thinking about this for a long time I came to the conclusion that I am incapable of deciding on this and hence I decided to take refuge behind thiruvalluvar who wrote the following in his magnum opus Thirukural

"Vaaymai ena paduvathu yaathenil, yaathonrum theemai ilatha sol"
meaning......
"The action that does not cause any harm to anyone is the right action" (meaning adapted to the context)

Saturday, October 22, 2005

Gnaybagam Varuthe Gnyabagam Varuthe - 2

The rustic chemical engineer whom I had mentioned about in earlier post did something based on an extraordinary piece of logic that resulted in us all really swearing at him. The ususal practice in our house is that the person leaving the house last should ensure that all the lights in the house are switched off. That particular day this was not done and hence the 60watts philips bulb in the rest room was burning all day. This fellow came home at about 7 and wanted to use the rest room. He entered the rest room and saw that a frog was sitting on the bulb holder. He thought of various methods of getting rid of the frog. Finally he decided the most potent weapon to accomplish this monumental task and using that got rid of the frog.
There were four of us staying in that house. The remaining three of us were from the same class and we all returned to the house at 9. It was a decent neighbourhood and hence the roads were all well lit. The only dark spot on that road was our house. We assumed that our room mate had not come and we switched on the lights but nothing came on. Cursing the EB we went to the terrace. There we saw our room mate. I quickly went over to him and asked him if he had reported this to the EB.
"illa da, ithukellam EB vendam... I will take care of that myself. fuse poirukku avalavuthaan"
"fuse poirichcha. eppudi pochchu?"
"toilet bulb vedichiduchchu da"
"ennathu.... eppudi da"
"athuva.... oru thavalai toilet bulb mela irunduchcha, naan atha veratarthukaga"
"atha veratarthukakga... enna da panne, bulb eppudi vedichchuthu?"
"athukaga, athu mela thanni oothinen da....."
"#$#$%#%#%#$%^#$%^#$%"

"Dei treat eppo da kudupa..........??"
"ethuku treat"
"ethuka??? US porada naaye... moodikittu treat kuduthuttu po"
"Athellam oru mayirum kuduka mudiyathu. odi po"
"dei naaye, nee treat kudukalena... flight kalambum pothu, kaka oru wingla mattum pee poi flight kavunthudum da"
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

ABC (for want of a better alias for this guy, let me call him ABC) had always wanted to sing in the college culturals. He didnt possess a golden voice or something but certainly did possess a decent voice and a good music sense... till his second year his senios always superceded him and he never got a chance to perform... but on this occasion he was in his third year and hence he was going to sing...
This friend of mine was a nice friend of ABC and ABC had requested him to be in the auditorium when he sang...
I walked into my friends room.... "Dei enga da saapidalam, messuliya... inniku special VIT bomb... (thats what we called our idli)"
"Venam da... athaan ECE dept culturals nadakuthula, we will go there and eat"
So we strolled upto the canteen and started to munch some stuff....
ABC is practicing hard his favourite song and wants his rendition to be widely applauded.... but they say fate is not without a sense of irony... there is this final year guy who has also not got a chance to sing from his first year and hence he goes to the organizer of the event..
Half way thru our dinner my friendly suddenly said.... "man look at that babe there.. intha hindikara ponnunga vanthalum vanthanga, college kala kattiduthu po... dei methuva saapidunga da... we should not finish before them"
"Dei organizer... I am a final year student and i will be leaving the college in 6months... I want to sing and you better gimme a change, illati magane nee seththe"... and he had a lot of hooligans around him and the organizer was visibly scared... seeing this the hooligans increased their volume and started shouting at him again..
After a sumptous meal, none of us could get up..."Anegama nalaiku kalaila vellore sewage block thaan ninaikaren"... that was my friend....
"uhum... athu varaikum thaangathu... naan ingaiye orama"...
"Dei naaye s****** mooduda"
"Naanum atha thaan da try panren.. mudiyala... athaannnnn"
"thu, echchakla naaye.. professionals mathiriya pesareenga"
"thoda, vanthutaru, cisco employee"
The organizer went to his staff and told about the problem... the staff was also a bit perturbed about this... "OK, after two more events ABC has to sing right... he is only a third year guy, lets chuck him out..."
"paavanga avan, 2 weeksa practice panittu irukaan"
"enna panrathu... enakkum kashtamthaan irukku... but we dont have a choice"
"Oh shit... I forgot da... ABC is singing today and he wanted me to come... f***, i better run now"
"Dei odatha da.. vazhiliye vanthuda poguthu.."
"hahahahaahahahahahahahaha".. we laughed at the way he ran to the audi
"ABC, I have to talk to you do da"
"Sollu da machcchan"
"Dei... athu vanthu.. you cannnot sing today da...."
"!!!!!!!!!!!!!!!!!!!"
"seniors galata panraanga da... one of their guys want to sing"
"f*** you da..... and you are culturals tooooooooo"
My friend is running towards the audi i.e. he assumes he is running... it is more like the tortoises slow walk....
before he could reach the audi or talk to anyone he sees ABC coming towards him... then he says to me...
"shit da partha, i didnt hear him singing... he will be upset... i am going to just say he sang greatly.. just play along..."
"Hey machchan.... it was simply excellent da... seriousa da.. i dont have words to describe that song da... too good....
SPB intha paata padatti... nee thaan da itha padirukkanum.. seriousa da machchan, en kathule innum ithu olichikitte irukku da...
you are indeed blessed by god da... you posses such a wonderful voice.. do build on this da... appudiye uttudathe"
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
"yen da onnume solla maatengara... naan joke adikala da.... meyyalume summa nachchunu irunthuchchu...."
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

From katpadi station to vellore there is a straight route and there is a circuitous route... and whenever we goto katpadi station we hear all these bus conductors shouting and inviting you to their buses.... it is rather like coaxing you to come to their buses... I was walking with the master of kadi from inside of the station to outside...
"Sir vaanga sir vaanga.... vaanga sir vaanga.. vellore polam sir, inta busla vaaanga sir"...
the master of kadis reply... "ennamo koopitu vechchu sappadu potu ponnu kuduka pora mathiri illa koopadareenga"
"Grrrrrrrrrrrrrrrrrrr"
"Dei naaye, mooditu vaada... adichchu gidichchu vekka poranga da".... I was already pissing in my pants... these bus fellows are indeed dangerous
"Nera vellore, vera vellore".. this bus was not taking the circuitous route... he is taking the straight route...
Master of kadi sprang into action again... "Nera pona railway station buildingla muttidumga, velloreku thirimbi poganum.. ithu kooda theriyam bus otareenga..."
I ran out of the station...

Will try to continue.... :)

Wednesday, October 19, 2005

Gnyabagam Varuthe Gnyabagam Varuthe - 1

Statutory Warning: This post contains some of the utterances of my friends during our college days and when we were in our hostel. So the post will contain utterances and references to things that are objectionable in public. If you consider such thinks offensive, then please do not proceed further with this post.

I had a great last weekend. I made a trip to Tirupathi with a couple of good old friends. The trip was very spiritual and we had loads of fun. It was basically a trip to Tirupathi and hence there was no dearth of spiritually. My friends who accompanied me are great entertainers and hence there was absolute no dearth of fun. It was a great trip in all. We managed to recollect some truly funny, rather hilarious moments during our college days. Just thinking of it made us all nostalgic, and of course, laugh like mad. Im penning down some of those events that came to our mind. Obviously these are timing jokes which were extremely funny at the moment they were delivered. They might not be as funny now but rest assured that at the moment they were told we were all laughing like mad.


CS people were all huddled in a room and trying seriously to make sense of this thing called Linux. In comes this rustic chemical engineer in the making and asks one guy in the room.
"Dei, ennada ippudi ulunthu ulunthu padikireenga"
"Linux da, nalaiku test irukku"
"Oh..."
After thinking on it for some time.
"Appo LineY eppo padipeenga"
"#$%^&*&^%$#"


The master of kadi in our circle wakes up at 6AM itself on a vernal sunday morning. In comes his mech class mate. Only yesterday was he badly bruised by one of masters' super kadis which left him speechless for close to an hour. He should have learnt his lesson but unfortunately...
"Dei, yen da athukulla elunthutte..."
"Kosu bayangarama kadikithu da... thoongave mudiyilla"
Suddenly a brainwave comes to this guy and he wants to get even with the master....
"Kosuku thaan palle kidaiyathe, athu unna eppudi kadikkum"
The master gives a big grin... which is a very very bad sign for the listener
"Seruppuku kooda thaan pallu kidaiyathu... athu kadikale... athu mathiri thaan"
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"


They say dont count your chickens before they hatch. A very apt saying in todays world were people start building castles in the air. One of my friends was having a conference on yahoo messenger with a couple of his friends. They were all discussing about their future amongst other things. Suddenly one guy got carried away and started to talk a lot. This was the response he got as reply from my friend.
"Dude, lets not count the baby monkeys before the mother monkey gets f***ed"
Yahoo messenger could not bear this and it closed the conference!!!


Many of my close friends are from the department of EIE and all of them had a great working relationship with one of their staff. One of these EIE guys was quite a lazy bum in college. He was also a kind of very concerned about the cleanliness of his undergarments and steadfastly refused to wear one that was not washed. He had about 10 pairs of undergarments so as to compensate for his laziness. But one weekend, his laziness got the better of him and he didnt wash any of them. So he didnt have any to wear the next day to college. So he decided to bunk classes that day.
The staff, whom these guys were very close with, noticed his absence and enquired about him to one of his room mates, who was also from EIE.
Now this room mate was under specific instructions to inform the staff that the lazy bum was ill. He nodded his head from pole to pole while in the room but the moement she asked the question he decided to tell otherwise.
"Mam, He has no underwears to wear to college today. So he is on leave!!!!!!!"
You can imagine the expression on the her face when she heard this!!!


If you did your B.E. from Madras University then youd certainly be aware of the marking system. Well, it cannot be described in one word. In fact, all the expletives in the dictionatry would not suffice to describe that. A truly patheric marking system. One can really feel the truth in this only when one has really been hit by it. One of my close friends from EIE was hit by that marking system as New Orleand was hit by Katrina.
This friend of mine is also from the EIE department. He was a CS student in school and hence the stupid Madras University syllabus was a cake walk for him. He used to coach everyone in class. He was also quite confident after the exams. The results came in after the sem holidays. Whilst everyone whom he coached above 80 , he got....
2.
Yes. you read that right. he got 2 out of 100. Just 2 marks out of 100. Unbelievable it was, for all of us. The guy who literally copied his paper verbatim for 15 '2 mark' questions got 62.
Guess, youd agree. It is highly difficult or rather highly impossible to score 2 out of 100 in those stupid Madras University exams. Obviously, he was very dejected and shattered. He was sitting on his bed in his room and all of his friends were sitting around him and were trying to console him.
There were various theories that people were inventing to console him.
"Dei, it is probably 72 or 82. etho oru ***** vaayan, thappa potturapan. Nee retotaling apply pannu machchi, ellam seriya poirukkum" - this was his class mate
"Amam da... it should be 72 or 82. probably even 92", said another guy
"illati they might have failed to add up all the page totals", opined another
"illa etho oru kammanati, first page totala eduthu pottu iruppan" - this was from the guy who copied from him.
His room mate who was silent all this while, starts...
"illa da, athu 12aa kooda irukalam, 22aavum irukalam... "
"!#$%^#$!%^%%$$!%%^%$!"


This one did not happen in my college but took place in my friends college. There was a guy in my friends class who had a big crush on a female in his class. This was the end of 7th semester. He was very depressed at the thought of the sem holidays coz he wont be able to see her for close to a month. After pushing over that one month with great diffculty he came running to class for the first day of his 8th semester in college to talk to his sweet heart. But, as usual, she did not reciprocate any of his feelings right through last sem. This sem she went a step further. The first thing she did this sem was to distribute her marriage invitation to everyone. And of course she gave it to our hero too. He was sitting red faced right through the morning sessions. Then he ran to the hostels during the morning interval. He came back after 30 minutes. The class was already in place and the next lecturer was taking classes.
A deadly silence descended on the class when they all looked at him. The lecturer who normally does not stop talking even for a second went silent. Everyone was looking at him. The girl who gave the invitation was almost on tears.
He walked into the class in slow motion. Stood in front of the girl for some time that seemed like ages and then walked to his place with a big grin on his face. The lecturer who didnt quite know what to do all along finally mustered enough gumption to say this.
"You sir, please remove that 0 watts bulb hanging around your neck"

To be contd....

Wednesday, October 12, 2005

Its Rrrrrrrrrraining in Chennaiiiiiiiiiiiii

and WTF am i doing??? sitting in office and digging into the C++ code written by someone else...

there is a wonderful aphorism about digging into someone elses' code from Mr.P.Venkat, a Senior lecturer from the Dept of CSE in VIT. I can now realize the absolute truth in that piece of wisdom. how tersely worded and how appropriate. Venkat sir, I salute theeee......

How wonderful would it be to wear a jerkin and stroll down quiet streets in this weather with the words "Ill be your dreams, Ill be your wishes, Ill be your fantasies...." on ones lips. My heart pines for it. Will I ever get a chance to enjoy such simple pleasures every human is entitled to during his brief sojourn on planet earth. Hopefully sooner than later!!!

My work involves the sustenance of a massively distributed system that manages networks containing millions of nodes. As is the case with all massive applications, bugs are galore and everytime the customer finds a bug, the engineer who is responsible for fixing it will have his arse on fire. I just finished one and am about to take up another one.

Ah, the first rains of this monsoon. It is fantastic... With flowers blooming, fresh air and chill climate, having a stroll with absolutely no shit on your mind... that is bliss. Every nature would love this. Thankfully not all nature lovers are unfortunate like me, having to dig into some shitty code. Hopefully one day, Ill take up a job that would give me time for all this.

the lab was silent with everyone trying hard to appear to be coding to avoid being pulled up by the lab instructor. suddenly one of my friends, wanting to impress him, called him and asked him to debug his program. his program for the conversion of a multi level tree to a binary tree using mutual recursion would not work.
"dei unakku arivu illa. innoruthan codea debug panrathu, innoruthan pondatiya thetharathu mathiri. it is not possible. it is very difficult as you dont know the structure."

Wednesday, September 21, 2005

E-mail IDs

E-mail IDs are simply the online addresses of people. Addresses to which electronic mails can be routed. Such a well intentioned invention has now become a major source of embarrasment or a perennial source for some fun, depending on which side of the ridicule you are, at my work place.

I work for HCL technologies' Network Products Division. The most important customer for this division is Cisco. There are close to 1300 people working on Ciscos projects alone. The relationship between HCL and CISCO is a very strong one and hence all employees of HCL who work on Ciscos projects are given Cisco e-mail IDs. This is were the problem starts for most people as Cisco has got a weird way of making e-mail IDs. Typically the E-mail IDs are "firstname"."secondname"@"domain.com", atleast in many companies like Infosys, CTS, TCS etc... But Cisco does not follow this pattern. Instead it feeds the first name, middle name and last name to a software and that software returns an e-mail ID.

As a result of this we get some really hilarious e-mail IDs i.e. as long as it is not your own. Sample some of the e-mail IDs.

Gnanashekaran Gnanapandian - gngnanan
Rathneswar joshi - ratjoshi
Madhneskar yadav - madyadav
Supraja Pandiarajan - suppandi

and the clincher......


Badhrinath Soundarajan - badsound

There are other IDs like karamamu, aragotha, aguggili, etc... which are definitely funny but not on the same league as the above mentioned ones. I am sure there are many other interesting IDs that are yet to be explored by me.

Imagine your state if you have to say your e-mail ID to your friend/fiancee or whoever as badsound. Shit..... This would also be printed prominently in your business card. Now if e-mail IDs were to be just that, online addresses to which e-mails are routed, then the embarrasment would be limited. But unfortunately the culture at CODC (this is what they call the centre in HCL that works for Cisco - Cisco Offshore Development Centre) is that people rarely address you by your first names. This is true even for people who know you well. Everyone addresses you by your e-mail ID. So the embarrasment caused to those who have those extremely funny IDs continues for a long time.

There are a whole lot of places where e-mail IDs are used.
1.) Your customers will address you by your e-mail ID on conference calls.
2.) Youll have to put your e-mail ID on the various documents that you edit.
The list of places where your e-mail ID is used, is endless and hence the sources of fun is also endless. Some people stop using their names altogether and start using their e-mail IDs even when they have to introduce themselves. For a good portion of my first month at HCL, I was thinking my project managers' name was anku while it was actually anand kumar.

I just thought of some names and the resulting e-mail IDs. I guess these are very common names. The E-mail IDs are only my guesses but there is a good possibility of such names actually getting these IDs. Very funny indeed. Sample some...
1.) pulliraj - Pulliman Rajamurugan (remember the popular pulliraja)
2.) yamaraja - Yamini (Whatever second name that can be formed from araja)
3.) aarupanni - Aarumugam Pannirselvam (Aarupanni in tamil means six pigs)
4.) shitami - Shivkumar tamilselvan
5.) kutipani - Kutila Panirselvam (kutipani in tamil means small pig)
6.) korangan - Koushik Ranganathan
7.) gandhand - Ganapathi Dhandapani (First four characters in hindi = .... )
8.) muchakra - Murali chakrapni
You should have got the picture by now.

Sample some conversations that I hear on a daily basis
"Hey badound, what happened to that document"
"Has suppandi checked in that C file"
"Dei ratjoshi, inga vaa da"
Ill be laughing like mad everytime I heard these during my initial days resulting in the aggrieved people giving me some stern looks. But I am kind of used to all these now.

Thankfully not everyones names lends itself to the forming of such IDs. Yours truly also escaped this trauma. I got a rather manageable pkarasan. This was formed from my first name and surname.

Saturday, September 17, 2005

Answers to questions in C

1.) The array is already sorted. Bubble sort will hence come out of the loop on the first iteration. So it will be the most efficient.

2.) Since both i and j are integers (i/j) and (j/i) will only produce an integer. Since i and j have not been initialized, they will have some junk values and hence most of the times they will not be equal. As a result either i/j or j/i will result in a decimal value between 0 and 1. This value when converted to an integer will become 0 and hence k will be zero. In the rarest of rare cases when the two junk values (i and j) have the same value k will evaluate to 1.

3.) This will result in a compilation error. z is declared as a void pointer. No arithmetic is possible on void pointers.

4.) There are three solutions to this.
a.) add a '-' before the 'i' in the comparison statement.
b.) change the 'i' in 'i--' to 'n--'.
c.) change the '<' in the comparison statement to '+'

5.) void main() { if( printf("Hello world") ) {} }

6.) Recursion is when a function calls itself. Mutual recursion is when a function A calls function B and B calls back A.

7.) 0 (atleast on linux systems.. not tested on windows platform)
Scratch your heads how...

8.) Semaphores implement what is called atomocity which application programmers will not by using the boolean. i.e.
the statement if (a == 1) in C will be a bunch of commands for the microprocessor
So pre-emptive processors might stop the programs execution in any of those commands and hence it will not be possible to implement the semaphore action by application level code. By using atomic function calls, semaphores will avoid pre-emptive scheduling microprocessors for critical sections of code.

Friday, September 09, 2005

Interesting questions in C

Here are some intersting questions in C. Just for fun questions.

Me being a techie (atleast Id like to think of myself like that) Ill torment people often with such stuff... :) Kindly bear with me...

1.) You have an integer array of 1000 elements with the ith element obtained by the formula
a[i] = 2*i+3
Which of the following sorting algorithms will sort the array the fastest..
a.) Quick sort b.) Bubble sort c.) Selection sort d.) Heap sort

2.) What will be the output of the following code snippet
int i, j, k;
k = (i/j) * (j/i);
printf ("%d", k);

3.) Predict the output
main() { int x=5, *y; void *z; y=z=&x; y++; z++; printf("\n%u%",y,z); }

4.) In the current format, the following code snippet will run infinitely.
int i;
for (i=0; i<5; i--) printf ("*");

By just adding/deleintg/modifying a single character in the second line of the above code snippet make the code print exactly five *'s

5.) Write a program in C to print the string "Hello World". The constraint is that there should not be any semi-colons in the code.

6.) What is mutual recursion?

7.) What is the output of the following program?
void function(int a, int b, int c)
{
char buffer1[5];
char buffer2[10];
int *ret;
ret = buffer1 + 12;
(*ret) += 8;
}

void main()
{
int x;
x = 0;
function(1,2,3);
x = 1;
printf("%d\n",x);
}

8.) Most programming languages provide a facility called semaphores to lock resources for exclusive use. Why is this needed? Why cant the application developer have a boolean to control the access of the boolean?

Answers in the next post....

Sunday, September 04, 2005

Me, Myself and my Alter

I am a gemini and as a consequence of which I have two personalities within myself. Often both are at loggerheads with each other. The first one is my normal self which is visible to everyone. The second one makes its presence felt whenever I am contemplating on some issue. It will rear its ugly head and pose all sorts of dumb questions that would really piss me off. By the end of it all it would have done its best to have me nonplussed and would have ensured that my decision making abilities are at an abyss. On its day, my alter would have been so succesfull that Id seriously start beleiving that my IQ/EQ/etc.. levels are rivalling that of a third rate moron. But on most days I do manage to scrape through without much damage.

Recently it reared its ugly head at the most uninvited moment and started asking all sorts of uncomfortable questions on my new found passion - blogging. On this occasion I was left high and dry and totally battered. My state at the end of it all - "Total Damage". This is what transpired between us then.

"Hey you dumbo... what are you doing sitting all alone in your house. Poor chap you are. What else can you do. You dont have a social life. You need a girl for that". That was my alter..

"Get lost dude... I am in no mood to entertain you now..."

"Thats OK man. Now that I am here, you ought to entertain me. You cannot wish me away. LOL. Tell me what you are thinking about now"

"Oh... get lost you miserable swine..."

"OK dude. I understand. You are thinking about the angular momentum of the seconds hand in your wrist watch right".

"Grrrrrrrrrr"

"Or are you contemplating ways and means of becoming REMO. Hahahaha. Forget it dude. You are totally incapable of anything remotely similar. You can constrain yourself to UNIX shell scripting, LV and such things that are totally bereft of even a scintilla of fun. You are not capable of things that normal guys of your age do so easily."

"Oh god. What did I do to endure all this crap... Someone please help me throw this guy out of me"

"Its OK man cool it. Its not as easy. Coming to the point, I know you like the back of my hand. I have been with you for a looooooong time machchi. Dont try to obfuscate your thoughts from me."

"Oh for gods sake. I am trying to identify points to add to my next blog. Please let me gloss over it in peace"

"Your blog!!!! I just have one question. What is the difference between you blogging your thoughts and I putting my thoughts in a notepad and storing in my PC"

"Elementary, my dear alter. If I blog my thoughts, it is on the internet and my fans/friends/well wishers all over the world can read it. Seems like you are out of touch with technology. Poor old alter"

"Hahahahahahahahahahaha. You ass. You cant even pick up sarcasm. What kind of a dumbo are you. If atleast one other person cares to read it, then there would be some use to it. Not a single person has cared to read it more than once. A couple of people probably read it immediately after that unabashed mail that you had sent begging people to read your blogspace. After that not a single soul would have bothered to visit this. Most probably theyd have deleted that mail too."

"Excuse me alter. You see, that 10 commandments was written by me a long time back and most of my friends knew it already and hence they didnt bother to comment on it. Also you seem to be totally oblivious to my contacts. People are indeed reading my blogs and are commenting on it... "

"Man, I am getting really bored of that evil laughter. Let me try a different version this time around. Heeeeeeheeeeeeoooooooolaaaaaaaaa..."

"and whats this for"

"for the joke of the millenium that you just cracked. how can you be so naive to say that people are commenting on your blog."

"Check it out man. I have four comments already. I am new to blogging. Also I do agree that I dont posses a great sense of humour but people do take me seriously. Remember, it all starts with a trickle but soon it will be a tsunami. People will start flocking to my blogspot and the day when I start getting atleast 15 comments on each of my posts is not far away..."

"Impossible. 15 comments on each of your posts. You must be joking. I know all about the virtues of having a BHAG - Big Hairy Audacious Goal. But this is just too much. Pigs will evolve into flying creatures before that will happen. Osama would have converted to Budhdhism. You need to be reborn again to get such things to happen. Face it dude. Some things are just not possible. One just needs to look at the current state of comments in your blog. 4 comments for 7 blogs. and the worst part, two out of the four comments are self comments. Yuk.. shit... ooovaeee... will be right back after i pewt. hold on...."

"Hey wait... what happened"

After a wait that seemed like ages he comes back...
"ok i'm back."... "hehehehehe.. i have a very good analogy for that"

"analogy for what and why did you have to pewt. were you drunk last night"

"I had to pewt for what you said ass. You know my brain is allergic to such outrageous thoughts. Hmmm..... One commenting on ones own blog as there is no one else to comment on it. you know what it sounds like..."

"shut up you pervert. I can get your innuendo. this is neither a X rated blog nor is this meant only for stags"

"Not a X rated blog. agreed. Not meant only for stags. Cant agree to that. OK you have not explicitly stated that this is only for guys. But the probability of a species from the opposite sex visiting your blog is nill. So by stating that this is not only for stags, you are implicity stating that you expect women to visit your blog. This according to me, in fact according to simple logic, is not possible. So in effect your blog is only for stags. In fact its only for two stags. One is you and the other unfortunate creature is myself. You know, sometimes I simply cannot comprehend on how someone can be Panglossian enough to assume such things."

"What simple logic...???"

"Elementary Logic da machchan. The only two women whom you know are your mom and your sister. your mom does not know how to hold the mouse and you sister hardly gets any net access. So no women has probably visited this blog and in all probability never will."

"What disgusting logic...."

"OOhhh aaah ooh aa!! Yes. Yes. Yes. I should probably be given a life time free membership to Mensa. My skills at reasoning is indeed improving by the day and at the moment it has crossed all theoretical limits for human intellignce. I should go and submit myself to SETI, Search for Extra terrestrial intelligence, as a specimen.

"Shit..."

"Also I think I should recommend you to some committee who can award you a prize for this achievement. No women contacts except mom and sister and you are a software professional and 23. I think you are well on your way towards becoming the most famous of Brahmachari cum software professional of the 21st century. please gimme your autograph now itself..."

"oh my god. you are really getting under my skin. I cant take it any more. GET LOOOOOOST"

"the pleasure is all mine. please stop blogging. check out this blog of OKA. http://sleepless-in-iima.blogspot.com/2005/08/fools-proof.html There were 56 comments just on that one post on last count. Now thats blogging. Please dont pollute this wonderful blogging community by publishing junk which no one ever cares to read, let alone comment upon. "

"Grrrrrrrrrr"

Tuesday, August 30, 2005

No more invincible. But, still the numero uno team by miles

I guess just reading the title would have given you an idea about what this post is about. Its about the australian cricket team and its position in the pecking order of the worlds cricketing team, post ashes 2005.

First a few sentences on the current ashes tour. I opine that most players of both teams have been playing in what I would like to call 'God mode'. 'God mode' is NOT playing like Bradman. Playing like Bradman is actually quite boring. The result is all too obvious and this is the exact opposite of what makes sports such a sensation. It is the brand of cricket that you get to see when highly talented players play very good cricket with lots of grit, determination and endurance against an opposition that is hell bent on preventing what the player has set out to do. Some examples would be:
a.) Steve Waughs innings against South Africa in the 1999 world cup.
b.) Laxmans innings against Australia in the all too famous Calcutta test match
c.) Sachins innings against Australia in the Sharjah ODIs
and so on...
The list is endless. Now in this ashes series we have seen some sterling performances by both the teams. Really riveting cricket played on good sporting conditions by highly motivated players. This is as good as it gets. This is certainly the best series that I have ever watched, even better than the famous Aussie tour of India. This is what I call cricket in 'God mode'.

Coming to the point. Though the aussies are 2-1 down they still are the best team in the world by miles. Yes, England are playing great cricket and are leading the series but they came perilously close to being 3-0 down and remember this is their home ground. Just 2 runs in the second test and just 3 tail enders in the fourth separated victory from defeat. As one commentator had put it, 'England have learned how not to loose'. True, but what makes champions is knowing how to win. That is what this Australian team specializes in. They will not and will never ever give up without a fight, without giving thier opponents a real scare. The fight that they put up on the fourth day is probably the stuff cricketing legends are made of. Shane Warne and Brett Lee were spitting fire. If only McGrath were around, England would have needed another 2 years to get a sniff of ashes. Such fighting spirit, a total refusal to accept defeat is what makes champions. That is what makes them the numero uno team in world cricket.

Obviously they are no more the invincibles. No more the unbeatable team. No more the team that every captain feared to play against. They are no more the undispute number one. No more the unparalleled warriors under the ruthless captianship of Waugh. But, they are still the worlds best team. On current form, Sri Lanka and England are good challengers to them. But they are still miles away from dethroning the aussies from the post of the worlds best cirketing team. As for the ashes, let England beware. They are not safe and let them not rejoice. For the aussies will probably need only one session to turn Englands ecstasy into agony. This australian team is dangerous. They are at their destructive best when they are cornered. Beware England.

As a cricket enthusiast, I am not exactly an ardent fan of the australian team. I did root for England to win. The aussies hardly have any supporters outside of australia. But as an individual, I love the way they go about their business. The passion they have for their work is worth emulating by anyone and in any business. Just like champions eveywhere.
In my formative years in school, I used to learn chess from one Mr.Murali Mohan. The phrase that he repeated often to us,
"Nee thothalum parava illa, opponent jaikarthukulla avan kannu, mooku, kathulernthu ratham varanum".
Now, that resembles the spirit of this australian cricket team. I am gonna attempt to imbibe that spirit in me. Lesseee...

Sunday, August 28, 2005

Honesty, Integrity et al.

"Honesty is the first chapter in the Book of wisdom" - so said Thomas Jefferson. Obviously a huge majority of men and women in India have not crossed the first chapter in the Book of Wisdom. With honesty and probity in public life hitting abominally low levels with every passing day, the future does look bleak. But there is hope. There still are individuals who hold to integrity and honesty no matter what. Occasionally you do get to see instances of such integrity and honesty that really makes your day. Sometimes it goes well beyond making your day to making a great impact on your character. I am gonna relate a small incident that had a defining impact on my views of honesty.

This is not something that happened recently. This happened about 12 years ago (dont remember exactly when it happened but it was around that time). It was a nice summer afternoon in Chennai and I was in my summer vacation. So my mom decided that she'll take me to her office so that I can meet her colleagues. She works for the Department of School Education.

I was sitting on a small table in a corner of a room writing something. I heard someone walking into the room. I looked up and noticed that there was the priest of some church standing there. He was having a small bundle in his hand. I had no idea what it contained. I stopped doing my work and started observing him. He walked straight to the woman sitting on the table next to mine and introduced himself. Then he started discussing with the women on how he has started a primary school for the under prvileged children of his village and how some things are getting delayed because of the delay in getting some papers from the government. The women told him that she had nothing to do about the delay and that she could not reveal the current status of his application. She then explained to him some other procedures etc and was explaining to him the possible sources of delay and what he may do to get things done fast.

"Thanks for all the info madam. I have a small gift for you here and he opened the packet that he was carrying." It contained bundles of 100 rupee notes.

The woman was very surprised by this and was totally taken aback. "Sir, you are a priest in a church. You are a religious leader of the christian community. You advice people of your faith not to do sins. Also you pardon people when they realize their sins come for forgiveness. Being such a person, is it right on your part to ask me to commit a sin."

The priest didnt know what to say. He was visibly moved and there were a couple of tear drops in his eyes. He spoke after a few seconds. "Mam, please forgive me for this. The person who was doing the same job before you used to accept money from everyone to pass the documents. So I assumed the same about you. I am very sorry. May jesus bless you and your family."

"Thanks for your blessings. It is blessings of people like you that we need."
The priest left after this and I continued with my work.

PS:
1.) I have modified a few minor things slightly for the sake of narrative convinience.
2.) Incidentally, the woman that I had mentioned above has a son named Parthasarathy.

Friday, August 26, 2005

The One legged Mendicant

'Endrendrum punnagai, Mudiv illa punnagai... dheem dheem thanana dheem thanana vaaname yellaiyo...' - I was humming this beautiful song from Alaipayuthey as I was cruising along in my land cruiser with my sweet heart on the magnificent roads of Chennai. The destination: Saravana Bhavan - a gourmets delight.

Yah, dreams are always great. Probably I should dream even better the next time. Coming back to earth, i was actually driving my TVS victor on the rickety (but better than Bangalore) roads of Chennai to Saravana Bhavan in the scorching sun for my lunch. Saravana Bhavan is not exactly a gourmets delight, but it does offer tasty and healthy food at middle class affordable rates. I was parking my bike on the road when I saw three people leaving the hotel. The first two had their bikes parked to the left of where I was parking my bike and the third had her scooty parked to my right. The third being a beautiful lass was naturally the focus of my attention.

At this moment, in came this one legged mendicant and asked the first guy for alms. He kind of acted as if this 70 odd mendicant did not exist and didnt even bother to say no. This pissed me off a bit. But of course, you cant quite blame that guy. When you are constantly looking at such people wherever you go, your senses are numbed and you stop feeling for them. After spending some time standing in front of him, the mendicant moved on to the second person. This was a pot bellied middle aged man who promptly gave him something and left the place. The mendicant thanked him before he left.

Me being a kind hearted, soft natured, good souled Samaritan along the lines of Buddha, Jesus and the Mahatma decided to give something to this mendicant. Of course I never encourage begging and have prevented many friends of mine from giving money to beggars but I make an exception when the concerned person is very old. So, I was actually waiting for this chap to come over to me and ask me so that I can give him something and display my generosity to the world. But, much to my consternation he simply crossed me without bothering to even look at me once and went straight to the lass who merily giggling into her nokia 3310. Somehow this affected me. I was not able to fathom why a beggar wouldnt want to get money from me. Do I look like a pathetic miser? With these thoughts I went into the hotel.

The aroma of the food made me forget this and I happily devoured the food. After a sumptuous meal, I walked out of Saravana Bhavan. By this time, I had completely forgotten the mendicant and the whole of my brain was trying to analyze that core dumped issue that was giving me sleepless nights at work. But the moment I came out of the hotel, I saw this mendicant and the core dumped issue vanished from my brain. I tried hard not to look at him or think about him and made a brisk walk towards my bike but before I could start my bike and leave the place he came to me and asked me to give him some money in his own inimitable style. I was totally nonplussed now. Did that meal from Saravana Bhavan make me loose that Uncle Scrooge looks. I couldnt understand. I just gave him 1 rupee and left that place. A lot of the bikes there were parked in a haphazard fashion. Cursing the people who had parked their bikes like that on the road, I slowly removed my bike out of that mess. But by this time, my curiosity had gotten the better of me. I wanted to know why he ignored me the first time and then asked me the second time. Was it just an act of a mad old man or did he have some reason for doing so. I wanted to know that. So I called him and asked him to come near me.

Myself: "Ungai kitta oru kelvi. Yaaru kittelam kaasu kepeenga"
Mendicant: "Ellar kittaiyum kepen sami. Yaaru kudupanga yaaru kuduka mattanganu eppudi theriyum"
Myself: "Seri. Appudina yen naan vantha pothu yen kitta kekale aana veliya pogum pothu kaeteenga. Hotel Security yethavathu sonnara"
Mendicant: "Illainga sami. pasiyoda varavanga kitta ketta kuduka maatanga. nalla vayirara saapitutu varavanga kitte ketta kudupanga. athaan"
Myself: ???????????????????
Myself: "Inthanga". and I gave him another 5 rupee coin.
Mendicant: "Sami, athaan yerkanave kuduthuteengale"
Myself: "Ithu tuition fees"


PS:
1.) I do think there is a small lesson here for all budding marketing people. For some this might be very obvious. But for people like me, who dont have an aptitude for marketing, this may provide some valuable lessons.

2.) I am no linguist and my literary skils are not something to be proud about though I can throw around a GRE word or two here and there. So please do bear with any grammatical errors and spelling mistakes. Id be happy if you were to take the trouble of pointing out any mistakes that you think need to be corrected. It will help me in improving my writing skills.

Thursday, August 25, 2005

Blogs that I read

Thought Id list down some of the blogs that I read regularly and give my comments on them. Heyyyyyy, I can almost see that expression on your face - at this very moment arent you thinking "this bugger says that he is so damn busy with this core dumped issue that has beseiged him but has still got the time to publish four posts in a span of 48 hours. What the heck does he think???"
Well, honestly, I am very busy. I have been working for more than 12 hours a day in the last week but I do get some time during the course of my work. Basically there is a process called make, which builds the binary (for the Windows literate but Linux illiterate, this is something like your EXE). This process needs to be done everytime you do some change to the code and you want to test it. This takes about 15 minutes. So I manage to conceive something and put it here. OK, enough of the crap and let me come to the point.

The primary contributor here is Kumar Alagappan (a) Dog, one of my close friends from VIT. Please dont ask me why he got that alias. It is far too hilarious to be described in words. Honestly, you need to be an absolute third rate moron to not name him that after seeing dog do that. hehe... I better stop here. Doggie is coming over to India after his masters at NCSU and I might get castrated for this.

OK, coming to his blog. It is actually a pretty neat one. You can get some serious stuff, some funny stuff and hold your breath, some mega serials too. Yes, this dog has already written the story, screenplay and the dialogues for two mega serials (a T.Rajendar in the making). The first one was in three parts and the second one in four parts. Whilst the protagonist in the second one was an young lad, a middle aged man in the gulf was the protagnoist in the first. IMO, the first one was simply superb. The bugger actually built up a lot of suspense by publishing the three parts over a period of 2.5 months. I guess almost everyone who reads his blog were blown over by that. Enough said, read it yourself. It is titled "Insecurities of a Middle aged Indian Expatriate". Of course there are other blogs too that are worth a read.

'Oka' is the owner of the above two blogs. The second blog is now defunct (but you can still read the archives) and the first one is very active. I dont know this person and neither does he know me but I got the link to his blog from another friend and from that day I have been checking his blog everyday hoping that there would be a new post available everyday. I just have one sentence to descirbe the posts there. Absolutely, outrageoulsy funny. This guy really writes well and has got a sense of humour which would make the likes of many a bollywood/hollywood/kollywood/"what not" comedian envious. Mind you, this is not a jobless fellow scibbling some crap. He is actually an IIM-A grad in the making. I actually spent a whole working day (I was supposed to be reading Simple Network Management Protocol that day) reading all of the archives in his blog. (Of course I was laughing all day reading this but failed miserably in the SNMP test) This blog is guaranteed to have you in splits.

A few people actually post here but the guy who posts most of the stuff is one Mr.Durvasula Karthik (a) DK, honestly a name that evoked feelings of one of the angry rishis in Indian mythology in me the first time I heard it. But, as it often turns out, he is actually a very affable person with a good sense of humour. You can get a variety of stuff in his blog. Some real serious stuff to some not so serious stuff. Not eveyone may like his blog but anyone who reads his blog can certainly appreciate the clarity in his thought and the quality of his english. Obviously, this is one guy who heeded his hearts calling and took up a Masters in Linguistics after a Bachelors degree in Electrical Engineering. Such actions are not exactly very common in India. If your wavelength matches his, then youd really appreciate some of the stuff that is posted there.

If you have the time, do visit the blogs and read the stuff out there. Your time would certainly be well spent.

Wednesday, August 24, 2005

Truly Inspirational!!!

This is something that one of my close friends Sriram (a) thala wrote to a few of us some time back. This has already found its way into the blogspots of a few of my other friends too. Just felt that I could add more beauty to mine too by posting it here. This write up contains a few references to our college VIT, but it is quite applicable to everyone.


Hi Guys,

I was just reflecting the other day about times at VIT and life in general and I must say I came up with some very self probing and revealing insights. How many of us remember the times we were at VIT when gangs of people would get together and there would be general talks on how we from VIT would not stand a chance in the big bad world! I must say we have not done badly for ourselves and there's no reason to not be optimistic. Just take a look at the profiles of the people on this group! Now many of us still dont have jobs and are still to earn a penny but IMHO thats not an indication of success. Often times the pursuit of a dream and happiness is more fulfilling than the destination which will always be a step distant but I believe we are all getting there in out own little ways. There is however only one thing that bothers me. I call it the "Comfort Zone Syndrome ". I do believe that many of my friends from VIT are short charging themselves ( as I have done in the past ) by not taking calculated risks. Often a risk must be taken head on. But the Indian and general mentality is to always have a "concrete" backup plan. However, more often than not, this concrete back up plan becomes the comfort zone and the original plan is forgotten. How many of us (either on this forum or friends we can think of)promised ourlseves that we would "eventually" do that thing of ourdreams - and that the job/ temporary occupation / course was just a stop gap / back up plan? Perhaps I am being unrealistic. But its just that I always belived that there were many in VIT who had real potential with the intelligence. And I have tried always to push them on the path they dread - the path of risk. No journey is without risk. What I would request of members of this forum therefore - if you remember a friend from VIT (or indeed from anywhere) who one day told you his dream (perhaps under the influence of alcohol in RiverView :) and if he has forgotten about it - then please do this - fireup a browser and write him a mail. This could change someone's life. Its nice to see some people on this forum whom I have not met in a while. Isnt it surprising that its almost 2 years since we left college! To round off - my only fear for those who have not taken the big plunges yet - will we have the courage to tread the path of fear? Because in time many will have a wife and children ;) Risk taking will definitely not come naturally then if it has not already.

Regards
Sriram


- EOM

Thought Id add a few lines to this myself and spoil the pristine beauty of the above message from thala... but what the heck, its my blog ;)

The main point to note in the above write up is about 'Risk Taking'. If you want a clear cut path before you embark on the journey then you will probably never take the risk. Also, IMHO, if you have a clear cut path before you then it is no risk. You will probably never get it or probably get it very late in your life when it would be too late. All you need is a heart that should always pine for something. With that and trust in your talent in hand, just take the plunge. You will find the path. Remember, its the journey that is the thrill and not the destination. It is great if you reach your destination but even if you dont, you would have lived a very fulfilling life where you relentlessly chased your dreams. Again IMHO, it is zillion times better to fail after trying than not trying at all. OK enough of rhetoric ... go after your dreams...
10 Commandments for LV Programmers


Thou shalt try thy level best to banish ‘Build Array’ & ‘Coercion Dots’ from thy program for they are the incarnation of Satan and will then do their level best to make thy life miserable on the day of delivery.
Obviously these are necessary evils, which thou cannot banish from existence but thou can definitely cleanse thy code of such unnecessary souls. Countless is the number of programmers who have gone insane in attempting to rectify the evil action, namely memory leak, of these evil incarnations. Pray thy god to allow thou to declare the data types correctly lest if thou do not have thy god’s blessings in this regard, thy code will become a breeding ground for ‘Coercion Dots’ and after that even thy god can’t save thou. Always call upon the services of the angelical ‘Replace Array Subset’ instead of invoking the devil incarnate ‘Build Array’. If thou need any help in this thou shalt consult the second prophet from India on the hardships he had to endure in a project due to this sin.

Thou shalt promise on the apple of thy eye that thou will exhaust all other opportunities before deciding to use ‘Globals’ and ‘Locals’.
These words are straight from the mouth of the first prophet from India. He had to face the wrath of the ‘Globals’ and had spent countless sleepless nights in attempting to unravel the evil web they had created around one of his early projects. The evil web will be in various forms like impossibility of debug, too much consumption of memory. Thou shalt reserve a seat for thyself and thy team members in an institute of mental health before declaring ‘Globals’ for this was an option that the first pharaoh himself contemplated after committing the blasphemy of declaring too much globals. So the same fate will befall mortals like thou.

Thou shalt not commit the heinous crime of not knowing thy library for thy brethren for this will scorn thou and thou will have to hang thy head in shame.
Thou should understand thoroughly what thy libraries promise and attempt to use them as often as possible. Libraries are special angels from the almighty and thou shalt use them to produce code that is bug free. Also these angels will greatly assist in reducing the development time and they are angels who are known to all of thy brethren. Thou will be blessed always by thy brethren for using the libraries coz it will make their job easy when they try to debug thy code in thy absence.

Before opening LabVIEW thou shalt understand that ‘Error in’ and ‘Error Out’ are like the dress on thy body. Thou shalt not venture out without thy dress; similarly thou shalt not create even a single VI without ‘Error in’ and ‘Error out’.
If thy dare for even a second to scorn the importance of ‘Error in’ and ‘Error out’ this will be noted down by thy code and they will take their revenge at the most opportune moment and will crash thy party in no time. While thou might think this VI is not going to generate error the devils will be conspiring against thou and hit thou where thou least expect to be hit. They will induce racing conditions in thy code and they will induce it in such a fashion that the racing will NOT occur in thy PC but in thy customers’ PC. So never forget to give ‘Error in’ and ‘Error out’ and never ever forget to wire them, as then the angels will bless thou so that all error conditions will pop out and no racing will occur.

Thou shalt commit right now to thyself not to fall prey to the ultimate weapon of Satan, temptation to use parallel constructs.
Satan managed to tempt Eve to eat the forbidden apple but thou, a warrior of god, shall always watch for this weapon of Satan. If it was the forbidden apple for Eve, it is parallelism for thou. It is very easy to fall prey to the temptation coz it is very easy to do so and seems to provide good answers immediately but remember these are the hallmarks of a good temptation. If thou fall pray to this, it will allow Satan to cause maximum damage to thy structure in the form of racing. This racing will give thou many sleepless nights and painful work days that thou will feel like bashing up thy PC for no fault of its. But relief is available for the discerning. If utilized with extreme circumspection thy can master parallelism in thy code and close all doors to racing, the most tormenting creation of Satan. Listen to the third pharaoh from India on the difficulties he had to endure in a couple of projects in his formative years on account of a mild form of this sin

At the outset thou shall master the art of using ‘Simulation’. Another of god’s creation that will relieve thou of the headache of testing the software with the hardware.
If ever there were a double-edged sword then this would be it. If used carefully can be such a good domestic pet but if thou, in all thy haughtiness, decide to abuse this gentle angel, thou shall face its wrath during testing. It will transform itself into a Jurassic beast and will cause untold harm to thy project estimates. If the fate of countless programmers does not convince thou not to abuse this angel then even thy prayer of repentance in the last moment will fail thou.

Be it an ‘Enumeration’ or a ‘Cluster’, even if it is used only once, thou shall save that as a type definition.
If thou do not adhere to this commandment thou will have to repent it later when thou are forced to change the structure of the cluster or add elements to the ‘Enumeration’. Though might think I will leave this project before any modifications come but thou will have to endure being abused with the choicest expletives from the person who had the misfortune of modifying thy horrible creation. Thou will be labeled a fool if thy fail to use such a simple god provided tool which will prevent survival from becoming hell in the later stages of thy project coz as by then thy LabVIEW application bereft of type definitions would have become so convoluted that it will start resembling the Gordian knot more than a Virtual Instrumentation application and thou art no Alexander.

If thou categorize inputs as ‘Recommended’ and ‘Required’ then truly thou and thy brethren are blessed else great misfortune will befall thou.
The creators of LabVIEW in all their wisdom had decided to make the inputs ‘Recommended’ by default. Though this might appear innocuous at first look, ask the poor programmer who had to wonder why his data in a ‘LV-2 global’ is getting initialized all of a sudden in the middle of an application before thou decide on the importance of this. If thy god had decided that he would endow thou with the wisdom to use this feature then thou art a truly blessed programmer. If thy god has failed to do so then thou shall try to put this into thy brain coz this is for thy own benefit. If thou decide to ignore this then let thy god help thou.

Thou shalt understand that thou are not creating a piece of art while coding for it to be abstract and thereby pose all sorts of problems to mortals from comprehending thy creation. So thou shalt create code that is clean and well commented.
If thou become too arrogant and claim that thy code is supremely self-documenting and hence does not require commenting, then thou art the biggest fool on earth coz though thou might be the pharaoh of pharaohs in LabVIEW thou brethren might not be the same. So thou shalt make thy code clean and explain all thy intelligent algorithms and the reason for following the data structure that thou have followed. Also remember comments are also part of the software, so when thou changeth the code thou shall changeth the comment. Also thou should not display thy arrogance and comment very simple operations. If thou doeth such things then thou will be scorned to no extent by thou brethren and will be banished from thy company coz thy nuisance value will far exceed thy utility.

Thou should remember coding standards like thou remember thy name. Coz any deviation from it, intentional or not, will coz thy brethren not to understand this and thou should cease to call thyself a programmer.
Thy creativity is better used in solving the problem than in finding new ways of doing simple things for which standards have already been established. While thou might think that thy idea is better than the standard thou successors might not think so. They will not thank thou for thy crime of playing with the sacrosanct standards. On the contrary, they will revile thou. If thou still feel that the standard is the creation of some useless fellow, think again. There have been pharaohs before thou who have created this in all their wisdom. If thou still think thou have to change the standard then thy god help thou in this perilous adventure. Thou have to perform the Herculean task of convincing the living pharaoh of the need of such a misadventure.


Creation of
The third pharaoh of LabVIEW in India

Parthasarathy



By
The third pharaoh of LabVIEW in India
Parthasarathy


PS:
1.) This is heavly inspired by
‘The Ten Commandments for C programmers’ by Henry Spencer
http://www.lysator.liu.se/c/ten-commandments.html
Check that link to get an annotated version of the above

2.) This was written by me less than a year ago while I was working in LabVIEW in Soliton Technologies www.solitontech.com .

3.) LabVIEW is proprietary software of National Instruments. To know more about LabVIEW, check out www.ni.com
Why CORE-DUMPED?????

For the uninitiated, core-dumped is an error that the C/C++ compiler reports when one of the pointers in the code violates the sarcosanct boundaries in the memory. This is actually a very frustrating error and almost all C/C++ programmers would swear that this is a real pain in the arse.

The error statement would simply be "Segmentation fault - core dumped" or "Something else equally bizarre - core dumped". Hardly of any help. Will not contain any details regarding why the error ocurred or where it ocurred. So to come out of it, you really have to dig in deep and try and solve the issue which can be really very frustrating.

Now, this blog got created when I was screaming at the top of my lungs for someone to come and rescue me from the clutches of one such error and hence this got the name core-dumped. The compiler would simply dump the core if there is something in the code that affects things that it reveres - basically boundaries in the memory. Similarly, if there is anything that affects me, then this blog will contain that. So this is basically my core-dump. But it will be better than C/C++ core-dump as this will contain the when, where, what and why...

The title "Manathirku Varuvathellam" means "Whatever that comes to my mind" in my native tongue Tamil. So you can expect posts on diverse topics consisting of but not limited to tech stuff, reviews, links to great websites, attempt at wry humour, my feelings etc...