Coding Standard

Our coding standard evolved over time as we became more familiar with C#. We didnt pay much attention to the standard, since only a few people were involved and only one of them worked with all the code. Still, we could have done better in certain areas. In particular, Id point to our use of properties and methods .

We have not been consistent with properties and methods. On the one hand, in Smalltalk and in Ruby, we are used to not needing parentheses or other parameter indicators on methods that dont need parameters. So we were initially inclined to use properties whenever they would work. We often got confused , however, for these reasons: First, in the Microsoft .NET library, some things that seem like properties are in fact methods, and vice versa, so we were often unsure as to what to use in the library. Second, sometimes we felt the need to mimic a similar method in .NET, so we would put parentheses on something where it felt to us that it didnt belong. Third, it seemed that on some days we preferred to put parentheses everywhere.

The bottom line is that we were not consistent, and we never sat down and talked through just what our conventions should be. The code suffers a little because of that, although I hope it doesnt suffer much.

Extreme Programming Adventures in C#
Javaв„ў EE 5 Tutorial, The (3rd Edition)
ISBN: 735619492
EAN: 2147483647
Year: 2006
Pages: 291 © 2008-2017.
If you may any questions please contact us: