473,383 Members | 1,832 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,383 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 1766
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...
1
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.