76
KAS89
122d

Why would someone do this? Is it really necessary?

Comments
  • 22
    Fuck my head hurts after processing dead
  • 7
    *eye twitches*
  • 12
    !IsItNotNecessary()?
  • 8
    i can't say i don't agree XD
  • 3
    I think its just bad design to begin with. The properties of the package class should be other way around.
  • 7
    Double negations to negate the negations.

    Wow, this person gets off on negations.

    On the bright side, you get to practice your sight reading of propositional logic!
  • 7
    @duckWit you mean more immune to cancer code
  • 4
    I've seen this few times. It might not be a bad design, as sometimes you do need those kind of checks but this is for sure - the blindest early return design follow.
  • 3
    @devTea *Your immunity to cancer code leveled up!*
  • 3
    omg!
  • 4
    "I don't discourage you not to refuse"
  • 3
    I bet the isNot part is done by one dev who made the packages where it was easier or more logical for him to negate the word and not the code. This lead to another dev using it with the negation.

    But I think this is not THIS bad devrant showed me way ... way way worse things ;-)
  • 5
  • 8
    !Not
    Who's there?
  • 5
    Yes it is necessary, otherwise you'd have to do

    !(!package.isEmpty())

    That takes two exclamation marks!
  • 3
    Nevermind, I just realized IsNotEmpty() actually needs THREE exclamation marks!!!
  • 2
    You can't say it's bad design when you don't know the design goals. This example could just be one use case that lost the trade off with many use cases you don't know about.
  • 2
    Don't know what bothers me more... Double negative or curly brackets in new line 🤔
  • 3
    @makzimalist curly braces in new line is Microsoft's standard. This is C# code. So I think that is fine. But double negatives? NO WAY.
  • 3
  • 3
    @mee4895 yep. !NAND is also easier than AND.
  • 2
    @kenogo are you high
Your Job Suck?
Get a Better Job
Add Comment