Ten Commandments of Programming

10 Commandments of Programming

  1. Thou shalt spend more time thinking than coding.
  2. Thou shalt never commit a line of code that is unnecessary.
  3. Thou shalt never commit code that you do not fully understand.
  4. Thou shalt never commit commented out code unless there is another comment explaining why it is commented out.
  5. Thou shalt format thy code consistently.
  6. Thou shalt always leave code cleaner and more organized than you found it.
  7. 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).
  8. Thou shalt never copy and paste more than two lines of code unless you are moving it.
  9. Thou shalt refactor thy code regularly.
  10. Thou shalt never rely on the compiler or someone else to test your code.

10 Doctrines of Programming

  1. Assume the coder before you didn’t know what he was doing until you understand what he was doing.
  2. Always aim to understand someone else’s coder better than they do.
  3. A poorly performing application is a broken application.
  4. Build your application to handle more mock data than you ever think would be necessary.
  5. As soon as you feel comfortable about your code, you have sinned.
  6. If you don’t know how long something will take, say you don’t know how long something will take.
  7. Revise your estimates regularly.
  8. Be explicit and organized in your naming of everything.
  9. If your code is not pretty, nobody will want to be intimate with it.
  10. Make the next developer love you.

“And thirdly, the code is more what you’d call “guidelines” than actual rules.” – Barbossa

- Josh

Advertisement
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.