sleepy programming!!

Yes, it was about 5 a.m. and I had a torrent of MATLAB 2012a being downloaded. I did hear about the competition from Mathworks Simulink and think of trying for that. Matlab was approximately 5gb and it is too much for a download speed of 64kbps!!! Though I started it as my PC is usually all time ON.. It can give challenge to servers man, lolzz . The maximum time it was on was 3 and a half days continuously downloading a game from torrent.

I was actually feeling sort of tension because I had to go to college too after a few hours, first lecture is of MaZumDaaar madam!!!!! So I decided to sleep putting an alarm alongwith (yeah, yeah yeah,, every other lazy and careless guy like me keeps an alarm to wake up, though it doesn’t make any affect…lolz. I looked around for the alarm watch and I was not able to find it because actually I dont have one!!! 🙂

So, I picked my phone but guess what It had already 3 alarms set for daily basis at 6:00 am to 7:00 am. So I thought of making a new alarm because this alarm never works! Looking at my PC and my SPEAKERS, I had an idea of making the alarm on my PC. As we all know there is already a watch available on everyone’s PC, no matter which OS you use, we usually get the ALARM facility like that of Kalarm and others with different distros. I thot of making it by my own irrespective of the fact that I was too much sleepy(on eye was almost closed sitting down on the chair).

Decided the point to make my alarm myself I half conscious started my favorite VIM editor, and started typing the easy code for my alarm.

I actually used the alarm system call with the desired time of 3 hrs and a signal handler where I invoked the VLC with argument as my desired song!
It indeed took 5-6 mintures and I was BHUND!

I really do think that I look like this guy while sleeping

but I guess, I was actually looking like that while writing the code::

The second argument is the time in seconds. I know that it does not look good to give alarm time in seconds but its the fact that I was half asleep and was not in a condition to do little bit of maths..really…

Then I decided to give this alarm a GUI via QT or C# but on that my friend Shantanu is working so I will just handover this task to him.
You may obviously modify this badly written code as deploying error-checking, command line arguments, and a basic function to take time as argument and parse that.

*BHUND — refers to a state where you are semi-concisous because either you are intoxicated or feeling heavily sleepy. 🙂