DEV Community

Discussion on: How would you define high quality code?

Collapse
 
zevenberge profile image
Zevenberge

One way to measure good code is that you need the knowledge of your problem to solve it, but no more. For example, if you need to fix a bug regarding to who financial transactions are sent, you obviously need to know which beneficiary to use in each use case. You should not need to worry about algorithms calculating the amount sent or interaction with external systems. This allows the developer to focus on one problem and one problem only.
Quite often this is achieved by modular abstractions, e.g. hide the external system behind an interface and supply the transferred amount through classes with calculated getter properties.