Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Good development practices

Reply
Thread Tools

Good development practices

 
 
Nickolai Leschov
Guest
Posts: n/a
 
      01-17-2008
Hello,

I have done some programming, mostly on embedded systems but now I would
feel like I have to learn good development practices (i.e programmer's
good manners). Let's say I want to build an application using some
established open source library or application. Do I just download the
source and hack away? Or I'd better do it in some controlled manner, i.e
set up some source control system so that I can always compute the diffs
from the original code? Or maybe I should try to keep my changes
separate from the original code base? How do I do it?

Where do I learn about things like that? I'm sorry for asking this here,
where we dicuss standard-compliant C/C++ programming, but I really don't
know any other place now. I do program in C/C++.

Regards,
Nickolai Leschov
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      01-17-2008
Nickolai Leschov wrote:
> [..] I
> would feel like I have to learn good development practices [..]
>
> Where do I learn about things like that? I'm sorry for asking this
> here, where we dicuss standard-compliant C/C++ programming, but I
> really don't know any other place now. I do program in C/C++.


news:comp.sofware-eng.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


 
Reply With Quote
 
 
 
 
Lew Pitcher
Guest
Posts: n/a
 
      01-17-2008
On Jan 17, 2:03 pm, Nickolai Leschov <(E-Mail Removed)> wrote:
> Hello,


Hi, Nickolai

[snip]
> Where do I learn about things like that? I'm sorry for asking this here,
> where we dicuss standard-compliant C/C++ programming, but I really don't
> know any other place now. I do program in C/C++.


OK, first thing is to recognize that there is no such thing as
"standard-compliant C/C++ programming", because there is no standard
that defines something called "C/C++".

However, there /are/ standards for the C language, and /different/
standards for the C++ language. You are going to have to choose which
language you want to learn about wrt "standard-compliant" programming.
If you are planning to program in /both/ C and C++, you'll have to
learn both standards, and a bunch of things about inter-language calls
(which, IIRC, the C++ standard talks about, but the C standard does
not).

Having said all that, neither comp.lang.c nor comp.lang.c++ seem to me
to be the best place to discuss the theory of "standard-compliant
programming". Both of these newsgroups discuss the practice of
"standard-compliant programming", and try to leave the theory to other
groups.

HTH
--
Lew



 
Reply With Quote
 
Malcolm McLean
Guest
Posts: n/a
 
      01-17-2008

"Lew Pitcher" <(E-Mail Removed)> wrote in message
>
> OK, first thing is to recognize that there is no such thing as
> "standard-compliant C/C++ programming", because there is no standard
> that defines something called "C/C++".
>

Standards-compilant C/C++ would be a language that anyone would call C, or C
with a few twiddles, but actually conforms to the C++ standard.
Many thousands of such programs are written.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

 
Reply With Quote
 
Martin Ambuhl
Guest
Posts: n/a
 
      01-17-2008
Malcolm McLean wrote:
>
> "Lew Pitcher" <(E-Mail Removed)> wrote in message
>>
>> OK, first thing is to recognize that there is no such thing as
>> "standard-compliant C/C++ programming", because there is no standard
>> that defines something called "C/C++".
>>

> Standards-compilant C/C++ would be a language that anyone would call C,
> or C with a few twiddles, but actually conforms to the C++ standard.
> Many thousands of such programs are written.


Or a language that anyone would call C++, or C++ with a few twiddles,
but actually conforms to the C standard. Many thousands of such
programs are written.

Your parochialism is showing. The fact is that there is no C/C++
language, and no standard to conform to. Not to bother with the obvious
point that the expression 'C/C++' is a violation of the standards of
either C or C++.

 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      01-18-2008
Malcolm McLean wrote:
> "Lew Pitcher" <(E-Mail Removed)> wrote in message
>
>> OK, first thing is to recognize that there is no such thing as
>> "standard-compliant C/C++ programming", because there is no
>> standard that defines something called "C/C++".

>
> Standards-compilant C/C++ would be a language that anyone would
> call C, or C with a few twiddles, but actually conforms to the
> C++ standard. Many thousands of such programs are written.


No. Run the following program to get the idea:

#include <stdio.h>

int main(void) {
int C;

C = rand(void);
if (C) printf("C / C++ == %d\n", C / C++);
else printf("C / C++ is undefined\n");
return 0;
}

