Blog 2 min read

Open Source Projects: Tutorials for Code Quality

Share this article
Open Source Projects: Tutorials for Code Quality

Quality is not something that can be easily added later; it’s better to take care of it from the beginning. Many companies dedicate a big budget to purchasing tools costing many thousands of dollars and call upon independent consultants to audit their code base and produce reports. This is still a good initiative to improve code quality.

However, after several years of analyzing many open source projects developed in C/C++, Objective-C and Java, we can confirm that most of them are well designed and implemented, despite the fact that open source contributors don’t have the resources companies have. Most of them work only at night or on holidays, and they produce very good code.

I’m not talking here only about open source projects sponsored by companies like Google or Facebook, where most contributors are employees of these companies, but also about projects developed by independent developers who use their own resources to provide us with many useful libraries and applications.

Many times, after analyzing an open source project, we discover interesting best practices and decide to refactor some pieces of our code to improve it, as done in these projects. These best practices can’t be detected by any tool or identified by any quality metric; they have to be identified by developers who care about the quality of their code.

What’s the secret of the open source contributors?

To understand why open source code is generally well implemented, we have to know the contributors’ motivations. Their goal is not to get rich; maybe some of them are looking for glory. But most of them love what they do and code with passion — and that makes a big difference.

Developing a solution because you have to, because you’re paid for it, is not the same thing as developing it because you enjoy producing a good application.

For companies without a dedicated quality budget, a good solution could be to encourage developers to spend a few hours a week exploring open source projects and discovering best practices to apply later in their code.

And even if you purchase the most powerful quality tool, you still need to employ developers who love what they do. The big problem is: how do you identify them?

Here are some interesting open source projects to explore:

C/C++

Java

If you’re trying to improve the quality of your code base by:

  • Reading books and tutorials.
  • Reading resources from websites.
  • Taking training courses.
  • Using tools.

Try exploring some open source projects to discover how they are designed and implemented — the result might surprise you more than you expect.

Share this article