473,372 Members | 995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

C++ coding standards

Can anyone recommend a good existing C++ coding standard - parctical,
pragmatic and sensible?

A company I joined recently are moving from C to C++, they are very
much into coding standards. But I have a horibble feeling they might
get a C programmer to write the C++ standard. Would be nice to be able
to suggest an existing standard.
Mar 21 '08 #1
9 2058
On Mar 21, 7:55*am, dom.k.bl...@googlemail.com wrote:
Can anyone recommend a good existing C++ coding standard - parctical,
pragmatic and sensible?

A company I joined recently are moving from C to C++, they are very
much into coding standards. But I have a horibble feeling they might
get a C programmer to write the C++ standard. Would be nice to be able
to suggest an existing standard.
No, but just a bit of advice to keep the "style" section to a
minimum. You can download and integrate a source code formatter (like
SourceFormatX) into your build stream that will format the code
according to your preference. Concentrate more on best practices. I
don't care what the name of the function is or where you put the curly
brace if it returns a dangling pointer.
Mar 21 '08 #2

wrote in message
Can anyone recommend a good existing C++ coding standard - parctical,
pragmatic and sensible?

A company I joined recently are moving from C to C++, they are very
much into coding standards. But I have a horibble feeling they might
get a C programmer to write the C++ standard. Would be nice to be able
to suggest an existing standard.
There is the book "C++ Coding Standards" by Sutter and Alexandrescu.
Mar 21 '08 #3
On Mar 21, 3:03 pm, "Maarten Kronenburg" <M.Kronenb...@inter.nl.net>
wrote:
wrote in message
Can anyone recommend a good existing C++ coding standard - parctical,
pragmatic and sensible?
A company I joined recently are moving from C to C++, they are very
much into coding standards. But I have a horibble feeling they might
get a C programmer to write the C++ standard. Would be nice to be able
to suggest an existing standard.

There is the book "C++ Coding Standards" by Sutter and Alexandrescu.
There was another book I heard of, 101 tips or something similar.

Are these worth investing in?
Mar 21 '08 #4
do*********@googlemail.com wrote:
Can anyone recommend a good existing C++ coding standard - parctical,
pragmatic and sensible?

A company I joined recently are moving from C to C++, they are very
much into coding standards. But I have a horibble feeling they might
get a C programmer to write the C++ standard. Would be nice to be able
to suggest an existing standard.
Hi,

Have a look at this chapter in the faq-lite.

http://www.parashift.com/c++-faq-lit...standards.html
Mar 21 '08 #5
In article <f6**********************************@i12g2000prf. googlegroups.com>,
<do*********@googlemail.comwrote:
>On Mar 21, 3:03 pm, "Maarten Kronenburg" <M.Kronenb...@inter.nl.net>
wrote:
> wrote in message
Can anyone recommend a good existing C++ coding standard - parctical,
pragmatic and sensible?
A company I joined recently are moving from C to C++, they are very
much into coding standards. But I have a horibble feeling they might
get a C programmer to write the C++ standard. Would be nice to be able
to suggest an existing standard.

There is the book "C++ Coding Standards" by Sutter and Alexandrescu.

There was another book I heard of, 101 tips or something similar.

Are these worth investing in?
IMO, you could do a lot worse than buying a copy of this
book. (Actually the company should buy the copy of the book for the
pricely sum of about 1 hours of developper time), read through it,
select the ones you agree with (hopefully most), delete the ones you
disagree, maybe ignore the ones that are irrelevant to your situation,
and publish your own standard built upon this solid base
adding your own favourite one for local flavour and placing the book
in the public company bookshelf for reference and longer explaination
of some guidelines.

Yan

Mar 25 '08 #6
do*********@googlemail.com wrote:
Can anyone recommend a good existing C++ coding standard - parctical,
pragmatic and sensible?

A company I joined recently are moving from C to C++, they are very
much into coding standards. But I have a horibble feeling they might
get a C programmer to write the C++ standard. Would be nice to be able
to suggest an existing standard.
The whole team should devise the coding standard.

I wrote one for my last company, but we dumped it in favour of what
ended up as a best practice page on our team wiki. Too many coding
standards go into way too much detail, with section on indentation,
brace placement and other trivia. Let the team decide as they share
code what works for them, if you have rules, make them editor or pretty
print ones that can be kept up to date.

