DEV Community

Discussion on: How would you define high quality code?

Collapse
 
kayis profile image
K

I think the quality of code has mostly to do with who needs to work with it.

Sometimes techniques that are hard to grasp can improve attributes of the software, like performance.

Some highly skilled people can write very performant code, but only other highly skilled people can work with this code.

Should we make the code more readable and easier to grasp but sacrifice performance so it can't be used by as much users as before?

I think 90% of the time the question is yes.

Write cleaner code and make it more maintainable, the bit of performance gains you could achieve aren't worth the trouble.

But sometimes it is worth it, sometimes you need to write high performance code so it works for the huge amount of people who only have slow devices to run your software.