473,320 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Coding standards for .Net

I would be grateful if people in here would review my article about
..Net coding standards that is soon to be published by Informit.com

It is available at http://mishj.brinkster.net/intranet/netcodingstds.doc

I would welcome any feedback. This has been posted to VB.Net but I
had no response there.

Thanks
Michelle Johnston
Jul 19 '05 #1
3 1764
mish <mi***@hotmail.com> wrote:
I would be grateful if people in here would review my article about
.Net coding standards that is soon to be published by Informit.com

It is available at http://mishj.brinkster.net/intranet/netcodingstds.doc

I would welcome any feedback. This has been posted to VB.Net but I
had no response there.


First suggestion - convert it to HTML, and put it up on the web in that
format. Significantly simpler to read!

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Jul 19 '05 #2
guy
Generally fine, comments in *** against relevant sections

 To conserve resources, be selective in the choice of
data type to ensure the size of a variable is not
excessively large.
*** but - remember integers are faster than shorts or
bytes (and also take up the same space on the stack, but
not in arrays - not certain of this any comments?)

 When writing classes, avoid the use of public variables.
Instead, use procedures to provide a layer of
encapsulation and also to allow an opportunity to validate
value changes.
*** Properties rather than Procedures ? ***
 Require the use Option Explicit in Visual Basic and
VBScript to encourage forethought in the use of variables
and to minimize errors resulting from typographical
errors.
*** and Option Strict ***
 Use Select Case or Switch statements in lieu of
repetitive checking of a common variable using IfThen
statements.
*** normally yes but in short procedures (<32 byte) not
neccesarily, If/Then blocks can be inlined by the Jit but
not select/switch I believe ***

Also ...
It might be worth mentioning the use of underscore for
VB.NET private instance variables eg:-

instance variable _MyStuff
associated property MyStuff

otherwise fine :-)

cheers
guy
Jul 19 '05 #3
Thanks Guy for your feedback! I will incorporate it into the final
version that goes to press next week hopefully!
Mish

"guy" <gu*************************@hotmail.com> wrote in message news:<0a****************************@phx.gbl>...
Generally fine, comments in *** against relevant sections

 To conserve resources, be selective in the choice of
data type to ensure the size of a variable is not
excessively large.
*** but - remember integers are faster than shorts or
bytes (and also take up the same space on the stack, but
not in arrays - not certain of this any comments?)

 When writing classes, avoid the use of public variables.
Instead, use procedures to provide a layer of
encapsulation and also to allow an opportunity to validate
value changes.
*** Properties rather than Procedures ? ***
 Require the use Option Explicit in Visual Basic and
VBScript to encourage forethought in the use of variables
and to minimize errors resulting from typographical
errors.
*** and Option Strict ***
 Use Select Case or Switch statements in lieu of
repetitive checking of a common variable using IfThen
statements.
*** normally yes but in short procedures (<32 byte) not
neccesarily, If/Then blocks can be inlined by the Jit but
not select/switch I believe ***

Also ...
It might be worth mentioning the use of underscore for
VB.NET private instance variables eg:-

instance variable _MyStuff
associated property MyStuff

otherwise fine :-)

cheers
guy

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: David Inada | last post by:
Looking for any info on coding standards for ASP? Any tools that help with the review/formatting of code? Is it done mainly for the jscript/vbscript components? David
3
by: ganesan | last post by:
Hi Guys, Could any one knows the best coding standards styles(with variable declarations for c#) . and if any links or site with the best coding standards for .NET send me those links regards...
4
by: dotNetDave | last post by:
About three weeks ago I released the first .NET coding standards book titled "VSDN Tips & Tricks .NET Coding Standards". Here is what the famous author/ speaker Deborah Kurata says about it: ...
5
by: db2sysc | last post by:
ALl. Is it possible to get MS ACCESS CODING STANDARDS? TIA
144
by: Natt Serrasalmus | last post by:
After years of operating without any coding standards whatsoever, the company that I recently started working for has decided that it might be a good idea to have some. I'm involved in this...
7
by: Ralph Lund | last post by:
Hi. I am starting a new project with C#. I am searching for "good" coding conventions. I know that there are some coding conventions from microsoft, (but they are very extensive and not clear)....
7
by: Robert Seacord | last post by:
The CERT/CC has just deployed a new web site dedicated to developing secure coding standards for the C programming language, C++, and eventually other programming language. We have already...
3
by: editormt | last post by:
A recent poll asked if programming standards are used by development organisations... and if they are controlled. None: 20% Yes, but without control: 49% Yes, with control: 31% Participants:...
0
by: pat | last post by:
CodeCheck Coding Standard's Support As a free service to our customers we offer support in developing "rule-files" for automating corporate coding standards. If you have a coding standard that...
9
by: dom.k.black | last post by:
Can anyone recommend a good existing C++ coding standard - parctical, pragmatic and sensible? A company I joined recently are moving from C to C++, they are very much into coding standards. But...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.