If you want me to look at code - COMMENT! - so I (and YOU) know what you're TRYING to do. When you comment, you are EXPLAINING the CODE to YOURSELF as well as others.
If you write great code, but the code is unmaintainable, you are a liability. 50-75% of a software system's cost is consumed by maintenance which includes fixing problems, adapting code to new environments and adding functionality.
The readability of the program directly affects maintainability. It takes more time to write maintainable code, but there is a large ROI. Adhere to these guidelines - significant points will be deducted if you do not.
"I just began working on a project that is pretty much a rewrite of an entire system because of
sloppy, poorly documented code. Please stress to your students the importance of good documentation.
It is nice for the person who has to go through all of it!"
-- message from a former student, Feb, 2010
Examples:
C# Console: GlazerCalc.cs |
C# Windows: FF.cs |
C++ Console: Metric.cpp |
Assembly: Template.asm |
Web JavaScript: js
Examples: Web HTML: example.html | Web CSS: base.css