Not really a post, but a discussion. What does code quality mean to you?
For further actions, you may consider blocking this person and/or reporting abuse
Not really a post, but a discussion. What does code quality mean to you?
For further actions, you may consider blocking this person and/or reporting abuse
Avesh -
Wanda -
Sarah Thomas -
Saurabh Dhariwal -
Top comments (8)
Great question! I'm sure there's a lot more but at the top of my mind:
To me, code quality means any changes to code that improve predictability and reduce the amount of effort needed to make future changes. Generally speaking, that's done through rules of thumb (use clear variable names, limit method length, use unit tests), which on average will have a positive effect on the aforementioned predictability and effort.
From another viewpoint, code quality is one facet that helps is increasing maintainability (others are good communication, proper requirements, reflecting on architectural tradeoffs, etc).
Yeah, this is a good point. "Increasing maintainability" is definitely crucial. Making the code easier to read ultimately makes it easier to maintain as well. Good one!
Thanks 😁. I think that's an important and generally overlooked point: if maintainability is the goal, and code quality just a tool (and not the actual goal), then you (often) need to decide on what you need to spend your time on to optimally increase maintainability. When you need to spend twice as much time to get that code quality from 90 to 95% (figuratively speaking), then chances are that that time is better spent on other improvements that have a higher impact on maintainability.
These are some steps I think through during code review
Putting structures in place that don't let bugs go to production.
Agreed! What structures would you add?
Unit testing! I'm trying to figure out unit testing for my own CI/CD pipeline this very moment.