{"id":1075,"date":"2018-04-17T09:43:55","date_gmt":"2018-04-17T09:43:55","guid":{"rendered":"http:\/\/cppdepend.com\/blog\/?p=1075"},"modified":"2023-05-31T15:22:03","modified_gmt":"2023-05-31T15:22:03","slug":"open-source-projects-tutorials-for-code-quality","status":"publish","type":"post","link":"https:\/\/cppdepend.com\/blog\/open-source-projects-tutorials-for-code-quality\/","title":{"rendered":"Open Source Projects: Tutorials for Code Quality"},"content":{"rendered":"<p>Quality is not something that can be easily added later. It\u2019s preferable to take care of\u00a0it from the beginning.\u00a0Many companies dedicated a big budget to purchase tools with many thousands of dollars and called upon\u00a0independent consultants\u00a0to audit their code base and produce some reports. This is\u00a0still a good initiative to improve the code quality.<!--more--><\/p>\n<p>However, after few years of the analysis of many open source projects developed with C\/C++, Objective C and java\u00a0we can\u00a0confirm that most of them are well designed and implemented despite the fact that the open source contributors do not have resources like companies.\u00a0Most of them work only at night or on\u00a0holidays and they produce a very good\u00a0code.<span id=\"more-1222\"><\/span><\/p>\n<p>I am not\u00a0talking here only about the open source projects sponsored by companies like Google or Facebook, where the most of the contributors are employees in these companies. But also about projects developed by independent developers who use their own resources to provide\u00a0us many useful libraries and applications.<\/p>\n<p>Many times after the analysis of an open source project, we discover many\u00a0interesting best practices, and we decide to refactor some pieces of our code to improve it as implemented in these projects. These best practices could not be detected by any tool or identified by any quality metrics, they need to be identified by developers who care about the quality of their code.<\/p>\n<p><strong>What\u2019s the secret of the open source contributors?<\/strong><\/p>\n<p>To understand why the open source code is generally well implemented, we have to know the contributor&#8217;s motivations. Their goal is not to be rich, maybe some of them could look for the glory. But most of them they love what they do and code with passion, what makes a big difference.<\/p>\n<p>Developing a solution because you have\u00a0to, you are paid for; it\u2019s not the same thing if you develop it because\u00a0you enjoy producing a good application.<\/p>\n<p>For companies not having a dedicated\u00a0budget for quality, a good solution could be encouraging developers to spend few hours\/week to explore some open source projects and discover some best practices to apply them later in their code.<\/p>\n<p>And even if you purchase the most powerful quality tool, you need to employ developers who love what they do. But the big problem is how to identify them?<\/p>\n<p>Here are some interesting open source projects \u00a0to explore:<\/p>\n<p><strong>C\/C++<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/TTimo\/doom3.gpl\">Doom3<\/a>.<\/li>\n<li><a href=\"http:\/\/loki-lib.sourceforge.net\/\">Loki<\/a>.<\/li>\n<li><a href=\"https:\/\/github.com\/facebook\/folly\">Folly<\/a>.<\/li>\n<li><a href=\"https:\/\/github.com\/torvalds\/linux\">Linux<\/a>.<\/li>\n<li><a href=\"https:\/\/github.com\/git\/git\">Git<\/a><\/li>\n<li><a href=\"http:\/\/pocoproject.org\/\">POCO<\/a><\/li>\n<li><a href=\"http:\/\/clang.llvm.org\/\">LLVM\/Clang<\/a><\/li>\n<li><a href=\"http:\/\/qt-project.org\/\">Qt<\/a><\/li>\n<li><a href=\"http:\/\/www.boost.org\/\">Boost<\/a><\/li>\n<li><a href=\"http:\/\/www.chromium.org\/\">Chromium<\/a><\/li>\n<li><a href=\"http:\/\/www.codeblocks.org\/\">Code::Blocks<\/a><\/li>\n<\/ul>\n<p><strong>Java<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/commons.apache.org\/\">Apache Commons<\/a>.<\/li>\n<li><a href=\"http:\/\/hadoop.apache.org\/\">Hadoop<\/a>.<\/li>\n<li><a href=\"http:\/\/jruby.org\/\">JRuby<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/libgdx\/libgdx\">libgdx<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/apache\/tapestry-5\">Tapestry<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/spring-projects\">Spring<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/apache\/spark\">Spark<\/a><\/li>\n<\/ul>\n<p>If you try to improve the quality of your code base by:<\/p>\n<ul>\n<li>Reading books and tutorials.<\/li>\n<li>Reading resources from\u00a0the\u00a0web sites.<\/li>\n<li>Doing a training.<\/li>\n<li>Using tools.<\/li>\n<\/ul>\n<p>Try to explore some open source projects to discover how they are designed and implemented, maybe the result will be more surprising than you expect.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quality is not something that can be easily added later. It\u2019s preferable to take care of\u00a0it from the beginning.\u00a0Many companies dedicated a big budget to purchase tools with many thousands of dollars and called upon\u00a0independent consultants\u00a0to audit their code base and produce some reports. This is\u00a0still a good initiative to improve the code quality.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1075","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/posts\/1075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/comments?post=1075"}],"version-history":[{"count":5,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/posts\/1075\/revisions"}],"predecessor-version":[{"id":1466,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/posts\/1075\/revisions\/1466"}],"wp:attachment":[{"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/media?parent=1075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/categories?post=1075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cppdepend.com\/blog\/wp-json\/wp\/v2\/tags?post=1075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}