News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Misko Hevery's Blog:
Guide Writing Testable Code
January 07, 2009 @ 10:29:39

In this slightly older (Nov 2008) but useful post to Misko's blog, he takes a look at a few common flaws that you should avoid in writing up your code (in any language really).

To keep our code at Google in the best possible shape we provided our software engineers with these constant reminders. Now, we are happy to share them with the world.

Here's the list of the flaws:

  • Flaw #1: Constructor does Real Work
  • Flaw #2: Digging into Collaborators
  • Flaw #3: Brittle Global State & Singletons
  • Flaw #4: Class Does Too Much

Each includes some warning signs to keep an eye out for to see if you and your code might be straying the wrong way.

0 comments voice your opinion now!
testable guide hint flaw avoid warning sign


blog comments powered by Disqus

Similar Posts

Davey Shafik's Blog: php|architect's Zend PHP 5 Certification Study Guide, 2nd Edition

PHPBuilder.com: Review: Rapid PHP 2007

Hari KT's Blog: Is there a design flaw for the Components or Packages made by Symfony2 and ZF2

PHPMaster.com: Type Hinting in PHP

PHPClasses.org: PHP 5.4 Features: Shall you Upgrade to the newer PHP Version?


Community Events

Don't see your event here?
Let us know!


symfony2 framework voicesoftheelephpant application conference introduction example library laravel podcast interview install performance community php7 release api opinion configure series

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework