• Tennyson (unregistered)

    Damn straight!!

  • Jens (unregistered)

    Overload ==?? Really?

  • Anonymous (unregistered)

    Since this is MS' best practices , he might be right.

    Flame away!

  • n;zif (unregistered)

    class money?

    new priceless (comment)

  • Beowulff (unregistered)

    He might have pointed out the risk involved with introducing unexpected behavior.

  • Иagesh (unregistered)

    This is why operator overloading is sacred animal feces. Operators (+,-,=,÷ etc.) are nothing but syntactical jujubes. All serious programming should use proper method calls only. Just like Java.

  • Code Monkey (unregistered)

    God, that could have been my old boss...

  • (cs)

    It is of course mandatory that any such divergences from the standards (in this case equals() not doing the same as ==) should be solidly documented in the API. IN this case, thought, I bet it isn't.

    Wonder how the compareTo() shapes up? Does a.equals(b) return the same as a.compareTo(b) == 0? If not, then ... oh what the fuck, you can't argue with a prick.

  • Patrick Magee (unregistered)

    Architect == "Prick"

    if(Architect.Equals("Prick")) { Architect.IsSacked = true; }

  • Patrick Magee (unregistered) in reply to Patrick Magee
    Patrick Magee:
    Architect = "Prick"

    if(Architect.Equals("Prick")) { Architect.IsSacked = true; }

    ??? where is the edit button??

  • Matt (unregistered)

    Sounds like a guy that's read too much theory and hasn't spent enough time applying it.

    I wouldn't argue with his opinion of "Standards and Practices" in general. I'd be darn worried about his apparent lack of ability to apply that thought, though

  • StupidTheKid (unregistered) in reply to Anonymous
    Anonymous:
    Since this is MS' best practices , he might be right. Flame away!

    Challenge accepted. MS actually publishes a free book on architecture design, the "Microsoft Application Architecture Guide", which is available at http://msdn.microsoft.com/en-us/library/ff650706.aspx. It is not the best book around, but it's free, and it might convince some people that software architecture is more than just smashing code snippets together.

  • (cs)

    "Least common denominator domain" is my new favorite buzz-phrase!

  • Heh (unregistered)

    If .NET weren't mentioned, I'd swear one of my coworkers submitted this.

  • brodie (unregistered)

    TRWTF is the name Tennyson.

  • (cs) in reply to brodie
    brodie:
    TRWTF is the name Tennyson.
    True.

    Parents can be so cruel...

  • (cs) in reply to Patrick Magee
    Patrick Magee:
    ??? where is the edit button??
    It's only visible for logged-in registered users...
  • Svick (unregistered) in reply to Иagesh
    Иagesh:
    This is why operator overloading is sacred animal feces. Operators (+,-,=,÷ etc.) are nothing but syntactical jujubes. All serious programming should use proper method calls only. Just like Java.
    Math.Divide(
      Math.Plus(
        Math.Minus(b),
        Math.Sqrt(
          Math.Minus(
            Math.Times(b, b),
            Math.Times(4, Math.Times(a, b)),
      Math.Times(2, a))
    

    Would you prefer to write code like this?

  • Bogolese (unregistered) in reply to Иagesh

    Let me add the :) for you so everyknow knows you're kidding. You're kidding, right?

  • x00|\|3s!s (unregistered) in reply to brodie
    brodie:
    TRWTF is the name Tennyson.

    Tennyson Tennyson Tennyson Pennyson Pennison Penison Penisson Penis son (Tenny's a pederast?) Penis sun (Tenny's a nudist?) Penis fun (Tenny's gay?) Penis->cunt (Tenny's a tranny?) Penis punt (Guess he was really tired of having one) Penis blunt (He rolled up pot in it and smoked it?) Tennis blunt (He plays while smoking?) Ferris blunt (I don't remember a pot smoking scene) Ferris Bueller (Oh right, it's my day off...) Dante Hicks (...and I'm not even supposed to be here today!)

  • Zog (unregistered) in reply to Svick

    ... erm, actually yes I like this...

    You'll have to excuse me a moment, the nurse just came in....

  • Bogolese (unregistered) in reply to Иagesh
    Иagesh:
    This is why operator overloading is sacred animal feces. Operators (+,-,=,÷ etc.) are nothing but syntactical jujubes. All serious programming should use proper method calls only. Just like Java.

    Let me add the :) for you so everyknow knows you're kidding. You're kidding, right?

  • (cs) in reply to Svick
    Svick:
    Иagesh:
    This is why operator overloading is sacred animal feces. Operators (+,-,=,÷ etc.) are nothing but syntactical jujubes. All serious programming should use proper method calls only. Just like Java.
    Math.Divide(
      Math.Plus(
        Math.Minus(b),
        Math.Sqrt(
          Math.Minus(
            Math.Times(b, b),
            Math.Times(4, Math.Times(a, b)),
      Math.Times(2, a))
    

    Would you prefer to write code like this?

    Do I get a jujube for spotting the bug?

  • (cs)

    There should be a rule that when your title includes "Architect" you should no longer be laying hands on code (much like a building Architect never picks up a hammer).

    Of course, the counter example is when a coder says "We should do <idiot idea>, because it's Best Practices" to a more senior person and then can't tell them who says so or explain why it is "Best Practice".

  • the beholder (unregistered) in reply to Bogolese
    Bogolese:
    Иagesh:
    This is why operator overloading is sacred animal feces. Operators (+,-,=,÷ etc.) are nothing but syntactical jujubes. All serious programming should use proper method calls only. Just like Java.

    Let me add the :) for you so everyknow knows you're kidding. You're kidding, right?

    Wasn't the name "Nagesh" clue enough?

  • trtrwtf (unregistered) in reply to Code Slave
    Code Slave:
    There should be a rule that when your title includes "Architect" you should no longer be laying hands on code (much like a building Architect never picks up a hammer).

    Of course, the counter example is when a coder says "We should do <idiot idea>, because it's Best Practices" to a more senior person and then can't tell them who says so or explain why it is "Best Practice".

    "Laying hands on the code"? What is he, a faith hacker?

  • (cs) in reply to Svick
    Svick:
    Иagesh:
    This is why operator overloading is sacred animal feces. Operators (+,-,=,÷ etc.) are nothing but syntactical jujubes. All serious programming should use proper method calls only. Just like Java.
    Math.Divide(
      Math.Plus(
        Math.Minus(b),
        Math.Sqrt(
          Math.Minus(
            Math.Times(b, b),
            Math.Times(4, Math.Times(a, b)),
      Math.Times(2, a))
    

    Would you prefer to write code like this?

    No, of course not. I'd rather write it cómo Dios manda:

    b.multiply(b).subtract(Integer.valueOf(4).multiply(a.multiply(b)))
    

    etc. (I wasn't able to properly port your code, because your brackets didn't match up).

  • (cs)

    Tennyson should have fired back saying "inconsistent behavior of the == operator among value types creates an unnecessary risk".

    I wonder if The Architect would have explained to him that some unnecessary risk is acceptable.

  • Anon (unregistered) in reply to pjt33
    pjt33:
    b.multiply(b).subtract(Integer.valueOf(4).multiply(a.multiply(b)))
    
    etc. (I wasn't able to properly port your code, because your brackets didn't match up).

    No magic numbers!

    const int FOUR = 4;
    
    b.multiply(b).subtract(Integer.valueOf(FOUR).multiply(a.multiply(b)))
    

    Amateur.

  • A Gould (unregistered) in reply to trtrwtf
    trtrwtf:
    Code Slave:
    There should be a rule that when your title includes "Architect" you should no longer be laying hands on code (much like a building Architect never picks up a hammer).

    Of course, the counter example is when a coder says "We should do <idiot idea>, because it's Best Practices" to a more senior person and then can't tell them who says so or explain why it is "Best Practice".

    "Laying hands on the code"? What is he, a faith hacker?

    OK, now I have the urge to spend the rest of my day walking up to co-workers' desks, laying hands on their machines and shouting "Let your Spreadsheet.. be HEALED!".

    Thanks.

    OK, but seriously - everyone should stop, take a moment, and be totally jealous of a guy who has managed to get a coding job where management is completely unwilling to overrule him. Yes, this guy is an arse, but if you could code what you want, give any BS reason you wanted, and be assumed to be Absolutely Correct, wouldn't you powertrip a little too?

  • (cs) in reply to boog
    boog:
    Tennyson should have fired back saying "inconsistent behavior of the == operator among value types creates an unnecessary risk".

    I wonder if The Architect would have explained to him that some unnecessary risk is acceptable.

    Witout unecesary risk, there is no return.

  • (cs) in reply to boog
    boog:
    Tennyson should have fired back saying "inconsistent behavior of the == operator among value types creates an unnecessary risk".

    I wonder if The Architect would have explained to him that some unnecessary risk is acceptable.

    or necessary

  • (cs) in reply to Anon
    Anon:
    pjt33:
    b.multiply(b).subtract(Integer.valueOf(4).multiply(a.multiply(b)))
    
    etc. (I wasn't able to properly port your code, because your brackets didn't match up).

    No magic numbers!

    const int THREE = 4;
    
    b.multiply(b).subtract(Integer.valueOf(FOUR).multiply(a.multiply(b)))
    

    Amateur.

    FTFY

  • (cs) in reply to Nagesh
    Nagesh:
    boog:
    Tennyson should have fired back saying "inconsistent behavior of the == operator among value types creates an unnecessary risk".

    I wonder if The Architect would have explained to him that some unnecessary risk is acceptable.

    Witout unecesary risk, there is no return.

    So you're saying unnecessary risk is necessary?

    Interesting...

  • Nagɘsh (unregistered) in reply to Nagesh
    Nagesh:
    boog:
    Tennyson should have fired back saying "inconsistent behavior of the == operator among value types creates an unnecessary risk".

    I wonder if The Architect would have explained to him that some unnecessary risk is acceptable.

    Witout unecesary risk, there is no return.

    Curry was designed to mask unnecessary risk of storing food in country with no ice.

  • (cs) in reply to Anon
    Anon:
    No magic numbers!
    const int FOUR = 4;
    b.multiply(b).subtract(Integer.valueOf(FOUR).multiply(a.multiply(b)))
    Amateur.
    Strictly, the developer should have looked up a MathematicalConstantProvider implementation on the enterprise service bus rather than hard-coding that constant at all, so that it can all be configured correctly during deployment. That way, maximal flexibility would be achieved for only minimal extra complexity.

    Now, excuse me while I fall off my chair laughing…

  • Nagesh (unregistered) in reply to Bogolese
    Bogolese:
    Let me add the :) for you so everyknow *knows* you're kidding. You're kidding, right?
    Imposter is matterhorn but being correct. Overloading si bad practise, not alowed in Java becase leads to misuse. See Joshua Block "Efective Java" or even piece of Shrowshups C++ programing language book (don't have paper copy on my hands) for reson why operater overloding is dangerous.
  • Atle (unregistered)

    "Standards and Practices" are simply conglomerations of tribal knowledge

    I love this (as in "I hate this kind of") answer. Because TRWTF is that he doesn't address the actual point of the argument.

    That point is "... because Money objects are immutable and represent the same data, ...". But The Architect steps around this and does a successful straw man attack on "Standards and Practices" instead.

    I've seen this so many times. Usually the straw man remains undetected and the discussion derails and ends in a totally pointless debate about the straw man instead.

  • Jon (unregistered)

    Yep, sounds like the architect.

    [image]
  • Nagesh (unregistered) in reply to pjt33
    pjt33:
    Svick:
    Иagesh:
    This is why operator overloading is sacred animal feces. Operators (+,-,=,÷ etc.) are nothing but syntactical jujubes. All serious programming should use proper method calls only. Just like Java.
    Math.Divide(
      Math.Plus(
        Math.Minus(b),
        Math.Sqrt(
          Math.Minus(
            Math.Times(b, b),
            Math.Times(4, Math.Times(a, b)),
      Math.Times(2, a))
    

    Would you prefer to write code like this?

    No, of course not. I'd rather write it cómo Dios manda:

    b.multiply(b).subtract(Integer.valueOf(4).multiply(a.multiply(b)))
    

    etc. (I wasn't able to properly port your code, because your brackets didn't match up).

    My project is using 1.2, but in later Java VMs, will not be needing type conversion.

  • ᴺᵃᵍᵉsh (unregistered) in reply to Svick
    Svick:
    Иagesh:
    This is why operator overloading is sacred animal feces. Operators (+,-,=,÷ etc.) are nothing but syntactical jujubes. All serious programming should use proper method calls only. Just like Java.
    Math.Divide(
      Math.Plus(
        Math.Minus(b),
        Math.Sqrt(
          Math.Minus(
            Math.Times(b, b),
            Math.Times(4, Math.Times(a, b)),
      Math.Times(2, a))
    

    Would you prefer to write code like this?

    I would prefer you not be starting game of FizzBuzz except more boaring.

  • trtrwtf (unregistered) in reply to A Gould
    A Gould:

    OK, but seriously - everyone should stop, take a moment, and be totally jealous of a guy who has managed to get a coding job where management is completely unwilling to overrule him. Yes, this guy is an arse, but if you could code what you want, give any BS reason you wanted, and be assumed to be Absolutely Correct, wouldn't you powertrip a little too?

    I'm more of a writer than a hacker, so my response to this is simple: no, I wouldn't be jealous of this. Good writing thrives on opposition, I write best in collaboration with a good editor or an involved client. When I write code, I find it's the same thing, having an interested party review what I'm doing always helps. I think I'd write lousy text and lousy code if I didn't have someone to help call me out on my bullshit. And if you think you don't write bullshit sometimes, that probably means you write a lot of bullshit.

  • Pytry (unregistered) in reply to trtrwtf
    trtrwtf:
    ..if you think you don't write bullshit sometimes, that probably means you write a lot of bullshit.

    Feature this.

  • Nagesh (unregistered) in reply to Pytry
    Pytry:
    trtrwtf:
    ..if you think you don't write bullshit sometimes, that probably means you write a lot of bullshit.

    Feature this.

    Refuse of sacred cow need to be treated with more respecting.

  • Andrew Norman O'ther (unregistered) in reply to Svick
    Svick:
    Math.Divide(
      Math.Plus(
        Math.Minus(b),
        Math.Sqrt(
          Math.Minus(
            Math.Times(b, b),
            Math.Times(4, Math.Times(a, b)),
      Math.Times(2, a))
    

    Would you prefer to write code like this?

    If he was alive today, Mr Pythagoras would be spinning in his grave.

  • David (unregistered) in reply to Heh
    Heh:
    If .NET weren't mentioned, I'd *swear* one of my coworkers submitted this.

    It is submitted by one of your coworkers, but they changed it to .NET to anonymise the story.

  • John M. (unregistered)

    Why does this story ( at least the beginning ) vaguely remind me of BobX? http://thedailywtf.com/Articles/We-Use-BobX.aspx

  • The Undertaker (unregistered) in reply to Andrew Norman O'ther
    Andrew Norman O'ther:
    Svick:

    Would you prefer to write code like this?

    If he was alive today, Mr Pythagoras would be spinning in his grave.

    What? Alive? In his grave?

  • The Undertaker (unregistered) in reply to The Undertaker
    The Undertaker:
    Andrew Norman O'ther:
    Svick:

    Would you prefer to write code like this?

    If he was alive today, Mr Pythagoras would be spinning in his grave.

    What? Alive? In his grave?
    Please, show some sensitivity. I had a son that was alive in his grave, and let me assure you: it is no laughing matter.

  • (cs) in reply to trtrwtf
    trtrwtf:
    "Laying hands on the code"? What is he, a faith hacker?

    I don't know, but stupidity like that should count as a Chaotic Act and he should lose his Paladinhood... Or a 50 DKP MINUS depending on what type of Paladin...

Leave a comment on “Tribal Knowledge”

Log In or post as a guest

Replying to comment #362374:

« Return to Article