How to Fail at Software Development |
||||||||
6. Are coding standards in place? |
||||||||
| Score from 0 to 6. | ||||||||
| Score 0 if there are no coding standards, but everyone has a clear idea of where things go and what they should be called. Ideally, the directory locations and file names are maintained on a central list, but it shouldn’t be more than a couple of pages long. This list of names will have some effect on the code, but not in the way a coding standard would. And the scoring should not be affected by special situationsfor example, it’s perfectly reasonable to lay out headers or comments in a specific way that makes it possible to produce documentation automatically. A destructive coding standard is one that imposes rules for the sake of having the code look cute. Good code formatting is a matter of personal opinion, and those who write coding standards usually have taste that is really silly. Score at least 1 if there is a coding standard but it is generally ignored, or if the file and directory naming convention is complex enough that you can get things confused if you’re not careful. These things are not particularly evil in themselves, but they are symptoms that something is rotten somewhere. Score at least 2 if a limited coding standard has been imposed. This type of standard will primarily concern itself with variable names, function names, and the like, and these are okay. But be careful Such rules will invariably slop over into some things dealing with style and opinionthings such as the number of lines of code in a module and how to indent the code. Score 3 if a simple coding standard with styling attitude is imposed, but not vigorously enforced. Some people will follow it anyway and it will reduce the amount and viability of the code they produce. If an enforced coding standard is less than five pages long score at least 4. If an enforced coding standard is longer than five pages, you must score 5. Score 6 regardless of the length of the coding standard if it is enforced to the point that there is at least one code cop who sends untested source code back to you for formatting update. Chapter 9 of How to Fail at Software Development contains some examples of the use of coding standards. |
||||||||