r/ProgrammerHumor • • 1d ago

Meme dynamicProgramming

Post image
5.3k Upvotes

140 comments sorted by

View all comments

Show parent comment

137

u/BufferUnderpants 1d 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

41

u/NomaTyx 1d 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

17

u/Advos_467 1d 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

40

u/bpkiwi 1d 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'

7

u/Advos_467 1d 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)

3

u/BastetFurry 1d ago

All these design patterns are nice and all until you are on a cheap microcontroller with 8k of flash and, if lucky, 1k of RAM and you begin to think about using bare assembler instead of C. ;)

1

u/IlliterateJedi 1d ago

Yeah but where do you put the OrangeBagFactory and the AppleBagFactory?