
{"id":2357,"date":"2016-05-23T07:03:12","date_gmt":"2016-05-23T07:03:12","guid":{"rendered":"http:\/\/www.codergears.com\/Blog\/?p=2357"},"modified":"2018-04-04T13:31:00","modified_gmt":"2018-04-04T13:31:00","slug":"1-year-after-launching-the-c-best-practices-repository-the-basic-rules-are-the-most-popular","status":"publish","type":"post","link":"https:\/\/codergears.com\/Blog\/?p=2357","title":{"rendered":"1 year after launching the C++ best practices repository, the basic rules are the most popular."},"content":{"rendered":"<p>Last year we launched the <a href=\"http:\/\/codergears.com\/QACenter\/index.php?qa=questions&amp;sort=votes\">C++ Best Practices repository<\/a>. \u00a0It&#8217;s an aggregator of some\u00a0known C++ rules guides:<\/p>\n<ul>\n<li>Google Style Guide.<\/li>\n<li>jsf air vehicle c++ coding standards.<\/li>\n<li>Effective Modern C++ from Scott Meyers.<\/li>\n<li>POCO coding standards.<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>And also many rules were\u00a0added by the C++ community. The goal of this repository is not to be just an aggregator of other guides. But to discover which ones are the most popular by providing the possibility to vote them. It helped us also to identify which rules we must add to our default <a href=\"\"http:\/\/www.cppdepend.com\">CppDepend<\/a> rules checking.<\/p>\n<p>After one year here are the three most popular<\/p>\n<p><a href=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/mostvoted.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2358\" src=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/mostvoted.png\" alt=\"mostvoted\" width=\"766\" height=\"353\" \/><\/a><\/p>\n<p>The most popular one is basic, \u00a0and the result after\u00a0applying it is very interesting. Indeed the known compilers gcc, Clang and the Microsoft compiler provide many useful diagnostics to improve your \u00a0C++ code. And even if you use the Microsoft compiler and you can compile your code base using\u00a0Clang or gcc, I recommend to try doing it.\u00a0You will get more useful diagnostics.<\/p>\n<p>The two others rules are also basic, and every developer could apply them easilly, no need to have an advanced C++ skill to understand them like some other rules, and after applying them the code become more clean and easy to understand.<\/p>\n<p>In the other side here are the less popular ones:<\/p>\n<p><a href=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/lessvoted.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2362\" src=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/lessvoted.png\" alt=\"lessvoted\" width=\"760\" height=\"254\" \/><\/a><\/p>\n<p>Exceptions is one of the controversy mechanism in C++, some known open source projects contributors chose to not use \u00a0them and explain why in their style guide like the case with the C++ google projects.<\/p>\n<p>Maybe \u00a0the order of these rules does not reflect the C++ community choices because there are not enough votes. But what&#8217;s sure is that most developers choose always the basic rules, it&#8217;s easy to apply them and the result is generally very interesting.<\/p>\n<p>To resume keep it simple and do not hesitate to apply at least the most basic best practices rules to let your code base clean and easy to maintain and understand.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last year we launched the C++ Best Practices repository. \u00a0It&#8217;s an aggregator of some\u00a0known C++ rules guides: Google Style Guide. jsf air vehicle c++ coding standards. Effective Modern C++ from Scott Meyers. POCO coding standards.<\/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-2357","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts\/2357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2357"}],"version-history":[{"count":12,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts\/2357\/revisions"}],"predecessor-version":[{"id":2374,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts\/2357\/revisions\/2374"}],"wp:attachment":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}