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.

26

u/Kwarter Nov 25 '22

Nothing drives me nuts like single implementation interfaces everywhere. It's such a little thing but it's maddening.

34

u/DoctorWaluigiTime Nov 25 '22

Interface-based development is more than "you make an interface so you can plug multiple implementations" into it, though. Helps keep good code decoupled and reduces dependency infestation across projects and classes. Makes it easier to mock/fake too when testing code.

Making an interface for a class is not some symptom of overengineering a simple solution, nor does it take excessive amounts of time to do.

1

u/anubus72 Nov 25 '22

sure, that's true in some cases. It's also very unnecessary in some cases

→ More replies (1)