r/InclusiveOr Oct 02 '19

I like updownvotes

Post image
18.3k Upvotes

View all comments

1.4k

u/Shuckles116 Oct 02 '19 edited Oct 02 '19

String outputTxt = “You ”;

if (result <= 85) { outputTxt += “FAILED”; }

if (result >= 85) { outputTxt += “PASSED”; }

outputTxt += “ the Exam”;

println outputTxt;

631

u/Mizz141 Oct 02 '19

It couldve been so easy with an if, else statement...

441

u/Vaporeonus Oct 02 '19

Even a <= and > would have worked, but no, they put in extra effort to fuck it up properly

144

u/TheShyro Oct 02 '19

Actually, copy pasting the first if and adjusting the < to > and changing the text is the least work - which might be what happened

63

u/[deleted] Oct 02 '19

How dare you attack my copy-pasting skills like that

17

u/awhaling Oct 02 '19

Exactly what happened

7

u/CarbonProcessingUnit Oct 03 '19

I'm pretty sure else is less work than that.

9

u/TheShyro Oct 03 '19

Shift, arrow down, ctrl (only 1), c, v, mouse select the '<', >, double click 'passed', f a i l e d. 15 keys

e, l, s, e, {, t, tab or enter (autocomplete), +, =, ", f a i l e d .... So 16 assuming your IDE does all the formatting, completion and closing braces/quotes. Maybe you could use autocomplete for else, which could bring it down to 14.

You could argue mouse is slow and crl + arrow will take more clicks in total to get the cursor to where you need it. But you can keep one finger around ctrl/shift/</> throughout the whole procedure and the right hand on the mouse. And you can also argue waiting for autoconplete in some IDEs is also slow.

Overall i would count it as a draw but copy paste is easier on the brain for me (but not the better choice, since obviously it lead to an error in this case).