Harry's articles

  1. Pick your fonts

    When viewing your source code, can you tell the difference between zero and an upper case O? What about an upper case i and a lower case l? If not, try ProFont, available on Mac, Linux and Windows and designed for programming, as explained here.

  2. Refactoring in Progress

    Currently refactoring WACT’s template parser, the SourceFileParser. Refactoring began with Revision 1.39. The SourceFileParser the effectively the center of WACT’s template engine, so not screwing up is kinda important. This main issue, as you can see with Revision 1.38, is the parse() method which is a giant loop, handling all XML events (currently we’re using […]

  3. SimpleTest 1.0beta4 Released

    Simple Test hit the final milestone before a stable release today (well last night I think). The release file is up on Sourceforge. Simple Test is the unit test framework for PHP. Not only is it packing essential features, like mock objects, that you probably won’t find elsewhere but the documentation is excellent, both on […]

  4. Is configuration with arrays a bad smell?

    Something I see fairly often in PHP, where OOP / classes are concerned; $options = array ( ‘name’ => ‘Harry Fuecks’, ‘favoritecolors’ => array (‘red’,’green’,’blue’), ‘favoritefoods’ => array ( ‘breakfast’ => ‘English Breakfast’, ‘lunch’ => ‘Steak and chips’, ‘dinner’ => ‘Tandori Chicken’, ), ‘etcetc’ => ‘aarrrgh!’ ); $person = new Person($options); In other words a […]

  5. A pat on the head

    Just thought I’d highlight the great work being done by the guys at PHP Application Tools. Not only have they been helping out PHP developers for ages now with their various pat* projects (probably patTemplate is the most reknowned) but they also maintain no less than 8 PEAR packages (been finding XML_Serializer very useful recently). […]

  6. Perl, PHP and Sour Grapes?

    Search CPAN (Perls repository of re-usable modules) for “PHP” and you might be surprised by the results. For example PHP::Strings. What’s interesting about this module is it partly implements PHP’s string functions in Perl, or tells you where to look for more info. The following code, for example; #!/usr/local/bin/perl -w use strict; use PHP::Strings qw( […]

  7. Generating XUL with PHP

    Couple of interesting PHP / XUL projects I ran into recently, experimenting with XUL generation from PHP. First there’s a PEAR package going through the process of approval (here): PEAR::XML_XUL. This provides a DOM-like PHP API for generating XUL. Not sure how much mileage there is in that approach through; will it add much value […]

  8. The PHP Anthology Volume 2, Chapter 5 – Caching

    HTML is fastest! So says Harry, as he shows how you can take advantage of caching on both the client and server sides to reduce bandwidth usage and dramatically improve performance in this, the final in his PHP Anthology series.

  9. HTTP Digest Implementation in PHP

    While following leads from Zend’s weekly summary, ran in Thomas Pike’s HTTP Digest Class: http://www.xiven.com/sourcecode/digestauthentication – a pure PHP implementation which relies on getallheaders() (i.e. requires Apache as well). Thomas introduces it here on his blog. PHP comes with built in support for HTTP basic authentication but the problem there is, unless you’re using SSL […]

  10. PHP Coding Standards – do you care?

    Over at WACT the question of coding standards has raised it’s (ugly?) head. There’s now this page on the WIKI linking to more or less every PHP coding standards document that’s ever made it’s way online (feel free to add more). By “coding standards” we’re talking whether you use tabs or spaces for indention, whether […]