Horn not OK, Please!

“Okay, so you are waiting for the traffic-lights to turn green, let me wait till it turns green so that I honk the shit out of your brain.”
“Okay, there is a passage left right behind you, let me repeatedly blow my horn to come a few inches closer to you, I have a bike, so it’s my right.”
“Who are you, a damn pedestrian? Leave the goddamn footpath and zebra crossing, else I will have to honk forever. Don’t you see, I have a bike?”
“Okay, the vehicle next to me is an ambulance. Forget it, I pay the road-tax and I am getting late, let me overtake it by blowing horn.”

These are a few variants of what we encounter everyday on Indian roads, and that’s why we are like:

and then this history guy exclaims..

Yes you got it right, I am talking about traffic situations in India and excessive usage of horn. Exposure to sudden loud noise can affect our ear-drums to some extent, sometimes even worse.

What is the need of the hour:

  1. Prolonged horns should be penalized unless there is a real need.
  2. Use of pressure horns should also be penalized if blown near schools, offices or, hospitals.
  3. Driving license is the key. Once an Indian gets it, he feels himself as the king of road. The Driving license issuance should be strictly handled in every single city.
  4. Honking needs a special strict law, may be a section in traffic laws. It’s a normal scene when you see as soon as the signal turned green, everybody automatically starts honking, even after knowing that every single fellow is in hurry and no one will stop in that condition. Book such errant drivers and set examples starting from metro cities and then in others.
  5. In Michigan, you can’t use a horn unless there is an emergency. Much of a criminal offense, indeed it is.
  6. Some blow horn for the sake of pleasure, or to get attention of other drivers on the road. If found guilty, they should not only be penalized but their licenses should be withheld.
  7. If the laws can’t be strict, the enforcement should be much stricter. This should never be confused with the do the deed, pay a few rupees to the traffic cop and leave.

All in all, every Indian driver should at least learn basic etiquette of traffic. If everybody starts following it, there is no denial of the fact that we will not contribute to excessive noise pollution in our country.

So, from next time onwards, “Horn , NOT Ok, Please!”

…and they say you have no life

Get up from bed, go meet relatives, be social for christ’s sake, damnn this internet, shut your laptop down, get a life….blah blah blah.- These are the few quotes (some original, some translated for better readability ;-)) can be heard at home in my weekend hours.

I hardly used to go out on weekend this winter. But even if the winter is about to kiss its end, I have not changed the usual activities at all, it’s just like I have moved some blankets off my body, that is it. Glued to my laptop, I prefer killing hours. This weekend was no different, follows the list of tasks:

  • Online Challenges: Solved 1 from February Challenge in CodeChef and 2 from HackerRank’s Algorithm challenge.
  • Firefox: Contributed to FFX via twitter’s support. A bit irritating, but at the end of the day, it feels nice.
  • Movie: Downloaded the movie “My Sister’s Keeper” and recalled good old memories by watching the same.
  • Wikipedia: Edited Shibani Kashyap’s page. God, this needs so much citations, let’s see if I can cover it up next weekend ;-)
  • Whatsapp: I have a Nokia Phone having a whatsapp app, but I don’t use (may be I am not that social :P). But I love contributing to whatsapp localization for Nokia symbian devices. Reviewed, answered and voted a number of leftover items. So much win, ain’t it?
  • Shabdkosh: Moderated and answered a few posts, since there are enough folks doing my job, I am well assured a visit once a week would suffice.
  • IRC rooms: gcc, Fedora-india, bash, firefox and so many. These are some nice places online where I feel so comfortable listening to their issues, socializing with them. You have interest? give it a try then.

So..in a way, i am so full of life…doing what I love to do….justified ??

Falling sick is wrong on so many levels

So..passed some days of agony, going through a series of bad incidents occurring to my body last week. Closed ones know I and they have touched several wood believing that i have never been and would never be hospitalized.

no..no..I seriously, am not going to iterate through those events happened to me and not going to boast how i came across fighting all that and writing them here because no one absolutely has a time to give a heed to these craps.

Well, this post of mine is a learning; Learnings are everywhere and we can actually learn through the diseases our body suffered so far.
1. A sick neeraj is a useless neeraj:
Yes, it felt so useless sitting and taking unwanted rest on a solitary bed in the hospital nearby my house. Those who have suffered lying on bed, watching the medical solution running drop-by-drop to their blood’s company through a plastic pipe; this in fact, makes you realise that yes, that’s why on earth you are supposed to be here in the hospital. In fact, this was my first experience of spending days in a cold house like a dead skin. :)

