File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Java Standards document Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Java Standards document" Watch "Java Standards document" New topic
Author

Java Standards document

Gary Ba
Ranch Hand

Joined: Oct 23, 2009
Posts: 150

Hi Guys,
Will someone point me to any Java Coding Standards out there.

Thanks,
John


star chaser..
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32654
    
    4
I can find two, which are rather different: 1: JavaRanch 2: Sun. I think both have not been updated for a few years. Wherever you work, there will probably be another set of code conventions.
Mike Simmons
Ranch Hand

Joined: Mar 05, 2008
Posts: 2778
    
    2
Another popular choice is this one:

http://www.ambysoft.com/essays/javaCodingStandards.html

Actually this is really two standards: the free online AmbySoft version, and the version published as The Elements of Java Style. These are similar but different, as the latter came from collaboration with additional coauthors. Both are worth checking out, however.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32654
    
    4
I haven't seen Mike Simmons' link yet, but I am sure it will be different from the other two. No two people can agree about code conventions.
Mike Simmons
Ranch Hand

Joined: Mar 05, 2008
Posts: 2778
    
    2
Yes they can!!!
Mike Simmons
Ranch Hand

Joined: Mar 05, 2008
Posts: 2778
    
    2
Oh, wait. Nevermind...
Embla Tingeling
Ranch Hand

Joined: Oct 22, 2009
Posts: 237
Campbell Ritchie wrote:No two people can agree about code conventions.


That's why you should always give developers a choise. They either comply with the code convention or quit the company.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 8435

uj nossnahoj wrote:
That's why you should always give developers a choise.


Not really. Coding standards or conventions are there for a reason.
Imagine using a third party library or working with someone else's code where the variables are named sObj1, sObj2...and so on, with no comments at all.
I understand standards can vary, but they should be uniform at least across the company. Asking every developer to follow his/her own favorite is just asking for trouble.


[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
Gary Ba
Ranch Hand

Joined: Oct 23, 2009
Posts: 150

Campbell,
Thanks for the link!

John
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

Right. Maneesh missed out on the joke made by uj nossnahoj, and a nasty discussion followed. That has all been removed, and if you people want to continue that discussion, that's where the Ranch office is for. I will have non of that here anymore.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Java Standards document
 
Similar Threads
coding standards
Documentation & Comments
Show Me Where Is Java. Sun pulling support for Java after the JDK 1.4 ???
Coding/naming Standards for struts Application
Mime Parsing performance