Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is "Code Conventions for the Java Programming Language" by Sun (1999) out of date? [closed]

I have found Sun's Java code conventions which were lastly revised in 1999.

Is it out of date now?

like image 297
Yishu Fang Avatar asked Apr 08 '14 07:04

Yishu Fang


People also ask

Is Java language outdated?

After 26 years of existence — Java is still doing well — programmers who know it are still in high demand. They will continue to be sought after for a long time to come as over 90% of the Fortune 500 companies still rely on Java for their development projects. Globally, there are over 8 million Java developers.

What are the coding conventions of Java?

The Java code conventions are defined by Oracle in the coding conventions document. In short, these conventions ask the user to use camel case when defining classes, methods, or variables. Classes start with a capital letter and should be nouns, like CalendarDialogView .

Who created Java programming language in 1995?

Java is one of the most popular programming languages worldwide. It was created by James Gosling and Patrick Naughton, employees of Sun Microsystems, with support from Bill Joy, co-founder of Sun Microsystems. Sun officially presented the Java language at SunWorld on May 23, 1995.

Who developed the Java programming language in 1991?

1) James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. The small team of sun engineers called Green Team. 2) Initially it was designed for small, embedded systems in electronic appliances like set-top boxes.


1 Answers

It's funny to ask this question exactly in the time when the guide is not available for unknown reasons. Perhaps it is being rewritten for Java 8?

Anyway, it's mostly still valid.

There are some controversial points (as in every styleguide) and there are lots of advice missing because of the last revision date (generics, enums, varargs, etc. - don't forget to have some conventions for those, too).

The main point is - you don't have to adhere to it religiously. Read it, let it sink in, try to use as much of it as possible for you and your team. If you find something that doesn't suit you, because you feel it's an outdated opinion, you can simply drop it. The only thing you have to be is consistent. If you start with one style, don't switch to another while still having old code.

By the way, there are many style guides out there. If you want something "new" (but a lot less thorough), see for example the very new Google styleguide.

like image 78
Petr Janeček Avatar answered Oct 05 '22 10:10

Petr Janeček