2. Phenomenology of Being sick:

Quoting what Siri said: “one that depends on temperament, personal history, and the culture which we live in.”

Very true, indeed. Nothing much to be explained here as it’s  so simple as Windows’ latest logo.

3. Nurses are more closer to God than the doctors:

Be it that South indian nurse, who kept reacting “Aiyoo Shri Krishna” with a sweet disgust on her face, on every idiotic activity of mine, be it the Safaiwala who used to come in the morning waking me up asking if he can quickly change the bedsheets and all, be it the mealwala, providing me a time-to-time meal near my bed or, the old maid who kept a check if I am not running out of drinking water–> folks, you are the real images of what we call, the God.

4. Sickness breaks your closed ones more than yourself:

Must admit that kins lost their sleeps just to hear a news that I am recovering from deadly Dengue.

5. Must not fall sick:

If I go by Rahul Gandhi’s ideology, the illness could be a state of mind. Dude, sometimes, it’s true but many a times, it’ s not.

Ab kya kare, delhi me dengue hum thode hi na laye hain.

Well…let’s have a quick look on a ragecomic freshly created.

Story of my life

Story of my life

Don’t grow up, it’s a trap

Starting a new blogpost requires self-contemplation, the courage and most importantly the “Time”. People exclaim with surprise “you are having enough time..ain’t it?” Well…i have time…and i don’t want to lose it that’s why I am here to speak out.

It’s my birthday, the day when my parents saw me first, the day when i incremented the population counter by one, the day when i merged my life to hell lot of natives’. Ruminating about my last 26 years last night, among which some lost in kindergarten, some disappeared in playing and wandering at home, a good bunch went away hanging out with friends, some in life out of home, and recent some in mail, code, internet and losing hair. So, psychologically speaking, i have almost developed a pretty nice competency in social life, but something remains unchanged since day one, some of’em are:

1. I just not only sing in the shower, I perform.

2. I see my photo and it ruins my whole day with an “Oh God Why” moment.

3. It’s easier for me to stay awake till 6AM than to wake-up at 6AM.

4. I love asking kids what they want to be when they grow up because I’m still looking for ideas.

5. I never know what I have until….. I clean my room.

6. When people fake sing “Happy birthday to you”,  I sit/stand there like a dumbfuck trying to figure out what to do.

7. I don’t smoke and am proud of it.

8. I am ugly and i fuckin’ smartly know this.

and it goes on….phewwww!

Okay leaving the past and coming to the second part, where i don’t say some serendipity awaits me, but yes while people are happy enjoying the festive season (Diwali, the next to next day) with their loved ones, a lazy ass is still wandering in texts over a blog with his official-cum-personal laptop and thinks it’s gonna work. Hell yea! :P Well..Life starts giving me lemons anytime and i make LEMONS and life becomes all like “Wait…whaaaat?” I know, this in no way makes any sense, however has something to do with my emotional life :).  Since growing up is a part of life, it teaches me to grow up to exactly the same amount in every aspect of it. One must have some impatience to live a life, I too have. After all, it makes me to ponder over the meaningfulness of my life; recalling a famous Hindi movie line “Dilo me apni betabiyaan lekar chal rahe ho, to zinda ho tum”(You feel alive, when you have some impatience for something in your heart). I am impatient about everything which would turn something good for my dear ones, my society and in turn, for myself. That will show up in my may be the next post… hehehe :)…for the time being here is a ragecomic made an hour ago, for you.

9gag fan

Story of my life

 

A step towards upgrading myself to a human

