Is There Right Code and Wrong Code?
Today I argued with my boss about a piece of code. I said that the code is wrong because it didn’t do what it had declared to do (it’s named “GetMMM” and it actually added stuff too), my boss said that this was the right place for the code because it would prevent future bugs.
My questions are simple –
- Can a piece of code, that does not follow the “rational” coding approach, be called “wrong code”?
- Should a piece of code that prevents bugs, and breaks all coding standards while doing so, be left in the code?
What do you say?
