|
-
Sep 29th, 2007, 11:02 PM
#1
Thread Starter
Fanatic Member
school coding standards
I'm taking a class required for my major that is supposed to teach us coding style and program design (since we've already had 2 classes that teach basic Java). The problem is they are using FindBugs and CheckStyle plugins in Eclipse and want us to adhere to strict coding style standards. We can opt to follow different standards as long as it has the same elements. I was wondering if you guys had any better suggestions?
They want arguments to start with a/an/the, followed by an underscore, followed by the argument name, or the name - underscore - numeral. For example: the_index, the_starting_point, an_animal, thing_1, thing_2.
Local variables must be all lower case with words separated by underscores: local_variable.
Instance variables begin with "my_" such as: my_color.
I'm cringing at the thought of writing code like this. I would rather have camel case arguments and local variables: thisIsMyVariable, and just a leading underscore for instance variables.
Is there any other way to do this so that all three types are different from each other and from the normal way to name classes and methods?
I might ask if I can do: _instance, arg_argument, local_variable. I guess that wouldn't be too bad. Any other ideas?
The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|