“Bhaiya, ek bada bag de dena,ye to fat jayega”(Bhaiya, a bigger bag please, this one may get torn easily.)- I noticed a duck-faced girl reminding me of Nargis Fakhri  purchasing potatoes on a grocery shop where I was buying onions to prepare chicken curry this Sunday.
“ye lo, madam ji!!” (Here it’s yours, madam!!)- said the grocerywalah. I saw her handling a half empty jute bag which carried almost nothing but a newspaper.
He pulled out a bigger polythene bag and handed that over to her. It was a not a thin polybag, and since she had a polybag already, she was just trying to make a support to the potatoes bought.
I was nevertheless not concerned with her, but the situation made me request her: Mam, aapke paas to ek bag hai hi..usi me rakh leti aaloo ko! (Mam, you already having a bag, right? Why don’t you keep your potatoes in that only?)
There came a moment of silence, and I was poker-faced when she gave me a “Who the f**k you are to advise me my business”-look and reverted, “kyun? kya hai isme?” (Why? What’s the problem behind?)
I smiled and said,”Mam, polybags hamare liye thik nahi hai, aapko pata hai isko recycle kaise karte hain?”(Mam, polybags are not good for us, do you know how to recycle it?) She exclaimed thinking me a crazy lad, “recycle..kya??” (What..recycle?). I noticed a strange look in her eyes, and thought she could be recognizing me as a vagabond , i said..it’s ok mam, sorry!! and she traced her way giving me again a “to hell with you, boy!”- look. The grocerywalah who was watching this 35 second drama, turned back to me and said, “kitna pyaz, bhaiya?”(How much Onions, bro?)
When i was segregating fresh onions, he told me, “bhaiya, ye sab to band ho chuka tha, lekin sab chalta hai…koi apna jhola nahi lata”. (Bro, these (polybags) were banned earlier, but they are okay today..no one brings his own bag). I smiled at his remark and put the onions into the level-beam. He balanced the weight and pulled out a polybag again to put the onions inside when I immediately forbade him to give any because I already had a small cloth-bag in my pocket.
When I was handling him a 10 rupees note, I asked, “Bhai, agar ek baar mana kar doge to agli baar se ye khud apne bag lekar aaya karenge.” (Bro, if you say ‘no’ once, they will certainly bring their own bags by next time!!)

I witnessed similar incidents since last three weeks and came to a point that, there was hardly any shop left which used bags made with any material other than Polythene. May it be grocery shop, the hardware shop, the garment shop, the general store, the confectionary shop, the butcher shop, or even the medical store, all frequently give away polybags without even asking whether the customer can carry the things without it. I prevented my mind to kill myself when I saw an aunty in the neighbourhood bringing two lemons in a 2 kilos. polybag.

Anyway, those who are reading this, must not be surprised, this is very very much normal now a days. But, I don’t know why, it teases me a lot.
Chemically speaking, Polythene Bags(regionally known as Chimchimmi/Polothene (in Bihar), Chimki (in eastern Uttar Pradesh), plastic bag/polybag (in Delhi), not sure about other states :P) is a polymer of Ethene/Ethylene (Chemical formula forgotten, may be C2H6?? ;)) and a non-reducing substance on earth. I remember this statement from my Chemistry teacher when I was studying my 10th.

There is a word called “recycle”, and it makes sense a lot when it comes in context to our respected “Mother Earth”. Yes, I am talking about recycling of resources. Polythenes are harmful to the Earth and in turn to us. I don’t want to make a good deal of explanation about its deadliness. Making it shorter, let me summarize a few points which can make us a good denizen in true sense.

  1. Reuse polythenes to a great extent.
  2. Use cloth bags instead of asking a polybag anywhere. If posible, take a bigger bag sufficient enough to your requirements while making a move to the market for a shopping.
  3. Try saying “no”(to the polybag), when someone offers something in a polybag. Trust me, it’s super-effective.
  4. I am quoting a corporate store named “Reliance fresh” which boasts itself to be environment friendly, gives free netbas to carry grocery items. I must say, avoid those netbags, they again are more deadlier than a polybag. People use them in huge amount, and throw them in garbage after use. The plastic nets are well able to injure the internals of the body when an animal takes it inside being unaware of the consequences.
  5. Before throwing a polybag, think once, is it really necessary to throw it, or can it be used once again.? I am 95% sure, you will get an answer positive, yes you can use it again. Go for saving it next time you go to purchase something, use the same instead asking for a new one. If you do this, I thank you for taking a step towards your mother’s care.
  6. My mom uses useless polythenes to make door-mats. She cuts the polythenes into stripes and knits them like woolen cloth appending them one by one. I remember from my childhood that, an aunty used to create hand-fans out of thick polybags. That was commendable. There can be several other usages as well, if you know any, do post.
  7. Coming over to another resource called paper:  Adding to the earth’s care, we must not waste paper as well. Take double-sided print-outs when necessary. Don’t print Railway e-tickets, now they accept it to be in electronic form. Use notepad, only when required. Those who are well adapted to computers, keep it simple to note something, Start->Run->Notepad-> Write->Ctrl+s. I have been using a single notepad since Oct 18th. 2010, and it can still be seen inside my office bag having a few last pages empty.
  8. If your company provides you free notepads/papers, take it only when required in urgency, and use it thinking like you paid for it.
  9. Some stores give you free paper-bags to carry items. These are very very precious for us. Avoid using them as anything other than a writable or printable work.
  10. Paper cups, NO!! Paper tissues, NO!! I always see in my office cafetaria, people use both tissue papers and water to clean their hands after eating. Use only one, either water or paper. Just beacuse you are working with a corporate, doesn’t mean you forget all your homely culture.
  11. While using tissue papers, one is more than enough, why pulling more than one? Better, use your hankies instead!

Truly speaking, I also can’t make myself assured to follow all the items i wrote above, but yes, I understand and follow them 10 out of 11 times a day, in general.
I believe, everyone can make it more than me, i.e, 100%.

Role of the government: Shiela Dixit says that she wants to see New Delhi as pollution free. She appeals the citizens not to use polybags.
I hardly care this message and it’s of no worth. Better, we understand our own role, because if she really wanted Delhi to be pollution free, she could have eradicated this monster here several years ago.

Aside

I was just derping around my computer a while ago and before shutting it down, i just landed into my facebook account to take a look on news-feed. While marking spams to all the shits over there, i came across one of the genius-shared-posts from one of my FB friend (trust me, FB friend :D) which made me write this post right away.

Let me paste it for her sake (as she says to share it…)

Boy: Boys are stronger than girls.
Girl: Oh! Please, can you carry a 7 pound baby in your stomach for 9 months? Can you cook, clean and talk on the phone at the same time? Can you burn your forehead with a curling iron and not complain? Can you walk all day in 5 inch heels? Can you cry all night then wake up the next morning like everything is okay?? Remember guys, woman are only helpless until their nail polish dries :)

Share it if you like it.

I just perused it thrice…you don’t believe me?? Yes..i did! Okay..let’s analyze it one by one:

  • 1. Can you carry a 7 pound baby in your stomach for 9 months?

No, just because Men’s body don’t have a usual construction for making it feasible. If you are talking about the labor pains, there is one pain men can suffer and they only know [if you know what i mean] when it hurts. Exactly an unfair question, pains can’t be compared..right? One more thing, if you have a strong feeling that a baby is of 7 pound from day one till 9 months, i am just a bit skeptical about this because of obvious knowledge gained during my 25 years of life. well..let’s move onto second.

  • 2. Can you cook, clean and talk on the phone at the same time?

Clearly a Yes! Multi-tasking is very much popular among men. I am not sure about others but there are examples of such men who can cook, clean, wash dishes, dance, and talk on the phone at the same time and trust me the reason behind is you..yes, you girls! Next….

  • 3. Can you burn your forehead with a curling iron and not complain?

No! It would be just a waste of time and even if had men to do such, they have stronger aim to hit at anything. This is just an epic fail of you, be careful next time. Next please…..

  • 4. Can you walk all day in 5 inch heels?

Yes, physically!! But we don’t, just because they are not comfortable. I really don’t find any valid reason why such questions were even thought.. High heels were designed by men only, because you may look sexier and taller. Wearing normal shoes doesn’t degrade your femininity. If you are an Indian, I would say normal Indians are prettier than you professional-western-freakos.

  • 5. Can you cry all night then wake up the next morning like everything is okay??

This was the hilarious one in the list.Surely, we could have cried, but then we think what the fuck are we crying for, we deal with our problems in our own way, so no tears…then begin to watch some movie, or do some programming/gaming/9gagging etc. Because we remember, “the null mind is devil’s lab” (professionally speaking).

  • 6. Woman are only helpless until their nail polish dries

Are you fuckin’ kiddin me??– a Woman is never helpless…this is just their feeling which makes them helpless and Nail-polish thing is just a shit, i know you can’t work in that case also when your hands are Henna-clad and many such examples. A woman can conquer everything/everybody if she just realizes her potential. Do I need to quote names for this…?? I don’t think so.

To conclude, let me just appeal to all those who share such posts and keep whining about it: Women! there is nothing comparable in you and a man. What you should feel proud about is that BABY case, because there you turn into a mother and mothers rule the universe of which, men are just a part.  Those who share this or agree with such Facebook craps, please don’t get offended by my words and even if you do, that would make point no. 7 to be edited in this post. Fortunately, there are some very nice fair sexes in my life/I have come across, who just don’t give shit to all this and know how to live and love their lives, a salute to you all.

