awesome isn't it well...have first look at it
step 1 : start (go to bed)
step 2 : close your eyes
step 3: 1 picture will come to your mind (for sure....i can bet 25 crore units)
step 4: think about it..keep on thinking and slowly slowly slowly all your senses (i mean most of them)
will sleep to!!!
step 5: brain is getting active and searches for hidden sentiments and on finding some..it create
characters for the story which you and I call as dream!! (this human brain...legendary)
step 6: NOTE :: all steps are for general people........from here on this theory applies to me :)
step 7: my “active” brain finds some disturbance if any.....in my sleep,which registers to it after the
process of disturbing continues for at least an hour.
step 8 : in my dream,then, that thing will happen...for example...if my phone is ringing...then there will
be a phone call (somehow) in my dream, provided the enthusiast caller made at least
(60 min/1.5 min) calls.
Step 9 : my brain then checks if there are other people at home
//a code snippet ;)
int sleepHours = 6,sleepHourCounter=0;
int sleepStartTime,sleepEndTime;
string time=checkSystemTime();
//extract number and other detail using regular expression
int timeHour = extractHour(time);
string AMorPM = extractAMorPM(time);
if(timeHour=>4 && timeHour <= 8 && (AMorPM.compare(regularAMorPM))==1) // 1 implies PM
{
sleepStartTime=timeHour;
sleepEndTime=timeHour+2;
}
elseif(timeHour >8 timeHour<12 )
{
if(personIsSleepin() == true)
{
endSleep();
}
}
else
{
sleepStartTime = timeHour;
sleepEndTime = timeHour +6;
}
for(;sleepHourCounter
if(familyMemberPresent()==true)
{
cutoffDisturbance();
activateSleep();
}
else
{
waitForAnHour();
if(checkDisturance() == true)
{
spellSomething(); /* like “Oh God”....string to be passed should be mentioned..this call is overrided so worry not even if I don't utter anything */
checkPerson=personDisturbing();
if(checkPerson != dear)
{
spellCurse(); // in mind,of course
doRegularStuff();
getRidOfPerson();
resumeSleeping();
}
else
{
endSleepingProcess();
doRegularDearStuff();
entertainPerson();
backToRegularActivity();
}
}
else //nothing like it!!
{
continueSleeping();
}
}
ufff..................this code is not compiled ( it won't run anyway,so mistakes are liable to exist , pardon me if any found ........syntactic or semantic :) )
ye code likh toh meri neend hi bhaag gayi !!!
i am sure,this is first piece of anything related to computer since i have written since i joined engineering and i am sure many would agree to this fact !!!
well if algorithm is not clear(as it is, to me)
go to sleep........sab “clear” ho jayega!!
gunnie !!!
wait wait wait.....if alive
step 10 : if(checkBrainStatus() == 1)
{
MessageBox.Show(“ You are GOD”);
}
else
{
MessageBox.Show(“hota hai hota hai..meri coding dekh k achhe achhon ka dimaag
kharab ho jata hai...tum kya cheez ho!! ”);
}
int checkBrainStatus()
{
if( checkMonitorStaus() == true) // if it is not broken,out of anger
{
if(checkPersonBrainLivingOrDead()==true) )
return 1;
}
else
return 0;
}
I had plans to have a flowchart rather than step by step algorithm but it turned out to be really good.
Comments needed !!