domingo, 13 de fevereiro de 2011

Eu odeio Strings

Isso que é odiar maninupalção de Strings!
    #include < wchar.h > //I hate strings.
    #include < tchar.h > //I HATE STRINGS!!!
    #include < string > //I HAT TEH STRINGES!!! DIE! DIEDIE! DIE!!!!!!

sábado, 12 de fevereiro de 2011

Incremento

Incrementar uma variável do tipo inteiro é bem simples, basta fazer isso:
    p += 5;
ou isso:
    p = p + 5;
Mas olha só o que o cidadão fez:
    for (int i = 0; i < 5; i++) {
        p++;
    }

P.O.G. Flowchart

A definição da palavra "gambiarra" no mundo nerd:

Técnica avançada de depuração

    flag=0
    if flag=1 then
        display "passei"
        flag=0
    else
        display "passei aqui!"
        flag=2
    end if
    display "ainda estah de peh... nao acredito!!!"
IMPORTANTE : Caso você não consiga mostrar o display na tela, poderá utilizar o método erro condicional colocando um comando que não existe para dar pau direto.

sexta-feira, 11 de fevereiro de 2011

Stupid Fucking Iterator

    /*
     * OK; before you read the following code know what I am trying to do.
     * I needed to get the list of child catagories from the root node so that
     * the root node didn't appear in the selection box. But for some stupid
     * fucking reason the stupid fucking DBA wont let me access the items using
     * indices and I instead have to use their stupid fucking Iterator
     * implementation. So there.
     */
    $firstList = $this->getRootNode()->getChildren();
    foreach ($firstList as $node)
    {
        $nodes = $node->getChildren();
        break;                // WTF?
    }

Angry comments

Isso que dá programar revoltado...
    // Either the app is exiting or the world is coming to an end.
    // Take your pick.

    // I'd trade my office mate for a layout manager.

    /* PB, is this right? -- AW */

    // Everything is shamelessly stolen and rewritten.
    // Feel the consequences of GPL ;-)

Newbie no VB

Não é por que é nosso primeiro Funny Code que eu vou pegar leve. Olha o que esse programador super-ultra-mega junior aprontou no Visual Basic:
    if (day=1) or (day=8) or (day=15) or (day=22) or (day=29) then
        weekday = "Monday"
    elseif (day=2) or (day=9) or (day=16) or (day=23) or (day=30) then
        weekday = "Tuesday"
    ...