<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>TK Studios Blog</title>
	
	<link>http://www.tkstudios.com</link>
	<description>Thoughts on design, development, and marketing.</description>
	<lastBuildDate>Mon, 20 Jun 2011 16:07:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TKStudios" /><feedburner:info uri="tkstudios" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>TKStudios</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Disable WP’s Automatic Paragraphs</title>
		<link>http://feedproxy.google.com/~r/TKStudios/~3/7uHhWG34_bc/</link>
		<comments>http://www.tkstudios.com/2011/06/20/disable-wps-automatic-paragraphs/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 16:07:28 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.tkstudios.com/?p=266</guid>
		<description><![CDATA[A quick hack to disable the wpautop() function&#8217;s tendency to mangle your WordPress-based HTML posts with extra markup: Add the following to your functions.php: function custom_autop($p, $br = 1) { if (stristr($p, '&#60;!--noautop--&#62;')) { return str_ireplace('&#60;!--noautop--&#62;', '', $p); } else {     return wpautop($p, $br);   } } remove_filter('the_content','wpautop'); add_filter('the_content','custom_autop'); That&#8217;s it. Now when [...]]]></description>
			<content:encoded><![CDATA[<p>A quick hack to disable the <strong>wpautop()</strong> function&#8217;s tendency to mangle your WordPress-based HTML posts with extra markup:</p>
<p>Add the following to your <strong>functions.php</strong>:</p>
<pre>function custom_autop($p, $br = 1) {
  if (stristr($p, '&lt;!--noautop--&gt;')) {
    return str_ireplace('&lt;!--noautop--&gt;', '', $p);
  } else {
    return wpautop($p, $br);
  }
}
remove_filter('the_content','wpautop');
add_filter('the_content','custom_autop');</pre>
<p>That&#8217;s it. Now when you add <strong>&lt;!&#8211;noautop&#8211;&gt; </strong>to a post, it&#8217;ll disable the wpautop() function.</p>
<p>Incidentally, wpautop has a parameter called &#8220;$pee&#8221; and a loop that reads &#8220;foreach( $pees as $tinkle )&#8221; &#8230;</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Disable+WP%E2%80%99s+Automatic+Paragraphs+http%3A%2F%2Fis.gd%2FtHw2Me+%28%40tkstudios%29" title="Post to Twitter"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Disable+WP%E2%80%99s+Automatic+Paragraphs+http%3A%2F%2Fis.gd%2FtHw2Me+%28%40tkstudios%29" title="Post to Twitter">Tweet This Post</a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2011/06/20/disable-wps-automatic-paragraphs/&amp;title=Disable+WP%E2%80%99s+Automatic+Paragraphs" title="Post to Digg"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2011/06/20/disable-wps-automatic-paragraphs/&amp;title=Disable+WP%E2%80%99s+Automatic+Paragraphs" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2011/06/20/disable-wps-automatic-paragraphs/&amp;title=Disable+WP%E2%80%99s+Automatic+Paragraphs" title="Post to Reddit"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2011/06/20/disable-wps-automatic-paragraphs/&amp;title=Disable+WP%E2%80%99s+Automatic+Paragraphs" title="Post to Reddit">Post to Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2011/06/20/disable-wps-automatic-paragraphs/&amp;title=Disable+WP%E2%80%99s+Automatic+Paragraphs" title="Post to StumbleUpon"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/su/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2011/06/20/disable-wps-automatic-paragraphs/&amp;title=Disable+WP%E2%80%99s+Automatic+Paragraphs" title="Post to StumbleUpon">Stumble This Post</a></p></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TKStudios?a=7uHhWG34_bc:aUsuz9YSIrQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=7uHhWG34_bc:aUsuz9YSIrQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=7uHhWG34_bc:aUsuz9YSIrQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=7uHhWG34_bc:aUsuz9YSIrQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=7uHhWG34_bc:aUsuz9YSIrQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=7uHhWG34_bc:aUsuz9YSIrQ:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TKStudios/~4/7uHhWG34_bc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tkstudios.com/2011/06/20/disable-wps-automatic-paragraphs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tkstudios.com/2011/06/20/disable-wps-automatic-paragraphs/</feedburner:origLink></item>
		<item>
		<title>Quick JS experiment: Function Overhead</title>
		<link>http://feedproxy.google.com/~r/TKStudios/~3/BDFCh2_5mgA/</link>
		<comments>http://www.tkstudios.com/2010/11/03/quick-js-experiment-function-overhead/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 17:27:44 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[FOR SCIENCE]]></category>
		<category><![CDATA[micro-optimization]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://www.tkstudios.com/?p=241</guid>
		<description><![CDATA[Probably common knowledge, but I just slapped together a quick test script to determine what kind of overhead there is between a) writing a function inline, b) keeping the function as part of an object (say, utility.isObject), and c) same as b, but get a reference to the function first. Each approach was iterated a [...]]]></description>
			<content:encoded><![CDATA[<p>Probably common knowledge, but I just slapped together a quick test script to determine what kind of overhead there is between a) writing a function inline, b) keeping the function as part of an object (say, utility.isObject), and c) same as b, but get a reference to the function first. Each approach was iterated a total of <em>100,000,000 times</em> to get usable time values. Tests were performed in Chrome 7, so YMMV. <span id="more-241"></span></p>
<p><strong>Results:</strong></p>
<p><strong>A:</strong> typeof obj == &#8220;object&#8221; : <strong>439 msec</strong><br />
<strong>B:</strong> util.isObj(obj) : <strong>1228 msec</strong> <em>(where util = { isObj : function(o) { return typeof o == &#8220;object&#8221;; } }) </em><br />
<strong>C:</strong> isObj(obj) : <strong>1155 msec</strong> <em>(where B and isObj = util.isObj)</em></p>
<p><strong>Conclusions: </strong></p>
<p>First, remember that these are looping over <strong>100 million</strong> iterations. This kind of research might be useful for a worker thread, but it&#8217;s not terribly useful for day to day stuff.</p>
<p>The big conclusion here is if you&#8217;re only going to call a function from one or two places, or it&#8217;s very short, skipping the function and putting the code inline will save you about 60%, but it&#8217;s really only significant if you&#8217;re calling that function millions of times.</p>
<p>The second conclusion is that if you must use a function for something like this (millions of calls), you can save a tiny bit—almost completely insignificant—of time by getting a reference to that function. Keep in mind that this micro-optimization<em> only works if the function you&#8217;re calling doesn&#8217;t require context</em>. If you have to use the <em>.call</em> or <em>.apply</em> methods to add context, this approach is actually about <strong>17x slower</strong>.</p>
<p>Actual testing code at <a href="http://jsfiddle.net/jsylvanus/tTsXp/">http://jsfiddle.net/jsylvanus/tTsXp/</a></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Quick+JS+experiment%3A+Function+Overhead+http%3A%2F%2Fis.gd%2FqQRGRd+%28%40tkstudios%29" title="Post to Twitter"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Quick+JS+experiment%3A+Function+Overhead+http%3A%2F%2Fis.gd%2FqQRGRd+%28%40tkstudios%29" title="Post to Twitter">Tweet This Post</a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/11/03/quick-js-experiment-function-overhead/&amp;title=Quick+JS+experiment%3A+Function+Overhead" title="Post to Digg"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/11/03/quick-js-experiment-function-overhead/&amp;title=Quick+JS+experiment%3A+Function+Overhead" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/11/03/quick-js-experiment-function-overhead/&amp;title=Quick+JS+experiment%3A+Function+Overhead" title="Post to Reddit"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/11/03/quick-js-experiment-function-overhead/&amp;title=Quick+JS+experiment%3A+Function+Overhead" title="Post to Reddit">Post to Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/11/03/quick-js-experiment-function-overhead/&amp;title=Quick+JS+experiment%3A+Function+Overhead" title="Post to StumbleUpon"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/su/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/11/03/quick-js-experiment-function-overhead/&amp;title=Quick+JS+experiment%3A+Function+Overhead" title="Post to StumbleUpon">Stumble This Post</a></p></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TKStudios?a=BDFCh2_5mgA:n8dUD02bOl4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=BDFCh2_5mgA:n8dUD02bOl4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=BDFCh2_5mgA:n8dUD02bOl4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=BDFCh2_5mgA:n8dUD02bOl4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=BDFCh2_5mgA:n8dUD02bOl4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=BDFCh2_5mgA:n8dUD02bOl4:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TKStudios/~4/BDFCh2_5mgA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tkstudios.com/2010/11/03/quick-js-experiment-function-overhead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tkstudios.com/2010/11/03/quick-js-experiment-function-overhead/</feedburner:origLink></item>
		<item>
		<title>phpScenario &amp; Listy.us updates</title>
		<link>http://feedproxy.google.com/~r/TKStudios/~3/aXmaOWz8Fqo/</link>
		<comments>http://www.tkstudios.com/2010/10/27/phpscenario-listy-us-updates/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 17:58:59 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Listy]]></category>
		<category><![CDATA[phpScenario]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[changelog]]></category>
		<category><![CDATA[listy.us]]></category>
		<category><![CDATA[qunit]]></category>
		<category><![CDATA[requirejs]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.tkstudios.com/?p=234</guid>
		<description><![CDATA[First, phpScenario has been updated to 0.1.1 (change log here), so that&#8217;s cool. It helps when the library you release actually works, right? Second, I&#8217;ve been posting some related tutorials in the project&#8217;s forums: Getting started with phpScenario &#038; Zend Framework (updated for 0.1.1) Configuration example for PDO adapter Working with Identity Providers (new for [...]]]></description>
			<content:encoded><![CDATA[<p>First, phpScenario has been updated to 0.1.1 (<a href="http://www.phpscenario.org/forum/index.php?topic=6.0">change log here</a>), so that&#8217;s cool. It helps when the library you release actually <strong>works</strong>, right?</p>
<p>Second, I&#8217;ve been posting some related tutorials in the project&#8217;s forums:</p>
<ul>
<li><a href="http://www.phpscenario.org/forum/index.php?topic=4.0">Getting started with phpScenario &#038; Zend Framework</a> (updated for 0.1.1)</li>
<li><a href="http://www.phpscenario.org/forum/index.php?topic=3.0">Configuration example for PDO adapter</a></li>
<li><a href="http://www.phpscenario.org/forum/index.php?topic=7.0">Working with Identity Providers</a> (new for 0.1.1)</a></li>
</ul>
<p>So, if you&#8217;re interested in split testing via php, I&#8217;d recommend checking the project and tutorials out.</p>
<p>Third, I&#8217;m finally getting started on the rewrite of Listy.us&#8217;s editor. Where the old editor was a single, sparsely-commented 1400-line javascript file, the new one is spread across several files using RequireJS, and uses QUnit for unit testing. It is, essentially, a project in itself, and I&#8217;m finding it much, much nicer to work with.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=phpScenario+%26+Listy.us+updates+http%3A%2F%2Fis.gd%2FusEs0P+%28%40tkstudios%29" title="Post to Twitter"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=phpScenario+%26+Listy.us+updates+http%3A%2F%2Fis.gd%2FusEs0P+%28%40tkstudios%29" title="Post to Twitter">Tweet This Post</a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/10/27/phpscenario-listy-us-updates/&amp;title=phpScenario+%26+Listy.us+updates" title="Post to Digg"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/10/27/phpscenario-listy-us-updates/&amp;title=phpScenario+%26+Listy.us+updates" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/10/27/phpscenario-listy-us-updates/&amp;title=phpScenario+%26+Listy.us+updates" title="Post to Reddit"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/10/27/phpscenario-listy-us-updates/&amp;title=phpScenario+%26+Listy.us+updates" title="Post to Reddit">Post to Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/10/27/phpscenario-listy-us-updates/&amp;title=phpScenario+%26+Listy.us+updates" title="Post to StumbleUpon"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/su/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/10/27/phpscenario-listy-us-updates/&amp;title=phpScenario+%26+Listy.us+updates" title="Post to StumbleUpon">Stumble This Post</a></p></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TKStudios?a=aXmaOWz8Fqo:Xr_GfChIZDA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=aXmaOWz8Fqo:Xr_GfChIZDA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=aXmaOWz8Fqo:Xr_GfChIZDA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=aXmaOWz8Fqo:Xr_GfChIZDA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=aXmaOWz8Fqo:Xr_GfChIZDA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=aXmaOWz8Fqo:Xr_GfChIZDA:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TKStudios/~4/aXmaOWz8Fqo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tkstudios.com/2010/10/27/phpscenario-listy-us-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tkstudios.com/2010/10/27/phpscenario-listy-us-updates/</feedburner:origLink></item>
		<item>
		<title>Introducing phpScenario</title>
		<link>http://feedproxy.google.com/~r/TKStudios/~3/xzdBEII0sEI/</link>
		<comments>http://www.tkstudios.com/2010/10/18/introducing-phpscenario/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 17:21:44 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[phpScenario]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[a/b testing]]></category>
		<category><![CDATA[conversion optimization]]></category>
		<category><![CDATA[split testing]]></category>
		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://www.tkstudios.com/?p=208</guid>
		<description><![CDATA[Last night I launched the project I&#8217;d mentioned a couple days ago. It&#8217;s a fairly early version of a free (BSD licensed) split testing library I&#8217;ve named phpScenario. The usage has changed a little bit since then; the code samples should still work, but they&#8217;ve been simplified even further so the main tasks (getting a [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I launched the project I&#8217;d <a href="http://www.tkstudios.com/2010/10/06/phpscenario-a-split-testing-library/">mentioned a couple days ago</a>. It&#8217;s a fairly early version of a free (BSD licensed) split testing library I&#8217;ve named <strong>phpScenario</strong>. The usage has changed a little bit since then; the code samples should still work, but they&#8217;ve been simplified even further so the main tasks (getting a treatment, setting it as complete, rendering results) can be done with single statements.</p>
<p>You can check out the free split testing library in all it&#8217;s beta glory at <a href="http://www.phpscenario.org/">www.phpscenario.org</a> and post any questions on the <a href="http://www.phpscenario.org/forum/">discussion boards</a>. It&#8217;s version 0.1 beta, as in <em>&#8220;Well, it works for me, but could probably use some tuning.&#8221;</em></p>
<p><span id="more-208"></span></p>
<p>Split testing, or A/B testing, is a method for testing goal-oriented theories. Essentially you say &#8220;I think (blank) will be more effective than (blank),&#8221; and then collect data to verify or disprove that hypothesis. In its simplest form, you&#8217;re just testing a 50/50 between two theories, a control and an alternate version. phpScenario assumes that this is the most desirable route and has defaults as follows:</p>
<ul>
<li>50/50 split test between control (&#8220;default&#8221;) and &#8220;alternate&#8221;</li>
<li>assumes you want to use session ID as the identifier</li>
<li>assumes a certain database structure</li>
</ul>
<p>Basically all you have to provide it with is a data adapter (two are currently provided in the library, for Zend_Db and PDO) and the database info, and you can fire away with one-liner testing.</p>
<p>The library makes room for more elaborate testing however, by allowing you to define classes for special cases, inheriting from Scenario_Experiment. It&#8217;s an object-oriented library, so I&#8217;ve tried to take advantage of that where possible. You can also define your own Identity objects, if you&#8217;d prefer to use, for example, a user ID rather than the session id as an identifier for testing.</p>
<p>As stated in the previous post, there&#8217;s an abstract renderer object and an included renderer that outputs XML, and optionally translated that XML via included or provided XSL translation files. The included one translates the data to a fairly simple HTML table, including z-score so you can judge just how reliable the data is.</p>
<h4>How to Install</h4>
<ul>
<li><a href="http://www.phpscenario.org/download.php">Download</a> the package and run <em>database.sql</em> against the database you&#8217;re intending to use. There&#8217;s an example of how to do so using the mysql command line tool in <em>README.txt</em> in the package.</li>
<li>Include and <a href="http://www.phpscenario.org/docs/Scenario/Scenario_Core.html#config">configure the core</a> per the documentation. If you&#8217;re not using something with a bootstrap like Zend Framework, you should probably put all the configuration stuff in one file and just <em>require_once</em> that file whenever you need to do Scenario calls.</li>
<li><strong>That&#8217;s it.</strong> Start making calls to the library.</li>
</ul>
<p>It&#8217;s a pretty straightforward setup process. I basically designed the library to solve my own problems, and wanted something I could just throw into any given project and have a working solution in under a minute. Add tables, configure core, and go. I figured I might as well make it something other folks can use as well.</p>
<p>Once you&#8217;ve got the core configured, you can see how easy it is to actually use the library on the <a href="http://www.phpscenario.org/">phpScenario site</a>.</p>
<p>Questions/comments/etc can go in the comments here or on the forums, I&#8217;ll answer both.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Introducing+phpScenario+http%3A%2F%2Fis.gd%2Fypu3Ef+%28%40tkstudios%29" title="Post to Twitter"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Introducing+phpScenario+http%3A%2F%2Fis.gd%2Fypu3Ef+%28%40tkstudios%29" title="Post to Twitter">Tweet This Post</a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/10/18/introducing-phpscenario/&amp;title=Introducing+phpScenario" title="Post to Digg"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/10/18/introducing-phpscenario/&amp;title=Introducing+phpScenario" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/10/18/introducing-phpscenario/&amp;title=Introducing+phpScenario" title="Post to Reddit"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/10/18/introducing-phpscenario/&amp;title=Introducing+phpScenario" title="Post to Reddit">Post to Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/10/18/introducing-phpscenario/&amp;title=Introducing+phpScenario" title="Post to StumbleUpon"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/su/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/10/18/introducing-phpscenario/&amp;title=Introducing+phpScenario" title="Post to StumbleUpon">Stumble This Post</a></p></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TKStudios?a=xzdBEII0sEI:vdlOq018vEw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=xzdBEII0sEI:vdlOq018vEw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=xzdBEII0sEI:vdlOq018vEw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=xzdBEII0sEI:vdlOq018vEw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=xzdBEII0sEI:vdlOq018vEw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=xzdBEII0sEI:vdlOq018vEw:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TKStudios/~4/xzdBEII0sEI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tkstudios.com/2010/10/18/introducing-phpscenario/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tkstudios.com/2010/10/18/introducing-phpscenario/</feedburner:origLink></item>
		<item>
		<title>phpScenario, a split testing library</title>
		<link>http://feedproxy.google.com/~r/TKStudios/~3/M2w2cIJHr-Y/</link>
		<comments>http://www.tkstudios.com/2010/10/06/phpscenario-a-split-testing-library/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 22:35:59 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[phpScenario]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[free stuff]]></category>
		<category><![CDATA[libraries]]></category>

		<guid isPermaLink="false">http://www.tkstudios.com/?p=173</guid>
		<description><![CDATA[I&#8217;m closing in on the first release of what you might call a by-product of Listy.us; phpScenario is a free split-testing library created out of the need to have a way of testing various ideas on Listy.us without relying on paid products or offsite solutions. I&#8217;m going to release it for free, though I haven&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m closing in on the first release of what you might call a by-product of Listy.us; <strong><a title="phpScenario: Free Split Testing Library for PHP" href="http://www.phpscenario.org/">phpScenario</a></strong><a title="phpScenario: Free Split Testing Library for PHP" href="http://www.phpscenario.org/"> is a free split-testing library</a> created out of the need to have a way of testing various ideas on Listy.us without relying on paid products or offsite solutions. I&#8217;m going to release it for <strong>free</strong>, though I haven&#8217;t chosen a license yet. (update: New BSD license!)</p>
<p><span id="more-173"></span></p>
<p>At the core, I wanted it to be as simple as possible to create new tests, but still have a good degree of flexibility. Basically by default, it assumes you want a A/B 50% split test using the php session ID as the identity. If you have a class defined as [Prefix_]TestName, it&#8217;ll load that as the experiment object instead of the default class, and you can do any additional cases (a/b/c/d?) and/or weighting in the treatment selection method. One treatment must always be named &#8220;default&#8221;.</p>
<p>The simplest possible usage case, after setting up your database, is essentially this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>Scenario<span style="color: #339933;">::</span><span style="color: #004000;">IsControl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myExperiment'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// do something </span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// do something different</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Next, in your conversion point, you&#8217;d do something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Scenario<span style="color: #339933;">::</span><span style="color: #004000;">Complete</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myExperiment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Easy, right? Rendering results looks like so:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Scenario<span style="color: #339933;">::</span><span style="color: #004000;">RenderXml</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myExperiment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The html output looks like this (data set is basically a bunch of randomized 50/50 data):</p>
<p><a href="http://www.tkstudios.com/wp-content/uploads/2010/10/Screen-shot-2010-10-06-at-5.54.40-PM.png"><img class="alignnone size-full wp-image-174" title="Screen shot 2010-10-06 at 5.54.40 PM" src="http://www.tkstudios.com/wp-content/uploads/2010/10/Screen-shot-2010-10-06-at-5.54.40-PM.png" alt="" width="378" height="284" /></a></p>
<p>If you specify &#8220;xml&#8221; for the translation, you&#8217;ll get something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Scenario<span style="color: #339933;">::</span><span style="color: #004000;">RenderXml</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myExperiment'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><a href="http://www.tkstudios.com/wp-content/uploads/2010/10/Screen-shot-2010-10-06-at-6.42.25-PM.png"><img class="alignnone size-full wp-image-177" title="Screen shot 2010-10-06 at 6.42.25 PM" src="http://www.tkstudios.com/wp-content/uploads/2010/10/Screen-shot-2010-10-06-at-6.42.25-PM.png" alt="" width="513" height="200" /></a></p>
<p>Lots of thanks to <a href="http://20bits.com/">Jesse Farmer</a> for his <a title="Statistical Analysis and A/B Testing at 20Bits.com" href="http://20bits.com/articles/statistical-analysis-and-ab-testing/">incredibly useful article on statistical analysis and A/B testing</a>. That article saved me a lot of headaches in attempting to decode the wikipedia article on the underlying concept. Seriously, wiki is freakin&#8217; horrible when it comes to plain english explanations of mathematical concepts.</p>
<p>Any suggestions or feature requests while I&#8217;m in the documentation / tweaking phase?</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=phpScenario%2C+a+split+testing+library+http%3A%2F%2Fis.gd%2FllIF1k+%28%40tkstudios%29" title="Post to Twitter"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=phpScenario%2C+a+split+testing+library+http%3A%2F%2Fis.gd%2FllIF1k+%28%40tkstudios%29" title="Post to Twitter">Tweet This Post</a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/10/06/phpscenario-a-split-testing-library/&amp;title=phpScenario%2C+a+split+testing+library" title="Post to Digg"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/10/06/phpscenario-a-split-testing-library/&amp;title=phpScenario%2C+a+split+testing+library" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/10/06/phpscenario-a-split-testing-library/&amp;title=phpScenario%2C+a+split+testing+library" title="Post to Reddit"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/10/06/phpscenario-a-split-testing-library/&amp;title=phpScenario%2C+a+split+testing+library" title="Post to Reddit">Post to Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/10/06/phpscenario-a-split-testing-library/&amp;title=phpScenario%2C+a+split+testing+library" title="Post to StumbleUpon"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/su/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/10/06/phpscenario-a-split-testing-library/&amp;title=phpScenario%2C+a+split+testing+library" title="Post to StumbleUpon">Stumble This Post</a></p></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TKStudios?a=M2w2cIJHr-Y:w2QfYkVLVgc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=M2w2cIJHr-Y:w2QfYkVLVgc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=M2w2cIJHr-Y:w2QfYkVLVgc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=M2w2cIJHr-Y:w2QfYkVLVgc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=M2w2cIJHr-Y:w2QfYkVLVgc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=M2w2cIJHr-Y:w2QfYkVLVgc:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TKStudios/~4/M2w2cIJHr-Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tkstudios.com/2010/10/06/phpscenario-a-split-testing-library/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.tkstudios.com/2010/10/06/phpscenario-a-split-testing-library/</feedburner:origLink></item>
		<item>
		<title>Fixing Doctrine’s Geographical template precision</title>
		<link>http://feedproxy.google.com/~r/TKStudios/~3/NpUchFp8e00/</link>
		<comments>http://www.tkstudios.com/2010/04/27/fixing-doctrines-geographical-template-precision/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 20:41:47 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[doctrine]]></category>

		<guid isPermaLink="false">http://www.tkstudios.com/?p=156</guid>
		<description><![CDATA[(Note that this blog post is about Doctrine 1.2. At the time of this minor update—Nov 16, 2010—I can&#8217;t seem to actually FIND a Geographical behavior in Doctrine 2. So, if you&#8217;re using Doctrine 2, this post probably isn&#8217;t for you. It sucks, I know, this behavior was friggin&#8217; handy.) Doctrine, an ORM library, has [...]]]></description>
			<content:encoded><![CDATA[<p><em>(Note that this blog post is about Doctrine 1.2. At the time of this minor update—Nov 16, 2010—I can&#8217;t seem to actually FIND a Geographical behavior in Doctrine 2. So, if you&#8217;re using Doctrine 2, this post probably isn&#8217;t for you. It sucks, I know, this behavior was friggin&#8217; handy.)</em></p>
<p><a href="http://www.doctrine-project.org">Doctrine</a>, an <acronym title="Object Relational Mapping">ORM</acronym> library, has a convenient little behavior that you can attach to your tables to give them awesome superpowers of geolocation. It&#8217;s the Geographical template, and it resides in Doctrine/Template/Geographical.php. What it does is add two fields to your table: Latitude and Longitude, and extends your model with the ability to discern distances between any two of these locations.</p>
<p>That&#8217;s all well and good, except that as of 1.2.2, Doctrine&#8217;s default precision for a floating point field is <strong>2</strong>. That doesn&#8217;t allow for very accurate geolocation, as it truncates something like &#8220;+33.544622&#8243; down to &#8220;33.54&#8243;. Not good.</p>
<p><span id="more-156"></span></p>
<p>The documentation says absolutely nothing about fixing this behavior. I found a bug listing, but no actual fix. Thus began a long session of guesswork, all futile, and ending in a &#8220;duhhh&#8221; moment and a quick manual trace of the code to determine how the options for templates are handled.</p>
<p>Long story short, I found a fix, and here it is:</p>
<p>YAML version:</p>

<div class="wp_syntax"><div class="code"><pre class="yaml" style="font-family:monospace;">actAs:
  Geographical:
    latitude:
      options:
        scale: 7
    longitude:
      options:
        scale: 7</pre></div></div>

<p>php model version (in your model&#8217;s setUp() function):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$geographical0</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Doctrine_Template_Geographical<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
   <span style="color: #0000ff;">'latitude'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
      <span style="color: #0000ff;">'options'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
         <span style="color: #0000ff;">'scale'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">7</span><span style="color: #339933;">,</span>
      <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
   <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
   <span style="color: #0000ff;">'longitude'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
      <span style="color: #0000ff;">'options'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
         <span style="color: #0000ff;">'scale'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">7</span><span style="color: #339933;">,</span>
      <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
   <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">actAs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$geographical0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Fixing+Doctrine%E2%80%99s+Geographical+template+precision+http%3A%2F%2Fis.gd%2FfkcCgw+%28%40tkstudios%29" title="Post to Twitter"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Fixing+Doctrine%E2%80%99s+Geographical+template+precision+http%3A%2F%2Fis.gd%2FfkcCgw+%28%40tkstudios%29" title="Post to Twitter">Tweet This Post</a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/04/27/fixing-doctrines-geographical-template-precision/&amp;title=Fixing+Doctrine%E2%80%99s+Geographical+template+precision" title="Post to Digg"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/04/27/fixing-doctrines-geographical-template-precision/&amp;title=Fixing+Doctrine%E2%80%99s+Geographical+template+precision" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/04/27/fixing-doctrines-geographical-template-precision/&amp;title=Fixing+Doctrine%E2%80%99s+Geographical+template+precision" title="Post to Reddit"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/04/27/fixing-doctrines-geographical-template-precision/&amp;title=Fixing+Doctrine%E2%80%99s+Geographical+template+precision" title="Post to Reddit">Post to Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/04/27/fixing-doctrines-geographical-template-precision/&amp;title=Fixing+Doctrine%E2%80%99s+Geographical+template+precision" title="Post to StumbleUpon"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/su/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/04/27/fixing-doctrines-geographical-template-precision/&amp;title=Fixing+Doctrine%E2%80%99s+Geographical+template+precision" title="Post to StumbleUpon">Stumble This Post</a></p></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TKStudios?a=NpUchFp8e00:9WzD8z-QYVM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=NpUchFp8e00:9WzD8z-QYVM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=NpUchFp8e00:9WzD8z-QYVM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=NpUchFp8e00:9WzD8z-QYVM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=NpUchFp8e00:9WzD8z-QYVM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=NpUchFp8e00:9WzD8z-QYVM:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TKStudios/~4/NpUchFp8e00" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tkstudios.com/2010/04/27/fixing-doctrines-geographical-template-precision/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.tkstudios.com/2010/04/27/fixing-doctrines-geographical-template-precision/</feedburner:origLink></item>
		<item>
		<title>PHP hashing performance experiment</title>
		<link>http://feedproxy.google.com/~r/TKStudios/~3/N1JTJEWsOQQ/</link>
		<comments>http://www.tkstudios.com/2010/04/25/php-hashing-performance-experiment/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 05:26:52 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Listy]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.tkstudios.com/?p=150</guid>
		<description><![CDATA[Today, in the never-ending quest to tweak server performance by a few milliseconds, I decided to do a bit of testing of various php hashing methods. I therefore wrote a quick script under php (5.2.11 currently, I need to update), which ran each test case 10,000 times to achieve a decent min/avg/max for each case, [...]]]></description>
			<content:encoded><![CDATA[<p>Today, in the never-ending quest to tweak server performance by a few milliseconds, I decided to do a bit of testing of various php hashing methods. I therefore wrote a quick script under php (5.2.11 currently, I need to update), which ran each test case 10,000 times to achieve a decent min/avg/max for each case, on strings of 10KB, 100KB, and 1,000KB in size.</p>
<p><span id="more-150"></span></p>
<p>The short version of the result is that the md5() function won across the board. The comments in the <a title="PHP: hash - Manual" href="http://us.php.net/manual/en/function.hash.php">php.net hash function documentation</a> seemed to indicate a performance increase in using hash(&#8216;md5&#8242;,$str), and an even better increase in hash(&#8216;md4&#8242;,$str). I found this to only partially be the case; While using the hash function, md4 is minutely faster than md5, the md5() function itself is considerably faster than either of these.</p>
<p>So, for any performance sensitive case, I would say md5() is by far the best choice.</p>
<p>Actual results of the test suite can be seen here:</p>
<p><a href="http://listy.us/list/view/153"><img src="http://www.listy.us/list/banner/153" alt="PHP Hash Performance by JSylvanus via Listy.us" /></a></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=PHP+hashing+performance+experiment+http%3A%2F%2Fis.gd%2FHclqbV+%28%40tkstudios%29" title="Post to Twitter"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=PHP+hashing+performance+experiment+http%3A%2F%2Fis.gd%2FHclqbV+%28%40tkstudios%29" title="Post to Twitter">Tweet This Post</a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/04/25/php-hashing-performance-experiment/&amp;title=PHP+hashing+performance+experiment" title="Post to Digg"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/04/25/php-hashing-performance-experiment/&amp;title=PHP+hashing+performance+experiment" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/04/25/php-hashing-performance-experiment/&amp;title=PHP+hashing+performance+experiment" title="Post to Reddit"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/04/25/php-hashing-performance-experiment/&amp;title=PHP+hashing+performance+experiment" title="Post to Reddit">Post to Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/04/25/php-hashing-performance-experiment/&amp;title=PHP+hashing+performance+experiment" title="Post to StumbleUpon"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/su/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/04/25/php-hashing-performance-experiment/&amp;title=PHP+hashing+performance+experiment" title="Post to StumbleUpon">Stumble This Post</a></p></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TKStudios?a=N1JTJEWsOQQ:Tvhnmb_OFjw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=N1JTJEWsOQQ:Tvhnmb_OFjw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=N1JTJEWsOQQ:Tvhnmb_OFjw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=N1JTJEWsOQQ:Tvhnmb_OFjw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=N1JTJEWsOQQ:Tvhnmb_OFjw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=N1JTJEWsOQQ:Tvhnmb_OFjw:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TKStudios/~4/N1JTJEWsOQQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tkstudios.com/2010/04/25/php-hashing-performance-experiment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tkstudios.com/2010/04/25/php-hashing-performance-experiment/</feedburner:origLink></item>
		<item>
		<title>Changelog ala Listy</title>
		<link>http://feedproxy.google.com/~r/TKStudios/~3/gycvcv0NZnU/</link>
		<comments>http://www.tkstudios.com/2010/03/27/changelog-ala-listy/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 18:42:46 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tkstudios.com/?p=140</guid>
		<description><![CDATA[I put together a change log for Listy.us IN Listy.us. And here it is. Tweet This Post Digg This Post Post to Reddit Stumble This Post]]></description>
			<content:encoded><![CDATA[<p>I put together a change log for Listy.us IN Listy.us. And here it is.<span id="more-140"></span></p>
<p><script src="http://www.listy.us/list/embed/111" type="text/javascript"></script></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Changelog+ala+Listy+http%3A%2F%2Fis.gd%2FAglW96+%28%40tkstudios%29" title="Post to Twitter"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Changelog+ala+Listy+http%3A%2F%2Fis.gd%2FAglW96+%28%40tkstudios%29" title="Post to Twitter">Tweet This Post</a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/03/27/changelog-ala-listy/&amp;title=Changelog+ala+Listy" title="Post to Digg"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/03/27/changelog-ala-listy/&amp;title=Changelog+ala+Listy" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/03/27/changelog-ala-listy/&amp;title=Changelog+ala+Listy" title="Post to Reddit"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/03/27/changelog-ala-listy/&amp;title=Changelog+ala+Listy" title="Post to Reddit">Post to Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/03/27/changelog-ala-listy/&amp;title=Changelog+ala+Listy" title="Post to StumbleUpon"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/su/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/03/27/changelog-ala-listy/&amp;title=Changelog+ala+Listy" title="Post to StumbleUpon">Stumble This Post</a></p></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TKStudios?a=gycvcv0NZnU:wLtNNwLEAX0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=gycvcv0NZnU:wLtNNwLEAX0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=gycvcv0NZnU:wLtNNwLEAX0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=gycvcv0NZnU:wLtNNwLEAX0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=gycvcv0NZnU:wLtNNwLEAX0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=gycvcv0NZnU:wLtNNwLEAX0:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TKStudios/~4/gycvcv0NZnU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tkstudios.com/2010/03/27/changelog-ala-listy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tkstudios.com/2010/03/27/changelog-ala-listy/</feedburner:origLink></item>
		<item>
		<title>Southwest Understands Conversation</title>
		<link>http://feedproxy.google.com/~r/TKStudios/~3/YmdP_DKOMUs/</link>
		<comments>http://www.tkstudios.com/2010/03/24/southwest-understands-conversation/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 19:16:18 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Marketing]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[customer experience]]></category>

		<guid isPermaLink="false">http://www.tkstudios.com/?p=135</guid>
		<description><![CDATA[I&#8217;m probably a bit late to the party on this one, but I flew Southwest up to &#38; back from the MD/VA area this past week. It was unlike any prior flying experiences, and as far as I can tell, they know they&#8217;re doing it. It&#8217;s intentional. The staff are happy and conversational with passengers. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m probably a bit late to the party on this one, but I flew Southwest up to &amp; back from the MD/VA area this past week. It was unlike any prior flying experiences, and as far as I can tell, they know they&#8217;re doing it. It&#8217;s intentional. The staff are happy and conversational with passengers. They joke with you, they aren&#8217;t afraid to laugh. Probably the best customer experience out there as far as feeling like a person, rather than cash-dispensing cattle.</p>
<p><span id="more-135"></span></p>
<p>What really shocked me though was when, on the flight up on the 17th (#522 if someone from SW wants to look it up), the flight attendant sang to the crew. Thrice. I was on a non-connecting one-stop flight, and was treated to amusing, silly, fun singing three times. It put a smile on my face. She got applause each time.</p>
<p>Someone needs to introduce that flight attendant to the marketing director, because that was just awesome. It really shows that they&#8217;re doing a great job, too: Checking baggage, the lines at every other airline were ghost towns. Southwest was almost spilling out of their guide thingies.</p>
<p>Keep it up, SW.</p>
<p>(I&#8217;ve got a lot of posts to make about the latest update to <a href="http://www.listy.us/">Listy.us</a>, but this seemed a more pressing post. I felt it was worth mentioning before I forgot about it.)</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Southwest+Understands+Conversation+http%3A%2F%2Fis.gd%2FtmmjAG+%28%40tkstudios%29" title="Post to Twitter"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Southwest+Understands+Conversation+http%3A%2F%2Fis.gd%2FtmmjAG+%28%40tkstudios%29" title="Post to Twitter">Tweet This Post</a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/03/24/southwest-understands-conversation/&amp;title=Southwest+Understands+Conversation" title="Post to Digg"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/03/24/southwest-understands-conversation/&amp;title=Southwest+Understands+Conversation" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/03/24/southwest-understands-conversation/&amp;title=Southwest+Understands+Conversation" title="Post to Reddit"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/03/24/southwest-understands-conversation/&amp;title=Southwest+Understands+Conversation" title="Post to Reddit">Post to Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/03/24/southwest-understands-conversation/&amp;title=Southwest+Understands+Conversation" title="Post to StumbleUpon"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/su/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/03/24/southwest-understands-conversation/&amp;title=Southwest+Understands+Conversation" title="Post to StumbleUpon">Stumble This Post</a></p></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TKStudios?a=YmdP_DKOMUs:PZ164DQ8924:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=YmdP_DKOMUs:PZ164DQ8924:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=YmdP_DKOMUs:PZ164DQ8924:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=YmdP_DKOMUs:PZ164DQ8924:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=YmdP_DKOMUs:PZ164DQ8924:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=YmdP_DKOMUs:PZ164DQ8924:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TKStudios/~4/YmdP_DKOMUs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tkstudios.com/2010/03/24/southwest-understands-conversation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tkstudios.com/2010/03/24/southwest-understands-conversation/</feedburner:origLink></item>
		<item>
		<title>Listy.us – Now with Embedding!</title>
		<link>http://feedproxy.google.com/~r/TKStudios/~3/tRYynPmLDxI/</link>
		<comments>http://www.tkstudios.com/2010/03/23/listy-us-now-with-embedding/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 22:08:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Listy]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.tkstudios.com/?p=132</guid>
		<description><![CDATA[Today marks the first &#8220;Huge&#8221; update to Listy.us. It is now a paid service, handles uploaded files, and allows public lists to be embedded on any page. Like so: Tweet This Post Digg This Post Post to Reddit Stumble This Post]]></description>
			<content:encoded><![CDATA[<p>Today marks the first &#8220;Huge&#8221; update to Listy.us. It is now a paid service, handles uploaded files, and allows public lists to be embedded on any page. Like so:</p>
<p><span id="more-132"></span></p>
<p><script src="http://www.listy.us/list/embed/40" type="text/javascript"></script></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Listy.us+%E2%80%93+Now+with+Embedding%21+http%3A%2F%2Fis.gd%2Fn9g7Nh+%28%40tkstudios%29" title="Post to Twitter"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Listy.us+%E2%80%93+Now+with+Embedding%21+http%3A%2F%2Fis.gd%2Fn9g7Nh+%28%40tkstudios%29" title="Post to Twitter">Tweet This Post</a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/03/23/listy-us-now-with-embedding/&amp;title=Listy.us+%E2%80%93+Now+with+Embedding%21" title="Post to Digg"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.tkstudios.com/2010/03/23/listy-us-now-with-embedding/&amp;title=Listy.us+%E2%80%93+Now+with+Embedding%21" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/03/23/listy-us-now-with-embedding/&amp;title=Listy.us+%E2%80%93+Now+with+Embedding%21" title="Post to Reddit"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.tkstudios.com/2010/03/23/listy-us-now-with-embedding/&amp;title=Listy.us+%E2%80%93+Now+with+Embedding%21" title="Post to Reddit">Post to Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/03/23/listy-us-now-with-embedding/&amp;title=Listy.us+%E2%80%93+Now+with+Embedding%21" title="Post to StumbleUpon"><img class="nothumb" src="http://www.tkstudios.com/wp-content/plugins/tweet-this/icons/en/su/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.tkstudios.com/2010/03/23/listy-us-now-with-embedding/&amp;title=Listy.us+%E2%80%93+Now+with+Embedding%21" title="Post to StumbleUpon">Stumble This Post</a></p></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TKStudios?a=tRYynPmLDxI:2CKolWhoIi4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=tRYynPmLDxI:2CKolWhoIi4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=tRYynPmLDxI:2CKolWhoIi4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=tRYynPmLDxI:2CKolWhoIi4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TKStudios?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TKStudios?a=tRYynPmLDxI:2CKolWhoIi4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TKStudios?i=tRYynPmLDxI:2CKolWhoIi4:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TKStudios/~4/tRYynPmLDxI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tkstudios.com/2010/03/23/listy-us-now-with-embedding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tkstudios.com/2010/03/23/listy-us-now-with-embedding/</feedburner:origLink></item>
	</channel>
</rss>

