1.  Always use in development and in staging highest error reporting level, and display_errors ON:

error_reporting(-1);
ini_set('display_errors', 1);

2. Fix every warning or notice that occur.
3. Check regularly server’s error_log for notices/warnings

4. Identify any temporary hack with a special mark. Maybe something like:

#@TODO masterpiece by @smartguy, to quick fix the division by zero

 

5. Each function must do a single task. If is log in the user and record the login in stats table, be nice and create a separate function for ‘record the login’ stuff.
Maybe even a distinct class for stats ?

6. Use a version control system. SVN is NOT dead.

7. Use an IDE Aptana 2, Aptana 3, Eclipse, even Zend Studio .

8. Know your IDE: code snippets, code assist, integration with Zend Framework, SVN integration, bug tracker integration, and so on

3 Comments

  1. Todd

    Seriously? There’s not even a hint of unit testing here. To be professional, you have to use an IDE, but you don’t have to test that your classes work?

  2. Julian

    Oh, unit tests are at a different level. A different story

  3. Daniël

    You forgot about one of the most important rules: “never trust user input”.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>