From 89cca1c761e6e4d707a7ab76ef12df1a90afc023 Mon Sep 17 00:00:00 2001 From: Bluesaxman Date: Tue, 19 Nov 2019 14:09:17 -0700 Subject: [PATCH] initial commit for the 10 commandments --- code10com | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 code10com diff --git a/code10com b/code10com new file mode 100644 index 0000000..3f10a33 --- /dev/null +++ b/code10com @@ -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.