• Simon Clarkstone (unregistered)

    if (myPrivates.size() != othersPrivates.size() || ! myPrivates.containsAll(othersPrivates) || ! othersPrivates.containsAll(myPrivates)) {

    I'm wondering why this isn't something like:

    if (!myPrivates.equals(othersPrivates)) {

    Which does pretty much the same thing in Java's standard library.

  • MIKE (unregistered)

    it depends on the equals implementation of TIntSet: are we sure it's actually a Java Set?

  • MiserableOldGit (unregistered)

    If myPrivates come first that's a good thing, right?

  • A Private Comment (unregistered) in reply to Simon Clarkstone

    Which does pretty much the same thing in Java's standard library

    Lots of people don't know that, or don't trust it, is why (assuming this code is Java but it definitely looks like it).

  • WTFGuy (unregistered)

    Considering everything I've ever learned about privates, better is != same. Better is actually > same.

  • (nodebb)

    So, in essence, the WTF here is that myPrivates and othersPrivates weren't called myPrivateSignatures and othersPrivateSignatures??? (With a few bonus points for not using the .equals method?)

    Weak weak weak.

    (I've seen worse variable-naming WTFs, like the guy who celebrated buying a new car by naming a key variable in a primitive embedded multithreading system after it. The worst part? golf_gti. Tells you all you need to know about the guy.)

  • (nodebb)

    In Ada, parts of some constructs are private (not visible from the outside). Story goes that the French lead designer had had his leg pulled so often by the Brits in the team that he refused to believe that "private parts" was probably not the best name for these constructs.

  • (nodebb) in reply to sjw

    So, "private parts" are not visible from outside? Sounds modest to me.

  • Steve (unregistered) in reply to Steve_The_Cynic

    You, sir, obviously have a much less childish sense of humour than the rest of us.

    If it helps, try reading the code out loud in a Beavis & Butthead voice ...

  • Vilx- (unregistered)

    Not a WTF, but made me smile more than the regular WTFs. :D

    Also: next opportunity I get, I'm using this!

  • (nodebb) in reply to Steve

    Nah, I got that part(1), but it's still a weak WTF.

    (1) I've been known to comment that in C++, if you're a class, then you and your friends can grope your private parts...

  • Mark (unregistered)

    He's comparing the size of his privates to the size of the other's privates. That's some serious insecurity there (and we all know we should write more secure code).

  • tbo (unregistered) in reply to Steve_The_Cynic

    Maybe sometimes we can just post something funny without it being inherently wrong.

  • ricecake (unregistered)

    Looks like he's down with O.P.P.

  • Sole Purpose Of Visit (unregistered) in reply to Steve_The_Cynic

    The original formulation is "your friend can touch your private parts."

    Call me prissy, but "grope" doesn't work so well. Maybe "manipulate?"

  • (nodebb) in reply to Sole Purpose Of Visit

    I think that "grope" perfectly captures the kind of touching that I don't want people doing if they are "just" friends.

  • DQ (unregistered) in reply to Steve_The_Cynic

    In our code a variable is actually named after me. The programmer thought it would be funny.

  • Steve Taylor (unregistered)

    In our old code where variable names needed to be short we had an rather poor choice of abbreviation for AnalyseMessage (I'll let you work it out)

  • sizer99 (google)

    | myPrivates.containsAll(othersPrivates)

    That's going to be painful if you're a dude.

  • (nodebb) in reply to Steve Taylor

    That's awesome. At the company I previously worked at one of the older guys had written a program quite a few years before I had even started there that was used to analyze raw log files. The exe was called RawAnal.exe. Cracked me the hell up when I found it in the code repo. I asked him about it passing one day and he chuckled.

  • Naomi (unregistered) in reply to sizer99

    It's going to be painful for someone involved no matter what parts they have!

  • Cyberlizard (unregistered)

    Many years ago I had to strip html from files. I made a Stripper class and called stripper.strip()

  • (nodebb) in reply to Steve_The_Cynic

    (I've seen worse variable-naming WTFs, like the guy who celebrated buying a new car by naming a key variable in a primitive embedded multithreading system after it. The worst part? golf_gti. Tells you all you need to know about the guy.)

    An oops of mine from back in the stone age. I was writing code for dealing with a plotter. (Those of you who don't know what they are can get off my lawn! They're not quite gone.) I had written code using the variable PenIs before I realized what it spelled.

  • Hasseman (unregistered)

    There is a company selling pens with the addition island to the name (http://www.PenIsland.net)

  • Steve (unregistered) in reply to Hasseman

    And of course who can forget the Stack Overflow of the 2000s, ExpertSexchange

  • RLB (unregistered) in reply to DQ

    DQ isn't a very informative variable name...

  • RLB (unregistered) in reply to Hasseman

    Well, was, apparently. What's there now is clearly a parody. "We Specialize In Wood" indeed...

  • Zach G (unregistered)

    At first I read that class as "TinySet"

  • WTFGuy (unregistered)

    An oops of mine from back in the stone age. I was writing code for dealing with a plotter. (Those of you who don't know what they are can get off my lawn! They're not quite gone.) I had written code using the variable PenIs before I realized what it spelled.

    Eons ago a friend and his wife were playing Scrabble on a real physical board, the one that rotated like a Lazy Susan. She, with the board facing towards her, played "PENIS" vertically. He, looking at the board upside down, loudly protested that "Penis (rhymes with 'tennis') isn't a word!". She, sensing blood, says "Oh yeah, are you sure you're sure???". "Hell yes I'm sure! You lose your turn for an illegal word!". She sloooowly rotates the board around to face his way.

    I'm told the argument lasted an hour but the makeup sex was *awesome *.

    And no, I'm not the "friend". Really.

  • Diane B (unregistered)

    myPrivates.containsAll(othersPrivates), but one at a time please.

  • Game Developer (unregistered) in reply to Simon Clarkstone

    Wouldn't be as funny then. Some jokes are funny only through repetition.

Leave a comment on “A Private Matter”

Log In or post as a guest

Replying to comment #515966:

« Return to Article