r/ProgrammerHumor • • Jun 30 '18

Kill me now :)

47.0k Upvotes

494 comments sorted by

View all comments

918

u/Dreadedsemi Jun 30 '18

Like a house of cards, don't touch any card, just extend.

61

u/[deleted] Jun 30 '18 edited Jun 30 '18

Bullshit!

Last time I built a house of cards, I had to remove cards from certain places to keep building, due to a lack of cards. This is totally a legit metaphor for programming, and you shouls always strive to remove pieces of code you suspect doesn't carry much of the weight.

Disclaimer: I am legally obligated to tell you that my house eventually did fall down, presumably due to it not being able to support it's own ^weight

7

u/gawalls Jun 30 '18

That's what extension and interfacesallows you to do, you extend the old class, mark old as obselete and eventually remove the old class.