Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
Found the internet!
21.7k
Posted by
3 months ago
Helpful4Wholesome4Silver7All-Seeing Upvote

Double programming meme

r/ProgrammerHumor - Double programming meme
1.8k comments
91% Upvoted
level 1

"The data needs to be protected!"

"From whom?"

"From ourselves!"

11.0k
level 2

Haha! Exactly.

1.8k
level 2

Ahahahah, yes indeed

89
level 2
· 3 mo. ago · edited 3 mo. ago

Yup, you don’t realize it now, but that will save your ass someday.

Edit: I realized by leaving the comment above and not explaining myself, I'm also guilty of the what's in the meme, so let me add my perspective.

A simple example: imagine someday you need to constraint the value of X to be between 1 and 10. Adding this constraint in the setter is is. Fixing all cases of "x =" is harder. And if you're in a large code base, maybe you run into some weird edge cases where the "x = " is in generated code, the author of the code generator didn't account for methods. Or the original value crosses a server boundary, and now you are touching code in a different code base and have to think about skew issues and the order in which the code rolls out. I dunno, stuff like that.

The key is: minimize mutability. (That link is from Effective Java, which has great pearls of wisdom like this)

266
level 2

laughs in C

77
level 2

Having read my own code, I agree.

22
level 2

I mean, we are definitely the most dangerous

31
level 2

Data needs to be liberated.

2
level 2

This lol

2
level 2

Except that it doesn't protect the data. Java developers will mumble something about extensibility, but they'll never go and extend those classes.

2
level 2

Fkn gold

2
level 2

Trust no one! Especially me!

2
level 2

I just took a Java class, i feel so fucking nerdy for understanding this

2
level 2

"We have met the enemy, and he is us."

--Walt Kelley (Pogo Possum)

2
level 2

"Anything could happen!" is a thing I've genuinely heard people say in defence of shit code like this.

2

23 more replies

level 1
798
level 2
· 3 mo. ago · edited 3 mo. ago
Silver

I love how all these convoluted patterns are simply addressing the inherent problems of OOP, then these patterns get lauded as advantages of OOP. Brilliant!

EDIT:

To address the comments below en masse - It's ProgrammerHumor not r/CommentCodeReview you pedants, go enjoy your weekend!

394
level 2

Terrible meme, but this is an excellent response. This should be the top comment.

11

About Community

Dedicated to humor and jokes relating to programmers and programming.
Created Jan 22, 2012

2.4m

HTML Programmers

10.6k

Slacking Off at Work

Top 1%

Ranked by Size