<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Pet Pixels - PHP</title>
    <link>http://marcus.bointon.com/</link>
    <description>Skiing, Baking, PHP, Music, in variable order</description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:marcusblog@bointon.com" />
    <generator>Serendipity 1.4.1 - http://www.s9y.org/</generator>
    <pubDate>Tue, 15 Dec 2009 08:21:38 GMT</pubDate>

    <image>
        <url>http://marcus.bointon.com/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Pet Pixels - PHP - Skiing, Baking, PHP, Music, in variable order</title>
        <link>http://marcus.bointon.com/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>MySQL backups with Percona's XtraBackup</title>
    <link>http://marcus.bointon.com/archives/87-MySQL-backups-with-Perconas-XtraBackup.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/87-MySQL-backups-with-Perconas-XtraBackup.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=87</wfw:comment>

    <slash:comments>5</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=87</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    MySQL backup is sometimes very hard to do effectively. MySQL provides &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/backup.html&quot; title=&quot;MySQL backup docs&quot;&gt;various options for backup&lt;/a&gt;, but many of them are simply unsuitable for large systems, particularly if they need to remain active during backups. &lt;a href=&quot;http://www.percona.com/&quot;&gt;Percona&#039;s&lt;/a&gt; &lt;a href=&quot;https://launchpad.net/percona-xtrabackup/&quot;&gt;XtraBackup&lt;/a&gt; is an open-source clone of InnoBase&#039;s &lt;a href=&quot;http://www.innodb.com/products/hot-backup/&quot;&gt;InnoDB Hot Backup&lt;/a&gt; utility. So what makes XtraBackup a better solution, and how does it work?
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; on December 10th 2009, &lt;a href=&quot;http://www.mysqlperformanceblog.com/2009/12/09/xtrabackup-1-0/&quot;&gt;Percona released Xtrabackup 1.0&lt;/a&gt;.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://marcus.bointon.com/archives/87-MySQL-backups-with-Perconas-XtraBackup.html#extended&quot;&gt;Continue reading &quot;MySQL backups with Percona&#039;s XtraBackup&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 11 Sep 2009 12:18:00 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/87-guid.html</guid>
    <category>backup</category>
<category>innodb</category>
<category>mysql</category>
<category>percona</category>
<category>xtrabackup</category>

</item>
<item>
    <title>Google Charts API Simple and Extended Encoders in PHP</title>
    <link>http://marcus.bointon.com/archives/88-Google-Charts-API-Simple-and-Extended-Encoders-in-PHP.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/88-Google-Charts-API-Simple-and-Extended-Encoders-in-PHP.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=88</wfw:comment>

    <slash:comments>5</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=88</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    Google&#039;s charting API has been around for quite a while now, but I&#039;ve only just needed to actually look at it. It became immediately obvious that I needed a PHP encoding function, so off to google I went. Though I found several implementations, they were all incomplete or deficient in one way or another (and it didn&#039;t help that there was an error in google&#039;s extended encoding docs), so I&#039;ve written my own based on several different ones. Both simple and extended encoders support automatic scaling, inflated maximum and lower-bound truncation, so you can pretty much stuff whatever data you like in, with no particular regard for pre-scaling and you&#039;ll get a usable result out. They have an identical interface, so you can use either encoding interchangeably according to the output resolution you need (contrary to popular belief, the encoding to use has very little to do with the range of values you need to graph). By default, the full range of possible values is used as it just seems silly not to. I deliberately omit the &#039;s:&#039; and &#039;e:&#039; prefixes so that you can call these functions for multiple data series, and I include a function that does just that. You still need to generate your own URLs and other formatting, but that&#039;s a different problem. Read on for the code... &lt;br /&gt;&lt;a href=&quot;http://marcus.bointon.com/archives/88-Google-Charts-API-Simple-and-Extended-Encoders-in-PHP.html#extended&quot;&gt;Continue reading &quot;Google Charts API Simple and Extended Encoders in PHP&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 14 Aug 2009 09:34:27 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/88-guid.html</guid>
    <category>api</category>
<category>charts</category>
<category>encoding</category>
<category>google</category>
<category>php</category>

