DEV Community

Discussion on: Why clean code is not the norm?

Collapse
 
jamesmh profile image
James Hickey

It's difficult to define what clean code is.

Yes. I think it's much easier to identify what unhealthy code is (I just wrote a book about this).

Speaking from my own experiences, I would have to agree with your points.

The main issue I've seen come up time and time again is:

Most devs (even those with years of experience) don't even understand how to write clean code. Or, if they do understand in theory, can't do it in practice.

Some of devs who've produced the worst code I've seen think that they are writing great code...

These also tend to be the developers who aren't interested in learning anything new and challenging themselves.

So... how can they "say no" to projects that ought to cause some refactoring? They can't because they don't know that refactoring needs to be done. Or they just don't know how to 🤷‍♂️.


I've seen a lot of junior devs who never get mentored, and if they do, not well. There does seem to be a major shortage of devs who understand how to clean up their code and how to identify unhealthy code.

I think your point about being lazy is true. If we are technology professionals, ought we to take our craft seriously? Ought we to learn how to identify unhealthy code and how to fix it?

I think so!