I really like the programmer humor in the Get with the program post. So I remade Get with the program in PHP script 🙂
I renamed a few things and redid some of the comments to how I comment. And I left some untouched as they were perfect as they were. I do feel like my humor and creative thinking is a little dead though.
<? /** * The adult Earthling. */ class adultEarthling { function __construct() { // By default, adult Earthlings are insane. $this->sane = false; /* By default, adult Earthlings are miserable, but that can fluctuate. An integer allows for that flux. */ $this->happiness = 0; // Create the doctors stethoscope. $this->alive = null; } function main() { // The adult Earthling is alive. $this->alive = true; /* While the adult Earthling is alive. Loop its life until the doctor deems them dead. */ while ( $this->alive ) { // Survive a day. $this->suiciDay(); if ( $this->sane ) { $this->commitSudoku(); /* The adult Earthling has commited sudoku and the script no longer needs to be running... Kill the script. */ die(); } } } function suiciDay() { // Brain stuff. $this->startThinkingAboutPastAndFuture(); // Entrust CNN with your happiness. $this->watchNews(); // Entrust Wall Street with your happiness. $this->checkStockPrices(); // Entrust your car stereo with your happiness. $this->morningCommuteToWork(); // Entrust your boss, coworkers, stockholders, and executives with your happiness. $this->workNineToFive(); // Entrust your car stereo with your happiness once again. $this->returnHome(); // Entrust your family and/or spouse/partner (and kids) with your happiness. $this->dinnerWithTheFamily(); // Entrust complicated equation with your happiness. $this->tryToHaveSex(); /* After the daily grind, after handing over your happiness to the world and letting it be gangraped three ways to Sunday, check how happy you are. Remember that your happiness has been affected by every single person, situation, and thought, encountered during the day. The way that people become sane is when they absolutely cannot be any less happy. In other words, when they have “suffered enough”. */ if ( $this->happiness == PHP_INT_MIN ) { // Earthling becomes sane. $this->sane = true; } else { // Sleep 8 hours. sleep(1000*60*60*8); } } function commitSudoku() { // Commiting sudoku resaults in not being alive anymore. $this->alive = false; } } // Create my adult Earthling. $myEarthling = new adultEarthling(); // Start the Earthlings struggle. $myEarthling->main(); ?>
18 comments
Haha, nice ! I have a few comments:
“// Start the Earthlings struggle.”
Nice ! When I read this, I let out an audible chuckle. It cracked me up. I sort of visualized a small pathetic creature starting its miserable struggle 😛 Great comment !
“// Entrust your car stereo with your happiness once again.”
Isn’t the car stereo quite reliable ? I mean it will not disappoint you, unlike people who will. That’s why my version was “Entrust every other rush hour worker bee” (referring to rush hour traffic and bad drivers). The car stereo will actually be the one *good* thing about your commute, so I didn’t get why you put that in there. Since the comment is meant to be sarcastic, you need to “entrust” something/someone who you know will fuck things up for ya 😛
“suiciDay” LOL. By this, you mean a day feeling suicidal ?
“commitSudoku” LMAO 😛 Do you struggle with the game ? Is that why you liken playing it to committing suicide ?
The doctor’s stethoscope also cracked me up ! I can picture him with his white apron on, checking the poor sod’s pulse 😛
Is die() PHP’s counterpart of System.exit() in Java ?
Great work ! Thanks for posting this 🙂
Hmm. You are right about the car stereo. I didn’t get the sarcasm very well. Nor do I have a car… or drivers license.
Fun fact: Suiciday is Thursday in unofficial suicide terminology.
Fun fact 2: I have not played Sudoku.
It is. It can also be ‘kill();’ which is more standard appropriate. It literally stops the PHP script from running any more code for that session.
Thanks, and I’m happy I cracked a few chuckles out of you 🙂
Proof: php.net/manual/en/function.die.php
One last thing. I didn’t understand why the call to sleep() is conditional (if/else). Shouldn’t the Earthling sleep regardless of whether he has achieved sanity or not ?
In fact, if he is now finally sane, he should make sure to get one last night of sleep before going off to play Sudoku 😛
Yeah, but a sane person wouldn’t waste time 😛
“//checkStockPrices();”
It’s commented out. Does your version of the Earthling not check his stock prices before heading off to work ? 😛
Also, I’m guessing you need to qualify it with a reference to this ? $this->checkStockPrices(); ?
You are absolutely right. I did comment it out as I actually ran some of the code xD
Fixed.
LOL. Good to know (terminology) !
No car/license ? I’m guessing you don’t live in the US/Canada, then ? Or, if you do, maybe in New York or Boston ?
Answering optional. I’m testing your SP security (remember my other post ?) 😉
Q29uZ3JhdHVsYXRpb25zLiBZb3UgY2FuIGRlY29kZSBCYXNlNjQh
LMAO. Base64 !
Ok, I got it (where you live). Great place, I think ! Staying true to my suggestions, I will not repeat your information here or elsewhere.
Have you heard of the music group Aural Planet ?
Oh, I forgot to answer your question. No, I’m not Security or from Security. I’m from Security (I’ve said it in other places … so I don’t care to keep it secret 😛 ).
I should probably delete those two comments soon. Security, you know 😉
And I have not. Listening to Aural Planet – Hydropoetry Cathedra right now. It’s massaging my ear-holes.
Ah. I was incorrect then. My mistake. Permission to CTRL + SHIFT + BLEACH?
FYI, Hydropoetry Cathedra is my #1 song of all time. It is more than sacred to me. I have shared it with only two people in my whole life. You’re kind of the third, and probably only because I had a feeling you’d be able to appreciate it.
That song is so powerful to me that I start hallucinating when I listen to it, esp. at night, and no drugs, mind you.
The female vocal is so amazing … it’s like a voice calling out from the heavens … “Come be with me” A light like the Aurora Borealis shines in the sky, a portal opens up, and her voice comes through it, calling out to me.
🙂
What did you want to delete ? Wait, don’t delete the Base64 text (edit it instead … remove the Base64 text and just put some random shit in there if you want).
If you delete the Base64 comment, all its child nodes (comments) will get deleted too.
I can definitely hear and understand that. That is the general purpose of Trance. I don’t know if I’ve gone into the state before since I don’t know how I would be able to relate to it. But I can definitely say I’ve lost myself to the sounds before. Where I am just completely immersed in sounds and my mind is nothing but sounds traveling through the dedicated space to it. Listening to and analyzing every little sound to decipher its meaning. It’s truly amazing and I wish more people could experience music like that.
I don’t know if I have any absolute favorite tracks. I listen to so much and I just don’t rank my favorites. I do really like something similar to it though. And I figure you will love the album to. It is World Of Sleepers by Carbon Based Lifeforms. All Acid Ambient/Psybient (Psychedelic Ambient). I lose myself in this album fairly quickly. It’s like I suddenly emerge in a far different world. Track 09 “Erratic Patterns” is probably my favorite one in the album. Highly recommend listening to it: youtu.be/QH_liqx0fuI
I took your suggestion. Far smarter idea. I also Secure-ified your second comment in this chain 🙂
Thanks for the suggestion. Will def check it out. I have heard some of their stuff.
It’s getting late here so it’s bedtime. But, I will probably catch you tomorrow. Nice chatting with you.
Later. Thanks for securifying 😉
Awesome. I have not slept for 24 hours. Should maybe probably consider hitting the hay myself.
Likewise. Hopefully we’ll catch later 🙂
Bonus: http://imgur.com/ZmR6Q2J