DEV Community

Discussion on: How would you define high quality code?

Collapse
 
thomasjunkos profile image
Thomas Junkツ

High quality code is code written by someone who cares.

What does it mean to care?

  • Knowing the language beyond the syntax, i.e. writing concise ideomatic code

  • Naming things in a way which helps understanding the purpose of things

  • Grouping things together, which belong together

Or as Ward Cunningham once put it:

You know you are working with clean code when each routine you read
turns out to be pretty much what you expected. You can call it beautiful
code when the code also makes it look like the language was made for the problem.

I heared once, that instead of naming it »software engineering« it should be renamed to »software gardening«. This would connotate the constant effort which has to be put into a codebase in order to keep it beautiful and keep weeds at a minimum.