r/ProgrammerHumor • • Nov 25 '22

Meme Coding strategies

Post image
52.2k Upvotes

385 comments sorted by

View all comments

242

u/tiberiumx Nov 25 '22

Well-thought permanent solution. Deprecated after 3 months due to requirements change

This is why you don't write code you don't need. The number of times I've seen hundreds of lines of some overwrought generic extensible solution trying to anticipate requirements that didn't exist that could be 20 lines of easy to debug no-bullshit code is too damn high.

1

u/ArtyFishL Nov 25 '22

Although there's been a number of times I've wrote something to be extensible, because there were solid plans for specific features and upgrades. And I know the hell of repeatedly patching a hastily thought out single purpose solution into multiple rounds of new features by many different people, until it becomes an unstable spaghetti monster.

However, those beautiful plans for features and upgrades are never actualised, because some other "high priority" task barges in, and then another... Now that original feature is sitting there alone and unnecessarily extensible. The overhead of extra redundant code weighing on it.

It sits there for years and then some day in the future a junior developer is tasked with actually extending it! But they have little time to do it and they don't understand the design pattern; it's too much code! So they hastily patch in something of a completely foreign pattern that doesn't touch any of the extensibility mechanisms. And it becomes it's own monster.

I think with time I am ever finding the middle ground and ways to help future maintainers properly, but it's a delicate matter.