Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Root797677yI did this once when I was like 14. I felt dirty. But I had no idea how to cleanly reverse a rather complicated bit of logic.
Now I'd just rewrite it, or, I dunno, do this:
if (!(complicated conditional))
lol -
Root797677y@JoshBent
complicated_condition = (first_flag or !second_flag and !((second_flag xor third_flag) or fourth_flag))
if (!complicated_condition) { ... }
Instead of
...
You know what, I'm not inverting that. Too much typing on my phone. Even with a builder approach. -
@Ashkin I was refering to the image I posted in the rant, not that you didnt post a full code example 😉
-
@JoshBent umm sir? That is my code, in devrant issue tracker. I am sure i wrote notshow.EditButton(), but i guess i was sleepy. Sorry about that
Related Rants
what is the else there for, it reminds me of all the times I saw shit like
if(variable == true){
}else{
doSomething();
}
undefined
github