Re: Sanity checker?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 3, 2006 12:51 pm, Ezra Nugroho wrote:
> I envision a tool that would audit your php code, and tell you if your
> code is good or not, if it has scaling issues, etc, etc. Basically it
> tells if your php code is "sane" or not.


No, but....

If you're in a team environment, the best advice I've heard is to have
the team share accountability.  Meaning, if you write a piece of code,
you _must_ have a colleague double-check it and sign off on it.  Then
if a bug is discovered down the road, _both_ of you will be held
responsible.  This will do two things:

1. Ensure that code you write is readable.  If someone else simply
can't understand it or consider it too confusing, they can hand it
back to you and say "clean this up".

2. It increases the chance of catching bugs or weak code prcocesses.

Also, develop/adopt specific coding standards (refer to PEAR's
standards as a flavor), and the steps above will help adherence to
that as well.

I'm willing to say that those two techniques will make you sleep much
sounder at night then just stuffing thousands of lines of code through
some regex checker.

Oh, plus some solid QA testing. Your last defense.

There will always be newbies in PHP (and elsewhere).  The solution is
education (being proactive), not sanity checking (being reactive)...

Although I don't blame you for asking.  :)

-John W

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux