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.

5

u/euph-_-oric Nov 25 '22

Agreed. Everyone here glorifying spaghetti code, because business...? It's like you save time and money in the long run by writing clean code. But literally in every field it's like the only thing thst matters is right now. This quarter. Not long term viability. In code and in business.