w**z 发帖数: 8232 | 1 【 以下文字转载自 Java 讨论区 】
发信人: wwzz (一辈子当码工), 信区: Java
标 题: Google Java coding standard
发信站: BBS 未名空间站 (Thu Feb 27 18:24:40 2014, 美东)
Yep, Google's got standards when it comes to Java coding, and they've been
carefully documented for your enlightenment. While these enforceable coding
conventions are clearly most relevant to Java developers interested in
joining the Googleplex, they're also a good indicator of what you might
expect to see in other shops. InfoQ's Bienvenido David lists some of the
rules gleaned from the Google Java Style guide:
No wildcard imports.
Overloads appear sequentially.
Braces are used even when the body is empty or contains a single statement.
Two space indentation.
Column limit can be 80 or 100 characters.
No C-style array declarations.
Default statements required in switch statements.
Modifiers appear in the order recommended by the Java Language Specification.
Constants use CONSTANT_CASE. Note that every constant is a static final
field, but not all static final fields are constants.
Read more on InfoQ and check out the Google Java Style guide ...
http://www.javaworld.com/article/2102551/java-language/googles- |
b*******s 发帖数: 5216 | 2 出了一段时间了
coding
【在 w**z 的大作中提到】 : 【 以下文字转载自 Java 讨论区 】 : 发信人: wwzz (一辈子当码工), 信区: Java : 标 题: Google Java coding standard : 发信站: BBS 未名空间站 (Thu Feb 27 18:24:40 2014, 美东) : Yep, Google's got standards when it comes to Java coding, and they've been : carefully documented for your enlightenment. While these enforceable coding : conventions are clearly most relevant to Java developers interested in : joining the Googleplex, they're also a good indicator of what you might : expect to see in other shops. InfoQ's Bienvenido David lists some of the : rules gleaned from the Google Java Style guide:
|
l*********s 发帖数: 5409 | |
e********3 发帖数: 18578 | 4 很多其实都是常识呀,和我们公司的code review的标准也类似,当然可能我们是直接
抄G家的。。。
coding
【在 w**z 的大作中提到】 : 【 以下文字转载自 Java 讨论区 】 : 发信人: wwzz (一辈子当码工), 信区: Java : 标 题: Google Java coding standard : 发信站: BBS 未名空间站 (Thu Feb 27 18:24:40 2014, 美东) : Yep, Google's got standards when it comes to Java coding, and they've been : carefully documented for your enlightenment. While these enforceable coding : conventions are clearly most relevant to Java developers interested in : joining the Googleplex, they're also a good indicator of what you might : expect to see in other shops. InfoQ's Bienvenido David lists some of the : rules gleaned from the Google Java Style guide:
|
w**z 发帖数: 8232 | 5 你们如何enforce?
【在 e********3 的大作中提到】 : 很多其实都是常识呀,和我们公司的code review的标准也类似,当然可能我们是直接 : 抄G家的。。。 : : coding
|
s***o 发帖数: 2191 | 6 谁犯规就罚去写一天Scala
【在 w**z 的大作中提到】 : 你们如何enforce?
|
e*******o 发帖数: 4654 | 7 那还不如直接定scala coding standard
【在 s***o 的大作中提到】 : 谁犯规就罚去写一天Scala
|
z****e 发帖数: 54598 | 8 这不是惩罚,谁犯规就去看一段scala还差不多
【在 s***o 的大作中提到】 : 谁犯规就罚去写一天Scala
|
e********3 发帖数: 18578 | 9 一个月review一次,错的让你拿回去返工,同样的错误太多了你自己也不好意思吧?
【在 w**z 的大作中提到】 : 你们如何enforce?
|
r********n 发帖数: 7441 | 10 一般大点的公司都要建立自己的lint script来检查一些强制性的标准
所有code必须通过lint 后才到人来review
【在 w**z 的大作中提到】 : 你们如何enforce?
|