News Feed
Sections




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

Andrew Podner:
NPATH Complexity Demystified
November 14, 2012 @ 10:55:57

In a new post to his site today Andrew Podner takes a look at NPATH and tries to "demystify" some of the concepts around it.

"NPATH, which counts the acyclic execution paths through a function, is an objective measure of software complexity related to the ease with which software can be comprehensively tested."[1] This is the definition from an article written in 1988 by Brian Nejmeh. As informative as this is, my eyes glazed over half way into it. So what the heck is acyclic execution anyway?

He defines the term in a bit easier to understand language and includes an example function to help illustrate how NPATH is measured.

The goal is to limit your NPATH complexity in a given method down to 200 or less. [...] As with other complexity metrics, this one can be checked with PHP Mess Detector (phpmd). The importance of staying under the 200 path threshold is realized when you develop tests and start trying to debug.
0 comments voice your opinion now!
npath complexity cyclomatic introduction phpmd phpmessdetector


blog comments powered by Disqus

Similar Posts

Brandon Savage: Private Methods Considered Harmful ("Do This, Not That" Excerpt)

DevShed: Rich Internet Applications - Introduction to Adobe Flex and PHP

KillerPHP.com: PHP Design Patterns - when should they be used?

SitePoint PHP Blog: PHP Fights HHVM and Zephir with PHPNG

Hasin Hayder: Running Symfony 2 Applications in OpenShift


Community Events





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


opinion framework unittest zendserver language release series introduction install tips community api laravel podcast symfony interview library update package deployment

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