C++ Coding Standards

C

ct-86

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
 
A

Alf P. Steinbach

* (e-mail address removed):
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!
 
N

Noah Roberts

Alf said:
* (e-mail address removed):

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.
 
I

Ian Collins

Alf said:
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?
 
P

Phlip

ct-86 said:
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.
 
S

Saqi

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/
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top