Proudness level : Women

Macro prescan funda

I was just going through a community post and saw the following C problem, and reminded me of my college days, thanks to the post-maker!

I managed to write this here; because it may come on Google search for others who are still confused with such problem. Hope my explanation helps!!

Predict and explain the output of last printf statement.

#define f(a,b) a##b
#define h(a) g(a)
#define g(a) #a

int main ()
{
printf (“\n%s”,g(f(1,2)) );

printf (“\n%s”,h(f(1,2)) );

printf (“\n%s”,h(h(h(f(1,2)))) );

return 0;

}

Before we jump to find the output, let’s remember a few golden preprocessor rules defined by GNU corp. in gcc.

a) # opeartor stringises the argument.
b) ## opeartor concatenates the two arguments.
c) If an argument is stringified or concatenated, the prescan does not occur.
d) Prescan is a process in which complete macro expansion takes place.

Let’s come to the printfs one-by one:

g(f(1,2)) => matches g(a); which says a whould be stringified. No prescan takes place; just the argument f(1,2) as an string “f(1,2)” comes in printf.
So output is: f(1,2)

h(f(1,2)) => matches h(a) which calls another macro (not doing any concat or stringisation), so prescan should take place and it goes to the lower level expansions.
Hence,
=> h(f(1,2)) => h(1##2) => h(12)
=> g(12) => “12″ (as a string)
“12″ comes in 2nd printf.
So output is: 12

h(h(h(f(1,2)))) => matches h(a); prescan should take place (because no stringisation/concatenation)
so, from lower level, we need to go up replacing the macros by their aproprite values.
h(h(h(f(1,2)))) => h(h(h(12))) (12 is juat a concatenated object, not a string)
=> h(h(g(12)))
=> h(h(“12″)) (12 becomes the string)
=> h(g(“12″))
=> h(“\”12\””) (stringising “12″, causes escape characters \ to come for double-inverted commas, first and last commas being the stringifiers)
=> g(“\”12\””)
=> “\”\\\”12\\\”\”” (as a string)
“\”\\\”12\\\”\”” comes in 3rd printf
So output is: “\”12\””

A meaningful pre-Holi evening

Hardly had time to write something…or rather didn’t get anything to press. As told by my ex-fairsex colleague, I usually press geeky things..ohh..thats true. But today is Holi ..of course..its Holi, a day, a holiday, and a holy day as well, so there is something i want to share . This day is kinda special for me..special in a way that it changed my perspective I had some 6 years  in a university hostel. But ..I do miss my BHU/JNU friends who made it joyful and colorful. Last Friday, we (me with my Nalanda friends) played a dry and herbal holi on/after office time. It was so much fun out there and i was going back home after greeting everyone a Happy holi. That’s where the real story began…

Since, it was a pre-Holi day, people from Delhi-NCR were commuting to their homes/native places. So, a general NCR employee can figure out the rush in evening at festival times  in metro stations, DTC buses and all sorts of commutes possible by Sheila Dixit’s grace, we have here. Anyway..I boarded the metro at MG Road station somehow, passing the one and half kilometres long queue. Since my whole body was drenched with colors, i ended up looking  like a clown; needless to say, few people in metro were surprised and kept staring at me , and two kids got scared as well, and stuck with their moms. “Just one more day chap!! Let Holi come, and you won’t even recognize your parents.”  i smiled at them and moved to a corner.

It took me around 20 mins to reach my destination by metro;  got down at Chhatarpur metro station to board a public transport bus which could take me upto Mehrauli. Waiting at the bus stop, 10 minutes passed…20 minutes passed..nothing came…but still had a hope that a bus would come otherwise hiring an auto in delhi is a tough idea. Finally, I found a DTC bus, I let others to board first, since my destination was hardly 10 minutes by bus. The bus was over-crowded, but I was not taking any chance to wait for another. I somehow bought a ticket, and began to move to the front gate. While I was about to get down,  I saw an old lady sitting at the front seat. I figured out that something had happened to her judging by her desparate face  and she was being consoled by other folks in the bus. The bus heading towards my destination, Ladosarai terminal, stopped at the red light. Then, I heard someone instructing that lady to get down here, take some bus or walk a kilometre. Not interested in the conversation, I waited for the lights to turn green, when i knew that she had to go to some hospital in mehrauli where her family was taking care of someone closed to her when she lost her way and unfortunately reached gurgaon. I could see no cellphone with her.  Time passed, the lights turned green and bus stopped at my bus stop in the very next minute. I got down, beside me that lady was getting down with a heavy bag with her, probably that might have contained some meal or clothings etc. for the victim in hospital. The bus passed, leaving her at the stop, but she didn’t know the destination and noone except me got down from that crowdy vehicle. I saw a kind of despair on her face, but i was in a hurry . i fidgetted with my cellphone and started to go when i noticed her in desparate help..i asked her, “kaun sa hospital jana hai aapko mehrauli me?(Which hospital in Mehrauli you want to go??)” knowing that might she not be answering my question. She very hopefully answered, “TB hospital beta!…mera something something….hospital…something something…gurgaon…something something…bahut der….something something…”. Her voice was not clear to me..but i understood what was she trying to say.. because there is only one Tb hospital in mehrauli, and then i recalled those voices..when people were instructing her to move there.  I recalled the venue and realized that it’s not far but it’s a bit hard for her to find. I said, ” aap mere saath chaliye..main aapko hospital tak chhod deta hoo, yahi paas me hi hai”(“you can come with me to the hospital, its nearby”). I was not sure whether She would come with me, because of the reason, the place Delhi is known for and thought if she sould say no..or made any excuses, i would  not bother myself for her anymore. But humanity is something that make you do these deeds even if they are worthless for you but matter to others. well..i am kinda inhuman..thats the other thing.. :), why should i mess my mind helping her to the hospital or rather i could have gone home as I had to take a bath soon. She told, ” haan beta…something something…hame nahi pata…something something…ladosari…mehrauli..something something”. I listened only that word “haan(yes)” and told her,”aaiye mere saath”(“Come with me”). I took her with me to the hospital. Since, I take long steps , i found her far behind me.So  I stopped for sometime until she reached me, and i asked,”hospital me koi hai?”(“Someone there in hospital..huh?”) damnn me…is it a question?? of course yes..or she is not going to enjoy holi over there. Rather..i should have asked who was there in hospital, any serious case etc. But being an unknown, perhaps that question was also a good one from my side.  She told ,panting,’haan beta…meri beti hai..something something…gharwale..something something…uske liye ye saaman le jana tha…nayi hoo..raste ka pata nahi beta…something something…ballabhgarh..”. I then figured out that her daughter was admitted there and that old lady had come from ballabhgarh.. near delhi..who boarded the bus which connects badarpur to gurgaon via mehrauli, so unfortunately she didn’t get down at Mehrauli and reached gurgaon, and came back from there. Anyway, walking some 200 meters distance, we reached hospital gate, and i saw her family members waiting for her at the gate itself. i said..”okay aunty..main chalta hoo”(“okay aunty…i am leaving now”). I saw a little sparkle of happiness in her eyes..i didn’t know whether it was for her family memebrs or for me..but it soothed me a lot. She said, “haan beta..something something”. She blessed me as she raised her hands before me and then i retraced my path back home. Even though i was not able to be of  much help to her, it made me feel good.

