> Miguel,
> Does Jmol have a coding standards document that I can
> use to integrate the jcamp code into Jmol?
No, we do not have a written document with coding standards.
Regarding some simple mechanical things ... I would prefer:
Indentation:
2 spaces for each indentation level
no tab characters in the file
80 character line length
make sure that there is a newline at the end of the file
spaces on each side of:
assignment
arithmetic operators
exception: cSquared = a*a + b*b;
comparison operators
Naming:
explanatoryMethodNames
you may override instance variables with parameters or locals
In general, declare your variables when you first assign them
Loops:
When making arithmetic comparisons as loop termination predicates, you
are allowed to use < or >=. Anything else is error-prone and probably
wrong. So, if you find your self using <= or >, then make sure your code
is correct and put in an explanatory comment.
In general, I do not like comments within implementation code. In general
I am of the believe that if you feel the need to write comments then that
is an indication of one or more of the following:
* methods too long
* method names and/or variable names not sufficiently descriptive
* class hierarchy too complex
If you want to put comments at the top of a file then that is fine, but
probably not for each method and certainly not for each line.
> As of now, the jcamp code needs a good level of
> restructuring and/or replacement.
OK ... use your judgement.
Miguel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers