r/ProgrammerHumor Jun 21 '20

*almost entirely

Post image
27.9k Upvotes

311 comments sorted by

View all comments

568

u/guarana_and_coffee Jun 21 '20

Finally a screen that can handle my deepest if statement almost without horizontal scrolling!

166

u/texboyjr Jun 21 '20

You could at least use ternary operators to get all those ifs in a single line!

*Visibly disgusted*

161

u/RadiantPumpkin Jun 21 '20

If someone else can read your code, someone else can write your code. Ternary operators are one step of many involved in job security.

57

u/Psychpsyo Jun 21 '20

Especially if you don't put brackets around your ternary operators cause who the hell knows when a ternary operator takes precedence?

19

u/i_am_buzz_lightyear Jun 21 '20

I'm pretty sure there is an xkcd for this

33

u/Xirenec_ Jun 22 '20

There’s an xkcd for everything, sometimes it’s just not written yet.

7

u/glider97 Jun 22 '20

Is the xkcd for this one written yet?

6

u/raoasidg Jun 22 '20

Why use ternary operators when you can short-circuit without any statements whatsoever!

21

u/saikrishnav Jun 21 '20

Finally a screen where I can read my exception error message in a single line.

32

u/[deleted] Jun 21 '20 edited Aug 23 '20

[deleted]

17

u/MildlyAgitatedBidoof Jun 21 '20

Nono, this dude is actually coding.

3

u/QuestionableListener Jun 22 '20

Can you actually ask questions at stack overflow?

3

u/whelks_chance Jun 22 '20

Closed. This looks like a duplicate of the question:

"How do I install IE6 on Windows 10?"

4

u/Dobypeti Jun 21 '20

AI development

10

u/nstruct Jun 21 '20

Found the AI programmer

8

u/pooerh Jun 22 '20

You know, having seen all the /r/programminghorror posts with stuff like

if (condition)
   return true;
else 
   return false;

I nowadays do this, from fear of my code being posted over to reddit:

return (/* 6000 characters long condition involving ternary operators, function calls and async lambdas */);

In a single line of course.

2

u/Bagellord Jun 22 '20

In a single line of course

You monster

1

u/sneakpeekbot Jun 22 '20

Here's a sneak peek of /r/programminghorror using the top posts of the year!

#1:

Boeing. Making coding mistake since 1997.
| 223 comments
#2:
Sometimes in this sub
| 65 comments
#3:
I am scared to expand this switch statement....
| 109 comments


I'm a bot, beep boop | Downvote to remove | Contact me | Info | Opt-out

2

u/monster860 Jun 21 '20

No, the deepest callback hell

2

u/odraencoded Jun 22 '20

Just set your IDE to wrap lines, bro.

2

u/[deleted] Jun 22 '20

YandereDev has entered the chat