If (guess == correct)

if (guess == correct)
{
guess = incorrect;
}

Attached: r1zr3jm86ba11.jpg (550x543, 83K)

if (color === COLOR.red) {
return true;
} else {
return false;
}

stop it

if(shouldProcessOnce) {
shouldProcessOnce = false
process()
}

is = true;
while(true) {
is = false;
}

if (guess) {
guess = !guess;
}

if (true) {
true = false
while (true) {
false = true
true = true
}
}

whats wrong with this

while (true) {
// TODO
}

I see this shit constantly at work

Good thread

Attached: 1531763500508.jpg (537x765, 81K)

public static void FizzBuzz(int num)
{
int[] factorOfThree = { 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33,
36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84,
87, 90, 93, 96, 99};

int[] factorOfFive = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60,
65, 70, 75, 80, 85, 90, 95, 100};

for (int i = 0; i

Attached: fizzbuzz.png (1012x169, 47K)

Brainlet here, why is it === instead of ==?

it's an ancient Sanskrit technique

Strict comparison vs loose comparison
As in, this comparison was looser than your mom at the club last night

if err != nil {
return err, nil
}

Attached: Paul_Klee_Was_fehlt_ihm_1930.jpg (940x1581, 105K)

Holy fuck I'm dying

whats a better way to do it?

t. coworker

return color === COLOR.red

brainlet

a = 0
while True:
a += 1
if a % 5 == 0 and a % 3 == 0:
print('FizzBuzz')
continue
if a % 3 == 0:
print("Fizz")
continue
if a % 5 == 0:
print("Buzz")
continue
print(a)

while True:
True = False

while 0!>0:
True == False

// hey guys this is my fizzbuzz program.
// please hire me :) i tryed my best for this one! :D
// counts from 1 to 100 and then puts fizz or buzz on 3 and 5 xD
// but on 15 it needs to put fizz AND buzz lol :D
for (let FizzBuzzIndex = 1; FizzBuzzIndex

Some languages have == as "truthy", and === as absolutely the same.

0 == false // true
0 === false // false

Javascript, btw.

Kys THANKS!!!! =)

This post gave me terminal lymphoma =)
Seriously though, I hope people don't actually write code like that

Doesn't this actually work despite the cancerous comments and the fact the if-else logic is backwards?

Mistake defining the struct /

> what is type coercion, lets throw bullshit to the most promising and growing language of current year

Is that golang?

if (input == true) {
result = true;
} else {
result = false;
}

I don't get it. What is this referring to?

if (guess = correct)
{
print(guess)
}
if (guess = incorrect)
{
print(guess)
}

The best way for you to learn the right way of doing things is to do things the wrong way and be corrected.
Most colleges don't care much about code composition as long as the code works correctly because they have to get through a lot of information in a short time and grading each student on composition takes a long time.

Plus, different groups have different preferences for how code is presented.
I'm sure theres some brainlet company out there that wants their employees to use full if then statements for everything just for the sake of consistancy.

Attached: pinkwojsad.jpg (360x342, 38K)

it's for security

What is wrong with this?

function asd(String param){
if(param == null){
doSomeRandomShit()
}
if(param == ""){
soSomethingElse()
}

doTheactuaThingMethodPromised()

}


Some legacy diarhea at work is full of this kind of shit where nulls or empty variables greatly change what happens. Also hash maps instead of classes and objects.

static void fizzbuzz(int num)
{
for (unsigned int i = 0; i < num; ++i) {
bool fizz = false;
bool buzz = false;
for (unsigned int j = 0; j < sqrt(i); ++j) {
for (unsigned int k = 0; k < sqrt(i); ++k) {
if ((j * k * 3) == i) {
printf("fizz");
fizz = true;
break;
}
}
if (fizz)
break;
}
for (unsigned int j = 0; j < sqrt(i); ++j) {
for (unsigned int k = 0; k < sqrt(i); ++k) {
if ((j * k * 5) == i) {
printf("buzz");
buzz = true;
break;
}
}
if (buzz)
break;
}
}
}

>The best way for you to learn the right way of doing things is to do things the wrong way and be corrected.
educationfags will do their absolute best to deny this

This code looks perfectly normal.
Hashmaps instead of classes on the other hand is cancer... I work on such project.

I mean at times there is intentionally passed null, rather than just directly calling the shit they wanted to do, and sometimes empty string is also directly passed. Its not that those if clauses handle some weird situation, every place the method is called is basically string constant as parameter. its just making one method do things that should be three methods instead.

True that. But is not that bad. At least it is easy to fix. Or maybe I am just getting too used to shit code in my current job.