Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

coding standards/conventions  RSS feed

 
Krishna Chaitanya Reddy Kuninti
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Could some one please send links to online tutorials or name of the standard/prescribed/widely used books that give up-to-date information on Java coding standards and Java coding conventions.

Thank You.

regards,
Krishna.
 
Michael Jennings
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i am sure you must have come across this... still here it is,

http://java.sun.com/docs/codeconv/

you might want to do some googling to find some more info though
 
Michael Jennings
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i am sure you must have come across this... still here it is,

http://java.sun.com/docs/codeconv/

you might want to do some googling to find some more info though
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sun Coding Conventions

JavaRanch Style Guide

The most important thing is
{
align your braces
}

Seriously, I'm in the minority with that and learning to live with the K&R style on my new team.
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll see, from the very substantial differences between Sun and JavaRanch coding conventions, that there is no global agreement on this.

I think that coding conventions are not of great importance. Sure, it can be a good idea to agree some, but fascistic enforcement of them is just a way to demotivate your developers.

On the other hand, insisting on developers writing clear, simple, maintainable code, with the minimum of "clever" stuff in it, is of great importance.

This second point drives some of the things in the JavaRanch coding style, such as not using "continue". However, I personally think that one shouldn't absolutely prohibit any language feature. If a certain loop is really clear to code with "continue" and horribly tortuous without it, then use "continue"; there aren't many examples of loops that are clearer with "continue", though!
 
Krishna Chaitanya Reddy Kuninti
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Thank you for the useful information and links.

regards,
Krishna
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!