initial commit for the 10 commandments
This commit is contained in:
commit
89cca1c761
15
code10com
Normal file
15
code10com
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Original Credit to Pegasus Epsilon)
|
||||||
|
---The 11 commandments of coding---
|
||||||
|
|
||||||
|
1. Name your variables and functions sensibly
|
||||||
|
2. Four levels of indentation is more than enough
|
||||||
|
3. Don't wrap an entire function in an if - negate the if and return from it at the beginning instead
|
||||||
|
4. Constants on the left (Yoda conditions)
|
||||||
|
5. Use your space bar - cond with no spaces are hard to read.
|
||||||
|
6. Teach before you expect anyone to know. (Define your functions before you call them.)
|
||||||
|
code should read like a book, establishing characters before you're expected to know them, read from top to bottom in one go and for maximum understanding afterwards.
|
||||||
|
7. Function often, if it happens more than twice make it a function.
|
||||||
|
8. When a function changes, its name should change also.
|
||||||
|
9. Thou shalt avoid comparison when possible. (boolean zen)
|
||||||
|
10.
|
||||||
|
11. All of us working together can make everyone's code better - chastise your fellow programmers that don't follow the commandments.
|
Loading…
x
Reference in New Issue
Block a user