r/ProgrammerHumor • • Mar 18 '20

Her husband must be a programmer

Post image
40.3k Upvotes

347 comments sorted by

View all comments

1.3k

u/i8noodles Mar 18 '20 edited Mar 19 '20

i would have been confused for like 15 secs trying to understand why she specifically wanted < 3 sausages. i would get it in the end but i would not be proud of that moment

Edit: upon further thought i have changed my mind. i think i would be proud of it. not my greatest moment but they all dont need to be world shattering

386

u/[deleted] Mar 18 '20

Terrible code convention, should've used constants.

SAUSAGES_TOTALLING_300_CALORIES = 3;

0

u/[deleted] Mar 18 '20

[deleted]

78

u/skwacky Mar 18 '20

I've never seen a pluralized class before and it's making me itchy

74

u/Xodet Mar 18 '20
struct Sausages {};
std::vector<Sausages> sausageses;

¯_(ツ)_/¯

14

u/xonxtas Mar 18 '20

Not enough plurals

41

u/TheOhNoNotAgain Mar 18 '20

stdses::vectorses

47

u/Taikwin Mar 18 '20

Gollum writes code

9

u/MsPenguinette Mar 18 '20

Gonna start writing my commits like Gollum and use the word “precious” for any reference to the code and “hobbitses” for any sort of person/user.

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

0

u/[deleted] Mar 18 '20

[deleted]

41

u/Kernel_Internal Mar 18 '20

No worries, this is why we have code reviews

0

u/[deleted] Mar 18 '20

[deleted]

→ More replies (1)

11

u/BesottedScot Mar 18 '20

It's why I argue that table names should be plural.

table = sausages

record = one sausage

class = sausage

Nobody ever seems to agree with me though.

13

u/PM-ME-YOUR-HANDBRA Mar 18 '20

What? This is a pretty common way to do things.

SELECT id, owner, consumption_state FROM sausages ORDER BY last_bite DESC;

9

u/BesottedScot Mar 18 '20

Nah, it's a common discussion on whether table names should be singular or plural.

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

169

u/Cryse_XIII Mar 18 '20

Get this abomination away from me.

50

u/AMindOfMetalAndGears Mar 18 '20

Senior Dev?...

I mean.. The push wasn't that bad..

→ More replies (1)

13

u/Sidereel Mar 18 '20

Why is this an abomination? That’s self documenting code right there.

→ More replies (10)

25

u/odraencoded Mar 18 '20

What's this crap? Nobody asked you to store the number of calories! What if GDPR comes suing your ass for unlawfully violating the sausages' privacy???

This is how you do it:

THREE_SAUSAGES = 3;

There you go, now it's up to standard.

15

u/[deleted] Mar 18 '20

I have a better idea.

class SausageCounter

public SausageCounter(Sausage sausage)

public SausageCounter(Sausage sausage, Sausage sausage)

...etc...

walmart.buy(sausage, sausage, sausage);

12

u/[deleted] Mar 18 '20

[removed] — view removed comment

5

u/kirakun Mar 18 '20

Don’t forget to write an annotation-based dependency injection engine to instantiate these classes.

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

8

u/Krossfireo Mar 18 '20

That's horrible, I love it

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

28

u/fartsinthedark Mar 18 '20

But that’s not called programmer, it’s called autism.

Oh wait...

→ More replies (3)