</item>
<item>
    <title>Subversion 1.5 repository upgrade on SourceForge</title>
    <link>http://marcus.bointon.com/archives/85-Subversion-1.5-repository-upgrade-on-SourceForge.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/85-Subversion-1.5-repository-upgrade-on-SourceForge.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=85</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=85</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    I&#039;ve just had a slightly tricky time upgrading a subversion repository on sourceforge. They have recently added support for subversion 1.5 at the server end. 1.5 brings major new features for merging, but as it&#039;s not backward compatible with older subversion clients, the upgrade is not done automatically. SF have also done a major rearrangement of their documentation while transferring everything to Trac, and it&#039;s not always easy to get the right info. Normally to upgrade a subversion repo, you just run the &#039;svnadmin upgrade /path/to/repo&#039;, however, it&#039;s not quite so simple on sourceforge as you don&#039;t have direct access to the repo, and &lt;a href=&quot;http://apps.sourceforge.net/trac/sourceforge/wiki/Subversion%20import%20instructions&quot;&gt;the instructions&lt;/a&gt; they give are &lt;a href=&quot;http://apps.sourceforge.net/trac/sourceforge/ticket/467&quot;&gt;slightly wrong at the time of writing&lt;/a&gt;. You&#039;re likely to get an error like this (it&#039;s not obvious that this is a fatal error) when you reload a dump file:
&lt;blockquote&gt;svnadmin: File already exists: filesystem &#039;/svnroot/projectname/db&#039;, transaction &#039;443-0&#039;, path &#039;tags&#039;
     \* adding path : tags ...&lt;/blockquote&gt;
This is because load is intended to add files to an existing repo, not to replace those that are already there, so you need to wipe the repo and start from scratch.

