• W (unregistered) in reply to Jay
    Jay:
    Charles400:
    "experience can be gained and skills can be learned, but attitude never changes."
    I used to have that attitude.

    Theun you must still have that attitude, because attitude never changes.

    WHOOOSSSH

  • SAMO (unregistered)

    ALL YOU N00BS CRITICIZE TEH CODEZ BUT LACK THE MOTIVATION TO DO IT RIGHT.

    THIS GUY COULD BE THE COMPANY ACE BY FIXING EVERYTHING AND IMPROVING RUNTIMES

  • expansys (unregistered) in reply to Zer0
    Zer0:
    whatever:
    object.equals wouldn't check the values, it checks if the 2 instances are equal, ie have the same memory address.

    Uh no. Please don't code in C# ever again, thanks.

    care to elaborate on that? i thought OP was right "Object.Equals", as implemented in the Object class, checks if two references point to the same thing. obviously if it's overridden it's different. is that not right?

  • (cs) in reply to spamcourt
    spamcourt:
    C# developer job
    shiny new Macbooks everywhere

    Yeah that's gonna work.

    +1 Funny

  • Zer0 (unregistered) in reply to expansys
    expansys:
    Zer0:
    whatever:
    object.equals wouldn't check the values, it checks if the 2 instances are equal, ie have the same memory address.

    Uh no. Please don't code in C# ever again, thanks.

    care to elaborate on that? i thought OP was right "Object.Equals", as implemented in the Object class, checks if two references point to the same thing. obviously if it's overridden it's different. is that not right?

    That is right. But if you're actually using Equals() you should already have it overridden, unless all you care about is a referrence check. But in that case you should use ReferrenceEquals().

  • (cs) in reply to SAMO
    SAMO:
    ALL YOU N00BS CRITICIZE TEH CODEZ BUT LACK THE MOTIVATION TO DO IT RIGHT.

    THIS GUY COULD BE THE COMPANY ACE BY FIXING EVERYTHING AND IMPROVING RUNTIMES

    Kindly bitwise-OR your future comments with ' ' prior to posting them.

    (a WTF-worthy lcase() if I ever did see one)

  • (cs) in reply to Georgem
    Georgem:
    There were, admittedly, a couple of Java projects in the place. But no grads working on them.

    So, only interns were working on the Java projects?

  • (cs) in reply to Zer0
    Zer0:
    whatever:
    object.equals wouldn't check the values, it checks if the 2 instances are equal, ie have the same memory address.

    Uh no. Please don't code in C# ever again, thanks.

    Agreed. 2 instances with the same memory address and different values. Somebody's smokin..

  • (cs) in reply to Zer0
    Zer0:
    That is right. But if you're actually using Equals() you should already have it overridden, unless all you care about is a referrence check. But in that case you should use ReferrenceEquals().

    TRWTF is languages that force the BaseBean antipattern on you

    (C#, Java, etc)

  • (cs)
    namespace Utils
    {
      public class CommonHelperFunctions
      {
        public static string GetNameOfClassFromObject(object o)
        {
          // ...
        }
      }
    }
    
  • James (unregistered) in reply to Jason Y
    Jason Y:
    Comments are ignored by the compiler.

    I'm increasingly thinking most of these comments should be ignored by everyone

  • Dan (unregistered) in reply to spamcourt
    spamcourt:
    C# developer job
    shiny new Macbooks everywhere

    Yeah that's gonna work.

    It could.

  • Franz Kafka (unregistered) in reply to pitchingchris
    pitchingchris:
    Zer0:
    whatever:
    object.equals wouldn't check the values, it checks if the 2 instances are equal, ie have the same memory address.

    Uh no. Please don't code in C# ever again, thanks.

    Agreed. 2 instances with the same memory address and different values. Somebody's smokin..

    2 instances with the same value and different identities are equal, but not identity-equal.

  • Iain Collins (unregistered)

    Other than the staffing ratio (which is all too common) this code example isn't all that WTFy really - at least not by the standards of stuff I've frequently been exposed to (which has been orders of magnitude worse).

    Surely all developers have inadvertently re-written the odd built-in or common function in one language or another, especially at the beginning of their career as these interns seemingly were.

    It's easy to misuse foo.Equals() in C# as can be seen in confusion on this thread, even Microsoft's own documentation doesn't do a great job of clarifying the functionality - although there are better explanations elsewhere. Sure the code wasn't brilliant, but it's easy to follow. Also worth nothing that Microsoft explicitly encourage people to override the Equals method to suit their needs in the MSDN documentation.

  • sRc (unregistered)

    Aeron chairs, so THAT's what theyre called...

    Ive sat in those for the last 3 years and absolutely hate them!

  • Bob (unregistered) in reply to Georgem

    [quote user="Georgem]I'm sure it does work. Whether it indicates that the development team are using the best tool for the job or not is another matter, though. [/quote] Development team? You mean the new guy and a couple of interns?

    Clearly the Macs were a vital tool used to minimise the chances that the "managers" would be able to touch the code. You think it was bad? Imagine if those guys had had Visual Studio installed. :)

    Even ignoring exaggeration, it seems likely that this was one of many companies that were marketing-heavy and product-light. And that can work, as long as your target market is the same sort of company because those guys don't care about whether or not your product works, they just care about whether or not it makes them look good to their equally smart boss. But you don't need a lot of developers with appropriate machines in order to build a product if you don't care about the product working.

  • Iain Collins (unregistered) in reply to sRc
    sRc:
    Aeron chairs, so THAT's what theyre called...

    Ive sat in those for the last 3 years and absolutely hate them!

    We have them here too...and they really, really suck IMO too.

    They seem to have a catastrophic failure rate, I count myself lucky to have one in the office that can even stay upright (as long as I don't actively lean back on it). The design of the element which is supposed to support the small of your back is pathetic - difficult to adjust and detaches easily.

    I've sat in many better chairs that cost around 10% of the price.

    So now we know - it's the CHAIRS that are the real WTF here!

  • Iain Collins (unregistered)

    And ... on a separate point (at the risk of turning into a comments whore) ... MacBook Pro's make excellent development systems, I've seen plenty of .NET only developers use them, never mind cross platform developers.

    They are some of the best portable hardware around, and handle running multiple VMWare instances well.

    I use one for development as I develop on Win, Mac and Linux with in a range of languages - including C# on Windows, Mac and Linux. It's also the only practical way to develop cross platform software in C# if you are intending to deploy on Mac OS X, as you can't get Interface Builder for any platform but Mac OS X now.

    Of course just because you are using C# doesn't mean you are using Windows. It's a good language, and ISO standard and enjoys solid cross platform support thanks to the efforts of the Mono team.

  • Anonymous Poster (unregistered) in reply to Bluesman
    Bluesman:
    It was everything start-up dreams were made of: posh decor, shiny new Macbooks everywhere, an air-hockey table, free catered meals and Aeron chairs as far as the eye could see.

    So let me get this: nice cushy job, and since he's by far the most knowledgeable programmer there, he can do what he wants (even if it's the right thing).

    Why the hell does he want out???

    Agreed. He can fix that mess, improve software quality, get a raise, write no documentation and hold all the managers hostage to his will. And pretty much run the company himself. Muahahahahahahaha~!

    Captcha: similis. Too damn close to a well known STD.

  • Mr.'; Drop Database -- (unregistered) in reply to m0ffx
    m0ffx:
    Because they're shiny. Management wants to attract people with the right a(p|t)titude, so they need to make the environment look attractive. A load of Dells wouldn't have the same aesthetic.
    Is that attractive or aptractive?
  • (cs) in reply to Iain Collins
    Iain Collins:
    So now we know - it's the CHAIRS that are the real WTF here!
    That should be "it are the chairs"! Did your English teacher teachn't you anything?
  • Gary Olson (unregistered) in reply to Mr.'; Drop Database --
    Mr.'; Drop Database --:
    m0ffx:
    Because they're shiny. Management wants to attract people with the right a(p|t)titude, so they need to make the environment look attractive. A load of Dells wouldn't have the same aesthetic.
    Is that attractive or aptractive?
    Or is that aesthetic or aesphetic?
  • rea (unregistered) in reply to Steve
    Steve:
    Code Dependent:
    Someone You Know:
    Code Dependent:
    Steve:
    #define attitude aptitude
    Very apt.
    Very att.
    Very @.

    #define att apt

    I'm just trying to make the comment compile y'all..

    Have at it, you!
  • (cs) in reply to Franz Kafka
    Franz Kafka:
    pitchingchris:
    Zer0:
    whatever:
    object.equals wouldn't check the values, it checks if the 2 instances are equal, ie have the same memory address.

    Uh no. Please don't code in C# ever again, thanks.

    Agreed. 2 instances with the same memory address and different values. Somebody's smokin..

    2 instances with the same value and different identities are equal, but not identity-equal.

    I don't know about C#, but Java distinguishes clearly between identity comparisons (same pointer, using the == operator) and equality comparisons (same content, using the equals() method). I would think that this kind of distinctiveness is technically required in any language.

  • Duke of New York (unregistered)

    This is the kind of WTF where the perp needs his face pressed against a wall with the words "COMPUTERS WEREN'T INVENTED YESTERDAY" printed on it.

  • (cs) in reply to James
    James:
    Jason Y:
  • acid (unregistered) in reply to m0ffx
    m0ffx:
    campkev:
    Frank's first day consisted mostly of introductions. When he finally made it back to his desk, he couldn't help but wonder about some things. Things like, why would a Web-based software company with 20 employees have only three developers on staff? And why would two of those developers be part-time interns?

    And why would a company doing C# development have MacBooks everywhere?

    Because they're shiny. Management wants to attract people with the right a(p|t)titude, so they need to make the environment look attractive. A load of Dells wouldn't have the same aesthetic.

    Oh, I don't know...

    http://www.dell.com/content/products/productdetails.aspx/xpsnb_m1730?c=us&cs=19&l=en&s=dhs&~ck=mn

    Not shiny, but manly looking in a gamer kind of way I guess...

  • fry (unregistered) in reply to Zer0

    So, in other words, what he said was technically correct, but you felt the need to say he was wrong, anyway?

  • Barf4Eva (unregistered)

    Heh, sounds a little like the last place I worked at... Practically everyone BUT the developers was a manager.

    They have probably outsourced all the devs by now...

  • (cs)

    TRWTF, as far as I am concerned, are the macbooks.

    I have a friend who does development on a macbook, the thing SUCKS as far as i am concerned. Where the F are the page up / down keys? WTF is up with that HUGE over-sized touchpad? Then I tried to do a right click...oh...right...no right button. I could go on...

    You could not pay me enough money to work with a mac-anything.

  • Anonymous Coward (unregistered) in reply to TheRider
    TheRider:
    I don't know about C#, but Java distinguishes clearly between identity comparisons (same pointer, using the == operator) and equality comparisons (same content, using the equals() method). I would think that this kind of distinctiveness is technically required in any language.

    In C#, all that behaviour is overridable. My understanding is that the behaviour for reference types should be:

    == : reference equality .Equals() : value equality (excepting object, which has no value except for its reference)

    And for value types (int, string, double, etc):

    == : value equality .Equals() : value equality

    Any overrides you implement on your classes should follow this pattern, or you risk confusion for other programmers using your code. But the point is that you don't have to. You can overide the =='s operator to always return false (try debugging that).

  • T.C (unregistered)

    Implementing your own 'Object.Equals' is not as stupid as it may first appear. I once built a class that compares objects by serializing them then doing a byte comparison to determine if two distinct objects contain the same data (which Object.Equals won't do). It proved very useful for unit testing.

    Which reminds me...I once worked for a company and during the first week I was introduced to the senior dev. and he showed me his project estimation for the first project I would be working on. I noticed there was no mention of testing so I asked him why unit testing was included. He responded: "We don't do unit testing here because it takes to long.". You can guess how the project went...

  • Anonymous Coward (unregistered) in reply to T.C

    I think it's actually assumed that you will override .Equals(), as a standard interface for evaluating object equivalency.

    As opposed to operator== (which is called based on the type of the object in the current scope), calling .Equals() always calls the implemetation of equals of the instance type of that object. i.e. the .Equals() implementation of the sub class, rather than the super class.

    Sub s = new Sub(); object o = new object(); object o2 = s;

    s.Equals(s) // calls Sub.Equals() o.Equals(o) // calls Object.Equals() o2.Equals(o2) // calls Sub.Equals()

    s == s //calls Sub.==() (if it exists) o == o //calls Object.==() o2 == o2 //calls Object.==()

    When you do override .Equals(), the compiler will throw up a warning suggesting that you also override .GetHashCode() (if you haven't already done so).

    If o1.Equals(o2) is true, then o1.GetHashCode() == o2.GetHashCode() should also be true. See the spec.

  • (cs) in reply to Tombo

    Hmm sounds rather like my employer, Grunts are outnumbered by managers 2:1.

  • (cs) in reply to m0ffx
    m0ffx:
    campkev:
    Frank's first day consisted mostly of introductions. When he finally made it back to his desk, he couldn't help but wonder about some things. Things like, why would a Web-based software company with 20 employees have only three developers on staff? And why would two of those developers be part-time interns?

    And why would a company doing C# development have MacBooks everywhere?

    Because they're shiny. Management wants to attract people with the right a(p|t)titude, so they need to make the environment look attractive. A load of Dells wouldn't have the same aesthetic.

    The developers (all one-plus-two-interns of them) wouldn't need MacBooks everywhere. The managers had the MacBooks, and there were a couple of Dells tucked out of sight under desks for development.

  • (cs) in reply to Code Dependent
    Code Dependent:
    Jason Y:
    Jason Y:
    Comments are ignored by the compiler.
    I see that a reply does not automatically quote.
    Nothing slow about you but your name, huh, Lightnin'.

    See that "Quote" button to the right of "Reply"? You'll never guess what it's for...

    It's the Reply button that's useless. If you're not replying to a post, you don't want "Reply", you want the "Add Comment". If you are replying to a post, then you want to quote what you're replying to for the sake of providing context (see quoted exchange). How many people bother with using those "in reply to 123666" links?

    It would make sense if the forum software threaded posts (and "in reply to 123666" doesn't count) - it would make it obvious which post you were replying to without needing to provide context manually, and you'd be free to only quote specific parts as and when necessary. But this forum doesn't do that.

  • SCB (unregistered) in reply to Iain Collins
    Iain Collins:
    sRc:
    Aeron chairs, so THAT's what theyre called...

    Ive sat in those for the last 3 years and absolutely hate them!

    We have them here too...and they really, really suck IMO too.

    They seem to have a catastrophic failure rate, I count myself lucky to have one in the office that can even stay upright (as long as I don't actively lean back on it). The design of the element which is supposed to support the small of your back is pathetic - difficult to adjust and detaches easily.

    I've sat in many better chairs that cost around 10% of the price.

    So now we know - it's the CHAIRS that are the real WTF here!

    +1 They have a ridge at the front which seems to be there to cut off the blood supply to your legs. Presumably to stop you from being able to run away.
  • (cs) in reply to Gary Olson
    Gary Olson:
    Mr.'; Drop Database --:
    m0ffx:
    Because they're shiny. Management wants to attract people with the right a(p|t)titude, so they need to make the environment look attractive. A load of Dells wouldn't have the same aesthetic.
    Is that attractive or aptractive?
    Or is that aesthetic or aesphetic?

    I think it's asthmatic.

  • (cs) in reply to Someone You Know
    Someone You Know:
    Gary Olson:
    Mr.'; Drop Database --:
    m0ffx:
    Because they're shiny. Management wants to attract people with the right a(p|t)titude, so they need to make the environment look attractive. A load of Dells wouldn't have the same aesthetic.
    Is that attractive or aptractive?
    Or is that aesthetic or aesphetic?
    I think it's asthmatic.
    Oh good, that's better than phlegmatic.
  • (cs)

    The first project I was assigned to when I started here was like this. It was originally given to the lowest bidder, who promptly fucked it all up and so I was hired permanently and told to fix the mess. The only thing was the deadline was fast approaching. The thing is still a clusterfuck of hellish, hackish, terrible code - but At Least It Works™, and that is how I work today!

  • (cs) in reply to Code Dependent
    Code Dependent:
    Someone You Know:
    Gary Olson:
    Mr.'; Drop Database --:
    m0ffx:
    Because they're shiny. Management wants to attract people with the right a(p|t)titude, so they need to make the environment look attractive. A load of Dells wouldn't have the same aesthetic.
    Is that attractive or aptractive?
    Or is that aesthetic or aesphetic?
    I think it's asthmatic.
    Oh good, that's better than phlegmatic.

    Which is miles better than Flemish.

  • Teh Irish Gril Riot (unregistered) in reply to WebDevHobo

    [quote user="WebDevHobo"]People, there is more to programming than just making it work. [quote]

    Ahhh... the exuberance of youth. Yes, Spring indeed has sprung!

  • (cs) in reply to Inhibeo
    Inhibeo:
    campkev:
    And why would a company doing C# development have MacBooks everywhere?
    Some iPhone fanboys believe that all .NET developers should use Macs.
    Well, it does say "Filed under: tools" below the headline...

    np: Moderat - Porc#1 (Moderat)

  • aileron chair (unregistered) in reply to Gary Olson
    Gary Olson:
    Mr.'; Drop Database --:
    m0ffx:
    Because they're shiny. Management wants to attract people with the right a(p|t)titude, so they need to make the environment look attractive. A load of Dells wouldn't have the same aesthetic.
    Is that attractive or aptractive?
    Or is that aesthetic or aesphetic?
    apesthetic
  • ese (unregistered) in reply to zolf
    zolf:
    spamcourt:
    C# developer job
    shiny new Macbooks everywhere

    Yeah that's gonna work.

    +1 Funny
    -1 /.

  • (cs)

    Obligatory hatred of fonts where 1 is identical to l (blockquoted code in the article).

  • Scottford (unregistered)

    TRWTF is that Frank didn't figure out in the interview that the interviewers were idiots.

  • Alex (unregistered)

    TRWTF is that if they extended this to certain numeric types (e.g. whatever the C# equivalent is of Java's BigDecimal) this would be different from equals, because compareTo is not necessarily consistent with equals. (The canonical example being a fractional number that remembers precision - (4.00).compareTo(4.0) should return 0, but (4.00).compareTo(4.0) should return false.)

  • (cs) in reply to Alex
    Alex:
    (4.00).compareTo(4.0) should return 0, but (4.00).compareTo(4.0) should return false.)
    Only if false is the same as 0.
  • (cs)
    Anonymous:
    Why do spammers think
    Wait, what?

Leave a comment on “A Winning Aptitude”

Log In or post as a guest

Replying to comment #:

« Return to Article