Post

CodeRed
CodeRed@CodeRed_dev·
There are 2 types of programmers.
CodeRed tweet media
English
37
7
198
5.5K
cole 🌺
cole 🌺@ColesTempHandle·
@CodeRed_dev i prefer doing 0 and 1 instead of false and true tbh lol
English
6
0
4
426
Timito
Timito@TimitoDA·
@CodeRed_dev Half my codebase uses if(!function) where the function is a bool function as function calls. Handy for exception proofing, but it doesn't register as a function call in Visual Studio so it makes tracking stuff way harder. Confused the hell out of me when I started working in it.
English
0
0
2
218
Carl Schulze
Carl Schulze@CarlvSchulze·
@CodeRed_dev I am the third one. I use both interchangeable throughout my code, no one can know what i am doing if i dont know what i am doing😂😅
English
0
0
0
12
TeaTonicNight
TeaTonicNight@night_tonic·
@CodeRed_dev I always do the ! but nowadays I try to use the == false as I've learned it's easier to read code if all the code is consistent; variable == status for everything is much easier to scan.
English
0
0
1
231
Eon Orange Apocalypse
Eon Orange Apocalypse@EonOrange·
@CodeRed_dev EVERYTHING must be a ternary, EVERYTHING must be a lambda, NO ONE SHALL be able to read my code but ME.
English
0
0
1
57
oopscene
oopscene@oopscene·
@CodeRed_dev "bool" is a keyword in the languages I use, so both examples won't compile. But on the topic itself, I don't have a strong opinion and both are equally good to me.
English
0
0
1
79
Jiriki
Jiriki@Jiriki_2·
@CodeRed_dev Imagine a world of people being boolean, true or false, no greys or "yes, but", don't know if it's good or pure evil.
English
0
0
1
142
Amir Barak
Amir Barak@binary_eyes·
@CodeRed_dev 3rd option: if (false == bool) { } also known as "yoda conditions"
English
1
0
0
107
direct_quote
direct_quote@quote_direct·
@CodeRed_dev Then there's fun in java where strings need if (string.equals("the thing") { }
English
0
0
1
107
Paylaş