INDEX
Coding Standard コーディング標準
1  NI-Lab.  2004/09/10(Fri) 22:52
Coding Standard コーディング標準

に関連するネタ。
2  NI-Lab.  2004/09/10(Fri) 22:53
"Code Reading" に書いてあった。

TAB width = 8 (というかインデント幅が8カラム) の意味

継続行はスペース4個。
制御ブロック要素はスペース8個。

// わかりにくい。
if(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == bbbbbbbbbbbbbbbbbbbb &&
cccccccccccccccccccccccccccccc == dddddddddddddddddddd){
System.out.println("hello");
}

// わかりやすい(かも?)
if(a == b &&
c ==d){
System.out.println("hello");
}

3  NI-Lab.  2004/09/10(Fri) 22:55
>>2
TABでそのまま書き込むとわかりにくいな……
実際の見た目は、こんな↓感じになる。

// わかりにくい。
if(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == bbbbbbbbbbbbbbbbbbbb &&
cccccccccccccccccccccccccccccc == dddddddddddddddddddd){
System.out.println("hello");
}

// わかりやすい(かも?)
if(a == b &&
c ==d){
System.out.println("hello");
}

4  NI-Lab.  2004/09/10(Fri) 22:56
"Code Reading"(日本語翻訳版の) P242あたりを参照。
/*- ではじまるコメントは
整形プログラムの indent が影響を与えないようにするため。

5  NI-Lab.  2004/09/10(Fri) 22:56
lintのためのコメント
/* FALLTHROUGH */
/* NOTREACHED */

正しくないがほぼ機能するコードのためのコメント。
XXX で検索できるように。
/* XXX */
/* XXX comment message */ 意味のあるコメントも付けてみる

修正対象のためのコメント
/* FIXME */

todoなコメント(^_^;
/* TODO */

6  NI-Lab.  2004/10/09(Sat) 17:39
http://www.rubyist.net/~matz/20041006.html#p02
Matzにっき(2004-10-06) - [Ruby]コーディングスタンダード

Rubyの作者のコーディングスタイル。

7  NI-Lab.  2004/10/09(Sat) 17:40
http://shugo.net/ruby-codeconv/codeconv.html
Rubyコーディング規約

8  NI-Lab.  2004/10/09(Sat) 17:49
http://community.borland.com/article/0,1410,10280,00.html
Object Pascal Style Guide

>Abstract: This article documents a standard style for formatting Delphi code. It is based on the conventions developed by the Delphi team.
9  NI-Lab.  2004/10/09(Sat) 17:51
http://jcsc.sourceforge.net/
JCSC (Java Coding Standard Checker)
10  NI-Lab.  2004/10/09(Sat) 17:53
http://www.gnu.org/prep/standards/
GNU coding standards

http://www.sra.co.jp/wingnut/standards/standards-ja.html
http://www.sra.co.jp/public/sra/product/wingnut/standards/standards-ja.html
GNU コーディング規約

11  NI-Lab.  2004/10/09(Sat) 18:00
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
Code Conventions for the Java(TM) Programming Language

http://www.tcct.zaq.ne.jp/ayato/programming/java/codeconv_jp/
Java 言語 コーディング規約

12  NI-Lab.  2004/10/09(Sat) 18:07
http://www.ambysoft.com/javaCodingStandards.html
AmbySoft Inc. Coding Standards for Java

Javaのコーディングスタイルの指針。
また、他の言語のコーディングスタイルなどの情報へのリンクがたくさんある。

http://www.alles.or.jp/~torutk/oojava/codingStandard/writingrobustjavacode.html
頑健なJavaプログラムの書き方(Writing Robust Java Code)

13  NI-Lab.  2004/10/09(Sat) 18:15
http://www.shos.info/develop/xp/cplusstd.html
翔ソフトウェア (Sho's) - XP (エクストリーム プログラミング) - C++ コーディング標準

14  NI-Lab.  2004/10/09(Sat) 18:22
http://www.objectclub.jp/community/XP-jp/pdf/CodingStd.pdf
http://www.objectclub.jp/community/XP-jp/pdf/CodingStd.doc
Javaコーディング標準

15  NI-Lab.  2004/10/09(Sat) 18:23
http://www.kawabata.com/dotnet/CodingStdCS.pdf
http://www.kawabata.com/dotnet/CodingStdCS.doc
http://www.kawabata.com/Forums/ShowForum.aspx?ForumID=25
C#コーディング標準

16  NI-Lab.  2004/10/09(Sat) 18:23
http://www.objectclub.jp/community/XP-jp/pdf/CodingStdVB.pdf
http://www.objectclub.jp/community/XP-jp/pdf/CodingStdVB.doc
VB.NETコーディング標準

17  NI-Lab.  2004/10/09(Sat) 18:47
ftp://ftp.cs.toronto.edu/doc/programming/ihstyle.doc
ftp://ftp.cs.toronto.edu/doc/programming/ihstyle.ps
ftp://ftp.cs.toronto.edu/doc/programming/ihstyle.tbl.ms
Indian Hill C Style and Coding Standards

これが、元々のオリジナル版の "Indian Hill C Style and Coding Standards" に、Henry Spencer による「Cプログラマーの十戎」を付けたもの。だと思う。

ftp://ftp.cs.toronto.edu/doc/programming/README

>ihstyle is the "Indian Hill C Style and Coding Standards" from Bell
>Labs, "as amended for U of T Zoology" by Henry Spencer. Follow it.
>Please.

ここのディレクトリの README によると↑だそうで。

ftp://ftp.cs.washington.edu/pub/cstyle.tar.Z
Recommended C Style and Coding Standards

"Indian Hill C Style and Coding Standards" の改訂版。
でも、もうファイルは置いていないみたい。

http://dennou-k.gaia.h.kyoto-u.ac.jp/arch/comptech/cstyle/
Indian Hill Style Manual (ver. 6.1 + japanese translation)

"Indian Hill C Style and Coding Standards" の改訂版の日本語訳。

18  NI-Lab.  2004/10/09(Sat) 18:50
http://www.gj.il24.net/~nakasima/vb/tech/style/
プログラマのメモ帳 - VBコーディング標準
19  NI-Lab.  2004/10/09(Sat) 18:52
http://www.hondarer-soft.com/cx/pukiwiki/pukiwiki.php?Link%2FProgram#content_1_17
Link/Program - CX_MEMO - Coding Style

コーディングスタイルに関するリンクがたくさん。
20  NI-Lab.  2004/10/16(Sat) 16:20
http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=view;name=RubyCodingConvention
The RWiki - RubyCodingConvention

21  NI-Lab.  2004/11/03(Wed) 07:51
http://www.objectclub.jp/community/codingstandard/
ObjectClub - コーディング規約の会