DEV Community

Discussion on: How do you know your code is bad?

Collapse
 
jlehew profile image
John Lehew

If you have to explain every detail of your code, and there are lots of questions, that code probably isn't very good and could be improved. Improve areas with the most questions and explaination. Even code that implements a complex mathematical algorithm should be easy to understand as long as others know the algorithm.

Collapse
 
bob profile image
Bob

Yes, I agree. I even restrain myself from writing comments over the code to explain the code and try to refactor the code so that it explains itself.