Jump to content


Member Since 29 Apr 2004
Offline Last Active Nov 14 2017 06:41 AM

Topics I've Started

Place for product development methodologies

24 April 2014 - 08:37 PM

Say I wanted to discuss Kanban vs Scrum vs Prince2 vs RUP and everything in between.


Where would I go?

Real world application of Traits

25 May 2013 - 08:32 PM

We're finally upgrading to PHP 5.4 coming release, and probably it's most prominent addition is that of traits (strictly mixins, but whatever).


Mxins in Ruby have always seemed a quick way to get you in a lot of shit, but 5.4 forces me to take another look at them, so I can formulate some guidelines for additions to our codebase. In other words, to make sure they are used without violating a truckload of design principles. Specifically SRP, or more generally cohesion look like a likely victim.


One possible application I see is reducing duplication, especially of boilerplate. In a way, a less complete solution to the problem solved by AOP, so the main Use Case I see is adding system/supporting features such as logging and access control. Example:


require 'vendor/autoload.php';

use Psr\Log\LoggerInterface;

trait UsesLogging
    private $logger;

    public function setLogger(LoggerInterface $logger)
        $this->logger = $logger;

    public function getLogger()
        return $this->logger;

    protected function log($level, $message, $context = array())
        $this->logger->log($level, $message, $context);


use Psr\Log\LogLevel;

class SomeService
    use UsesLogging;
    public function doSomething()
        $this->log(LogLevel::DEBUG, "I did something worth logging");

How do you use traits?

Where did the ZCE practice exams go?

22 May 2013 - 04:58 PM

Hi all,


Been a while.


I'm a lead developer and I want to push two of my developers to get the ZCE certificate. The company will of course pay for the certification itself and resources like the study guide, but probably not the Zend online training which I think is overkill anyway: these are professional developers so they don't need to start from scratch (and we can't let them invest that much time, there's cool stuff to be built). 


When I took the exam myself quite some time ago, I used the online practice exams to check if I was ready, I would like these guys (actually a guy and a girl) to go the same route. But I can't for the life of me find the online exam.


Have they been discontinued, are they hidden away somewhere, or am I just being a bit retarded?  ;)






Edit: I've submitted an inquiry on zend.com, but I am also interested in alternatives. I have periodical progress evaluations with my developers, and I would like to have something a bit more measurable than code reviews (which eat at my time as well). The exams seemed ideal but if they have been discontinued I will have to come up with something else, preferrably with limited effort on my part (not because I'm lazy but because I have more developers and already have a surreal worload). So I'm open to suggestions...

Workstation instable - could really use some help

02 July 2011 - 10:05 AM

Hey people,

I'm struggling with getting my workstation stable again, I could really use some help.

See the full thread with the details here: http://ubuntuforums.....php?p=11004364

Thank you in advance,


Zend Studio 7.1: PHPUnit namespaced tests

14 December 2009 - 11:09 AM

Hi all,

Has anybody been able to use namespaced PHPUnit tests in 7.1? I could get it to run by setting the default debugger to 5.3 CGI and hacking into ZendPHPUnit:

class ZendPHPUnitSuite extends PHPUnit_Framework_TestSuite {

    public static function suite() 
      $suite = new self();
      syslog(LOG_DEBUG, "adding " . count($GLOBALS['ZendPHPUnitTests']) . " tests");
      foreach ($GLOBALS['ZendPHPUnitTests'] as &$test)
         syslog(LOG_DEBUG, "looking for {$test['name']} in {$test['file']}");
         if(!class_exists($test['name'], false))
            $code = file_get_contents($test['file']);
            $namespace = preg_replace('/.*?(namespace\s+([a-zA-Z0-9\\\]*?);).*/s', '$2', $code);
            $test['name'] = "$namespace\\{$test['name']}";
         if ($test['type'] === 'suite') {
               $suite->addTest(call_user_func(array ($test['name'], 'suite')));
         else  {

      return $suite;

That will at least make it run, but trying to explore the textcase by clicking on it throws an error..