Ten Commandments of Programming
10 Commandments of Programming
- Thou shalt spend more time thinking than coding.
- Thou shalt never commit a line of code that is unnecessary.
- Thou shalt never commit code that you do not fully understand.
- Thou shalt never commit commented out code unless there is another comment explaining why it is commented out.
- Thou shalt format thy code consistently.
- Thou shalt always leave code cleaner and more organized than you found it.
- Thou shalt never do the same thing twice but differently without explicit reason to do so. If you are not sure whether you have broken this rule, see (3).
- Thou shalt never copy and paste more than two lines of code unless you are moving it.
- Thou shalt refactor thy code regularly.
- Thou shalt never rely on the compiler or someone else to test your code.
10 Doctrines of Programming
- Assume the coder before you didn’t know what he was doing until you understand what he was doing.
- Always aim to understand someone else’s coder better than they do.
- A poorly performing application is a broken application.
- Build your application to handle more mock data than you ever think would be necessary.
- As soon as you feel comfortable about your code, you have sinned.
- If you don’t know how long something will take, say you don’t know how long something will take.
- Revise your estimates regularly.
- Be explicit and organized in your naming of everything.
- If your code is not pretty, nobody will want to be intimate with it.
- Make the next developer love you.
“And thirdly, the code is more what you’d call “guidelines” than actual rules.” – Barbossa
- Josh
Advertisement
No trackbacks yet.