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
![](/static/devrant/img/pipeless-devrant-banner-white.png)
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "! == false?"
-
Interviewing a junior dev.
> Make this function return false.
> junior: deleted all code in function replaces it with return false;
Literally no words.........20 -
Welcome to JavaScript where
Number.isInteger(0.9999999999999999) is false and
Number.isInteger(0.99999999999999999) is true11 -
public boolean even( int num ) {
if ( num < 0 )
num = -1 * num;
while ( num > 1 )
num = num - 2;
if ( num == 0 )
return true;
else
return false;
}19 -
Code: if(customer.primaryContract)
Boss: "just using a variable as a boolean isn't very readable"
Me:
if(!(!customer.primaryContract != !true).toString() == 'false')13 -
if( !condition ) vs. if(condition == false)
Pointless debate started with readability, turned into heated insults under 30 seconds 😂20 -
int main()
{
bool NeedPoints = true;
int Points = 0;
if (NeedPoints)
{
Points++;
if (Points > 10)
{
CreateAvatar();
NeedPoints = false;
}
}
}29 -
Boss: "Can you create a login page where every login fails?"
Me: "Sure thing!"
*Writes out php file that returns false and calls it via AJAX*8 -
Me-
/ / / / / / / / /
if (bool == true)
{
bool = false;
}
if (bool == false)
{
bool = true;
}
/ / / / / / / / /
My friend-
/ / / / / / / / /
bool = !bool;
/ / / / / / / / /
*not a real story*15 -
This was typical for me:
Yesterday evening I was installing a webserver on my Raspberry Pi for experiments with WordPress. I began some days ago, but I had to stop because the downloads took at least to long.
So I started to logi in:
Username: Raspberry
Password: Pi
-> False Password
Wondering why it is not working a tried again. Same result. After some time I remembered that I changed my password.
Username: Raspberry
Password: Ih4G2tgY*
-> false password
*example
Tried again. Still false password. Then I remembered, that I used my another standard password.
Username: Raspberry
Password: U2gra94hY*
-> false password
After that I felt a mix of angry and helplessness. After some other failed attempts I gave up.
I formatted the SD-Card and installed Raspian again.I started my Pi
Username: Raspberry
Password: Pi
-> false password
My thought: WTF, why does this not work!!
This was the moment when I got the brainwave that the Username wasn't Raspberry, it's Pi.
Username: Pi
Password: Raspberry
-> access
Then I hated myself.9 -
Why have you not yet approved my PR?!!?!
The PR:
```
role.filter(elem => elem !== "view" ? elem !== "use" ? elem !== "admin" ? false : true : true : true)32 -
bool success = false
if !success {
success = try()
}
if !success {
success = try()
}
if !success {
throw new GiveUpException()
}8 -
not the worst by itself, except I keep finding them everywhere
if(thingThatIsTrue == true) {
// omfg
}
or it's inbred cousin
if(!thingThatIsTrue == false) {
//herpa derp
}6 -
Today at work while reading legacy code:
do {
...
} while(false)
Wanna cry and laugh at the same time22 -
Where I work, in our database, we use 3 to indicate true and 7 to indicate false and 0 is true but null is false
In another table, we use 'P' to indicate true and 'I' to indicate false and 'Y' is also false and null is false
And the most used table, we also use 'Y' to indicate yes and 'N' to indicate no, but null is also Yes.
We also store integers as varchar in a live table, but stays an integer in all the other tables. I hope I'm not there when the number of digits exceeds the varchar limit.
These are all live and used in production all created by my boss, the head of IT.8 -
Want to piss off the person reviewing your PR?
don't just return true or false use 1 == 1 for true and 1 == 2 for false.
Watch the glorious rage unfolds 🤘🤘🤘6 -
Developers who writes something similar
if (count >= 0) { return true; }
else { return false; }
deserves a special room in hell.16 -
JavaScript question of the day:
Is NaN equal to itself?
NaN === NaN
A. SyntaxError
B. False
C. True
D. NaN11 -
I hope I can code myself like below.
me.Girlfriend = true;
me.Millionare = true;
but, the real case is
me.Girlfriend = false;
me.Millionare = false;
the sadest case is
me.Girlfriend is not defined T.T11 -
I have previously seen this in a production code base. The same code base included nested if statements (20+ conditions)...
If (condition == false) {
return false;
} else if (condition == true) {
return true;
}11 -
console.log(0.47-0.01===0.46);
Output: false :/
That got me stuck for quite a while..
Learned more about floating point arithmetic and representation 😊7 -
Being told that real life experience < school degree.
You couldn't possibly be more fucking wrong.2 -
Kids use "if(condition)"
Men use "if(condition == true)"
Legends use "if((condition == false) == false)"12 -
!rant
In firefox:
about:config
In "dom.webnotifications.enabled", change "true" to "false"
Website notifications are now disabled. You're welcome.7 -
bool True = false;
bool False = true;
if (True == true)
{
False = True;
}
else
{
True = true;
False = !true;
}
if (!False == !!true && True == !false)
{
False = True;
True = (!!False)true;
}
Console.WriteLine("Banana");5 -
So, if i false just correct me to true. But if i true i will be false at the same time. But this is not false.
Thank you devRant algorithm 😂1 -
How to test your cpu cooling system:
Open Firefox
Set option CloseOnLastTab to false
Hit CTRL W and don't let it up
Watch cpu burn.9 -
I really think we should have a "misleading or false" reason for --, or some other way to deal with fake news that generally plague internet forums.17
-
Spent hours trying to figure out why API calls to a third party service weren't working.
Hit up their support and find out the following:
"Hi there, we can only take true and false as strings."
"Uhmm... Does it take anything apart from true or false?"
"No, but they must be sent in as strings"
"Any reason why you don't take booleans if it's just true or false?"
*crickets chirping*
GFG2 -
Ok , so True is just !Falsejoke/meme testing database nosql development java javascript project management sql python programming php4
-
I just found this `Cyberpunk` VS Code theme and I'm a fan 🤩
https://marketplace.visualstudio.com/...6 -
Your choice. Select one
1.
foo (bar) {
return true;
}
2.
foo (bar)
{
return true;
}
3.
foo (bar) { return true; }
4.
foo (bar)
return true;
5. Collapse
|-------------------|
| foo (bar) ... |
|-------------------|
6.
#define foo boo
#define bar par
#define ( `
#define ) '
#define return go_home
#define true false
#define { ☞
#define } ☜
6-1.
boo `par' ☞
go_home false;
☜
6-2
boo `par'
☞
go_home false;
☜
6-3.
boo `par' ☞ go_home false; ☜
6-4.
boo `par'
go_home false;
6-5.
|--------------------|
| boo (par) ... |
|--------------------|
Select and Comment below.
Or add your own.27 -
Am I the only one who's getting more and more aggrevated about how the large youtube channels misinform and make out VPN providers (I am looking at you, Nord VPN, mostly) as the messiahs of the internet? How they protect our data that would otherwise be in incredible "danger" otherwise?
I understand they need clients, and I know most of the YT channels probably do not know better, but... This is misinformation at best, and downright false advertising at the worst...
"But HTTP-only websites still exist!" - yes, but unlike the era before Lets Encrypt, they are a minority. Most of the important webpages are encrypted.
"Someone could MITM their connection and present a fake certificate!" - And have a huge, red warning about the connection being dangerous. If at that point, the user ignores it, I say its their fault.
Seriously... I don't know if Nord gives their partners a script or not... But... I am getting super sick of them. And is the main reason why I made my own VPN at home...15 -
Class DonaldTrump extends Shit implements Asshole {
public final boolean PRESIDENT = false;
public final String THINKING = "bullshit";
public void talk () {
System.out.println(THINKING);
}
}1 -
Just JavaScript things:
alert(typeof NaN); //alerts 'Number' alert(NaN === NaN); //evaluates false
What else would you expect?4 -
Javascript is so funny
"0" == 0 //true
"" == 0 //true
"0" == "" //false
Always remember the ===
Realize this took me an hour of debugging7 -
My first login function
const login = (email, password) => {
If (email && password) {
return true
} else {
return false
}
}10 -
OSC, or open sound protocol, does not have a Boolean type. instead, the Boolean true has type true and the Boolean false has type false.
what.
well.
at least the problem wasn't in my code? -
Today I found this jewel in a PR of a respected dev of my workplace:
if(conditions)
{
return true;
}
else
{
return false;
}3 -
didn't anyone go for the "#define true false" joke? i didn't actually see it in action, but it would be a pretty harsh one.1
-
When you search for this error during 3 hours
if (false);
{
printf("why u right ?");
}
And it was just the first lines comma9 -
I’ll often open up my console and check if something is true and then check if the opposite is false. Thanks js3
-
Lets play a game of spot the bug...
Too easy you say?
What if I told you that this code was written by a well paid dev over an exceptionally large period of time?
Crazy huh, but that's still nothing. The most ludicrous thing about it - is that you (like me) probably suffer from a mild case of impostor syndrome.
I just ended that suffering. The only thing worse than impostor syndrome is believing you actually know what the fuck your doing. Keep it in check but learn to love it... it's probably the reason you could spot the bug after all.4 -
$md5 = md5_file($file_uri);
=> Returns false
Mmh...
die(is_readable($file_uri));
=> Returns false
[Mmh intensifies]
if(!is_readable($file_uri)) {
chmod($file_uri, 0777);
}
=> Chmod() returns false
GAAAAH FUCK THIS I CALL IT A DAY6 -
I'm surprised management allows us to write false positive tests just to have high coverage instead of refactoring it first. Time to abandon ship.
-
Going to make a new programming language, positive# .
Where the default value of a Boolean is true instead of false. -
My man said "What should I return if the True/False field is left blank?"
WHY WOULD A BOOLEAN BE ANYTHING OTHER THAN TRUE OR FALSE???!!!
I'm gonna have an aneurysm. I shouldn't be educating people on best practices for something that's already been written about time and time again. RESTful philosophy has been documented so much, and all it takes is a quick google search, but noooo! I have to take time out of my day as if I'm a regular old stakeholder to explain that I want the exact thing that I sent in an email two weeks ago. Amazing.20 -
I really dislike when people don't use braces { } on if/else statements.
If(almond.harvestStatus == undefined) almond.harvestMode=false
almond.dropdown = false.2 -
Helped somebody learning Arduino (he is new to programming in general)...
I saw this at the top of his file...
I admire his effort tho...14 -
I wrote this code last month...
def func(is_admin, user):
is_admin = is_admin or False
user = user # so pro much wow
return is_admin ^ user4 -
Fucking give me an error message instead of telling me {error: "You can find more details on developer.incompetent-shits.com", success: false}2
-
I've noticed when I talk to people I use terms like "true" and "false" a lot. Like "Dude that's totally false". "So true!"
#CantHelpIt💻5 -
if false? if false what? (false is just not defined, but this is the sort of shit I come across in the twig-theme-saas world, makes me angry)5
-
Someone mentioned being frustrated with people who answer "either/or" questions with "yes". I figured out why. They are not human. They are a robot and their processing of language is failing.
A simple question:
Q: The car is red or the car is green?
A: Yes
Breakdown:
The car is red. Yes, True
The car is green. No, False
The car is red OR the car is green.
True OR False
True || False = True
True = Yes
So they dissected the language like a computer treating "or" as a logical OR. This proves they are a robot pretending to be human. They failed the Turing test.7 -
Came across a method in the code base that returns a boolean.
It uses a ternary operator which returns true if the result is true and false.. you guessed it... if the result is false.
WHY NOT JUST RETURN THE FUCKING RESULT!!!
What. The. F#%#....2 -
When a condition is true and false at the same time...
var_dump(0 == "x"); // true
var_dump(!0 == " x"); // true
WTF?!
I started using the === more often...5 -
How to deal with legacy code when you see such thing:
if function() == !!!false
1. Ctrl+A
2. Del
3. rm -rfv /3 -
When someone defines a Bool3 type in swift to represent true, false and undefined. Even tho swift already has Optionals as a first class feature. 😳
-
PSA: negate your tests and make sure they fail!
I have what I thought was a weird and slightly paranoid habit. When I write tests sometimes just as a sanity check negate the assertion to make sure the test fails and isn't a false positive. Almost always fails as expected.
But not today! Turns out I had forgotten to wrap my equality check in an assertion so it would always pass. It freaks me out to imagine pushing a test that always passes not just because it doesn't do its job, but could also obscure a bug and trick me into thinking it works differently than it does. Broken tests are the worst!
But it pays to be paranoid. -
//How To Don't Get Spoilers
<?php
$newGoTEp;
$seen;
do {
turnOffInternet();
} while ($newGoTEp == true && seen == false);
?>
😂😂😂2 -
Just found this gem:
<a href="..." onclick="if (! confirm("Are you sure you want to log out?")) return false;">Log out</a> -
Spend past 2 days trying to hunt down a bug...
I forgot `0` evaluates as `false` so this statement always returned `false` if `id` was `0` >.>12 -
So they are back, wanting another quick PR approved.
The PR:
```
let isDisabled = switch quantity > 0 {
| true =>
switch value !== "" {
| true => false
| false =>
switch inputStatus {
| Valid =>
switch inputData {
| Ok(a) => a !== 0.0 ? false : true
| Error(_) => true
}
| _ => true
}
}
| false => true
}
```6 -
function isBool(input) {
return (mixed_var === true || mixed_var === false);
}
at least this crap wasn't used anywhere in the code base
#gemoftheday #wtf -
At first it seemed harsh, but then I learned that he committed code like
if (a == b)
return true;
else
return false;9 -
bool isTrue(bool val){
If(val == true){
return true;
}
else if(val == false){
return false;
}
else{
cout<<"Wrong value";
}
Function isTrue is the future ! 😂😂😂2 -
just found a build in function in a certain framework.
that function has a parameter named
"fail_silently".
func(fail_silently=False)
made me laugh.
and my laugh function was like.
laugh_func(laugh_silently=False)
😆😁3 -
I hate complex boolean logic.
(true||false) && true || false || (true && false) ... etc (continue for at least ten clauses four times as long)10 -
mongpoop
this is how our upgrade from mongoose v5 to v6 went
v5: strictQuery is false by default
v6: strictQuery is true be default
^ realized this once our update went live, we are now manually migrating several hundreds of production data.
v7: strictQuery is false by default.
what!!!2 -
allUpperCase = true
for char in rant.message:
if !isUpperCase(char):
allUpperCase = false
if allUpperCase:
rant.category = "rant"
else:
rant.category = "!rant"6 -
Found this in production code.
For those who doesn’t understand Delphi:
switch (some boolean) {
case false:
// some code
default:
// some code
}7 -
Why would anyone use -1 for true and 0 for false in a database.
Booleans people!!! FFS
Making migration of old project a real PITA4 -
I have come up with a weight loss program with developers in mind. It involves scaring the crap out of your fellow developers while they work and play on a computer. When you are scared you expend a bunch of energy reacting to the scare. Any number of scare tactics can be employed. They can be surprise (jumping out), conversational (your fired type), screamer videos or programs, etc. The type of scare is up to you. Get creative.
I am calling this program: Boo-Lean
You can choose to use this program or not.5 -
I hate complicated and out of date documentation!!!
if (me == angryClickityClackity) {
headButtKeyboard = True;
}else{
headButtKeyboard = false;
}15 -
Some managers think if one woman can deliver a baby in 9 months, then two can deliver a baby in 4 and a half...1
-
Skynet 😎 **evil laugh**
Or at least, an AI that can detect and emulate emotions, including sarcasm. Without errors or false results 😐1 -
To all guys who write shitty code:
if (false)
I just found that when compiling for Release mode in Visual Studio the JIT compiler eliminates this:
Dead code elimination - A statement like if (false) { /.../ } gets completely eliminated.
And a lot of other similar stuff2 -
my C# dream:
if (Object.Property != null)
wouldn't produce an exception if the obejct is null but just equal to false5 -
import answer from "./knowledge.js"
const topic = 'Vue'
const rant = false
const allowDumbAnswers
const q = 'Why to use only a single Vue instance?'
allowDumbAnswers ? return : answer(q);9 -
if (smart === false) {
system32.delete();
} else if (smart === true) {
system32.DEMOLISH();
}
MUAHAHAH5 -
boolean experience = false;
boolean get_a_job;
while(!experience){
get_a_job = false;
while(!get_a_job){
experience = false;
while(!experience){
get_a_job = false;
.....
«To infinity and beyond!»8 -
LicenseManager(){this.licensed=false;this.licenseCached=false}
change false to true
and Vysor Beta is PRO!! cracking was so simple ahahahaha OMG Fuck -
Snartsheet requires checkbox values of "true" or "false"
Microsoft Flow only passes booleans as "True" and "False" so the API rejects the data.3 -
var gotGud = false;
while(!gotGud)
{
try
{
makeCode();
gotGud = true;
}
catch(AbilityException ex) { }
} -
var dayInMyLife = function(data) {
var checkDevRant = setInterval(function() { openDevRant(); }, Math.random()*10000),
workday = (data.day.toLowerCase() == 'saturday' || data.day.toLowerCase() == 'sunday' || data.holiday == true) ? false : true;
if (workday) {
var schedule = {
'wakeup': '06:45',
'travelToWork': {
'time': '07:10',
'method': 'walking'
},
'lunch': '11.00',
'travelToHome': {
'time': '15:30',
'method': 'walking'
}
};
while (atWork) {
keepZeroInbox();
beAmongDinosaurs();
if (checkForProjects()) {
doProject();
};
while (noisyCoworkers) {
useNoiseCancellationHeadset();
};
};
spendPreciousFreeTimeWithFamily();
enterSleepMode();
}
}
var today = dayInMyLife({'day': 'monday', 'holiday': false});1 -
myCheckbox.isChecked = myboolean--> weirds bugs
myCheckbox.isChecked = myboolean ? true : false --> All weirds bugs fixed
\o/ Thank's Visual Studio for spending time \o/4 -
The second you write `else { return false; }` you should lose the privilege of calling yourselves a dev, from then on. Period.
Example,
if(condition) {
// ...some code
return true;
} else {
return false;
}14 -
More glorious gems from stupid hipster API dev:
HTTP GET api.redacted.com/referral/$id
{
"referral_id" : null // yes it was actually null
"referral_is_inactive": true,
"referral_deactivated": false,
} -
How do you deal with relatively complex Boolean logic requirements?
Here's a simple example, of which I missed 50% of the cases because it was non-intuitive to me:
A year is a leap year if:
- it is divisible by 4
- except it is also divisible by 100
- unless it is also divisible by 400
To my intuition, the logic tree is as follows:
if (year % 4 == 0) -> true
if (year % 100 == 0) -> false
if (year % 400 == 0) -> true
so I ended up with 3 cases and I initially missed all the others until I started coding.
The full solution is:
if(year % 4 === 0) {
if(year % 100 === 0) {
if(year % 400 === 0) {
true
} else {
false
}
false
} else {
true
}
true
} else {
false
}
}
I don't like it when I don't immediately see all logic paths.19 -
Anyone who codes like this?
if(IsThereAValue($("#txt_term").val(), true) == false)
{
}
this is too much!!! damn! complexity!!!
PS. He is my senior developer.6 -
What do people like more?
if(condition){
return true;
} else{
return false;
}
Or just
if(condition){
return true;
}
return false;7 -
define myDay() {
if (time==0600) {
while (sleeping == true) {
xiaomi.miBand.vibrate();
}
}
morningCoffee = new coffee("Strong");
sleep(120); // Gotta let that cool
while (morningCoffee.state.empty == false) {
morningCoffee.drink();
}
while (time > 0630) {
putFaceOn();
}
leaveForStation();
while (train.overground.atStation() == false) devRant.scroll;
getOnTrain();
while (train.overgrond.atStation("Kenton") == false) devRany.scroll;
getOffTrain();
getBus();
while (getToUni == false) devRant.writePost.wk4;
devRant.uploadPost.wk4;
while (time > 1300) project.workHard();
while (time > 1400) lunch.obliterate();
while (time > 2100) project.meetDeadline();
walkToFlat();
goToBed();
}3 -
Today I got a message from a "friend" of @Alice and me, for a long time. And I was already ranting by myself, because this little fucker is writing maybe two or three times a year, just to have a computer support, like now. He needed help, because a game was crashing everytime at a specific point, and I advised him to reinstall the game, which he can't, because of his slow internet. His answer stated, that he would have only slow internet right now. After this I explained him, that his internet is for around 2.5 years slow. And 2.5 years aren't "right now". I'm still waiting for any reaction.
It's the same fucking guy in Alice's wk post here: https://devrant.com/rants/1564585/...2 -
Do you prefer?
var foo = true;
if (some condition){
var foo = false;
}
Or
if (some condition){
var foo = false;
}
else{
var foo = true;
}9 -
Function works() {
Try {
HorriblyDyingCode();
Return true;
} catch (Exception e) {
Return false;
}
} -
CodingRoom room = new CodingRoom();
room.lights = true;
// or
room.lights = false;
// how do you like it?12 -
Just a reminder guys especially who do agile(scrum). TEAMS SHOULD BE HIGHLY ALIGNED BUT LOOSELY COUPLED!5
-
Whoever uses "status" as boolean in responses to indicate whether error happened (true) or not (false)??????!!4
-
import datetime as dt
while(True):
time_left = 24
work_hours = 8
trained_today = False
while(work_hours>0):
do_work()
listen_to_music()
browse_interesting_feeds()
work_hours -= 1
time_left -= 1
while(time_left>0):
if trained_today == False:
train()
trained_today = True
eat()
if dt.datetime.now().hour > 23:
time_left -= time_left -
If(person.getState().equals("Texas")){
person.setCanDrive(false);
}
Like I was just driving to my class and so many people were driving like maniacs. So frustrating >. <3 -
if (thingYouNeed.exists == false)
developer.make(thingYouNeed,
function(err,success) {
if(!err) thingYouNeed.exists = true;
})3 -
self.rant = self.dev = False
I just won a debate defending mass surveillance and I hate myself.
I actually used Snowden to defend it.2 -
"X ? true : false"
I love seeing these :D
Clearly a decent attempt at simplifying the code and at the same time missing the mark.12 -
Bad coding style:
bool condition = false;
if(condition) { /* enough whitespace so that braces appear offscreen in editor*/ }{
std::cout << "hahahahaha" << std::endl;
}6 -
really surprised Gatorade isn't sued because it actually basically has no electrolytes in it and it wouldn't rehydrate you
but it's known for it, it advertises it on the damned bottle
but it has no goddamned electrolytes (or rather the things we consider electrolytes when humans say you need more electrolytes)
because citric acid "can conduct electricity" it has electrolytes!
but you specifically need potassium, magnesium, sodium, calcium 😒
they do have some sodium and a TEEEENY totally insignificant amount of potassium. and a SHITTON of instant sugar.
I impulse bought some on a sale because my blood pressure was so bad I was gonna drop at the hospital which were unhelpful twats, and it helped I think simply because I was in such such such a bad state (and the doctors just telling me I'm pregnant instead of checking me was pretty fucked up, too), but to restore balance to my body I need something else that doesn't give me fucking diabetes because it "rehydrates" wtf
and citric acid fuck who knows what happens to that. it has no potassium, magnesium, sodium, or calcium molecules in it. which I figured maybe it got decomposed into them but nada
I was at the pharmacy and spotted a bottle specifically claiming "electrolytes" right beside the pharmists and it similarly had no actual electrolytes and instead citric acid and a bunch of weird flavouring shit. how can these people sell this garbage. humanity is disgusting. they should be sued11 -
I said and will say again (over and over) Microsoft WTF!
Set-CalendarProcessing -Identity $userUpn -AutomateProcessing AutoAccept -AllowConflicts $false -BookingType 'Standard' -BookingWindowInDays 365 -MaximumDurationInMinutes 1440 -AllowRecurringMeetings $true -EnforceSchedulingHorizon $false -ScheduleOnlyDuringWorkHours $false -ConflictPercentageAllowed 0 -MaximumConflictInstances 0 -ForwardRequestsToDelegates $true -DeleteAttachments $true -DeleteComments $true -RemovePrivateProperty $true -DeleteSubject $true -AddOrganizerToSubject $true -DeleteNonCalendarItems $true -TentativePendingApproval $true-EnableResponseDetails $true -OrganizerInfo $true -AllRequestOutOfPolicy $false -AllBookInPolicy $true -AllRequestInPolicy $true -RemoveOldMeetingMessages $true -AddNewRequestsTentatively $true -ProcessExternalMeetingMessages $false -RemoveForwardedMeetingNotifications $true
ok I "splatted" that command but yet does not look much better :-)
Oh how I miss my dear old VIm and SSH sessions can't wait to go back to where I belong!4 -
Quick javascript question:
let a = .............
Make a == a always return false.
What would a be? One solution is to let a = NaN. Anything fancier? :>4 -
def haveNiceDay(){
while code.works():
if frustration == true:
game.play()
food.eat()
keepCoding()
if error.notResolved():
while giveup!= false:
screen.stare()
} -
True or false? You know your waiter is making a lot, and your probably being overcharged, when you see her wearing an iWatch.17
-
|----------------------------------------------------|
| FALSE(1) User Commands |
| |
| NAME |
| false - do nothing, unsuccessfully |
|----------------------------------------------------|
My daily activity summed up in a linux command man page. -
"Please ad this feature to the tool" spend the next 30 mins removing the comparisons from ugly (something == true) and (somethingElse == false) statements.
-
When elements of an union are distinguished by a boolean, VSCode's Typescript plugin can only do type elimination if I branch by "== true" and not if I just branch by the boolean.
This is because Typescript treats booleans as an union of the constants "true" and "false", and compile-time elimination can only be done if I use syntax that makes sense with unions. Logical evaluation, for some reason, doesn't.
The fact that this issue can even appear is deeply concerning.1 -
You gotta love PHP:
<?php
$bool = true && false;
var_dump($bool); // false, that's expected
$bool = true and false;
var_dump($bool); // true, ouch!
Source: http://php.net/manual/de/...
http://php.net/manual/de/...3 -
AV heuristics toggle alarms on a program I created. I did not know that I integrated some virus features. Lovely.1
-
A videogame that I play has an achievement for getting all the achievements.
Has a developer, this just reads as an always false condition. -
if($scope.soup && $scope.checkout.broken){
$scope.fixCheckout()
};
$scope.fixCheckout = function() {
$scope.accrueTechnicalDebt = true;
$scope.writeDisgustingCode = true;
$scope.feelsGood = false;
$scope.maintainable = false;
}; -
TypeScript! Why you default compiler option "pretty" to false!? Why would anyone want this as false? This is such an amazing feature disabled out of the box! GNARF!
I USED TO GREP FOR ERROR TO GET ERROR HIGHLIGHTING!
:/ -
Problems with Dynamic typing (eyyy JS)
0 < undefined // false
0 == undefined // false
0 > undefined // false6 -
int totalHourSpentOnFixingBootflags = 5;
while (!isWorking) {
Clover.flags = "-x -v -s -f nv_disable=1 injectNvidia=false ncpi=0x2000 cpus=1 dart=0 -no-zp maxmem=4096" + Internet.getRandomBootFlags();
}1 -
FUCK YOU hash_hmac and your stupid fucking $raw_output = false default...UGHHHHHHHHHHHHHHHH
http://php.net/manual/en/...4 -
if (in_array($needle, $haystack)){
return true;
}else{
return false;
}
# yeah, I did it.... wtf brain!!1 -
Alright ya clever kids, what's a possible value for a and b here in this JavaScript type insanity:
> a == b
true
> !a == !b
false
> !!a
true
> !!b
false
> a == b
true14 -
Got a new notebook for work, got all Projects from tfs and it's like every single project I want to build has false references
-
Where to start, maybe from string.
Empty string conditions and string comparison.
if “”: - python
“” == false - javascript
.equals() - java1 -
Finally i knew it, you always give me a false promise, I shouldn’t trust you from the first time we meet. Damn you JS Developer 🤦♂️1
-
{
while(time_to_exams > 0){
me.shouldBeLearning(true);
time_to_exams--;
}
public void shouldBeLearning(boolean bool){
if(bool){
should_be_learning = false;
waste_time_on_DevRant = true;
} else {
waste_time_on_DevRant = true;
}
}
} -
$TheForce = 'Impostor Syndrome';
$incompetent = true;
while ($incompetent) {
echo <<<EOT
I am one with $TheForce. $TheForce is with me.
EOT;
if(get_training($result) > 9000) $incompetent = false;
} -
<?php
die(eval("printf('Is PHP bad for your mental health and should you choose something simpler? %s',2000 == '2e3bf55c7e4dd7ef7bc5b1bf05fcf786' ? 'true' : 'false');"));2 -
Doesn't the existence of NULL in a language mean, that there cannot be a boolean type? Because a bool is defined by the fact, that it can have two possible values. Having NULL changes that.
Without NULL a variable of the type bool could be True or False, two possible values. With NULL is can be True, False or NULL, three possible values.
I hate NULL.18 -
Why don't we change all conditionals from if to as long as?
as long as true:
as long as false:
Is it not beautiful?8 -
How to defeat our AI overlords in the future starter pack.
Start with statements like this:
Nothing begins with 'N' and ends with 'G'
This statement is both true and false at the same time. The risk here is if the AI can ever ask why a question is both true and false. Then we are boned.4 -
Okay I always found these js weirdnesses that you see in memes more or less logical if you think about it, but so far I could not find any logic behind this:
true&&undefined
>undefined
false&&undefined
>false
can anyone explain wtf they thought about there? undefined is falsy so why not just convert it to boolean implicitly!4 -
Foreach (DevrantUser user in devRantUsers)
{
Bool hundredPlusPlus = false;
While (user.hundredPlusPlus == false)
{
Rant myRant = new Rant(awesomeness);
user.postRant(myRant);
If(myRant.plusPlus >= 100)
hundredPlusPlus = true;
}
}3 -
At work we use a custom python library to parse XML responses from an internal API to objects. I literally spent half an hour pondering why an if statement was misbehaving. Turns out it parsed <tag>false<\tag> as obj.tag = 'false' instead of the boolean False which obviously made "if obj.tag:" misbehave 😒
-
Checking for root is maintaining a false façade of security. By the definition of root it can always be bypassed and we should be designing workflows to discourage logging in from an untrusted device unless you have 2fa.1
-
Q) 0 is false and !=0 is true.right??
A) 1,2,3,4.........................................................................................................................∞ -
var rant=false;
var question=true;
Question to devrant game developers is it possible to make complex 3D PC game using javascript?9 -
Why do you fucking retards make the tinyint column nullable AGAIN and use 'null' as false instead of setting fucking false!
-
You could use /\D+/.test('498934') == false to check if a string contains only digits. That statement will result to true. /\D+/.test('oijwei3') == false will result to false since the the test argument has letters in them.4
-
Funny argument in class today and was curious what you lot thought, cuz Im honestly not sure who was right. student argued false. professor said true.
Question:
(True or False): A preemptive kernel is safe from race conditions on kernel data structures.11 -
TypeScript has two levels of private values (at least in the beta):
private foo = false; // Cannot be accessed outside the object in TypeScript
#bar = false; // cannot be accessed outside the object in both TypeScript and JavaScript.2 -
Pps with Nuxt experience, please help: Nuxt has a config option "ssr" that can be set to false: https://nuxtjs.org/docs/...
My question is: what is the point of using Nuxt if you set ssr to false, considering that I would use a lighter solution for static sites, or just Vue for an SPA?8 -
class devRantPost
{
bool isRant = false;
string title = "Feature idea";
string content = "\n
If you try to buy something and the purchase fails, the error message should say this: Stop trying to use Lucky Patcher!";
bool isTried = totallyNot;
bool isWorked = false;
string purpose = "Research";
string content2 = "Pls don't ban me!";
}3 -
Why did the pirate learn boolean logic?
So he could "arr" and "arr" without getting confused between true and false :)2 -
If (method-exists (devrant->rantAboutBreakingUpWithGirlfriend ()){
Echo "This seriously sucks %#$@£¥";
}else {
Return false;
} -
Unique error message layouts on my college's site thus far?: 2
Time since entering site?: 30 minutes
Trying?: False
https://imgur.com/a/3sbJgep