...
The following guidelines are meant to make the user experience more pleasant. They are aimed to help the user make use of existing tools and increase productivity. As a first guideline, keep in mind that somebody other than you will use your code.
- #Bug reports
- #Object orientation
- #Optimization
- #Status codes
- #"Overloaded Operators"
- #Using strings to access parameters
- #Deprecation
- #JavaDoc
Bug reports
Anchor | ||||
---|---|---|---|---|
|
A vital component of the project is the bug database. The software is actually more than a mere reporting system for bugs. You can use it to suggest improvements and monitor progress as well as organize workflow for tasks in your own project.
Rule: Use the JIRA system often and extensively
Rule: Search the database before reporting a bug
Object orientation
Anchor | ||||
---|---|---|---|---|
|
...
See also Sun's Guidelines on deprecation
JavaDoc
While it is true that your code should be self-documenting, this does not save you from writing proper documentation and code comments. Paraphrasing the function name is not helpful.
How Not to do it:
Code Block |
---|
// returns x
int getRL() {}
|
This makes more sense, doesn't it ?
Code Block |
---|
// calculates the radiation length from the previously set parameters. NOTE: The parameter Y gets invalidated by the call.
// returns the radiation length in a range between 0 and 10
int getRadiationLength() {}
|