74

Apparently they'd never heard of bools. The best part is the case check given that they define the string.

Comments
  • 8
    It's quite scary how much shit code like this there is out there. Where did these 'developers' come from? How did they fake it this far?
  • 1
  • 1
    @joycestick This doesn't even touch the sides. This code sits in a project that is pretty much a single form consisting of 3k lines.
  • 4
    What language is that?
    They can set Bools but can’t use them , I don’t understand how people get jobs sometimes.
    == is not ‘usually’ case sensitive anyway ๐Ÿ˜‘
  • 1
  • 1
    There's just so much wrong with this. What are you going to do? Tidy up or ignore?
  • 4
    @joycestick A rewrite of the entire project is in the pipeline.
  • 1
    @delegate212 That'll be refreshing. Nothing sweeter than an empty project.

    Are you guys using ReSharper at all? It's great for teaching language and style if you're going to be using slightly noob developers on the new project. A little pricey but well worth it for the code quality it brings. It won't stop people using magic strings though!
  • 0
    @joycestick We do use Resharper. However, the lead who wrote this has since left, in fact I don't believe there is anyone who worked under him left.
  • 3
    and i thought I'm the only developer
    Who writes worse code ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

    But this one is legend !!!
  • 1
    Also, who does string checks like that?
  • 1
    @DutulescuRemus Indeed. I gave you your 200th point
  • 1
    @delegate212 And I gave you your 300th. Cheers!
  • 0
    Maybe they thought in future they might need more than 2 states, like Yes, No, and Maybe. ๐Ÿ˜‚๐Ÿ˜‚
  • 1
    @NuttLoose assuming they will need three, they can use optional bool value, assuming they don't want to go through constants or at least enums

    Damn that's the scariest thing I've seen so far, code compared against static values, one typo and hello hours of debugging
  • 0
    And please tell me that "catch" block is not empty T_T
  • 0
    เคฏเคธเฅเคคเฅˆ เคนเฅ‹ ๐Ÿ˜‚
  • 1
    tell them by writing that in the issue tab
Add Comment