One liners that make you giggle



  •       Iterator tit = transactions.iterator();
     



  • parent.parent.parent.parent.parent.parent.parent.parent.parent.parent.
    parent.parent.parent.parent.parent.parent.parent.window.document.
    getElementByID("hiddenCounter").value++;



  • Command-line one-liners:

    man man

    after aliasing the 'man' command to 'girl':
    man girl

    if only there was a way to arrange this one...:
    girl girl



  • if ((this.Something)&&(this._SomethingElse != null)&&(this._SomethingElse.Id != 0)&&(!this._SomethingElse.SomethingIsGoingOn)&&(!this._SomethingElse.SomethingHappened)&&(this._SomethingElse.HasStuff))

    It's anonymized, but I swear to god that's in our framework. Yes, every single this-dot is unnecessary. I've found up to eight this-dots on one line.



  • @djork said:

    if ((this.Something)&&(this._SomethingElse != null)&&(this._SomethingElse.Id != 0)&&(!this._SomethingElse.SomethingIsGoingOn)&&(!this._SomethingElse.SomethingHappened)&&(this._SomethingElse.HasStuff))

    It's anonymized, but I swear to god that's in our framework. Yes, every single this-dot is unnecessary. I've found up to eight this-dots on one line.

    I get why some folks use "this." where it's not necessary; sometimes it's to clarify things in a file with a lot of MyClass.staticConstant's (I know it's not necessary, but sometimes, especially with deeply inherited classes, it makes things more obvious).

    Two of my personal pet peeves:

    class MyClass { protected int MY_CONSTANT = 1; }

    if (MyClass.this.MY_CONSTANT==x) { ...}

     and

    [code]class A { protected int x=1;}
    class B extends A { protected int x=2; }
    class C extends B { protected int x=3; }[/code].

    which forces hard-coding stupidity like:

    [code]void xxx() {
    C c = new C();
    System.out.println("c.x="+c.x);
    System.out.println("b.x="+((B)c).x);
    System.out.println("a.x="+((A)c).x);
    }[/code]



  • #define barf cout
    #define gorge cin
     



  • @djork said:

    after aliasing the 'man' command to 'girl':

    man girl

    You've been to thailand recently, haven't you.



  • Can't find the offending code right now, but saw this once:

    if(bUserInitialized){
         // cout << "User is initialized";
    }

    else{
        // cout << "User is not initialized";
    }

     



  • @djork said:

    after aliasing the 'man' command to 'girl':


    man girl

    Surely you mean "girl man"?

    Also, I suspect (but don't know for sure) that you could either rename or symlink the appropriate file (looks to be /usr/share/man/man1/man.1.gz on a RHEL box) to girl to make "girl girl" (or "man girl") work. Fnar.
     



  • Perl's scoping can make some interesting lines like:

     

    my $line; #whose line is it, anyway?

    our $house; #in the middle of the street

     

    For no particular technical reason, object self-references use the variable $self, rather than the keyword 'this'.  Unlike 'this', however, '$self' is not set in stone, and I think it is done just so that each method begins with:

    my $self = shift();

     

    Then there is the infamous Perl threat clause:

    $object->method() or die();

     

    There is a module that implements an enhanced exception handling ability.... its key method is called "die_trying()" and is used syntactically the same way, e.g.:

    $object->method() or die_trying();

     

    I have been known to define some error text in a variable $HORRIBLY, so as to be able to write:

    $object->method() or die($HORRIBLY); 

     

    On another note, I think it would be funny to create a Makefile that has a "love" and "war" target defined (maybe just alias them to "all") so that you can:

    $ make love

    $ make war

     


    Along that same line, you could also define appropriate targets to:

    $ make ammends

    $ make peace

    $ make over

    $ make up

    $ make the_rounds

    $ make friends

    $ make money

    ...etc.

     



  • @Critter said:

    $ make love

     My favorite was
    $ make install --not war
     

    (ok, whenever I saw that I assumed that '--not' would exclude a particular target, but it's not in the man pages.  Am I reading something wrong, or did the guy I borrowed that from lie?)



  • I have also seen one on Slashdot in a sig file that went something like:

        unzip strip grep finger fsck more yes

    there may be more to it, that's about all I can remember of it.


     



  • @vt_mruhlin said:

    (ok, whenever I saw that I assumed that '--not' would exclude a particular target, but it's not in the man pages.  Am I reading something wrong, or did the guy I borrowed that from lie?)

    Looks to me like there are no double-dash options for GNU make, but make is not 100% standardised, by a log shot.  I would have expected maybe:

     
        make install #not war

    ...or something like that.

     



  • @Cloaked User said:

    @djork said:

    man girl

    Surely you mean "girl man"?

     

    Depends. Girl comes first, would make you more popular with the ladies. Man comes first, is more realistic.



  • This was already mentioned in some other thread:

    [code]long fuck = 99;[/code]



  • how about --keep-going?



  • A favorite C library of mine that we had in an old project -- gstring 🙂



  • define("PC_LOAD_LETTER",99);

    Which I placed in there to generate "PC_LOAD_LETTER?  What the f**k is that???" from a co-worker when he went into that service. 



  • if ($framework->authentication->login($users->get_field("auth_typ"),$str_user_name, $str_password) == AUTH_RC_LOGIN_SUCCESS) {
    // Is great success. I like. High five.

    -- snip --

    return AUTH_KNOWN_USER;
    }

    I love the comment. Especially if you say it like Borat.



  • @djork said:

    Command-line one-liners:

    man man

    after aliasing the 'man' command to 'girl':
    man girl

    if only there was a way to arrange this one...:
    girl girl

    in ksh:

    alias girl='echo giggity;';

    $ girl girl

    giggity

    giggity


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.