[How strange that such simple words have launched holy wars... :]

<disclaimer>
All things considered (with regards to curly placement), it's far more
important that everybody in the shop do the same thing than it is
specifically what you do.  All of the research on bug-hunting and
maintenance prove decisively that shops with uniform standards and
enforced conventions deliver higher quality faster...
</disclaimer>

Jarrod,

The author of the NAnt coding conventions is taking McConnell's name in
vain.  There's no evidence in any of the various editions of Code
Complete lying about our shop that he would support, prefer or in anyway
advocate positioning the curlies in such a lazy fashion as you seem to
prefer.  :P  Nor is there contrary evidence that he would oppose it,
either.

(I wish we could afford to have him speak here, because it would be fun
to watch the fireworks if somebody asked him.)

We adopted the "horribly expanded way of writing code" that M$ advocates
(I've heard it misreferred to as Pascal-style) for two primary reasons
and a secondary rationalization:

        1) It's the default setting for VS.NET, supported by more cash
for human factors research alone than we'll ever have for all of our
products put together;
        2) It follows other principles that McConnell (and many others
preach), such as clear distinction of logical constructs, improved
readability with additional vertical whitespace and uniformity of
purpose (all of our logical constructs follow the method pattern you
hate - ifs, switches, etc);
        A) We voted on the subject as a team two years ago, and the only
dissenters were a pair of refugees from VB.NET who thought we were
taking the lunch order and don't like curly fries.

Since we're not living in the dark ages of command line C code on an
80-column screen and we've all got pairs of snazzy 21" monitors,
"horribly expanded" is the most readable way to go, right?



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:nant-users-
> [EMAIL PROTECTED] On Behalf Of Jarrod Moore
> Sent: Monday, January 19, 2004 10:24 AM
> To: [EMAIL PROTECTED]
> Subject: [Nant-users] Off-Topic: Coding Conventions & Code Complete by
> McConnell
> 
> Sorry, this is a bit off topic, but I was curious about someting I saw
> on the coding conventions
>
page(http://sourceforge.net/docman/display_doc.php?docid=6080&group_id=3
> 1650). On that page it shows the curly braces being used on the same
> line as the if statement, as well as the else. I must say that I
> completely agree with this, and it is my preferred style of coding.
I'm
> trying to convince some other people to use this method instead of the
> other bad examples shown on the page, but I don't have any ammo to win
> my argument.
> 
> I went and bought the Code Complete book to see what the reasoning was
> in there, since it was mentioned on the page. After looking through
the
> book, I found that there is no mention of curly brace usage and
logical
> structure. Can someone point me to the correct page in the book, or(if
> feeling generous) type out the necessary text?
> 
> My only thought as to why this isn't in the book is that the previous
> publisher of the book wasn't MS Press. Since MS advocates the horribly
> expanded way of writing code, my only assumption was that they had
that
> part taken out.
> 
> Sorry for such a long post for such a simple thing.
> 
> Thanks,
> Jarrod
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to