|
| |
| Programming Standards |
 |
Programming Slandered is following |
- Can you actually read the code? Is it spaced out clearly?
|
- Do you separate blocks of code into 'paragraphs' so that different sections are easily defined?
- Are you using indentation to show where control structures (if, else, while and other loops) begin and end, and where the code within them is?
- Are your variable naming conventions consistent throughout the code and do they briefly describe that data that they'll contain?
- Are functions named in accordance with what they do?
|
- If you come back to the code in a few weeks or months, will you be able to work out what's happening without needing to look at every line?
|
- How are you commenting the work?
|
- Have you used complex language functions/constructs that are quicker to write but affect readability?
|
Once you've considered those points, you can begin to draft your coding standards. Consult with your team members (if any) and compare how they code to your own style -- you shouldn't force total change upon everyone. Compromise and incorporate elements of everyone's style. If someone has been coding in a specific way for a long time, it will take a while for that developer to change to the new method. Developers will likely adopt the style gradually, just as an accent develops over time. |
|