Browse by Month RSS Feed
  • September 2010
  • August 2010
  • July 2010
  • May 2010
  • April 2010
  • March 2010

  • Ajaxian PostsFebruary 26, 2009
    Filed under: Tech News @ 2:25 pm

    Two nice things posted on Ajaxian today:

    JSONView: JSON browser from within Firefox

    Appcelerator Titanium – an open source alternative to Adobe AIR. ’bout time.

    Comments (0)


    Multi-threaded PHP HackFebruary 25, 2009
    Filed under: Code, Life @ 2:18 pm

    Just came across this today. It’s rather a fun hack to simulate multi-threaded behaviour with PHP – it certainly solved my problem, but as with most hacks, I find myself grimacing a lot during implementation. It’s very simple: in your webpage generate HTML for any number of images that link to each script you need to run in its own thread, passing whatever info is needed via the query string.

    <img height=”0″ width=”0″ border=”0″ src=”process.php?whatever=1&something=2″ />
    <img height=”0″ width=”0″ border=”0″ src=”process.php?whatever=3&something=4″ />
    <img height=”0″ width=”0″ border=”0″ src=”process.php?whatever=5&something=6″ />

    Neat.

    Comments (0)


    My first php.net bugFebruary 20, 2009
    Filed under: Life @ 12:36 am

    With the Form Tools 2 public beta release day looming, one of the private Beta testers sent me his FTP so I could debug a (very serious!) problem directly on his server. The result was unexpected – give it a read:
    http://bugs.php.net/bug.php?id=47459

    I’m so totally stumped I don’t even know how to continue debugging. Out of desperation I wrote up the bug on php.net – my first bug report.

    Hopefully I’m just doing something dumb, but I’m damned if I can see it. Hopefully some helpful soul will know where the problem lies.

    [EDIT] What a let down. Turns out his server is just being weird: not even basic echo statements aren’t working. Quel dommage.

    Comments (0)


    I want a holiday.February 18, 2009
    Filed under: Life @ 6:54 pm

    I want a holiday. That’s all.

    Comments (0)


    Nitobi Hack DayFebruary 8, 2009
    Filed under: Life @ 11:32 pm

    Nitobi hosted another Hack Day this weekend, giving me another opportunity to eat their food, drink their beer and generally mooch around their office. Nice.

    There were lots of neat things being worked on. One, a pared-down jQuery script called XUI written for iPhones was particular interesting, as was a Flash app (or component?) for handling information loading for image sets – showing better clarity for the images when zooming in. Hard to explain, but easy if you could see the demo.

    I decided to spend the day making a couple of updates my data generator script (see generatedata.com). I actually had a long list of features I wanted to add, but around 2pm someone brought beer and, mysteriously, my productivity kinda went south.

    But what I *did* add was pretty cool (I think!). First, I upgraded the “Date” data type to use the Nitobi Complete UI calendar component, which is about a thousand times better than the one currently being used. Secondly, I modified the code for a simple plugin architecture. So, with the next release of the code (2.2), programmers will be able to write their own plugins to add new data types, letting them generate whatever custom info they want.

    As an illustration, I wrote a plugin that pulled random images from a Flickr public RSS feed based on a search string and either displayed the image (for the HTML result type), or stored the URL (for the other types). I originally worked on a “Fractions” plugin that would generate fractions with certain denominators and numerators, but dumped it because images will always be cooler than fractions – especially if the search string you use is “boobs”.

    The code design is actually very simple. A /plugins folder stores all plugins, and each plugin folder name acts as the namespace for both PHP and JS functions. At certain spots in the code – like page load and during generation time – the core code checks for the existence of those function names and executes them if they exist. Plugin developers may choose to write functions for particular events, but only if they need to. For example, for my Flickr plugin I wanted a “search string” option to appear when the user selected the data type from the “Data Type” column. So in my code, I just needed to add:

    var plugin_flickr = {};
    plugin_flickr.select = function(row) { } // executed when the plugin data type is selected by the user

    And that’s pretty much it. The core code passes the row number to the function, which the plugin developer can use to identify the various elements in the row, letting them do whatever the heck they want.

    Anyway, I’ll document all this when I can find some time to polish it up and release the sucker. Documentation will probably take longer than writing it, so give me some time…
    A good day.

    Comments (0)


    Filed under: Freelance, Life @ 3:30 pm

    This was a little site I wrote last year for my girlfriend’s Veterinary clinic which today, finally, finally went live. We’re a terrible bunch of procrastinators at heart. I’d almost totally forgotten about the site!
    http://wbvc.bc.ca/

    It’s uses a simple CSS-based layout with a jQuery-driven accordion menu nav. Wordpress is used as the CMS.

    Comments (1)