Results of the Code Quality Tools survey

Subscribe to receive new articles. No spam. Quality content.

Follow @makagon

Hello everyone. In this blog we talk a lot about the quality of code: Patterns, Object-Oriented Design, SOLID principles, etc. Week ago I started to think about the tools we have that help us to measure and improve quality of code. That's how I came up with the idea of a survey: "Code Quality Tools". In this article I would like to share results of that survey with you.

First of all I would like to say thanks to every developer that took this survey or shared the link. I managed to collect 83 responses in just a couple days, which is a great result.

Important note: it was my initiative, it wasn't a paid research. I don't cooperate with any companies mentioned in this survey.

Ok, let's go to the main part. First of all I wanted to figure out what are the most popular tools that developers use.

Which tools do you use to keep your code in a good shape?

We have one strong leader here - rubocop gem. I'm so proud to be a contributor of that gem.

Besides those gems, couple people mentioned the following gems as well: brakeman , rufo , unused , sandi_meter and bundler-audit .

Then I decided that it would be good to figure out if developers think that these tools actually help to write better code.

Do code quality tools make your code better?

The answer is YES in 69 cases. Just one developer thought that these tools don't work and 12 developers weren't sure about it. In general I feel like it's really that Ruby developers appreciate benefits of such tools.

Next question I wanted to figure out is how developers prefer to run rubocop , reek , etc. Results are quite interesting.

How do you run those tools?

rake before push - 35

Third-party CI - 34

Self-hosted CI - 21

Editor Integration - 11

Overcommit - 4

It was a question with multiple answers, so those do not exclude each other. One thing that is obvious from these results: developers integrate tools into CI (55 out of 83) and Editors. For editors people mentioned RubyMine, vim and Atom integrations.

I grouped all answers regarding third-party CI tools and figured out that we have 2 leaders there:

According to these results circleci and Travis CI are the most popular tools. Also couple developers mentioned semaphore and Hound-CI.

There are tools on the market that offer automated code review, so next question was related to third-party tools.

If you use third-party tools for tracking code quality, which one do you use?

36 developers use third-party tools and CodeClimate is leading on this field. Besides those three leaders, the following tools were mentioned as well: SideCI and AppCanary.

I know that at this point you can think that sample wasn't big enough and results might not show the full picture, I understand that. Besides those questions, I had couple questions with input field, where developers could write their own opinions. That's how I collected really interesting opinions.

What don't you like about code quality tools?

I grouped answers to this question, and we have 2 main friction points for developers here:

Configuration - 7 developers False positives - 6 developers

Seven developers described their frustration during configuration process of gems like rubocop. They said that it's too tedious to configure these tools. Six developers complained about a big number false positives.

Developers said:

Sometimes there are good reasons to violate the guidelines and to do so one has to intentionally disable rubocop styles. And that's annoying. sometimes the default configurations / rules are annoying and the re-configuration can be tedious. each tool uses different files and different conventions which can make these tools seem like a burden to use Ton of false positives Bugs in tools. Like false positive in rubocop.

Also, couple developers mentioned problems they have with paid solutions mentioned above.

The last question I had is my favorite.

Which aspects of code would you like to measure the most?

Isn't that interesting? rubocop is a leading gem that most developers use, but what they actually want to measure and improve is: complexity, code smells, performance. I think it shows that we have missing tools in our toolset. Just couple examples of answers:

Class complexity/dependence. I wish tools could show when someone is writing a sh*tty interface to a class. Refactorings performance, design pattern suggestion syntax, extendability, reusability & whether it follows KISS & DRY principles I would appreciate a bit of stuff for higher level architecture (something like rails best practices but a bit better)

It's just a couple of those.

Conclusion

This survey confirmed that Ruby developers are great! It was a pleasure to see how people shared this survey and were interested in results. It's nice to be able to collect 83 responses in couple days and share results with you. Thanks to all subscribers who responded.

I hope that it was interesting to see tools that other developers use. Also it was good to figure our role of CI in progress, as well as third-party tools. As I said my favorite part was the one where developers wrote their answers. I was happy to see that it's not just me, but other developers are also interested in tools that would estimate complexity, flexibility of code, possible usage of patterns, etc.

Don't forget to subscribe to receive new articles.

Thanks for reading!

Subscribe to receive new articles. No spam. Quality content.

Follow @makagon