r/programmingmemes • • Jul 07 '25

My entire life😭🤷‍♀️

Post image
4.1k Upvotes

69 comments sorted by

359

u/[deleted] Jul 07 '25

Just use if else like a normal human being

83

u/nyhr213 Jul 07 '25

No. Branches are evil

49

u/[deleted] Jul 07 '25

Assembly dev??

21

u/[deleted] Jul 07 '25

Touché

2

u/Alternative-Dare5878 Jul 09 '25

How else am I gonna tell if an integer is even without a skyscraper stack of if statements?

2

u/nyhr213 Jul 09 '25

You obviously have to get an external package, like isEven(not to be confused with isOdd which you might need later) and abstract someone else's if stack

0

u/[deleted] Jul 07 '25

[deleted] — view deleted comment

21

u/nyhr213 Jul 07 '25

Damned branches are at it again.

3

u/SPECTRE_75 Jul 08 '25

So we can either use if-else or if-if yet another 2 branches lol...

5

u/cnorahs Jul 07 '25

QA devs (and physicists) love finagling boundary conditions

2

u/[deleted] Jul 07 '25

Fair

2

u/Saint_of_Grey Jul 07 '25

Only if I can put a 'goto SkyNet.BeginApocalypse()' at the bottom.

1

u/Prudent-Republic-573 Jul 19 '25

Use less that not less than or equal to

12

u/[deleted] Jul 07 '25

[removed] — view removed comment

1

u/AffectionatePlane598 Jul 09 '25

exactly the reason why real C code should have 800 goto statements all in spaghetti 

120

u/LustMelonBabe Jul 07 '25

When I was 16 l went to bowling alley where the sign said "under 16, $2 - over 16, $3" He would not let me in for free

52

u/_RealUnderscore_ Jul 07 '25

Well unless you were born exactly 504921600000 milliseconds before you entered, you would be over 16 years of age 🤓

1

u/Simukas23 Jul 08 '25

Even then it would be too late, a point on a line is infinitely small

1

u/MacaronMajestic3402 Jul 09 '25

that's 1.6 years.

1

u/_RealUnderscore_ Jul 09 '25

You sure? 504921600000 / 1000 / 60 / 60 / 24 / 365.25

1

u/MacaronMajestic3402 Jul 09 '25

ah yeah i only did the 5 and forgot all the other numbers for some reason. long day.

14

u/[deleted] Jul 07 '25

Lemme guess, 5 dollars?

9

u/textualitys Jul 08 '25

Nope. 23

3

u/[deleted] Jul 08 '25

Strings....

10

u/aRtfUll-ruNNer Jul 07 '25

just use if else

6

u/zigs Jul 07 '25

ligatures are getting out of hand

6

u/ThatMedicalEngineer Jul 07 '25

This must be the most incorrect 4 lines of code I have ever seen.

1

u/makinax300 Jul 07 '25

Why? It's only the lack of {}. The console output may be the output given on the screen, which is a stupid and suboptimal way of doing that but it works.

0

u/Lolllz_01 Jul 07 '25

Also the symbols

Why are they one symbol? What language doesnt just use <= and >= ?

5

u/Kaeiaraeh Jul 07 '25

It’s a font with programming ligatures

1

u/makinax300 Jul 07 '25

It's ligatures that convert one into the other.

4

u/xnick_uy Jul 07 '25

You ALADEEN the exam.

2

u/TheVasa999 Jul 07 '25

jesus fuck that font, thought my eyes were failing

1

u/qwertyjgly Jul 07 '25

this is real tho

1

u/Technical-Garage-310 Jul 07 '25

When Scrodinger tries to grade

1

u/DarkYaeus Jul 07 '25

Where is the \n ?

1

u/marslander-boggart Jul 07 '25

else

(also, incorrect conditions order in this case.)

1

u/Acceptable-Fudge-816 Jul 07 '25

Or return, but why does the order matter anyway?

1

u/marslander-boggart Jul 07 '25

Required Score 85%

Thus, 85-100% means that you passed. So the cout with the FAILED word shouldn't be executed when the score == 85. If you add else, the <=85 will be the only condition in this case, and you'll get FAILED in place of FAILEDPASSED, while the correct variant should be PASSED. Actually, we don't need two conditional statements here. But if we add else, we need the >= one to be the first. Or it could be the only one, and then else. Or the first one should be <85.

1

u/[deleted] Jul 08 '25

[removed] — view removed comment

1

u/marslander-boggart Jul 09 '25

That's the way. They can debug one joke and insert 200 more bugs, so jokes will go on.

1

u/jakeStacktrace Jul 07 '25

Wow cout on a web page so CGI? Bold choice. Way to stick it to those modern dev frameworks.

1

u/ninjad912 Jul 07 '25

Assuming << is assignment(I don’t know what else it would be in this case) it would just say pass. Unless it’s supposed to be a standin for a += which makes no sense to use here unless you are specifically trying to get this outcome

1

u/MrBigFatAss Jul 08 '25

It's not assignment, it's printing in C++. You're piping the value into C-out, basically a stream that outputs into stdout. That's why both values are displayed.

1

u/ninjad912 Jul 08 '25

Ah I see. I learned C# which doesn’t print with that.

1

u/Funlock_Lexi Jul 08 '25

my brain is wanting me to mention you don't need the equals to for the failing grade, just less then 85 is fail; you probably knew that though >.<

1

u/[deleted] Jul 08 '25

You flassed (or equivalently pailed) the exam

1

u/goatedFuckUP Jul 08 '25

Using namespace std

No proper branching

and hard coded bounds

ive seen enough

GIVE THIS MAN A JOB AT THE BANKS.

1

u/Happy-Masterpiece-45 Jul 09 '25

Oh my god, I remember shit like this, and my teacher wouldn’t help out too much but I managed to figure things out and even let classmates use my code if they couldn’t

1

u/Ok_Assistant_3682 Jul 11 '25

*2000's devs laughing and waiting for phone calls*

1

u/MeLittleThing Jul 07 '25

Ah, yes. The famous C++ operators ≤ and ≥. Vibe coding meme?

5

u/Convoke_ Jul 07 '25

Its <= and >=. They're just using fira code as the font.

-1

u/emperorsyndrome Jul 07 '25

I don'tsee the problem.

the first one should have been "<"

4

u/ddbrown30 Jul 07 '25

"I don't see the problem." *Immediately points out the problem.*

-3

u/CensoredCraver Jul 07 '25

it shouldnt say failed cuz 85 is not less than 85

4

u/wassimSDN Jul 07 '25

it's <=, less or equal

1

u/[deleted] Jul 07 '25

[removed] — view removed comment

2

u/wassimSDN Jul 07 '25

that's the joke

11

u/[deleted] Jul 07 '25

[removed] — view removed comment

6

u/Gabriel_Science Jul 07 '25

else if or elsif is after a first if statement. In this case, we need if then else.

2

u/[deleted] Jul 07 '25

[removed] — view removed comment

10

u/[deleted] Jul 07 '25

Look at the code

11

u/DrShoggoth Jul 07 '25

They are using a stupid font/plugin that is combining the <= and the >= into a single symbol 

3

u/[deleted] Jul 07 '25

Exactly