Finals - Finally!
Cats: Personal, School|Today was my finals day for school, and I thankfully think I did very well.
The harder of the two tests required me to memorize a bunch of information from several handouts, which I’m generally not all that great at doing. This may come as a surprise to those of you who know my uncanny ability to remember the most obscure references to movies, songs, and things from my personal experience (as well as my need to handicap myself (’kneecap’ is a better description) in order to play Trivial Pursuit). Nevertheless, while I have always tested well, if the content of the test relies on my having read something, it’s always a toss-up. Fortunately I gave myself plenty of time to study, focusing solely on the review content, and since the instructor happened to test on the stuff I happened to remember, it turned out to be a big win for me.
My programming test focussed on PHP, which has been a fun language to learn–especially since WordPress is written in PHP and therefore I’m able to integrate (and customize) most of the plugins without too much trouble. The third question on the test threw me for a loop, however:
What is the logical statement in PHP to reflect the following:
$x is an even number
How exactly does one define an even number using purely mathematical and logical functions? I know even numbers are divisible by two, but how to boil it down using symbols, especially since we weren’t explicitly taught this in class?
Well, fortunately I remembered the ‘modulus’ function, with % as its symbol. It basically returns the remainder of dividing one number by another; i.e. 10 % 3 = 1, or 10 divided by three leaves a remainder of 1. So my answer to the even number problem was:
$x % 2 == 0
That is, when you divide the variable $x by 2, there’s exactly zero left over. I was pretty impressed that I came up with that. As smart as I tend to be, much of that intelligence comes from my memory, and not from pure processing power (to use computing terms). But this time, it all worked out.
In the words of Butthead, “Damn, I’m smooth.”





