- apache
- api
- beelzebub
- benchmarking
- captcha
- crosswords
- developers
- dom
- domdocument
- dtd
- fifteensquared
- fireeagle
- lamp
- m255
- maths
- mobile
- mobileweb
- mono
- ms221
- mst121
- openuniversity
- overtheair
- overtheair08
- php
- phparchitect
- playphone
- python
- recaptcha
- recruitment
- rest
- slideshare
- softwarearchitecture
- spam
- subversion
- sucks
- svn
- talks
- ted
- testing
- tutorial
- versioncontrol
- wurfl
- xml
- yammer
- zendframework
- zendplatform
Test-infected? Kind of
I've been spending increasing amounts of time recently getting to grips with Unit Testing and the Test-Driven "way". It can be hugely satisfying, but more often than not I'm finding it painfully frustrating. Don't get me wrong, I know it's the right way to go about things, I don't need any convincing. I did some growing up in public thanks to the lovely Advanced-PHP folks at Sitepoint, but I'm not there yet.
The best fully Test-Driven code I've managed so far is PHPTuring, and I'm trying to rewrite Briolette using TDD, but it's slow going. (If anyone of any talent is interested in helping develop a TDD MVC framework in PHP5, I'd be interested to hear from you).
Still, you can't beat that glow you get when you tame a nasty old piece of code with a couple of Unit Tests. Today with the help of Marcus Baker's excellent SimpleTest we did exactly that, and replaced about 40 lines of mission-critical cruft with a single regex. The confidence to do that simply wouldn't have been there were it not for the Tests.
HOWTO: Install PHP5 on Linux
I did this on a IBM box running Red Hat Linux, I'm not sure which version. It basically went like a dream, and maybe took an hour or so. This is to compile PHP5 as an Apache module, a way I choose as it makes subsequent PHP upgrades simpler. Everything was installed under /usr/local, for what it's worth.
Read more »