1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to create a decent set of C++ guidelines?

Discussion in 'Programming' started by ronnysingh, Dec 20, 2018.

  1. #1
    I'm in a group that is responsible to renew the company guidelines for C++ code. We have recently upgraded our entire legacy codebase from C++98 to C++11, and currently we are moving to C++14.



    I find it difficult to find the optimal approach for these guidelines. What we have agreed on so far is to create guidelines for how the code should be formatted (syntax, naming, etc. ), and the file and folder structure of our code. This is straight-forward, necessary for consistency, and easy to follow.



    The old guidelines had 30 coding do's and don't. These are good but old, and we are throwing them out to be replaced, or removed. We can go for a strict rule-set approach, a free no-rules approach, or something in-between. The two last options are preferable. Preferably, the goal is to stimulate coders to create maintainable, quality code, without being too rigid, as flexibility is required to maintain creativity and joy of coding.



    We could refer to cpp core guidelines or similar. However, we find this too comprehensive. Although coders should read it, no one will read it in its entirety.



    Should one select the 20-30 top rules from cpp core guidelines? Then how, does one select a decent subset..? Should one ditch rules altogether, and focus on continuous training?


    SEMrush
    Does anyone have any experience with creating company coding guidelines, that are somewhat enforceable, while maintaining individual creativity and satisfaction? What was your approach? Our software assurance level is medium-high: not the strictest, not the loosest
     
    ronnysingh, Dec 20, 2018 IP
    SEMrush