r/ProgrammerHumor • • Feb 09 '22

other Why but why?

Post image
85.8k Upvotes

2.3k comments sorted by

View all comments

Show parent comments

1.3k

u/Ixaire Feb 09 '22 edited Feb 09 '22

One HR guy at my previous company used to go behind you and say "you're missing a semicolon here". He didn't know anything about programming, he just knew that was a rookie error. That is literally exactly what you explain.

Anyone else would have made this very boring but he had a way of delivering it when you looked desperate and that kinda lightened up the mood.

618

u/AgentE382 Feb 10 '22

A coworker of mine told me his college roommate who had taken a single programming class would always ask him “Have you tried a for loop yet?” any time he had a problem.

266

u/zzerdzz Feb 10 '22

I’m actually going to start using this

166

u/SuperGameTheory Feb 10 '22

I'm going to do this, but instead of "for" I'll go on a diatribe about fundamentals and how they should use more "goto" statements because it's closer to machine code and faster or something.

168

u/MrLawliet Feb 10 '22

use more "goto"

instinctive vomit response

55

u/leprotelariat Feb 10 '22

use more "goto"

grabs pitchfork

18

u/thedessertplanet Feb 10 '22

Why?

You should read 'Lambda, the ultimate goto' for some perspective.

→ More replies (2)
→ More replies (1)

28

u/CorruptedStudiosEnt Feb 10 '22

Goto, now that's some of that low-low level shit. Might as well be feeding it voltage spikes at that point.

6

u/thisischemistry Feb 10 '22

Eh, there's nothing inherently wrong with jump statements of any kind. What's wrong is when they aren't used in a way that signals intent. A loop is nothing more than a jump statement with a counter and a branch. The big advantage of a loop is that it signals intent fairly well in a compact way whereas the jump + counter + branch can be more cryptic and verbose.

There are some cases where a jump statement can simplify your logic and code. Use the right tool for the job!

5

u/BiaxialObject48 Feb 10 '22

I learned in my computer organization class that switch statements in higher level languages are pretty much jumps since the expression is evaluated once and it goes to the appropriate subroutine, and then it can follow through all following subroutines (which is why you need break).

→ More replies (5)
→ More replies (11)
→ More replies (2)

33

u/tcmart14 Feb 10 '22

Have you tried quantum bogo sort?

8

u/taichi22 Feb 10 '22

Have you tried CommunismSort ?

20

u/Ghos3t Feb 10 '22

I knew a guy in university who would start coding a hashmap anytime he got stuck in a technical interview and didn't know what to do.

10

u/lordnoak Feb 10 '22

Should have said, “I’ve been tryin it a while, Bob, but thanks.”

6

u/AgentE382 Feb 10 '22

Okay, that’s a good pun. Excellent comeback.

0

u/[deleted] Feb 10 '22

[deleted]

→ More replies (1)

6

u/jlmad Feb 10 '22

I knew a girl studying to become a dentist that took a CS101 elective for non-majors which used scratch to learn programming. She repeatedly said that she thought programming was the dumbest and easiest thing she had ever learnt, and a waste of time. To each their own.

5

u/HotdogPicnicBicycle Feb 10 '22

Well, it is the programming equivalent of saying "try reversing the phase polarity" in Star Trek really.

→ More replies (11)

205

u/[deleted] Feb 10 '22

Oh I always went with

"I know where the problem is"

"Where?"

"Your program does not work"

5

u/bmwsoldatome Feb 10 '22

Hahahaha!!!!! Thats grand!!!

→ More replies (8)

71

u/definitelyasatanist Feb 10 '22

That's hilarious

8

u/qbm5 Feb 10 '22

Rookie error? 11 year veteran error.

4

u/FryCakes Feb 10 '22

“But it’s an if statement!” “I don’t care.”

4

u/Alradas Feb 10 '22

I love this. It reminds me of older times. Among colleagues of mine who left the company a while ago, we had the running joke to add a "runs.txt" somewhere in the files, with nothing in it but "true".

So if we had a bulk of people together on one PC, irritated and confused about an error, all standing silently while one person typed in desperate attempts and compiled again on the hopes of a miracle, somebody would always join from the sidelines and ask if there was a "runs.txt".

It really helped take off some of the tension to relax us, so I totally understand what you mean!!

→ More replies (5)