DEV Community

Discussion on: Write less code

Collapse
 
eljayadobe profile image
Eljay-Adobe • Edited

I am a fan of Robert Martin's Clean Code.

Clean code also means "not having (too) clever code" by reducing multiple simple lines with one long complicated line. Rather the opposite: break up a long complicated line into multiple short, simple, understandable lines.

It means coding for obviousness, maintainability, simplicity.

And since it is Robert Martin, he also champions code that has abundant unit tests.

Depending on your programming language, some languages are very verbose. Lots of ceremony and annotation.

Other languages are very succinct. Perhaps to the point of line-noise incomprehensibility... I'm looking at you, Perl!

If you cannot change your language for your project, you have what you have. And have to make do to make it appropriate Clean Code as best you can. Assuming the developer has embraced Clean Code.

Collapse
 
sadick profile image
Sadick

Robert Martin is very correct. By me saying write less code i don't mean "make it a cleaver one liner". I have given an example above of what i mean.