What makes code good? How do you tell bad code from good one? Issues like this come to mind when you think about the concept of code quality. To get a better idea of the topic, I'm interviewing João Caxaria
Can you tell a bit about yourself?#
Codacy. Before this, I did several years of software development as a consultant, having worked in several different companies, from small game studios to industry giants such as Citibank.I'm a software engineer currently disguised of a CTO for
How would you describe the term code quality to someone who has never heard of it?#
Code quality is a hard thing to explain; Having a good code quality will mean your code is less error prone but having no errors in your code does not mean good code quality. Good code quality reflects itself on a application whose architecture is well built, easily explainable and well understood by your peers.
Code quality is code that is easily extendable and provides a framework to work upon for the next developers that find it vs. removing the current code and starting over. Code quality is safety in deployments, and predictable development times on new features.
How do you measure code quality?#
To measure code quality, you need to look at several components in your code: code issues, code consistency, proper namespace or package responsibilities, class dependencies should be kept to a minimum, code coverage, etc etc. Some stuff can be measured automatically, and some still requires human reviewers.
Why is code quality important?#
Code quality is not always important! For example, if you're doing a prototype, code quality takes a secondary role when compared to speed of delivery.
If you're working on a project on which you will build a mission critical part of your company, then code quality is the most important thing you can think of; it will allow you to continuously grow your project and have your company grow with it.
What does the future look like for measuring code quality? Can you see any particular trends?#
I believe several current software development processes will be changed or improved by Machine Learning / AI techniques. Although foreseeing the future is hard, if I had to bet on something, it would be on this.
What advice would you give to programmers getting into web development?#
Have fun and and don't be afraid to create and experiment new things.
Who should I interview next?#
Florian Motlik for sure. Smartest and kindest fellow I had the pleasure to talk to and learn from. Would read anything he says without second thoughts.
Any last remarks?#
Thank you for your time and making me think about this and how to put it in written form :)
Thanks for the interview João! I think code quality is one of those things that's easy to overlook. You definitely feel it when you are working. I found it particularly interesting that you noted it doesn't matter that much always.
Especially during prototyping phase it's more important to explore the idea space than end up with a technically perfect implementation. Techniques, such as using tracer bullets, come in handy here as you are still guessing and trying to figure out a good direction.