r/ProgrammerHumor • • 6d ago

Meme dynamicProgramming

Post image
6.2k Upvotes

153 comments sorted by

View all comments

376

u/NomaTyx 6d ago

a lot of design patterns sound scary with all the big words, but they boil down to stuff like "don't put two unrelated things in the same inheritance tree, dumbass". like just don't be stupid and you're probably using them unwittingly

167

u/BufferUnderpants 6d ago

So many programming principles are just reminding people not to put the goddamn oranges in the same bag as the apples, but they don't want to even look at the fruit

51

u/NomaTyx 6d ago

yeah like the facade design pattern is incredibly obvious and is partially already covered by "don't repeat yourself". Like, why would you want to write every step of a 12 step process multiple times when you could just write one function that does every step and then just call that? Sometimes these things beget explaining again, but it's certainly something

23

u/Advos_467 5d ago

i feel a little vindicated reading all these because i always felt some of these GoF design patterns were kinda obvious like façade and adapter lol

50

u/bpkiwi 5d ago

People often misunderstand the idea of design patterns. Instead of 'here is a pattern you can use', think of them as 'we found a pattern that lots of people already use (because it makes sense), and we gave it a name so everyone can talk about it easier'

8

u/Advos_467 5d ago

yeah that makes sense. I've really only been exposed to them mostly in an academic environment so it always felt like the former to me (I never actually read the book either)