And lo it came to pass that when God was looking for a programming language to code existance in he narrowed the decision down to three choices: C++, Perl or Python.

He spent an aeon or two weighing up the pros and cons of each language and finally on the 6th day reached a decision.

He cast C++ into the pit of eternal damnation because he just couldn't get his head around pointers and when his destructors would get called. And the thought of those namespace and exception thingies gave him the squits.

Upon gazing at Perl one more time it became evident that Perl was created by Lucifer! God cast Perl down to the pits of hell, where it is actually seeing a lot of use by the pit fiends and the eternally damned.

Then finally god chose Python to be his own language. And lo, it was good. It even kept those annoying linux weenies happy.


Update: Just for the record (and to rebuff the comments I've gotten) the C++ part is sarcasm. Of course God knows how to use pointers.

Update: Just skimmed through the article in the Python node about ESR coming out and declaring his love for Python. Gonna have to find another language to love and cherish now.

What most people don't realize is that when God writes code, it comes out much like this:

from omnipotence import *
from omniscience import *

def do_stuff(list_of_the_day):
    for i in list_of_the_day:
        if i is Heathen:
            try:
                for j in range(0, 10): smite(i)
                cause_leprosy(i)
            except:
                disintegrate(i)
        else:
            smite(i)

So when you hear a loud, resounding "that's IT, you're ALL on my muthafuckin' LIST", be sure to stand next to a lightning rod. If you, after finding yourself in a definitely non-"oops, looks like I've been fried to a crisp" state, also see a wide-angle disintegration beam coming your way, DUCK AND COVER!.

In either web or desktop programming, most of the time, your codes need to produce different results or output depending on one or more conditions. For example, if you want to your webpage to write “Good Morning”, “Good Afternoon” or “Good Evening”, you will need to test first if the current time is considered as morning, afternoon or evening. Another example is when someone entered his username and password to your website’s login page and clicks submit. On your script, you will need to check if the username is existing at the database and the password for that username is correct. If authenticated, you would give him access to your website, otherwise, he would be redirected back to the login page with the message “Incorrect Login!”.

In PHP programming, the if statement is all you need for this kind of situation. The basic syntax for IF statement is:

if ($godisgood)
    praiseHim();

This IF statement checks if the boolean statement, that is $godisgood variable inside parenthesis, when converted to boolean data type, would evaluate as true. Boolean statement can also be two variables or more variable or constants, compared using the boolean operators such as ==, >, <, !=, and so on. So we can also put something like $god > $satan, $jesusislord == true or $jesuslovesyou != false.  If the boolean statement evaluates as true, the line preceeding the if statement, that is praiseHim() function, will execute. You can also execute group of codes by enclosing that inside open and close parenthesis, like the following:

if ($godisgood) {
    praiseHim();
    $soulwinning++;
}

If you want to execute a code or group of codes, when the boolean statement evaluates as false, use the else keyword.

if ($godisgood) {
    praiseHim();
    $soulwinning++;
} else {
    $lifeismiserable = true;
}

Sample codes using if statement

// since adam fell
$man_condemned_to_hell = true;
$guilt = 1;

// man cannot reach God
if ($commit_adultery == true) {
    $man_condemned_to_hell = true;
    $guilt++;
} elseif ($commit_theft == true) {
    $man_condemned_to_hell = true;
    $guilt++;
} elseif ($faithful_to_devotion == false) {
    $man_condemned_to_hell = true;
    $guilt++;
} elseif ($wordliness > $spirituality) {
    $man_condemned_to_hell = true;
    $guilt++;
} elseif ($way_of_living != $biblical) {
    $man_condemned_to_hell = true;
    $guilt++;
}

// but jesus reached out for us
if ($man_accepted_jesus) {
    $man_condemned_to_hell = false;
    $guilt = 0;
    $blessings++;
    winSoulsForJesus();
}

a weather report from five hundred thousand years ago? | unfinished something, almost | Trebizond | Star Nest | The Claim

Log in or register to write something here or to contact authors.