Java coding standards

Colin Watson cjwatson at ubuntu.com
Thu Feb 2 21:34:02 GMT 2006


On Thu, Feb 02, 2006 at 10:14:07PM +0100, Fatal Error wrote:
> this is my first post to the list, after using ubuntu right from the start 
> I felt it was time to contribute to the - in my opinion most promising - 
> linux distribution. I´d like to excuse for my english, I´m not a native 
> speaker but I try to do my best :) . Here´s my first question, which could 
> not be answered neither by the Ubuntu wiki nor by Google: are there
> any recommended coding standards for ubuntu projects? Like "one has to use 
> the GNU Java coding standards for a pure Java
> project"? Is it sufficient to use an arbitrary coding scheme, and use this 
> scheme consistently throughout the code?

There aren't really any particular coding standards recommended by
Ubuntu itself, although the project or language you're writing in may
well have its own widely-accepted guidelines. For instance, Python code
should generally follow PEP 8
(http://www.python.org/peps/pep-0008.html); and of course if you're
contributing to an existing project then it's usually best to be
consistent with existing code. I'm not familiar enough with Java to know
if the GNU Java coding standards are generally-accepted or if there are
other style guides one might wish to follow.

In the absence of any other prevailing guidelines, just make sure that
your style would be considered clear and readable by others who might
want to contribute to the project.

Cheers,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the ubuntu-devel mailing list