Wednesday, May 27, 2015

Shaking out dependencies in PHPUnit unit tests

Isolation is a unit test ideal. You should, in theory, be able to run them in a random order, or in parallel, with no effect on the results.  PHPUnit provides no options to do this, but, fortunately, two neat GNU command line utilities can help.

Thursday, May 21, 2015

How software dies

When software reaches its design apex, the passion to develop it wanes and it begins descending through maintenance hell.  What was once state-of-the-art becomes legacy, and once legacy becomes abandonware.  Except for those rare software gems that endure for generations.

Tuesday, May 19, 2015

"Writable" is wrong!

Incorrect and inconsistent spelling makes searching harder:

function initDb() {
    $datbase = PDO::get();
    $datbase->check();
}


If I searched my code base for "database", I'd miss this hit.  That sucks.  Please take the time to correctly spell.  (Corollary: if you misspell, misspell all instances consistently!)

With this in mind, what about "writable" and its variant "writeable"?  While the dictionary says "writable" is correct, I consider that spelling harmful.  Search for "table" and you'll hit "writable", which is undoubtedly a false positive.

Please use the "writeable" variation.