So, here is a working command sequence that needs to be run from a project login shell on sourceforge (it applies to the project you&#039;re logged in through, substitute your project&#039;s name for projectname):
&lt;blockquote&gt;adminrepo --checkout svn
svnadmin dump /svnroot/projectname &gt; svn.dump
rm -rf /svnroot/projectname/\*
svnadmin create /svnroot/projectname
svnadmin load /svnroot/projectname &lt; svn.dump
adminrepo --save svn&lt;/blockquote&gt;
Yes, you do need to delete the whole thing and re-import it, but it&#039;s quick and easy, and you have a backup in the dump file you take at the start. After the upgrade, make sure you get a new checkout of your project to ensure that you&#039;re using 1.5 all the way through. Now you&#039;ll find that commands like &#039;svn merge --reintegrate&#039; work. 
    </content:encoded>

    <pubDate>Tue, 05 May 2009 11:19:04 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/85-guid.html</guid>
    <category>project</category>
<category>repository</category>
<category>shell</category>
<category>sourceforge</category>
<category>subversion</category>
<category>upgrade</category>

</item>
<item>
    <title>The web developer's holy vhost trinity</title>
    <link>http://marcus.bointon.com/archives/83-The-web-developers-holy-vhost-trinity.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/83-The-web-developers-holy-vhost-trinity.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=83</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=83</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    When you&#039;re developing web stuff, working with projects in path names (i.e. not at the top level of a domain) can be difficult (gets in the way of absolute links, rewrite rules etc), so you often need to set up a local apache virtual host, stick an entry in DNS and create an SSL certificate before you can get on with the serious business of doing some real work. This can get to be a drag when you do it a lot, but there is an extremely elegant solution that means you&#039;ll never have to do it again...
 &lt;br /&gt;&lt;a href=&quot;http://marcus.bointon.com/archives/83-The-web-developers-holy-vhost-trinity.html#extended&quot;&gt;Continue reading &quot;The web developer&#039;s holy vhost trinity&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 20 Mar 2009 12:11:12 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/83-guid.html</guid>
    <category>apache</category>
<category>developer</category>
<category>php</category>
<category>ssl</category>
<category>web</category>
<category>wildcard</category>

</item>
<item>
    <title>Web Hooks, Callbacks and Distributed Observers</title>
    <link>http://marcus.bointon.com/archives/80-Web-Hooks,-Callbacks-and-Distributed-Observers.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/80-Web-Hooks,-Callbacks-and-Distributed-Observers.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=80</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=80</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    Someone at &lt;a href=&quot;http://www.amee.com/&quot;&gt;AMEE&lt;/a&gt; pointed out to me that there&#039;s been a &lt;a href=&quot;http://webhooks.pbwiki.com/&quot;&gt;flurry&lt;/a&gt; of &lt;a href=&quot;http://blog.webhooks.org/&quot;&gt;activity&lt;/a&gt; around so-called &quot;Web Hooks&quot; when I referred to the concept. This is quite heartening as I thought of this a couple of years ago and implemented this in &lt;a href=&quot;https://www.smartmessages.net/&quot;&gt;Smartmessages&lt;/a&gt; early last year! I call them callbacks, but the idea is the same - it&#039;s essentially a distributed observer pattern. I couldn&#039;t figure out why nobody seemed to understand what I was on about... When I get some interesting event (e.g. a message open, mailshot completion, clickthrough etc), I ping a user-supplied URL with the appropriate event data, pretty much the one-liner that Jeff alludes to. The reason we do it is that sync with external systems (usually CRM) is something that were always running into, and there seems to be no sensible, generic way of dealing with it other than this, so I&#039;m surprised it has not been discussed in this context before.
There&#039;s one downside as far as I can see - it is highly dependent on the receiver to be able to handle the event in a timely fashion. This isn&#039;t an issue if you&#039;re connecting say, Yahoo! to Google, but it could be a big problem if you connect Google to your Wordpress blog... My experience of CRM systems is that they are simply too slow to cope with the high rates of traffic that we are likely to generate, for example, if we point a stream of ~200 events per second at a CRM system, it will probably just bog down and fail (I&#039;m thinking of the SalesForce API here which typically takes 1-2 sec to deal with a single SOAP API call). Retrying will only make this worse. I have two solutions for this: limit events to those that don&#039;t happen so often (kind of lame!), or alternatively, use an outbound message queue to rate-limit the sending (&lt;a href=&quot;http://aws.amazon.com/sqs/&quot;&gt;Amazon SQS &lt;/a&gt;and &lt;a href=&quot;http://memcachedb.org/memcacheq/&quot;&gt;Memcacheq&lt;/a&gt; spring to mind). Queueing works, but you lose some of the real-time aspect. Ideally clients would implement their own incoming queue in order to allow them to process events at their leisure, but this is mostly beyond the vast majority of web authors (or at least those that host the CRM systems that we hear from!).
Anyway, it&#039;s nice to know that I&#039;m not completely barking... 
    </content:encoded>

    <pubDate>Wed, 04 Mar 2009 14:44:37 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/80-guid.html</guid>
    <category>callbacks</category>
<category>crm</category>
<category>php</category>
<category>smartmessages</category>
<category>web hooks</category>

</item>
<item>
    <title>PHP London Conference 2009</title>
    <link>http://marcus.bointon.com/archives/79-PHP-London-Conference-2009.html</link>
            <category>PHP</category>
    
    <comments>http://marcus.bointon.com/archives/79-PHP-London-Conference-2009.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=79</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=79</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    From this &lt;a href=&quot;http://www.phpconference.co.uk/&quot;&gt;truly excellent conference&lt;/a&gt;, I took away some good memories, some new ideas and a nasty bout of conference flu. There&#039;s nothing quite like being in close proximity to a few hundred people to really spread things around...
Highlight for me was &lt;a href=&quot;http://aralbalkan.com/&quot;&gt;Aral Balkan&lt;/a&gt;&#039;s keynote. It&#039;s always nice to see someone showing plain enthusiasm, and I couldn&#039;t agree more with him about the &quot;lost magic&quot; of computing. Had a chat with him afterwards about &lt;a href=&quot;http://www.amee.com/&quot;&gt;AMEE&lt;/a&gt; and other things. He also seems to have put together some odd but dull things that I had noticed a need for - EU VAT codings and ISO language references as web services!
I didn&#039;t really enjoy David Soria Parra&#039;s talk on sharding. It all came across as very negative and many of the ways of doing it and coping with the fallout were not really discussed. No mention of &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/partitioning.html&quot;&gt;MySQL 5.1&#039;s partitioning&lt;/a&gt; (which is limited, but is at least a start), or more radical approaches like &lt;a href=&quot;http://www.continuent.com/community/sequoia&quot;&gt;Sequoia&lt;/a&gt;.
David Axmark&#039;s talk on &lt;a href=&quot;https://launchpad.net/drizzle&quot;&gt;Drizzle&lt;/a&gt; was more interesting than I expected, nice to see effort being put into this direction.
Microsoft really does seem to be trying a bit harder these days - their CSS test suite for IE8 is very welcome, and the effort they are putting into PHP, apache and other projects benefits many people. It has to be said that while it&#039;s not a mainstream product, &lt;a href=&quot;http://www.microsoft.com/SURFACE/index.html&quot;&gt;Surface&lt;/a&gt; is really pretty cool to play with.
Chris Shiflett&#039;s talk was excellent too; his demos and examples were particularly good, and entertaining.
The post-conference social was great fun, I met lots of nice new people. After our move to France I suspect it will be harder to get to events like this, so I should make the most of them while I can!
I&#039;ve had several ideas for talks that I&#039;d like to do (I get sick of email sometimes!), so I guess I need to get a bit more proactive on actually submitting them to a call for papers. 
    </content:encoded>

    <pubDate>Mon, 02 Mar 2009 15:58:36 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/79-guid.html</guid>
    <category>aral balkan</category>
<category>conference</category>
<category>mysql</category>
<category>php</category>
<category>phplondon</category>
<category>phpuk2009</category>
<category>sequoia</category>
<category>surface</category>

</item>
<item>
    <title>Scalable irony</title>
    <link>http://marcus.bointon.com/archives/78-Scalable-irony.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/78-Scalable-irony.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=78</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=78</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    &lt;a href=&quot;http://highscalability.com/scaling-digg-and-other-web-applications&quot;&gt;This article&lt;/a&gt; on highscalability.com is a really excellent rundown of some of the options available for scaling a site to the heights of Digg. Ironically enough, at the time of writing the highscalabilitycom web server shows this error:
&lt;blockquote&gt;Unable to connect to database server
The MySQL error was: User highscal_admin already has more than &#039;max_user_connections&#039; active connections. &lt;/blockquote&gt;I can point them at this really good article on how to avoid problems like this... oh, wait... 
    </content:encoded>

    <pubDate>Mon, 02 Mar 2009 15:52:13 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/78-guid.html</guid>
    
</item>
<item>
    <title>Genius on Experts Exchange</title>
    <link>http://marcus.bointon.com/archives/74-Genius-on-Experts-Exchange.html</link>
            <category>PHP</category>
    
    <comments>http://marcus.bointon.com/archives/74-Genius-on-Experts-Exchange.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=74</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=74</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    I finally got my &#039;Genius&#039; rank in PHP on &lt;a href=&quot;http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/&quot;&gt;Experts Exchange&lt;/a&gt; today. It&#039;s taken about 3 years and in that time I&#039;ve answered over 1,000 questions and participated in over 500 others, making about 3,300 posts. I think I&#039;ve helped a lot of people, but I&#039;ve learned a lot too. And I get a free T-shirt. Now why did I choose such a silly user name? 
    </content:encoded>

    <pubDate>Sat, 01 Nov 2008 10:46:00 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/74-guid.html</guid>
    
</item>
<item>
    <title>PHPLondon08 follow-up</title>
    <link>http://marcus.bointon.com/archives/54-PHPLondon08-follow-up.html</link>
            <category>PHP</category>
    
    <comments>http://marcus.bointon.com/archives/54-PHPLondon08-follow-up.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=54</wfw:comment>

    <slash:comments>11</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=54</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    I think it was Juliette that was asking me about spam filtering in PHP. I didn&#039;t think that was such a great idea (spamassassin is slow enough!), however, it seems that &lt;a href=&quot;http://www.thyphp.com/php-spam-detection-project.html&quot;&gt;some&lt;/a&gt; &lt;a href=&quot;http://www.phpclasses.org/browse/package/4401.html&quot;&gt;others&lt;/a&gt; do.

The framework shootout session was very interesting. It was nice to see Toby jumping into CodeIgniter with such ease - it contrasted markedly with my own difficult initiation into CakePHP! There was mention of &lt;a href=&quot;http://kohanaphp.com/home.html&quot;&gt;Kohana&lt;/a&gt; which I&#039;d only seen a couple of weeks previously, but looks pretty good - I had always been put off CI by its support for PHP4, so a PHP5-clean version is very appealing. &lt;a href=&quot;http://thislab.com/2008/02/23/notes-on-choosing-a-php-framework-a-quick-comparison-of-codeigniter-and-kohana/&quot;&gt;This article&lt;/a&gt; spells out the differences.

The shootout was, um, augmented by a heckler who had decided that all frameworks were &quot;criminal&quot; because they didn&#039;t conform to the letter of the &quot;rules of MVC&quot; (though MVC is really a pretty loose term AFAIAC). He wouldn&#039;t name his mystery preferred framework, but I later found out it was &lt;a href=&quot;http://agavi.org/&quot;&gt;Agavi&lt;/a&gt; when I saw it demo&#039;d by its creator. It is indeed very nice, and has distant ancestry in Mojavi (as used by Symfony). One of the things that I was impressed by is that it uses (of all things) HTML for marking up templates. This is an elegant reversal of what I&#039;ve seen before, where form elements are typically generated by helpers (requiring syntax that you don&#039;t know). Why mark up a form input like this (vaguely CakePHP style):

&amp;lt;?php echo $htmlhelper-&amp;gt;textinput(&#039;name&#039;, &#039;name&#039;, 20, 50); ?&amp;gt;

when you could do:

&amp;lt;input type=&quot;text&quot; id=&quot;name&quot; name=&quot;name&quot; size=&quot;20&quot; maxsize=&quot;50&quot; /&amp;gt;

and still get automatic server and client-side validation and ajaxy feedback goodness, but also have it play nicely with HTML editors like Dreamweaver? It also makes for a great deal of sense when generating non-HTML output. I can&#039;t think why other frameworks have not done this before.

Agavi also has very elegant routing so that a single controller function is available across all access methods, whether HTML, JSON, SOAP, XML-RPC or whatever. Makes CakePHP look very dumb.

Anyway, so maybe this heckler had a point of sorts.

I have to say a big thank you for the compliments I&#039;ve received about my talk. Maybe it wasn&#039;t so bad after all! I&#039;ll get on with doing the remaining audio ASAP... 
    </content:encoded>

    <pubDate>Mon, 03 Mar 2008 16:49:28 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/54-guid.html</guid>
    <category>code igniter</category>
<category>frameworks</category>
<category>kohana</category>
<category>php</category>
<category>phplondon08</category>
<category>spam filtering</category>

</item>
<item>
    <title>PHPLondon</title>
    <link>http://marcus.bointon.com/archives/53-PHPLondon.html</link>
            <category>PHP</category>
    
    <comments>http://marcus.bointon.com/archives/53-PHPLondon.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=53</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=53</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    PHPLondon08 was quite a success. I really enjoyed it, met lots of great people.

The talks were generally good (I&#039;ll get to mine!). The only downer I thought was that there was really quite a bit of overlap between Ivo&#039;s intro and Mike &amp;amp; Scott&#039;s one immediately after it, though both were good in their own right (and I liked Ivo&#039;s bricks analogy).

Mine went mostly ok, but I got the timing &lt;em&gt;completely&lt;/em&gt; wrong, spent far too long on the first half, and I&#039;d  not even reached halfway through the second half when I spotted Richard (the room manager) holding up the &quot;1 minute remaining&quot; sign - I&#039;d completely forgotten about time allocated for questions! That said, after being really quite nervous beforehand (which is generally unlike me!), I found it pretty easy once I got going, though taking it too easy is probably what made it take too long. Despite all that, there were plenty of good questions asked (no tumbleweed effect!), and I got some great compliments. Someone even said it had been their best talk of the day, so I must have been doing something right.

The slides are linked below, and I&#039;ll also try to record audio of the bits I didn&#039;t get to, as otherwise my talk&#039;s MP3 will have a rather feeble ending!

A real surprise appeared just before Derick&#039;s excellent keynote - a combination of PHP history and best-practice - three guys from PHP Barcelona invited me to speak at their conference in September! I think it&#039;s kind of provisional, but it was very flattering to be asked!

I mentioned in the talk, and talked to various people, about writing an email book. One point came up that led me to think that there should be a guide for marketers - there simply isn&#039;t any good, accessible information on what&#039;s legal and what&#039;s not, and practical advice about what they should ask of their email service provider in implementing marketing campaigns.

For those who want them, here are PDFs of my talk(s):
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://marcus.bointon.com/uploads/MarcusBointonMailpresentation.pdf&quot; title=&quot;MarcusBointonMailpresentation.pdf&quot; target=&quot;_blank&quot;&gt;Part 1: mail();&lt;/a&gt; (6.8Mb PDF)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://marcus.bointon.com/uploads/MarcusBointonLifeaftermailpresentation.pdf&quot; title=&quot;MarcusBointonLifeaftermailpresentation.pdf&quot; target=&quot;_blank&quot;&gt;Part 2: Life after mail();.pdf&lt;/a&gt; (7.6Mb PDF)&lt;/li&gt;
&lt;/ul&gt;

FYI, I ground to a halt on slide 13 of 28 in the second one. 
    </content:encoded>

    <pubDate>Fri, 29 Feb 2008 23:45:00 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/53-guid.html</guid>
    <category>phplondon08</category>

</item>
<item>
    <title>GraphViz &amp; SVG frustration</title>
    <link>http://marcus.bointon.com/archives/42-GraphViz-SVG-frustration.html</link>
            <category>PHP</category>
    
    <comments>http://marcus.bointon.com/archives/42-GraphViz-SVG-frustration.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=42</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=42</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    I thought I&#039;d do a little warm-up hack for &lt;a href=&quot;http://hackday.org/&quot; &gt;HackDay&lt;/a&gt;, so I wrote a little thing to interrogate the &lt;a href=&quot;http://hackdaylondon07.backnetwork.com/&quot; &gt;backnetwork&lt;/a&gt; API and build a network diagram of all the relations using GraphViz. It started out looking quite promising, but I soon discovered that lots of GraphViz features just don&#039;t work very well (even simple stuff like putting labels in boxes), and also that common SVG implementations suck. Firefox&#039; SVG rendering is just awful - no anti-aliasing, lots of misdrawing, all text defaulting to 18px Courier bold and worse. &lt;a href=&quot;http://nightly.webkit.org/&quot; &gt;WebKit&#039;s nightlies&lt;/a&gt; are in a different league in terms of accuracy and rendering quality, but since &lt;a href=&quot;http://bugs.webkit.org/show_bug.cgi?id=11225&quot; &gt;scrolling is broken&lt;/a&gt;, large diagrams are kind of hard to display. GraphViz&#039;s layout mechanisms are pretty cool (if rather unpredictable), but the errors it makes for labelling stuff just makes it unusable. Its output directly to PNG was worse than the SVG renderings.

This was my first attempt at using both GraphViz and SVG, and I have to say I&#039;m massively underwhelmed. I hope that I&#039;m using a bad version, or there&#039;s some issue with my font configs as it really should be possible to get decent output from what I&#039;ve gathered.

&lt;strong&gt;Update&lt;/strong&gt;
Thanks to Bruno Pedro, I have something to compare against, and now something to point the finger at... It appears that the OSX version of GraphViz from fink is a waste of space, and simply doesn&#039;t support some vital features. Secondly, it&#039;s clear that Mac Firefox&#039; SVG rendering is totally broken, but the windows version works ok (in Parallels). Thanks Bruno! 
    </content:encoded>

    <pubDate>Sun, 10 Jun 2007 22:51:59 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/42-guid.html</guid>
    
</item>
<item>
    <title>Me and Tony, we're like this...</title>
    <link>http://marcus.bointon.com/archives/41-Me-and-Tony,-were-like-this....html</link>
            <category>PHP</category>
    
    <comments>http://marcus.bointon.com/archives/41-Me-and-Tony,-were-like-this....html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=41</wfw:comment>

    <slash:comments>6</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=41</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    I spent most of May building the back-end for &lt;a href=&quot;http://www.global-cool.com/&quot; &gt;Global Cool&#039;s&lt;/a&gt; MyCO&lt;sub&gt;2&lt;/sub&gt; site, and I&#039;ve just seen &lt;a href=&quot;http://www.global-cool.com/cooltube/?play=global_cool_45_sec#&quot; &gt;this little clip&lt;/a&gt; they put up. It&#039;s not every day you get a prime minister directly endorsing your stuff. Good stuff Global Cool! 
    </content:encoded>

    <pubDate>Sun, 10 Jun 2007 22:34:55 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/41-guid.html</guid>
    
</item>
<item>
    <title>CakePHP's invisible query cache</title>
    <link>http://marcus.bointon.com/archives/38-CakePHPs-invisible-query-cache.html</link>
            <category>PHP</category>
    
    <comments>http://marcus.bointon.com/archives/38-CakePHPs-invisible-query-cache.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=38</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=38</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    I just wanted to document something that was driving me nuts in Cake PHP.

I do a simple find on a model:

&lt;code&gt;$thing = $this-&gt;Model-&gt;find(array(&#039;id&#039; =&gt; 123), NULL, NULL, 1);&lt;/code&gt;

Then later on, I make the same query again. Only the first query appears in the SQL debug output. Why call it again? Well, I&#039;ve made some manual queries in between the calls using SQL that is inconvenient to emulate in Cake functions, in particular INSERT IGNORE. It turns out that Cake has a largely undocumented query cache, but Cake has no idea that its cache is dirty because of the manual queries. The _clearCache function is not yet implemented for the query cache, so the only choice is to disable it before the first query, and you can do that during a single instantiation by saying:

&lt;code&gt;$this-&gt;Model-&gt;cacheQueries = false;&lt;/code&gt;

Note that the query has 1 level of recursion, which means that all the sub-queries are also cached. Setting cacheQueries to false on this one model means that all queries through it don&#039;t get cached, including those that may be in other models via relationships. 
    </content:encoded>

    <pubDate>Wed, 23 May 2007 01:46:13 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/38-guid.html</guid>
    
</item>
<item>
    <title>CakePHP hasManyAndBelongsTo relationship limitations</title>
    <link>http://marcus.bointon.com/archives/36-CakePHP-hasManyAndBelongsTo-relationship-limitations.html</link>
            <category>PHP</category>
    
    <comments>http://marcus.bointon.com/archives/36-CakePHP-hasManyAndBelongsTo-relationship-limitations.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=36</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=36</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    Cake has some nice support for modeling many to many relations using &#039;hasManyAndBelongsTo&#039;. There&#039;s a simple example &lt;a href=&quot;http://edivad.wordpress.com/2007/04/19/cakephp-hasandbelongstomany-habtm/&quot; &gt;here&lt;/a&gt;.
Though this works well for simple connections between classes, you can&#039;t do much else. Taking the classic Blog-style Posts and Tags example, this approach will easily let you link multiple tags to multiple posts. But what if you want to track the date that a tag was applied to a post? If you add a date field to the join table, it seems pretty much impossible to retrieve it, and setting it is even harder. You can search on it by twiddling with the conditions on the relation, but that&#039;s ugly. I think in that case, you have no option but to model the relation explicitly with two pairs of hasMany/belongsTo relations linked through a PostTag model, and then you&#039;ll have to set your recursion deeper and get busy with unbindmodel in order to keep the number of queries down. Who knows, I might even write up an example and post it here... 
    </content:encoded>

    <pubDate>Mon, 14 May 2007 02:58:53 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/36-guid.html</guid>
    
</item>
<item>
    <title>PHP London Take 4</title>
    <link>http://marcus.bointon.com/archives/35-PHP-London-Take-4.html</link>
            <category>PHP</category>
    
    <comments>http://marcus.bointon.com/archives/35-PHP-London-Take-4.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=35</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=35</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    A simplified London shape (Based on Sadiq&#039;s) with an exaggerated river:&lt;br /&gt;
&lt;!-- s9ymdb:9 --&gt;&lt;img width=&#039;407&#039; height=&#039;186&#039; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://marcus.bointon.com/uploads/PHP-London-Logo-3.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
It&#039;d difficult to place the text without interference with the river, so I thought I&#039;d try it offset. 
    </content:encoded>

    <pubDate>Sat, 12 May 2007 01:41:47 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/35-guid.html</guid>
    
</item>

</channel>
</rss>