Best practices for programming and web development

May 12, 2006 / Filed under: Programming, Web Development

I’ve started a list of "best practices" for programming and web development.

The list is, by no means, complete - but it has some substance, so far.

These principles I apply in my current job. But they are, by no means, isolated only to my job. I try to practice these things for any project I am working on - personal, or work-related.

Here is the list so far:

  • Proper indenting and spacing at all times. This includes HTML generated by a server-side programming language.
  • If it’s not in use - get rid of it. But consider that it may need to be re-enstated.
  • Comment the hell out of everything.
  • Use AJAX where it saves steps, space, or organization - but don’t use it just to use it.
  • Less is more: Whenever you need to create something new (a file, function, script, etc.) - ask yourself, "is there any way I can avoid creating this, and still complete the task?"
  • Never have the same code appear twice - that’s twice the edits, and twice the maintenance.
  • Never rush any new script out for public use. It’s always better to take extra time to make sure it works 100%, then releasing a "broken" product. The public may have to wait longer, but they’ll quickly forget that wait, if the product works smoothly from the start.

This list grows each day.

Comments/Mentions