Re: good guide to programming style

"George Georgalis" <[email protected]>
Newsgroups gmane.os.netbsd.help
Message-ID <[email protected]>
On Thu, Jan 25, 2007 at 08:10:40AM +0000, David Laight wrote:
>On Tue, Jan 23, 2007 at 12:05:21AM -0500, George Georgalis wrote:
>> At $WORK I support a group of analysts, who are generally
>> very smart but they are not familiar with good programming
>> practices. Mostly Window users getting a foot hold in unix by
>> following examples from not so well written Fortran or R examples.
>> 
>> Unfortunately "good" programming is not something I can just define
>> in a short training session. And, it's too easy (and painful) to
>> just identify poor programming techniques or mistakes.  So, I'd
>> like to put some kind of training together and was wondering if
>> anyone here could provide some interesting websites to help the
>> process?
>
>IMHO you need to show why some things are 'bad practice', because 'good
>practice' is what is left after you remove all the bad practice! and knowing
>some bad practice will (should) help people identify others themselves.

the more I read http://www.soberit.hut.fi/mmantyla/BadCodeSmellsTaxonomy.htm
the more I agree :)


>- KISS (keep it simple stupid)
>- namespace preservation (and I don't mean C++ namespaces)
>  eg all members of a structure have a short prefix, all gloabal defines
>  and functions have a prefix.

Good idea! We have discussed namespace collision but that's about it...

>- consistant and clear layout [1]
>
>	David
>
>[1] Considers the following fragment:
>		....
>		....
>	}
>	while (.......................................................................
>	{
>		....
>		....
>Is it the bottom of a 'do' loop or the top of a 'while loop'.


I don't understand your example, "while" is the beginning of a new
loop. what are you saying?

// George


-- 
George Georgalis, systems architect, administrator <IXOYE><
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.