OctoPerf has been built from the ground with one unique idea: writing code that’s pleasant to work with. Code quality is our number one priority. When you create your own startup, you quickly understand that the number one enemy are not your competitors: it is yourself!
When creating a startup you realize that your product:
- must be released as quickly as possible on the market,
- needs as many features as possible to catch back the competitors,
- must be bug free to give your users the best possible experience.
The ‘Test is worthless’ myth
What makes most developers think that writing crappy code goes faster than writing well designed and tested code?
Probably because they think it’s better to spend time on coding rather than testing. Testing doesn’t add any feature and takes time. Testing is sometimes tedious. Why would i spend time on something that hasn’t any added value for my customers? Because, in fact, there is an added value to test. What’s the point of delivering a feature that doesn’t work? If the requirement is that the feature doesn’t need to work, features could be delivered instantly.
Testing is the starting point of code quality. When you test your code, you start to think differently. You write simpler code because it simpler to test. You split big functions into smaller ones. Testing code affects the way you write your code.
Bad code cannot be tested. The worse the code is, the harder is it to test it. Developers then argue that they didn’t test it because it’s not possible.
We try to stick to this as much as possible:
Refactor your code until it is fully testable.
Learning the hard way …
As being developers ourselves, we have been through a number of companies where code quality was like
Eh, don’t you have anything else to do?
We tried hard to explain how important it is to write good software, and failed miserably many times. Probably because we are bad at explaining things to other people.
Code quality doesn’t slow a company, it makes it faster in fact. Well designed code is easy to understand, and to refactor. It’s easily testable, so regressions are avoided during development iterations. Developers are pleased to work with well-designed code. Well tested code allows you to spend less resources on other forms of Quality Assurance before you deliver an application.
In contrast, bad code, full of code smells, just gets worse with time.
- How many hours did you spend debugging your code base?
- How many times did you encounter classes / functions / code that you could not easily modify, for fear of breaking things?
Writing untested code is like driving blindfolded!
Gave us our motivation
Many people were telling us that when you create a startup, you must write bad code to get quickly on the market. We don’t want to work in such an environment anymore. Nor we want to repeat this, and feel like Sisyphus.
This gave us a strong goal: create our own and prove this is simply not true. We’re just average developers. We’re not bad, nor perfect. But, we don’t want to repeat what we have seen in so many software companies so far. And we’re proud to announce that we did it.
SonarQube is an open source platform for continuous inspection of code quality. Its supports many languages and offers reports on:
- coding standards,
- code coverage,
- code complexity and potential bugs,
- and more.
It’s a very handy tool to quickly get a view of your application’s code health. We use it to check both our frontend, the GUI of OctoPerf, and our backend, the Java platform used to run the stress tests.
The screenshot below shows our frontend SonarQube analysis: