Posted on January 29th, 2007 by headwedge
My preferred design approach for the ‘code-colouriser’ would be for it to filter a PHP script through a suitably trained finite state machine (FSM). After a bit of rummaging in the online PHP manual I was pleased to find that PHP 5 has a rich, if poorly documented, set of stream functions [link] and, [...]
Filed under: code, colouriser, php | No Comments »
Posted on January 25th, 2007 by headwedge
I was a bit glum to see that prettyprinter.de [link] seems to be broken after its css refit with round corners…
PHPDocumentor [link] is okay but a bit, well, on the ‘complete’ side and for quick code samples the css approach is a bit of a faff…
GeShi [link] is good but it does some pretty mad [...]
Filed under: code, colouriser, pie in the sky | No Comments »
Posted on January 25th, 2007 by headwedge
-> ->
This Mac Hack greatly speeds up the Mac Mini OS X experience.
I partitioned the roomy 320Gig Minimax into 2 equal partitions and used the excellent SuperDuper![link] to duplicate over my OS X setup from the Mac Mini’s internal HD. I plan to put M$ XP onto the other partition and Ubuntu onto to the [...]
Filed under: hack, mac | No Comments »
Posted on January 15th, 2007 by headwedge
On Thursday January 11 Slashdot [link] argued over the inherent shoot-yourself in the foot insecurities of PHP when coded by the naive. This reminded me of a previous real life argument and on-line rambling [link]. I have found myself using a number of more secure PHP programming idioms along with PHP’s rag-bag of sanitizing functions [...]
Filed under: code, ramblings | No Comments »
Posted on January 10th, 2007 by headwedge
This simple theme is intended to evoke memories of computing in the 80’s as well as work on those crappy internet explorer browsers.
Many thanks to OLD-COMPUTERS for the images.
Tested on:
Firefox (Mac & PC)
Safari (Mac)
Opera (Mac & PC)
IE 5.2 (Mac)
IE 6 (PC)
IE 7 (PC)
It is interesting to see how slooow IE7 is to rescale the images [...]
Filed under: code, css, wordpress | No Comments »
Posted on January 10th, 2007 by headwedge
Previous musings on the random image class [link] seemed to result in a toss-up between enforcing structure in the image names or structuring the image names in code, but…
The glob() function seems to allow the best of both of these worlds. Given a path and a file name pattern to match it returns an array [...]
Filed under: code, php | No Comments »
Posted on January 4th, 2007 by headwedge
A Finite State Machine [link] is a way of making a decision or modeling behaviour. Although it is a core concept in computer science and in particular the theory of computing, it is probably more widely known from its use in the Quake games [link]. Conceptually it is a bit like a flow chart and [...]
Filed under: code, php | No Comments »
Posted on January 3rd, 2007 by headwedge
Confining class code and associated files to its own directory is a convenient and flexible way of organising your code. Unfortunately maintaining a long list of include files is not.
However, PHP 5 offers the __autoload($class_name) function for you to redefine to automatically load class definition files based upon your path structure [link].
Future test harness examples [...]
Filed under: code, php | No Comments »