[Skip to content]

Code Conventions and Style Guides

AmbySoft Coding Standards for Java Very detailed, served as the foundation for "The Elements of Java Style" (2000)

Cay Horstmann's Java Language Coding Guidelines According to the author a simplified version of one that has been used with good success both in industrial practice and for college courses (2004)

Code Conventions for the Java Programming Language A style guide written by Sun, only covers the basics. Often seen as the official reference, though not taken too seriously by Sun itself (1999)

Geosoft Java Programming Style Guidelines Unlike all other documents mentioned here, comes in an annotated form that makes it easy to use during project code reviews (2004)

Infospheres Java Coding Standard Provides little discussion, but features interesting Javadoc guidelines (1999)

JavaRanch Java Programming Style Guide Covers mainly the same ground as the original Sun document, but gives different advice in some areas

Nejug Coding Standards for Java The most complete and up-to-date Java coding style document we know of. Compiled by the New England Java User Group (2001)

Books

Code Complete Steve McConnell, Microsoft Press, 2004, ISBN 0735619670
Just like "The pragmatic programmer" a book that should be included in every software engineering library. Devotes a whole chapter to code layout and style

Expert One-on-One J2EE Design and Development Rod Johnson, Wrox, 2002, ISBN 0764543857
Devotes a whole chapter to design techniques and coding standards for J2EE projects

The Elements of Java Style Allan Vermeulen, Scott Ambler et. al., Cambridge University Press, 2000, ISBN 0 521 777682
Provides a set of rules for writing Java code that can be used as the Company's coding standard. Falls short on some rules, but overall gives sound advice

Related Software

Artistic Style Source Code Indenter written in C++. Supports C/C++ and Java

BeautyJ Java Source Code Formatter that demonstrates the use of a flexible Java source code framework

CheckStyle Java Coding Convention Checker

ImportScrubber Java import optimizer

Jacobe Java Source Code Formatter. Written in C, available for Windows and Unix (not Open Source, but free)

FOSS Jalopy The predecessor of the commercial Jalopy. Originally written by the founder of TRIEMAX Software (until 1.0b10), now maintained by the community

JCSC Java coding convention checker

Mozart Development Environment Framework for user extensible compilers and development tools

PMD Java source code analyser/checker

QDox Framework for extracting class/interface/method definitions

Recoder Source code metaprogramming framework

What is Jalopy?

Jalopy is a world-class source code formatter for Java. It automates and enforces all aspects of source code layout—to meet a certain coding style without putting any burden on individual developers.

Learn more

Who needs it?

Jalopy is for everyone involved with source code editing. It scales from single developer usage to large scale enterprise deployment and seamlessly integrates with your favorite Java IDE or build tool.

Go and see yourself

I want some!

Concentrate on your problem domain and don’t waste time shuffling characters around. Pricing starts at USD $40 for a single-user license. Buy now using secure online purchase or wire transfer.

What are you waiting for?

Learn the details

Deploy, configure and use the software to best meet your needs. Download the printable user’s guide and learn everything there is to know to put Jalopy’s capabilities to full use.

Download (.pdf - 8.3MB)