So, you see the manner my pre holi day was celebrated. Thank God, You make humans, but from where does this inhumanity comes, well..thats the question!

 

7 reasons why i dont watch…

Disclaimer: The content of the post is author’s sole thought. Please mind scrolling down if you are a television addict.

If you see 6 years from my past, hardly i watched television for half an hour continuously. Being a computer science student, my UbuntuBox itself worked for me whenever i felt an urge for entertainment. As of now, when i have left my hostel room and residing with my bhaiya..the idiot box once again came into picture. Having been tired of 9 hours job, when you come to home, you are not going to strain your fingers on keyboard once again to catch up some fun. Needless to say, many sites are banned in companies, so there is nothing left for you other than your prime activity (“People call it work…ohh i do say”).

Moving ahead..i used to be a good TV maniac when i was a school guy or even before that period. Reason, VJs of MTV or Channel V! They used to teach me…what they taught, you may guess and let me know.  Still finding their lost shows on Youtube becomes my good time pass (who has got time to pass???..huh!) Well..when i usually, non intentionally, surf my tv with a pinch of salt hope that something will entertain me but unfortunately…

MTV/channel V/Vh1: are not aired by the Damnn Cablewalah.

Bhakti channels :Am i that aged to watch’em?

News Channels: Ohh..stupid me! Why dont i also start my news channel. Cover something silly with the camera and air them on regular intervals, such an easy job, isn’t it?