and I expect the vast majority of results to be the value 1.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.



--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
Michael DOUBEZ
Guest
Posts: n/a
 
      01-18-2008
Nickolai Leschov a écrit :
> Hello,
>
> I have done some programming, mostly on embedded systems but now I would
> feel like I have to learn good development practices (i.e programmer's
> good manners). Let's say I want to build an application using some
> established open source library or application. Do I just download the
> source and hack away? Or I'd better do it in some controlled manner, i.e
> set up some source control system so that I can always compute the diffs
> from the original code? Or maybe I should try to keep my changes
> separate from the original code base? How do I do it?
>
> Where do I learn about things like that? I'm sorry for asking this here,
> where we dicuss standard-compliant C/C++ programming, but I really don't
> know any other place now. I do program in C/C++.


You can learn some of it from de Herb Sutter and Andrei Alexandrescu:
http://www.amazon.fr/Coding-Standard.../dp/0321113586

Michael
 
Reply With Quote
 
Nickolai Leschov
Guest
Posts: n/a
 
      01-18-2008
Victor Bazarov wrote:

> news:comp.sofware-eng.



Thank you. I'm subscribing.
 
Reply With Quote
 
Nickolai Leschov
Guest
Posts: n/a
 
      01-18-2008
Lew Pitcher wrote:
>
> OK, first thing is to recognize that there is no such thing as
> "standard-compliant C/C++ programming", because there is no standard
> that defines something called "C/C++".
>
> However, there /are/ standards for the C language, and /different/
> standards for the C++ language. You are going to have to choose which
> language you want to learn about wrt "standard-compliant" programming.


Yes, I know what is C and what is C++, they are different languages, I
just wrote "C/C++" to save time, not because I think they are the same
or something like that.
Please don't be so pedantic. You know what I meant, don't you?

My question is about good practices applicable to both C and C++,
(that's why I post this to both newsgroups) with emphasis on "good
practices", not "C/C++"

> Having said all that, neither comp.lang.c nor comp.lang.c++ seem to me
> to be the best place to discuss the theory of "standard-compliant
> programming".


This is the term I used to name the topic of discussions in this
newsgroup is I see it. I mean programming in the language, not specific
implementation.

 
Reply With Quote
 
Bart van Ingen Schenau
Guest
Posts: n/a
 
      01-18-2008
On Jan 18, 11:01 am, Nickolai Leschov <(E-Mail Removed)> wrote:
> Lew Pitcher wrote:
>
> > OK, first thing is to recognize that there is no such thing as
> > "standard-compliant C/C++ programming", because there is no standard
> > that defines something called "C/C++".

>
> > However, there /are/ standards for the C language, and /different/
> > standards for the C++ language. You are going to have to choose which
> > language you want to learn about wrt "standard-compliant" programming.

>
> Yes, I know what is C and what is C++, they are different languages, I
> just wrote "C/C++" to save time, not because I think they are the same
> or something like that.
> Please don't be so pedantic. You know what I meant, don't you?


Actually, no we did not know that.
There are just too many people about who really think that there is a
language called "C/C++" to assume that a poster knows about the
distinction between C and C++ when he uses the term C/C++.

And if you can't stand pedantery, comp.lang.c and comp.lang.c++ will
not meet your tastes, because they are full of it.

To answer your original questions:
- Using source control is always a good idea. Agood source control
system lets you easily find out when and why certain changes were
made. This I use often in finding the cause of bugs that I try to
solve.
- When writing an application that uses third-party software (open
source or not), you should regard the third-party software as 'read-
only'.
Even if you are allowed to, writing your application intermixed with
library code is likely to break all sorts of things. In the very
least, it breaks the principle of modularity.

Bart v Ingen Schenau
 
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
Good development practices Nickolai Leschov C++ 30 01-20-2008 02:16 AM
Best Practices for Web App Development ? Kevin Frey ASP .Net 1 02-03-2006 05:51 AM
Ten Essential Development Practices gyromagnetic@gmail.com Python 220 08-16-2005 04:31 PM
Best practices in ASP.NET application development Amelyan ASP .Net 2 04-30-2005 01:48 AM
Re: Development best practices and knowing when to exercise control over development Kevin Spencer ASP .Net 2 08-06-2003 09:33 PM



Advertisments