DEV Community

Discussion on: How do you cope with bad code?

Collapse
 
aschwin profile image
Aschwin Wesselius • Edited

Bad code is like a piece of text, with vulgar language, wrong grammar and having chapters, paragraphs and sentences ordered in the wrong way. Trying to get the message across from the text is really hard to do this way.

Saying the text contains the information to get the message across, so it's "working text" is almost the same thing as bad code.

Explaining the state of the code to the stakeholder in this metaphor should be possible quite well.

If they would get a compendium or a series of books full of vulgar language, wrong grammar and the chapters, paragraphs and sentences in the wrong way, would they accept it? How much time would they allow you to improve it?

Would you only get the time to add/remove sentences without improving the readability? The information is in there, but are they willing to read the book(s)?

The simple answer is: NO. Why should you be put up with this problem, while you are not the one responsible for the cause of it?

You should not be forced to feel this pain all by yourself. Try to make a plan to improve this and put across that they can not expect you to do the impossible.

I'm from the Netherlands, near Amsterdam. Nobody can ask me to get to New York, in two hours, with just a swimming short and $100. Don't even start, because it doesn't make sense to waste time in that situation. You didn't ask for the bad state of the project.

If you can not find support to improve the situation, let them eat their own poo.