• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

coding standards

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please give me the coding standards for a good java project.
 
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Coding style guide used
on Cattle Drive.
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may want to look atjalopy and checkstyle. There are tools that I use both at work and at home.
Hope they help.
Chris
 
reply
    Bookmark Topic Watch Topic
  • New Topic