8

I know that if something looks stupid but it works, it ain't stupid... but this is just plain borderline.

Basically, a cast from int to String to int to String from some legacy code I'm working with

Comments
  • 3
    .... what?
    Why?
    Ugh.
  • 2
    What problem does this solve?

    We got an int...

    We convert that to String...

    We take that, convert that from String to Integer, subtract 1, create a new Integer object unnecessarily, and then convert that Integer object to String..?

    If it works, but you could simplify it and have the same functionality, it's just stupid, not "street smart".
  • 4
    @piehole It seems like none. This is what you get when you contract bank accountants, take them to a course of an old software's programming language and teach them to copy /paste code in order to create a hybrid java web application. And this is just the tip of the iceberg
  • 3
    Even if what it did was sensible, the style totally invalidates it!
  • 0
    @Root This is me everytime I have to open one of these pages...
  • 1
    This is classic yo-yo code, though it takes extraordinary stupidity to do it that blatantly.
  • 3
    @Fast-Nop And this is all over the place in this project. Did you even notice those variable names? it's not like its version 4 of variable zcount, there also zcountv1, zcountv2 and zcountv3. Its just a fucking counter to distinguish them.
Add Comment