--
Ian Collins.
Mar 26 '08 #7
On 3月26日, 下午12时28分, Ian Collins <ian-n...@hotmail.comwrote:
dom.k.bl...@googlemail.com wrote:
Can anyone recommend a good existing C++ coding standard - parctical,
pragmatic and sensible?
A company I joined recently are moving from C to C++, they are very
much into coding standards. But I have a horibble feeling they might
get a C programmer to write the C++ standard. Would be nice to be able
to suggest an existing standard.

The whole team should devise the coding standard.

I wrote one for my last company, but we dumped it in favour of what
ended up as a best practice page on our team wiki. Too many coding
standards go into way too much detail, with section on indentation,
brace placement and other trivia. Let the team decide as they share
code what works for them, if you have rules, make them editor or pretty
print ones that can be kept up to date.

--
Ian Collins.
The c++ Programming Languange
Mar 26 '08 #8
322322 wrote:
On 3月26日, 下午12时28分, Ian Collins <ian-n...@hotmail.comwrote:
>dom.k.bl...@googlemail.com wrote:
>>Can anyone recommend a good existing C++ coding standard - parctical,
pragmatic and sensible?
A company I joined recently are moving from C to C++, they are very
much into coding standards. But I have a horibble feeling they might
get a C programmer to write the C++ standard. Would be nice to be able
to suggest an existing standard.
The whole team should devise the coding standard.

I wrote one for my last company, but we dumped it in favour of what
ended up as a best practice page on our team wiki. Too many coding
standards go into way too much detail, with section on indentation,
brace placement and other trivia. Let the team decide as they share
code what works for them, if you have rules, make them editor or pretty
print ones that can be kept up to date.

The c++ Programming Languange
Is that a random utterance, or a comment?

--
Ian Collins.
Mar 26 '08 #9
Ian Collins wrote:
do*********@googlemail.com wrote:
Can anyone recommend a good existing C++ coding standard -
parctical, pragmatic and sensible?

A company I joined recently are moving from C to C++, they are very
much into coding standards. But I have a horibble feeling they might
get a C programmer to write the C++ standard. Would be nice to be
able to suggest an existing standard.

The whole team should devise the coding standard.

I wrote one for my last company, but we dumped it in favour of what
ended up as a best practice page on our team wiki.
Here, we had a group of representatives from the major projects using
C++ (inaptly named "The C++ Users Group) to work on the coding standard.
Too many coding
standards go into way too much detail, with section on indentation,
brace placement and other trivia. Let the team decide as they share
code what works for them, if you have rules, make them editor or
pretty print ones that can be kept up to date.
I strongly disagree with this. It's best to bite the bullet on those
things upfront, or it's a continual battle all through the project.


Brian
Mar 26 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: David Inada | last post by:
Looking for any info on coding standards for ASP? Any tools that help with the review/formatting of code? Is it done mainly for the jscript/vbscript components? David
3
by: ganesan | last post by:
Hi Guys, Could any one knows the best coding standards styles(with variable declarations for c#) . and if any links or site with the best coding standards for .NET send me those links regards...
4
by: dotNetDave | last post by:
About three weeks ago I released the first .NET coding standards book titled "VSDN Tips & Tricks .NET Coding Standards". Here is what the famous author/ speaker Deborah Kurata says about it: ...
5
by: db2sysc | last post by:
ALl. Is it possible to get MS ACCESS CODING STANDARDS? TIA
144
by: Natt Serrasalmus | last post by:
After years of operating without any coding standards whatsoever, the company that I recently started working for has decided that it might be a good idea to have some. I'm involved in this...
7
by: Ralph Lund | last post by:
Hi. I am starting a new project with C#. I am searching for "good" coding conventions. I know that there are some coding conventions from microsoft, (but they are very extensive and not clear)....
7
by: Robert Seacord | last post by:
The CERT/CC has just deployed a new web site dedicated to developing secure coding standards for the C programming language, C++, and eventually other programming language. We have already...
3
by: editormt | last post by:
A recent poll asked if programming standards are used by development organisations... and if they are controlled. None: 20% Yes, but without control: 49% Yes, with control: 31% Participants:...
0
by: pat | last post by:
CodeCheck Coding Standard's Support As a free service to our customers we offer support in developing "rule-files" for automating corporate coding standards. If you have a coding standard that...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.