Category: php

Improve your code coverage percentage – delete code!

A recent post showed how to setup Code Tombstones – but there are other , even more insidious pieces of code in a project. The code you know you aren’t using now, but you wrote ahead of time – because  you

Posted in php, testing

PHP-in-London list

While Twitter can be really annoying, sometimes it can help to promote some wonderfully simple ideas. One of these came from Andrew Woods (@awoods) – a github repo called php-in-seattle.  It’s a simple idea – just a list of companies around a

Posted in php

Code Tombstones

In a large project – particularly one in a dynamic language like PHP, as a project gets bigger maintaining full control of the code can be difficult. New features are written, old ones are changed or deprecated. Sometimes code is

Posted in php, tools

Replacing @expectedException with $this->expectException()

One of the advantages of a side-project is that you can be a little extra passionate about getting things just right. If you want to increase code coverage because you think that it’s good, you can – after all, it’s

Posted in php, testing, tools

Doing the work elsewhere – Adding a job to the queue

I’ve previously shown you why you may want to put some tasks through a queuing system, what sort of jobs you could define, plus how to keep a worker process running for as long as you would like (but still

Posted in php, scaling, tools Tagged with: , ,

Doing the work elsewhere – Sidebar – running the worker

I’m taking a slight diversion now, to show you how the main worker processor runs. There are two parts to it – the actual worker, written in PHP, and the script that keeps running it. For testing with return from

Posted in php, scaling Tagged with: , ,

Doing the work elsewhere – Asynchronous Message Queues

The use of Beanstalkd as a queueing system What is an asynchronous queue The classic wikipedia quote (Message queue) In computer science, message queues and mailboxes are software-engineering components used for interprocess communication, or for inter-thread communication within the same

Posted in advanced, php, scaling Tagged with: , ,

($me instanceOf ZCE) === true

Phew. That would have been embarrassing if I’d not passed my ZCE on Thursday afternoon (Jun 4th, 2009).

Posted in quick, zce Tagged with: , ,

Upcoming posts – keep watching

Just a quick note on what is going to be posted in the next few weeks – I’ve got a few significant pieces in mind for various topics – including: Doing the work elsewhere – asynchronous queues This is going

Posted in php Tagged with:

I laugh at your ZCE exam prep tests #2

Back at the PHP London Conference at the end of February, iBuildings was offering a little test, with prize for people that could do well answering the sort of questions that are on the ZCE exam. Never one to turn

Posted in php Tagged with: ,