• D B (unregistered) in reply to dkf
    D B:
    So for example (and this probably isn't true), if XXX.ToString worked for a property, but didn't work for a function. It shows that down in the code they're really both functions, but because the implementation treats them differently it then ends up causing more headaches than it solves.
    Speaking of which, why is XXX.ToString() a function/method in the first place? Shouldn't it be just the XXX.string property?

    So a property of a property!?

  • Meep (unregistered) in reply to Sociopath
    For instance, with an ArrayList you can call .remove(0) and get an object, and then do something with it. For a connection pool, it's pretty reasonable to remove a connection in use, and add it back when you're done. (At which point, though, it looks like you probably want a Queue.)
    One lazy and/or ignorant client, and your whole connection pool is drained. Brillant!

    My implementation lets their app fail, whereupon they can fix their app. Yours would let them hose the server with thousands of stale connections.

  • 11 (unregistered) in reply to Zynaps

    50% is not that bad!

  • WorldClass (unregistered) in reply to Zynaps
    Even worse, it looks like if this.connections.size() = 0, then it doesn't return any value.

    Really the problem is one of the curly brackets needs to be moved up two lines.

    Finally someone got it. Not really a WTF, just another simple bug, probably due to bad indentation on the original code.

    TRWTF, as usual, is people on this site should know how to analyze code, but don't. This just reflects the general level of developer competence out there, where only 1 out of 10 developers know how to read other people's code.


Leave a comment on “This Round Robin Laid an Egg”

Log In or post as a guest

Replying to comment #:

« Return to Article