wood burning stoves*
The moose likes Beginning Java and the fly likes coding standards Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "coding standards" Watch "coding standards" New topic
Author

coding standards

feroz muhamed
Ranch Hand

Joined: Nov 15, 2003
Posts: 87
Please give me the coding standards for a good java project.
chi Lin
Ranch Hand

Joined: Aug 24, 2001
Posts: 348
Coding style guide used
on Cattle Drive.
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
The most important coding standard is always the one favoured by whoever will be paying you for the code.
People have plenty of differing opinions about the details of coding standards, and arguments can get quite heated. The bestthing is to learn to be flexible and adopt whatever coding standard is preferred for a particular project.
That said, the Cattle Drive coding standard mentioned above is as good as any, and making sure your own "learning" code follows that standard is a good way to learn to follow standards generally.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
We found that the aura of authority given by having a real book helped. I bought Scott Ambler's Elements of Java Style for everybody on the team, and published a very short list of exceptions.
If your team all uses the same IDE, get as much of your style into the code formatter as possible. I use the formatters in Eclipse and Visual Age often. It's nice to type or refactor at maximum speed without worrying about indentation and alignment.
Finally, if you want to go all the way on this, look into an automated style checker. JTest is one example. I find them way too finicky about unimportant things, but it might be just the thing to bring a team into line.
[ January 01, 2004: Message edited by: Stan James ]

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
Hi All,
I am replying late but I have gonbe through a very good of Java coding standard its
Elements Of Java Style
Author
Al Vermeulen
And we need to follow standard anywhere whereever we are going to write codes even its just for testing.
thanks
Anurag


SCJP 1.2
Chris Harris
Ranch Hand

Joined: Sep 21, 2003
Posts: 231
You may want to look atjalopy and checkstyle. There are tools that I use both at work and at home.
Hope they help.
Chris


SCJP 1.2, SCWCD, SCBCD
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: coding standards
 
Similar Threads
Coding/naming Standards for struts Application
XML
How to prepare
Happy Days are Here. Finally. 151 :)
What tasks are part of "coding?"