Code snippet of the week



  • coworker: "It's like we're writing Java!"



  • PEOPLE LIKE ITEMS



  • What does poor choice of variable names in PHP code have to do with Java?
    Your coworker is weird.



  • Your screen needs cleaning.



  • @veggen said:

    What does poor choice of variable names in PHP code have to do with Java?
    Your coworker is weird.
    It's Perl. Anyway I think it's because you see stuff like ArrayList arrayList = new ArrayList(); a lot in Java.



  • We use Perl as well and a lot of $item variables too. But sometimes they are $itm. Sometimes hashes and other time hashrefs.



  • Ooops, looked like PHP. And, yeah, I now see the similarity to Java, but it's really not the same thing. Btw, I'm sure at least one of you guys works for that mega-huge hotel finding site (the biggest Perl shop I know of).



  • @veggen said:

    Ooops, looked like PHP. And, yeah, I now see the similarity to Java, but it's really not the same thing. Btw, I'm sure at least one of you guys works for that mega-huge hotel finding site (the biggest Perl shop I know of).

    IMDB, Slashdot and Craigslist also run on Perl. All sites full of crazy people, I don't know if it's a side effect of perl.



  • Perl kinda forces you to do such things...

    I once wrote this:

            my $you = {
                    # Mortal fool! Release me from this wretched tomb! I must be set free
                    # or I will haunt you forever! I will hide your keys beneath the
                    # cushions of your upholstered furniture... and NEVERMORE will you be
                    # able to find socks that match!
                    sock => $sock,
                    # My demonic powers have made me OMNIPOTENT! Bwahahahahahahaha!
            };
            return
                    bless $you, 'Connection::Socket';
    


  • @jamesn said:

    @veggen said:
    What does poor choice of variable names in PHP code have to do with Java?
    Your coworker is weird.
    It's Perl. Anyway I think it's because you see stuff like ArrayList arrayList = new ArrayList(); a lot in Java.
    Actually, I think it looks more like those lambda expressions in C#, like

    Func<Item, string> f = item => item.item; 



  • @OperatorBastardusInfernalis said:

    bless
     

    I am slightly taken aback and need to readjust my worldly parameters.

    ah, ok.

    wait

    @perldoc said:

    thingy

    Fuck this world.

    @OperatorBastardusInfernalis said:

    bless $you, 'Connection::Socket';

    Shouldave been $me. Then you'd have something kind of like an implementation of to "suck it to me".

     

    I had to explain that joke beforehand.

    I'm not proud.

     



  • @Ronald said:

    I don't know if it's a side effect of perl
     

    Nah, it's just selection bias. Other teams choose other langues, or completely fail.


Log in to reply
 

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