David, Bummer about the McConnell reference being incorrect. Regardless, it's still a *really* good book. I like being a lazy programmer, I want to type the least amount of code necessary to do what I want.
1) Yes, it may be the default setting, but it's just that, the default. It can of course be set to keep braces on the same line as the construct. MS has quite a bit of money no doubt, and maybe there was some research into it, but I(conspiracy ahead) think the main reason is that it's the opposite of what Sun recommends for Java. 2) I can't comment directly on the book, as I'm not far enough along in it. As for readability, it's easy for me to look at my code, or someone else's that keeps their braces on the same line, and read what's going on. Whereas reading the expanded version just have a very disjointed feel to it(to me). A) It takes them a while, but they eventually come around. I must admit that I would rather read expanded C#, than that cluttered mess that is VB*. Yep, 21" monitor and 1920 resolution, it's quite nice, and by keeping my code compact I can fit even more on the screen. I can view around 70-80 lines of code at a time, which means that I can view pretty much any function(of mine) without the need the scroll, and in most cases I can fit about 2.5 functions. I guess the most important thing is just be consistent, whichever route is chosen. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Reed Sent: Monday, January 19, 2004 9:47 AM To: [EMAIL PROTECTED] Subject: RE: [Nant-users] Off-Topic: Coding Conventions & Code Complete by McConnell [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