Powershell or any scripting gives you freedom to write simple to complex programs. You must follow standards while programming to make your life easier and your organization as well.
Common Standards followed in Scripts
1. Add header and footer of the code. The header might be organization specific. But, mostly below lines are common -
#--------------------------------------#
# Script Name :
# Author Name :
# Purpose :
#
#--------------------------------------#
# Revision History
#--------------------------------------#
# 05/05/2011 - Som DT - Initial release
# 08/12/2011 - Jack - Added one mo...
#--------------------------------------#
2. Add comment for each complex logic. You may skip those lines where logic is simple and understood. But, when logic is complex, you are supposed to add at least one line of comment.
3. Declare all Global variables as capital case and Local variables as small case.
(Short of time.. leaving to office.. i will be back..Happy scripting.. )
- Som DT
Common Standards followed in Scripts
1. Add header and footer of the code. The header might be organization specific. But, mostly below lines are common -
#--------------------------------------#
# Script Name :
# Author Name :
# Purpose :
#
#--------------------------------------#
# Revision History
#--------------------------------------#
# 05/05/2011 - Som DT - Initial release
# 08/12/2011 - Jack - Added one mo...
#--------------------------------------#
2. Add comment for each complex logic. You may skip those lines where logic is simple and understood. But, when logic is complex, you are supposed to add at least one line of comment.
3. Declare all Global variables as capital case and Local variables as small case.
(Short of time.. leaving to office.. i will be back..Happy scripting.. )
- Som DT
No comments:
Post a Comment