Xpode.com        Click here to Print this article.

Coding Standard for good software programming

Mostly programmers write inefficient code, this is real. Some things are learned with time and experience. We are sharing our Programmers experience with you. This will help you while you will work in company.

If you want to be an efficient programmer, then before start code. Please read these standards.

Naming Conventions: Naming conventions refers to every namespace, class, identifier, object, property, variable, function, Constructor, interface, structure or any user defined word. We have to assign or give relevant name to these abbreviations. Like class name Student is better understandable than std or stdnt.

Like:

Class StudentInformation

It is better understandable that any other word like

Class StdInfo

Give appropriate name.

There are some capitalization style:

Pascal Code: In this style first letter of word is in capital form. Like

Class HelloWorld

Camel case: In this style first letter of first word is small and other first letters of other words are in capital form.

Class helloWorld

This is also called camel casting. This is mostly used in projects and preferred by developers.

Use relevant and understandable names for variables.

For example if you need to declare variable for Address. Then you have to use Address word instead of add or addr. Similar for Name for name. not nm or nam.

Page or file name should be proper and person or other developers can judge the reason or functioning by name of page. For example

Contactus.html shows the reason of page generation. Like this is for used as contact to company for visitor.

Method name should show what it is doing. One method should be use for one motive.

Never hardcode anything in code. Use dynamic path or variables for use.

If error is occurred in project the show the relevant error to user. Not Specific words like. There is an error etc.

There should be error handling pages in project. Like for error 404, 405 etc. There should be error handling at page level and at application level.

Note: These are views of some/individuals persons who had experience in their fields(programming). Please implement these on own experience. Dotnetquery.com will not be responsible for any loss for use of these connetns.



http://
http://

Contributed by:
Rohit kakria
I am software developer

Resourse address on xpode.com
http://www.xpode.com/Print.aspx?Articleid=302

Click here to go on website