Sports channels: God! FIFA is over and Roger comes very rare so i have to wait for long to tune them

Hindi movie channels: Buddy…is there anything more sucking than a repeated hindi movie on the box?

English movie channels: Oh yes! can i watch them? but that needs concentration.

Comedy channels: it would be kidding if i write anything here.

Saas Bahu Channels: Thanks Ms/Mrs (I dont know what) Kekta Kapoor, for making one’s life a chewing gum and everything an action replay. You have washed not only women’s but also guys’ minds too with your daily soaps. Hats off to you!

Science Channels: Do they entertain really, when you are tired?

Oh! Did i forget to mention any other channel?

So..you might be thinking what the heck this guy is? Wait buddy…

There is something which is very very in vogue and that is Reality shows on television. Earlier, i heard the names only, now i am able to watch them and that why this post is being added. No doubt..people love it more than their personal lives (Correct me!). One such show i came to know about 6 years ago, “INDIAN IDOL” (There are many such shows, but let me restrict myself on this only). I am watching it for last three weeks or so and am trying to point out some things i noticed:

one: Even if you are a singer, don’t put your hands in joining such shows, because you may see your career as what the the first indian idol has right now and others are having (well…anyone knows who are other idols or better say idles, lol :)) So, probably you’ll not love to be an anchor rather than a singer.

two: If you are a good singer (you think, or your friends say), i would suggest to make it a hobby, not a profession. (of course Luck doesn’t favours all).

three: Judges involved in the show, they know what a fellow can do, but they have given job to speak fake reality. They are meant to fight among one another otherwise who the hell is going to watch. You can smell this rat, when everything is going peachy, suddenly you listen a different sound and the camera halts on one of the faces.

four: If you are a star and you have to promote something, please help yourself and contact Indian idol group, they will provide you the right platform.

five: Contestants, if they dont get a job of a singer, they at least get some popularity for a little timespan and needless to mention: some attractive suit or jewellary sets.

six: The channel gets popularity not by showing their talent but by showing the backstage footage.

seven: You spend one fourth of your showtime in watching their talents, and other time in watching silly quotes, votes prayer, judges’ idea and ugly ads.

So..do you think..it really worked for me?

Rather it caused me to write this post..rofl :P

Getting started with MVVM in WPF

Hell lot of time passed since i updated my blog with a new post.  This time while working with WPF, i feel like write something on what is called MVVM Design pattern.

MVVM has got three components:

  • Model: Data+Classes; Nothing WPF sepcific.
  • View: This is the User Interface element visible to the user. Its DataContext is its ViewModel.
  • ViewModel: It contains all the data that needs to be displayed and procedures to modify the model at will. ViewModel knows nothing about the View.

This is very loosely coupled design pattern. The View knows the ViewModel but the ViewModel does not know the View. You can very easily replace the View without affecting the ViewModel. This is very useful in Developer/Designer teams where the Developer improves the ViewModel and the Designer enhances the View.

The fact that the ViewModel does not know anything about the View comes as a bit of surprise. A typical View in MVVM does not need have a code-behind (except for the general code that calls the InitializeComponent() method from the constructor)!!

You may be wondering how the view updates itself when the ViewModel changes and how it handles user interaction like button clicks etc. This is what makes MVVM specific to WPF.

The controls in the View bind themselves to the corresponding properties in the ViewModel. The changes in ViewModel will be reflected in the view, thanks to Data Binding in WPF. (Otherwise we would have had to handle every event and then update the view accordingly.)

As for user interaction, we always have had commands in WPF. MVVM leverages on this feature. Instead of writing event handling code for button clicks, we bind the buttons (or MenuItems) to Commands in the ViewModel. Every button binds itself to a command which the ViewModel exposes. This command delegates its job to a method in the ViewModel that gets the work done. But the problem is that there is no built-in command in WPF that does that. We have a RoutedCommand that targets UIElements but not methods. Here comes to the scene a new command that targets methods, the DelegateCommand or the RelayCommand. Controls can bind the RelayCommand (that the ViewModel exposes) and invoke methods in the ViewModel.

The DelegateCommand implements the ICommand interface and delegates the Execute and CanExecute methods in the interface to methods in the ViewModel.

That’s all with the theory and understanding i have. The sample code snippets i will update soon.