C++ Coding Standards

Discussion in 'C++' started by ct-86@163.com, Apr 29, 2006.

  1. Guest

    http://www.cdbook.cn/book.asp?id=2393
    Organizational and Policy Issues
    1
    0. Don't sweat the small stuff. (Or: Know what not to standardize.)
    2
    1. Compile cleanly at high warning levels.
    4
    2. Use an automated build system.
    7
    3. Use a version control system.
    8
    4. Invest in code reviews.
    9

    Design Style
    11
    5. Give one entity one cohesive responsibility
    12
    6. Correctness, simplicity, and clarity come first
    13
    7. Know when and how to code for scalability.
    14
    8. Don't optimize prematurely.
    16
    9. Don't pessimize prematurely.
    18
    10. Minimize global and shared data.
    19
    11. Hide information.
    20
    12. Know when and how to code for concurrency.
    21
    13. Ensure resources are owned by objects. Use explicit RAII and
    smart pointers. 24

    Coding Style
    27
    14. Prefer compile- and link-time errors to run-time errors.
    28
    15. Use const proactively.
    http://www.cdbook.cn/book.asp?id=2393
     
    , Apr 29, 2006
    #1
    1. Advertising

  2. * :
    > http://www.cdbook.cn/book.asp?id=2393
    > Organizational and Policy Issues
    > 1
    > 0. Don't sweat the small stuff. (Or: Know what not to standardize.)
    > 2
    > 1. Compile cleanly at high warning levels.
    > 4
    > 2. Use an automated build system.
    > 7
    > 3. Use a version control system.
    > 8
    > 4. Invest in code reviews.
    > 9
    >
    > Design Style
    > 11
    > 5. Give one entity one cohesive responsibility
    > 12
    > 6. Correctness, simplicity, and clarity come first
    > 13
    > 7. Know when and how to code for scalability.
    > 14
    > 8. Don't optimize prematurely.
    > 16
    > 9. Don't pessimize prematurely.
    > 18
    > 10. Minimize global and shared data.
    > 19
    > 11. Hide information.
    > 20
    > 12. Know when and how to code for concurrency.
    > 21
    > 13. Ensure resources are owned by objects. Use explicit RAII and
    > smart pointers. 24
    >
    > Coding Style
    > 27
    > 14. Prefer compile- and link-time errors to run-time errors.
    > 28
    > 15. Use const proactively.
    > http://www.cdbook.cn/book.asp?id=2393


    Here I thought, wow, that's really GOOD: that's what I do, and what I
    want others to do. I just have to take a look. Is this a free e-book,
    an article, what?

    And it turns out your're a /spammer/.

    Spam for Herb and Andrei's coding guidelines book, which from the list
    above seems to be good, but still, go spam somewhere else: I highly
    doubt any of the authors want to be associated with a spam campaign!

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
     
    Alf P. Steinbach, Apr 29, 2006
    #2
    1. Advertising

  3. Noah Roberts Guest

    Alf P. Steinbach wrote:
    > * :
    > > http://www.cdbook.cn/book.asp?id=2393
    > > Organizational and Policy Issues
    > > 1
    > > 0. Don't sweat the small stuff. (Or: Know what not to standardize.)
    > > 2
    > > 1. Compile cleanly at high warning levels.
    > > 4
    > > 2. Use an automated build system.
    > > 7
    > > 3. Use a version control system.
    > > 8
    > > 4. Invest in code reviews.
    > > 9
    > >
    > > Design Style
    > > 11
    > > 5. Give one entity one cohesive responsibility
    > > 12
    > > 6. Correctness, simplicity, and clarity come first
    > > 13
    > > 7. Know when and how to code for scalability.
    > > 14
    > > 8. Don't optimize prematurely.
    > > 16
    > > 9. Don't pessimize prematurely.
    > > 18
    > > 10. Minimize global and shared data.
    > > 19
    > > 11. Hide information.
    > > 20
    > > 12. Know when and how to code for concurrency.
    > > 21
    > > 13. Ensure resources are owned by objects. Use explicit RAII and
    > > smart pointers. 24
    > >
    > > Coding Style
    > > 27
    > > 14. Prefer compile- and link-time errors to run-time errors.
    > > 28
    > > 15. Use const proactively.
    > > http://www.cdbook.cn/book.asp?id=2393

    >
    > Here I thought, wow, that's really GOOD: that's what I do, and what I
    > want others to do. I just have to take a look. Is this a free e-book,
    > an article, what?
    >
    > And it turns out your're a /spammer/.
    >
    > Spam for Herb and Andrei's coding guidelines book, which from the list
    > above seems to be good, but still, go spam somewhere else: I highly
    > doubt any of the authors want to be associated with a spam campaign!


    It's a very good book. I don't agree with everything but there are
    also a lot of things I never thought of mentioned. It is what a
    standard really should be, a set of rules to keep code clean...not
    looking a particular way.
     
    Noah Roberts, Apr 29, 2006
    #3
  4. Ian Collins Guest

    Alf P. Steinbach wrote:
    >
    > Here I thought, wow, that's really GOOD: that's what I do, and what I
    > want others to do. I just have to take a look. Is this a free e-book,
    > an article, what?
    >
    > And it turns out your're a /spammer/.
    >

    Then why oh why quote the full text?

    --
    Ian Collins.
     
    Ian Collins, Apr 29, 2006
    #4
  5. Phlip Guest

    ct-86 wrote:

    > Organizational and Policy Issues
    > 0. Don't sweat the small stuff. (Or: Know what not to standardize.)
    > 1. Compile cleanly at high warning levels.
    > 2. Use an automated build system.
    > 3. Use a version control system.
    > 4. Invest in code reviews.


    The ratio of unit test code to production code should be >3:1.

    --
    Phlip
    http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
     
    Phlip, Apr 29, 2006
    #5
  6. Saqi Guest

    Rules are meant to ease in programming or whatever... afterall they are
    also made by humans.... so any one and everyone have the right to adopt
    or reject the rules.

    If you dont know how to programme come to
    http://www.mycplus.com/
     
    Saqi, Apr 29, 2006
    #6
  7. Ian Collins Guest

    Saqi wrote:
    > Rules are meant to ease in programming or whatever... afterall they are
    > also made by humans.... so any one and everyone have the right to adopt
    > or reject the rules.
    >
    > If you dont know how to programme come to
    > http://www.mycplus.com/
    >

    If you don't know how to post on Usenet, read
    <http://cfaj.freeshell.org/google/>

    --
    Ian Collins.
     
    Ian Collins, Apr 29, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Culver

    coding standards

    Jim Culver, Sep 9, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    2,221
  2. shbgupta

    coding standards

    shbgupta, Jun 27, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    546
    Chance Hopkins
    Jun 27, 2003
  3. =?Utf-8?B?UHJhdmVlbg==?=

    ASP.NET Coding Standards

    =?Utf-8?B?UHJhdmVlbg==?=, Aug 12, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    8,448
    Kevin Spencer
    Aug 12, 2004
  4. Adam Knight

    C# coding Standards!!!

    Adam Knight, Jan 11, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    826
    Karl Seguin [MVP]
    Jan 11, 2006
  5. mish

    Coding standards for Java

    mish, Jun 27, 2003, in forum: Java
    Replies:
    4
    Views:
    1,557
Loading...

Share This Page