From the mind of an IT professional

Thoughts, projects, other random ideas and sometimes just braindump.

Teaser image: Software Metrics 101 - Class Interface Size (CIS)

Software Metrics 101 - Class Interface Size (CIS)

The Class Interface Size or CIS metric is measure of the public services that a class provides. This metric was orginally defined in the QMOOD model [1] by Bansiya & Davis. The orginal version of the CIS metric was defined as the number of public methods that a class provides. Each of these methods can be seen as a service where surrounding application can send messages to or receive messages from a class.

Teaser image: Software Metrics 101 - Efferent Coupling (CA)

Software Metrics 101 - Efferent Coupling (CA)

The Efferent Coupling or CE counts the number of software artifacts a software entity depends on. Therefore it takes all artifacts the entity depends on and builds a unique set for these dependencies. This means that if there are N dependencies from A to B and M dependencies from A to C, the Efferent Coupling of A is 2. Because we like and force reuse of existing code a high value for this metric isn't that bad at a first glance.

Teaser image: Software Metrics 101 - Afferent Coupling (CA)

Software Metrics 101 - Afferent Coupling (CA)

The Afferent Coupling or CA metric describes the number of unique incoming dependencies into a software artifact. An artifact can be nearly everything in an Object-Oriented software system, e.g. a component, package, class, method or property. Therefore the Afferent Coupling is an indicator for the responsibility that the artifact has in the analyzed software system. The higher this value is the higher is the artifact's responsibility.

Teaser image: PHPMD 1.1.0 released

PHPMD 1.1.0 released

Version 1.1.0 of PHPMD was released on March the 20th 2011 The key features for this release were two new rules The first one utilizes the [Coupling Between Objects CBO metric to detect strongly coupled classes The second one detects the usage of PHP's questionable `goto` statement…

Teaser image: Howto write a Rule for PHPMD

Howto write a Rule for PHPMD

This article describes how you can extend PHPMD with custom rule classes that can be used to detect design issues or errors in the analyzed source code. Let us start with some architecture basics behind PHPMD. All rules in PHPMD must at least implement the PHP_PMD_Rule interface.

Teaser image: A brief introduction to the Coupling Between Objects metric

A brief introduction to the Coupling Between Objects metric

In this blog post I will give you a brief introduction into the Coupling Between Objects metric, that is one of the metrics calculated by the static code analysis tool PHP_Depend.

Teaser image: PHP_Depend 0.10.2 released

PHP_Depend 0.10.2 released

We are proud to announce release 0.10.2 of PHP_Depend. Beside two bug fixes this release implements four new software metrics:

Teaser image: Brief introduction to the Class Interface Size metric

Brief introduction to the Class Interface Size metric

This blog post will give you a brief introduction into the Class Interface Size metric, as it is calculated by the static code analysis tool PHP_Depend

Teaser image: Testing file uploads with PHP

Testing file uploads with PHP

A question I am asked on a regular basis is, how you can test a file upload with PHP. In this blog post, I take a precise look at this topic and show you how to test your file uploads from within your standard testing environment, using widely unknown testing framework for PHP.