DEV Community

Discussion on: How would you define high quality code?

Collapse
 
alainvanhout profile image
Alain Van Hout • Edited

I'm going to use the #likeimfive approach here.

If code is like cake, then good code is like cake that you can enjoy eating and that will not leave you with stomach aches later on.

Note that 'doing what it is supposed to' is not an attribute of good code any more than 'being edible' is an attribute of good cake. That's just a fundamental real-world requirement for when someone asks you to write code / bake a cake. It doesn't have anything to do with either of those being good.

Collapse
 
devcamilla profile image
Camilla Santiago

Just to highlight.. so you mean cake is considered good based on the experience of eating it.

Collapse
 
alainvanhout profile image
Alain Van Hout

In the case of cake, yes. How that translates to code is that code is also experienced as being good by how you interact with it later, i.e. modifying it in any way (rather than just looking at it).