Blog posts tagged "woe"

Recently, I was looking through the SweetCron source code when I found the MY_Controller.php source file. Along with this snippet of hilarity:

    function Auth_Controller() {
        //OMG WHO R U
        if ($this->data->user === FALSE) {

Ok, what? Those SweetCron developers must have been on cupcakes when they were coding that.

That reminds me of the Rubiwin glitches. It has always amazed me how strange glitches can be introduced into programs due to a series of coincidences.

However, this glitch had nothing to do with an amazing series of coincidences. The funny glitch was this thing with the switches, that if a block fell onto a switch in the bottom right hand corner of the screen, it would turn into a picture of a furnace with a hole in it. If a block fell into it, it would turn every single empty space in the area into Super Furnaces.

WOE???? It was very weird and I couldn't understand how that could be a glitch. However, upon re-reading the code, it turned out that I had actually put it in there! OMG! I must've either been half-asleep, or temporarily insane because it was really funny....

Anyway, there's my rant about SweetCron, Rubiwin and OMGs.

Hatkirby on December 28th, 2008 at 12:38:26pm
👍 -2 👎

Wow. I love The Daily WTF, and looking back at some of my code, I've written some WOEs myself. (WOE = What On Earth). So, I'd like to share them. Because they're funny. Yes.

for (i=0;i<toParse.length();i++)
  if ((toParse.substr(i, 1) != " ") && (toParse.substr(i, 1) != "4") && (toParse.substr(i, 1) != "\n"))
    cout << endl << endl << "ERROR: Unrecognized character in line " << lineNum << ":" << endl;
    cout << "\t" << curline;
int j = 0;
i = 0;
if (toParse.length() > 0)
  while (toParse.length() != 0)
    if ((toParse.substr(i, 1) == " ") || (toParse.substr(i, 1) == "\n"))
      if (i == 0)
        toParse = toParse.substr(1);
        i = -1;
      } else {
        string2int((char*)toParse.substr(0, i).c_str(),paras[j]);
        toParse = toParse.substr(i + 1);
        i = -1;

If you haven't gotten it yet, here's the explanation. The program first verifies that the string toParse does not contain any non-4s, non-dashes and non-spaces. Then it examines each character and if it is not a dash or a space, it converts the character from an integer to a string. This is absolutely ridiculous as the only value that character could be at that point would be a 4.

This WOE has been taken from lines 43-72 of singlefour.cpp of the singlefour project. This code was introduced in revision 7 and fixed in revision 26.

Hatkirby on June 7th, 2008 at 10:30:09pm
👍 -3 👎