DEV Community

Discussion on: What is bad code?

Collapse
 
stereobooster profile image
stereobooster

First of all, I don't think that having bad code is a bad thing. It's called technical debt and is totally acceptable. Bad code can become good code and vice versa.

👍

As for the definition of bad code, at the end of the day, a piece of software tries to solve a problem. As long as that problem is being solved, we are talking about good code.

I'm not sure if everybody would agree to call it good code, but I feel wrong calling it bad. I feel that this dichotomy of good/bad is wrong by itself. Good/bad is broad category, with ambiguous definition. For example, it is fair to say this code is hard to read or this code hard to modify or this code is undocumented etc. but if it works and helps people I wouldn't call it bad...