-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Philipp Kempgen
committed
May 28, 2011
1 parent
f610986
commit 80cb282
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
Coding guidelines | ||
======================= | ||
|
||
You may have expected a long list here, but there is none. | ||
The essence is to keep the software architecture clean and to | ||
write good, readable code. :-) | ||
|
||
|
||
Read about anti-patterns in software design/architecture/ | ||
development and programming. | ||
|
||
http://en.wikipedia.org/wiki/Anti-pattern | ||
http://de.wikipedia.org/wiki/Anti-Pattern | ||
http://c2.com/cgi/wiki?AntiPatternsCatalog | ||
|
||
Try to avoid those mistakes. | ||
|
||
|
||
Use tabs for indentation, i.e. at the beginning of lines | ||
(as always, in just about any decent programming language). | ||
|
||
Why? It has been discussed a thousand times. Search the web. | ||
A good percentage of the Ruby community seems to prefer two spaces. | ||
We tried to take that into consideration but there's a problem: | ||
2 spaces are too small and make the code look fluttery and | ||
unreadable. Essentially you'd need a Ruby IDE then with code | ||
folding, outlines etc. However we have wasted way too much time | ||
trying to find an IDE. None of them worked acceptably well on Mac | ||
OS X and various Linux distos so we finally gave up. Which means | ||
we decided against spaces. Tabs are _meant_ for indentation. Tabs | ||
are universal. Tabs have better support in most text editors and | ||
IDEs. Tabs are more "accessible". (There should be accessability | ||
guidelines for source code.) Everyone can set their preferred tab | ||
width. You still want a tab to look like 2 spaces? Fine, set your | ||
tab-width to 2. Just don't expand tabs. | ||
|
||
|