<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>David Otton</title>
	<atom:link href="http://www.otton.org/feed" rel="self" type="application/rss+xml" />
	<link>http://www.otton.org</link>
	<description>Look! Bunnies!</description>
	<pubDate>Fri, 05 Jun 2009 12:03:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Supid PHP Tricks: Broken Switch</title>
		<link>http://www.otton.org/2009/06/05/supid-php-tricks-broken-switch/</link>
		<comments>http://www.otton.org/2009/06/05/supid-php-tricks-broken-switch/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 12:03:46 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[PHP Tricks]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.otton.org/?p=388</guid>
		<description><![CDATA[A fragment of PHP that really shouldn&#8217;t work. I hope nobody ever finds a use for this:

switch&#40;$n&#41;
&#123;
    case 1;
        echo 'one';
        break;
    case 2;
        echo 'two';
   [...]]]></description>
			<content:encoded><![CDATA[<p>A fragment of PHP that really shouldn&#8217;t work. I hope nobody ever finds a use for this:</p>
<p><code>
<pre><span style="color: #b1b100;">switch</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$n</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">1</span>;
        <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'one'</span>;
        <span style="color: #b1b100;">break</span>;
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">2</span>;
        <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'two'</span>;
        <span style="color: #b1b100;">break</span>;
    <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">3</span>;
        <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'three'</span>;
        <span style="color: #b1b100;">break</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2009/06/05/supid-php-tricks-broken-switch/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Seen on the PHP General Mailing List</title>
		<link>http://www.otton.org/2009/06/04/seen-on-the-php-general-mailing-list/</link>
		<comments>http://www.otton.org/2009/06/04/seen-on-the-php-general-mailing-list/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 16:48:22 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://www.otton.org/?p=386</guid>
		<description><![CDATA[
Hi
Can anyone help me handel this URL injection ?
https://www.xxx.co.uk/register.php"&#124; grep "123"
I want to detect it and header back to my index page.
It's quite urgent
Thanks for help

Heh. Poor guy.
]]></description>
			<content:encoded><![CDATA[<blockquote>
<pre>Hi</pre>
<pre>Can anyone help me handel this URL injection ?</pre>
<pre>https://www.xxx.co.uk/register.php"| grep "123"</pre>
<pre>I want to detect it and header back to my index page.</pre>
<pre>It's quite urgent</pre>
<pre>Thanks for help</pre>
</blockquote>
<p>Heh. Poor guy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2009/06/04/seen-on-the-php-general-mailing-list/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Small Privacy Bug in Google Maps</title>
		<link>http://www.otton.org/2009/04/22/google-maps-privacy-bug/</link>
		<comments>http://www.otton.org/2009/04/22/google-maps-privacy-bug/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 23:25:35 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[personal]]></category>

		<category><![CDATA[bug]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[privacy]]></category>

		<guid isPermaLink="false">http://www.otton.org/?p=379</guid>
		<description><![CDATA[I was poking around in Google Maps tonight, and discovered that the &#8220;Link&#8221; button contains a reference to the last map you looked at, as well as the current one.
Steps to replicate:
Go to http://maps.google.co.uk/ and search for &#8220;Birmingham&#8221;
Now search for &#8220;London&#8221;
Click &#8220;Link&#8221;. The link should look something like this:
http://maps.google.co.uk/maps?f=q&#38;source=s_q&#38;hl=en&#38;geocode=&#38;q=London&#38;sll=52.487798,-1.893768&#38;sspn=0.262996,0.617981&#38;ie=UTF8&#38;ll=51.510452,-0.126343&#38;spn=0.537601,1.235962&#38;z=10&#38;iwloc=A
If you snip out the sll attribute [...]]]></description>
			<content:encoded><![CDATA[<p>I was poking around in Google Maps tonight, and discovered that the &#8220;Link&#8221; button contains a reference to the last map you looked at, as well as the current one.</p>
<p>Steps to replicate:</p>
<p>Go to <a href="http://maps.google.co.uk/">http://maps.google.co.uk/</a> and search for &#8220;Birmingham&#8221;</p>
<p>Now search for &#8220;London&#8221;</p>
<p>Click &#8220;Link&#8221;. The link should look something like this:</p>
<p><a href="http://maps.google.co.uk/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=London&amp;sll=52.487798,-1.893768&amp;sspn=0.262996,0.617981&amp;ie=UTF8&amp;ll=51.510452,-0.126343&amp;spn=0.537601,1.235962&amp;z=10&amp;iwloc=A">http://maps.google.co.uk/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=London&amp;sll=52.487798,-1.893768&amp;sspn=0.262996,0.617981&amp;ie=UTF8&amp;ll=51.510452,-0.126343&amp;spn=0.537601,1.235962&amp;z=10&amp;iwloc=A</a></p>
<p>If you snip out the sll attribute (52.487798,-1.893768) and feed it back into Maps, you&#8217;ll find it&#8217;s the lat/long for Birmingham, not London. I think it&#8217;s intentional, because the ll attribute points to London. I can&#8217;t see any obvious use for the sll attribute, though - there doesn&#8217;t appear to be a back button or history tool on the target page.</p>
<p>Not a big deal, but it could conceivably be an embarrassment to someone, some day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2009/04/22/google-maps-privacy-bug/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I Learn Something New Every Day - isset()</title>
		<link>http://www.otton.org/2009/04/16/i-learn-something-new-every-day-isset/</link>
		<comments>http://www.otton.org/2009/04/16/i-learn-something-new-every-day-isset/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 12:10:30 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[PHP Tricks]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.otton.org/?p=377</guid>
		<description><![CDATA[Check this out:

if &#40;isset&#40;$a, $b, $c&#41;&#41;
&#123;
    unset&#40;$a, $b, $c&#41;;
&#125;

Mulitple arguments. Looks like they&#8217;ve been there since an early PHP4 release, at least. Why does nobody tell me these things?
]]></description>
			<content:encoded><![CDATA[<p>Check this out:<br />
<code>
<pre><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #000066;">isset</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a</span>, <span style="color: #0000ff;">$b</span>, <span style="color: #0000ff;">$c</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    <a href="http://www.php.net/unset"><span style="color: #000066;">unset</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a</span>, <span style="color: #0000ff;">$b</span>, <span style="color: #0000ff;">$c</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p></code></p>
<p>Mulitple arguments. Looks like they&#8217;ve been there since an early PHP4 release, at least. Why does nobody tell me these things?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2009/04/16/i-learn-something-new-every-day-isset/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Script to make relative includes absolute, for the benefit of APC</title>
		<link>http://www.otton.org/2009/04/06/script-to-make-relative-includes-absolute-for-the-benefit-of-apc/</link>
		<comments>http://www.otton.org/2009/04/06/script-to-make-relative-includes-absolute-for-the-benefit-of-apc/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 17:16:29 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<category><![CDATA[build process]]></category>

		<category><![CDATA[include_once]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[require_once]]></category>

		<guid isPermaLink="false">http://www.otton.org/?p=371</guid>
		<description><![CDATA[The problem:
If you include() or require() files with relative paths, APC will search the include_path on every request, and you won&#8217;t gain the full benefit of turning apc.stat off.
Using absolute paths portably in your own code is easy - just use a constant, eg. &#8220;require APP_PATH . &#8216;file.php&#8217;;&#8221;. External libraries, however, are harder to deal [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The problem:</strong></p>
<p>If you include() or require() files with relative paths, <a href="http://pecl.php.net/package/APC">APC</a> will search the include_path on every request, and you won&#8217;t gain the full benefit of turning apc.stat off.</p>
<p>Using absolute paths portably in your own code is easy - just use a constant, eg. &#8220;require APP_PATH . &#8216;file.php&#8217;;&#8221;. External libraries, however, are harder to deal with - you either accept the performance hit, or go through them adding constants by hand (and merging your changes every time there&#8217;s a new release).</p>
<p><strong>The solution:</strong></p>
<p><a href="http://www.otton.org/uploads/Absolute/absolute.rar">This script</a> rewrites PHP scripts, turning relative paths into absolute paths, allowing you to deploy third party libraries within your build process and still take full advantage of APC.</p>
<p><strong>Some caveats:</strong></p>
<p>It reads from stdin and writes to stdout.</p>
<p>It relies on it&#8217;s own include_path; in the real world, you&#8217;ll probably want to pass that in on the command line.</p>
<p>It only deals with the most common subset of include statements (variations on T_INCLUDE, T_CONSTANT_ENCAPSED_STRING, T_SEMICOLON).</p>
<p>The Windows support is a bit wing-and-a-prayer.</p>
<p>It&#8217;s memory-greedy when dealing with very large files.</p>
<p>It doesn&#8217;t play 100% nicely with safe_mode_include_dir.</p>
<p>Thrown out there in the hope it will be useful to someone. I&#8217;d be delighted to accept any feedback or additions anyone wants to offer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2009/04/06/script-to-make-relative-includes-absolute-for-the-benefit-of-apc/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Job Opportunity - Junior Pythonista</title>
		<link>http://www.otton.org/2009/04/05/job-opportunity-junior-pythonista/</link>
		<comments>http://www.otton.org/2009/04/05/job-opportunity-junior-pythonista/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 22:13:11 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[links]]></category>

		<category><![CDATA[jobs]]></category>

		<guid isPermaLink="false">http://www.otton.org/?p=369</guid>
		<description><![CDATA[Mauve Internet over in Chichester is growing, and is looking for a Junior Python Developer. If you know anyone who might be interested, please forward the link to them.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mauveinternet.co.uk/">Mauve Internet</a> over in Chichester is growing, and is looking for a <a href="http://www.mauveinternet.co.uk/jobs">Junior Python Developer</a>. If you know anyone who might be interested, please forward the link to them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2009/04/05/job-opportunity-junior-pythonista/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quick Link</title>
		<link>http://www.otton.org/2009/02/19/quick-link-2/</link>
		<comments>http://www.otton.org/2009/02/19/quick-link-2/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 12:09:15 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://www.otton.org/?p=365</guid>
		<description><![CDATA[Matt Jones on the advantages of &#8220;Good Enough&#8221; in location-based services. (via)
I think lifestreaming might have something to learn from this approach.
]]></description>
			<content:encoded><![CDATA[<p>Matt Jones on the advantages of <a href="http://magicalnihilism.wordpress.com/2009/02/18/exporting-the-past-into-the-future-or-the-possibility-jelly-lives-on-the-hypersurface-of-the-present/">&#8220;Good Enough&#8221;</a> in location-based services. <small>(<a href="http://radar.oreilly.com/2009/02/four-short-links-18-feb-2009.html">via</a>)</small></p>
<p>I think lifestreaming might have something to learn from this approach.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2009/02/19/quick-link-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wreck of HMS Victory discovered&#8230; wait, what?</title>
		<link>http://www.otton.org/2009/02/02/wreck-of-hms-victory-discovered-wait-what/</link>
		<comments>http://www.otton.org/2009/02/02/wreck-of-hms-victory-discovered-wait-what/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 11:59:29 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[links]]></category>

		<category><![CDATA[history]]></category>

		<guid isPermaLink="false">http://www.otton.org/?p=358</guid>
		<description><![CDATA[Discovery, BBC, Guardian, Discovery Again, Wikipedia, Independent
]]></description>
			<content:encoded><![CDATA[<p><a href="http://dsc.discovery.com/news/2009/02/01/victory-wreck-treasure.html">Discovery</a>, <a href="http://news.bbc.co.uk/1/hi/world/europe/7863840.stm">BBC</a>, <a href="http://www.guardian.co.uk/artanddesign/2009/feb/01/hms-victory-wreck">Guardian</a>, <a href="http://dsc.discovery.com/news/2009/02/02/victory-treasure-quest.html">Discovery Again</a>, <a href="http://en.wikipedia.org/wiki/HMS_Victory_(1737)">Wikipedia</a>, <a href="http://www.independent.co.uk/news/uk/home-news/intrepid-treasurehunters-ndash-or-archaeological-vandals-1543642.html">Independent</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2009/02/02/wreck-of-hms-victory-discovered-wait-what/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Processing Blobs</title>
		<link>http://www.otton.org/2008/12/14/processing-blobs/</link>
		<comments>http://www.otton.org/2008/12/14/processing-blobs/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 21:02:03 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://www.otton.org/?p=353</guid>
		<description><![CDATA[As Processing recently hit 1.0 I thought I&#8217;d take a quick look. It seems to work on the same principle as a unit test suite or a web framework - you develop &#8220;inside&#8221; the library, so it can abstract all that Java complexity away from you. Fill out setup() and draw() methods, press a button [...]]]></description>
			<content:encoded><![CDATA[<p>As Processing recently hit 1.0 I thought I&#8217;d take a quick look. It seems to work on the same principle as a unit test suite or a web framework - you develop &#8220;inside&#8221; the library, so it can abstract all that Java complexity away from you. Fill out setup() and draw() methods, press a button to run, press a button to export as an applet. Embedding the applet in Wordpress is actually a lot more frustrating than writing the damn thing (Solution: I resorted to an iframe. I don&#8217;t really want to waste time because Wordpress is being &#8220;smart&#8221;).</p>
<p>Processing is an awful lot of fun. It evokes a feeling of exploration that I haven&#8217;t had since the BBC Basic days - experimenting with maths, mapping it to a plane, just to see what it looks like.</p>
<p>I doubt anyone reading this via RSS will be able to see the applet, but you&#8217;re only missing lens-flare-esque coloured blobs. Click and hold to draw. Right-click to clear.</p>
<p><iframe src="http://www.otton.org/uploads/TransE/index.html" width="640" height="485" frameborder="0"></iframe></p>
<p>Source code: <a href="http://www.otton.org/uploads/TransE/TransparentEllipses.pde">TransparentEllipses</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2008/12/14/processing-blobs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Anthropodermic Bibliopegy</title>
		<link>http://www.otton.org/2008/11/28/anthropodermic-bibliopegy/</link>
		<comments>http://www.otton.org/2008/11/28/anthropodermic-bibliopegy/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 02:16:36 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[personal]]></category>

		<category><![CDATA[bookbinding]]></category>

		<category><![CDATA[books]]></category>

		<guid isPermaLink="false">http://www.otton.org/?p=347</guid>
		<description><![CDATA[I&#8217;ve had a search running on abebooks for well over a year for the word &#8220;anthropodermic&#8221;.
Yesterday, I finally got a hit from a book dealer in Texas. The book is from the library of Joseph Sadony, a 20th century mystic, and was presented to him by Fernand Angel.
&#8220;Aurora Alegre del dichoso dia de la Gracia [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a search running on <a href="http://www.abebooks.co.uk/">abebooks</a> for well over a year for the word &#8220;anthropodermic&#8221;.</p>
<p>Yesterday, I finally got a hit from a book dealer in Texas. <a href="http://www.abebooks.co.uk/servlet/ListingDetails?bi=1233369269&#038;cm_ven=nl&#038;cm_cat=trg&#038;cm_pla=want&#038;cm_ite=viewbook">The book</a> is from the library of Joseph Sadony, a 20th century mystic, and was presented to him by <a href="http://fr.wikipedia.org/wiki/Fernand_Angel">Fernand Angel</a>.</p>
<p>&#8220;<em>Aurora Alegre del dichoso dia de la Gracia Maria Santissima Digna Madre de Dios</em>, Francisco Antonio de Vereo, 1727&#8243;.</p>
<p><a href="http://en.wikipedia.org/wiki/Anthropodermic_bibliopegy">Anthropodermic bibliopegy</a> is the practice of binding books in human skin. Yours for just US$16,895.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2008/11/28/anthropodermic-bibliopegy/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
