Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > C++ Coding Standards

Reply
Thread Tools

C++ Coding Standards

 
 
ct-86@163.com
Guest
Posts: n/a
 
      04-29-2006
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

 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      04-29-2006
* ct-:
> 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?
 
Reply With Quote
 
 
 
 
Noah Roberts
Guest
Posts: n/a
 
      04-29-2006

Alf P. Steinbach wrote:
> * ct-:
> > 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.

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      04-29-2006
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.
 
Reply With Quote
 
Phlip
Guest
Posts: n/a
 
      04-29-2006
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!!!


 
Reply With Quote
 
Saqi
Guest
Posts: n/a
 
      04-29-2006
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/

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      04-29-2006
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C# coding Standards!!! Adam Knight ASP .Net 3 01-11-2006 12:16 PM
ASP.NET Coding Standards =?Utf-8?B?UHJhdmVlbg==?= ASP .Net 4 08-12-2004 12:37 PM
coding standards Jim Culver ASP .Net 4 09-18-2003 02:59 AM
Coding standards for Java mish Java 4 06-30-2003 11:59 PM
coding standards shbgupta ASP .Net 2 06-27-2003 08:48 AM



Advertisments