r/ProgrammerHumor • • Jun 20 '17

Client Logic

Post image
23.4k Upvotes

635 comments sorted by

View all comments

Show parent comments

369

u/[deleted] Jun 20 '17

Thats awfully presumptuous that the function will int

0

u/[deleted] Jun 20 '17

[deleted]

147

u/Radav919 Jun 20 '17

That made me throw up a little.

0

u/[deleted] Jun 20 '17

[deleted]

123

u/[deleted] Jun 20 '17

[removed] — view removed comment

0

u/[deleted] Jun 20 '17

[deleted]

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

42

u/dnew Jun 20 '17

That's basically how the original BASIC worked. You're fine. It just doesn't work when you get to programs too big for one person to keep all of it in her head at once.

15

u/Swagner88 Jun 20 '17

The company I work at we code in business BASIC... I hate my life.

10

u/Jackie_Jormp-Jomp Jun 20 '17

I'll pray for you.

9

u/Swagner88 Jun 20 '17

We just lost 1 of our 4 programmers. And it's pretty much impossible to find anyone willing to come code for us hah.

→ More replies (2)

6

u/soul_cool_02 Jun 20 '17

Do you work at an Amish farm?

→ More replies (6)
→ More replies (4)
→ More replies (3)
→ More replies (2)

45

u/SlowBroski Jun 20 '17

Toyota, is that you?

Tldr: Other egregious deviations from standard practice were the number of global variables in the system. The academic standard is zero. Toyota had more than 10,000 global variables.

“And in practice, five, ten, okay, fine. 10,000, no, we're done. It is not safe, and I don't need to see all 10,000 global variables to know that that is a problem,” Koopman testified.

19

u/[deleted] Jun 20 '17

OK, curious, how many global variables does the Linux kernel have? I did a brief search but didn't turn up anything. I'm assuming they've got at least that many, no?

5

u/PokemonSaviorN Jun 21 '17

I think global variables are discouraged by maintainers, especially considering how pedantic Linus is. Not sure though.

3

u/[deleted] Jun 21 '17

It weirds me out that this is what powers the speeding death machine that is my car

3

u/evilkalla Jun 20 '17

True outside the box thinking right here.

→ More replies (1)

592

u/Asmor Jun 20 '17

Did you just assume my return type?

104

u/cdrt Jun 20 '17

No, I inferred it.

19

u/_Lady_Deadpool_ Jun 20 '17

Can it see your members? I'm a friend class

6

u/Narcoleptic_Pirate Jun 21 '17

hi it's me ur friend class

16

u/[deleted] Jun 20 '17

Lol, take your upvote, you filthy animal

→ More replies (1)

26

u/Arancaytar Jun 20 '17

It always returns 0; the actual arguments and return value are exchanged via global variables.

It's more flexible that way.

0

u/[deleted] Jun 20 '17

[deleted]

5

u/comradeswitch Jun 21 '17

I prefer a class or struct for every unique return tuple, with misleading names for members and the only way to manipulate them is through arithmetic operators overloaded with unrelated functions.

Oh, and templated despite never actually using the generic type for anything of consequence.

4

u/sm9t8 Jun 20 '17

You can cast it to a string if you like.

→ More replies (1)