My day with 3 lines of code
In 5th or 6th sem of college, I had Windows Programming as one of my subjects - two papers(theory and practical).
I saw a function(don't remember the syntax now) which creates a beep sound and there were 3 lines of sample code in the book,by which the beep continues in a loop until interruption.Now what I did was I added those three lines of code to the program and tested them. The code executed properly and I heard the beep sound. Then I commented those lines and ran it. The beep sound should stop naa! But in vain. I tried and tried, I compiled, built and executed but hmmmm, no way it was continuously beeping or ringing rather. I was too tired and a bit sweating. I decided to take a break. So I closed the program. And what do u think happened? Even after I closed the program, the beep or ring continued. Oh! my God ! I should have meddled with some system property, because in this VC++, we used to use a lot of APIs which involved a lot of system properties also at times. It was still ringing....was annoying me a lot. I closed my eyes and opened.My computer had vanished(Not bcoz of my newly invented program??????!!!!!!). I was in my cozy bed and my mom had been ringing the door bell for nearly 15 minutes, which in turn had morphed into my program beep sound :-)).
The following is what happened before all this.
That day we had a sort of model practical session - there weren't so many days bfore the exam.
We had our model practical session in the afternoon. I got a simple program related to check boxes and their actions depending on the click. So as I finished in one hr, Sir told that I can go home if I want. It was some 2.00PM. 15 mins in Scooty & another 2 mins, I was lying in my bed at home.
I saw a function(don't remember the syntax now) which creates a beep sound and there were 3 lines of sample code in the book,by which the beep continues in a loop until interruption.Now what I did was I added those three lines of code to the program and tested them. The code executed properly and I heard the beep sound. Then I commented those lines and ran it. The beep sound should stop naa! But in vain. I tried and tried, I compiled, built and executed but hmmmm, no way it was continuously beeping or ringing rather. I was too tired and a bit sweating. I decided to take a break. So I closed the program. And what do u think happened? Even after I closed the program, the beep or ring continued. Oh! my God ! I should have meddled with some system property, because in this VC++, we used to use a lot of APIs which involved a lot of system properties also at times. It was still ringing....was annoying me a lot. I closed my eyes and opened.My computer had vanished(Not bcoz of my newly invented program??????!!!!!!). I was in my cozy bed and my mom had been ringing the door bell for nearly 15 minutes, which in turn had morphed into my program beep sound :-)).
The following is what happened before all this.
That day we had a sort of model practical session - there weren't so many days bfore the exam.
We had our model practical session in the afternoon. I got a simple program related to check boxes and their actions depending on the click. So as I finished in one hr, Sir told that I can go home if I want. It was some 2.00PM. 15 mins in Scooty & another 2 mins, I was lying in my bed at home.