<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>StkyWll</title>
	<atom:link href="http://stkywll.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://stkywll.com</link>
	<description>posts by Matt Perry on whatever</description>
	<lastBuildDate>Sat, 15 Jun 2013 16:53:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='stkywll.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>StkyWll</title>
		<link>http://stkywll.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://stkywll.com/osd.xml" title="StkyWll" />
	<atom:link rel='hub' href='http://stkywll.com/?pushpress=hub'/>
		<item>
		<title>WordPress homepage settings trick: a simple, portable way to show a static homepage and a blog index</title>
		<link>http://stkywll.com/2013/06/04/wordpress-homepage-settings-trick-a-simple-portable-way-to-show-a-static-homepage-and-a-blog-index/</link>
		<comments>http://stkywll.com/2013/06/04/wordpress-homepage-settings-trick-a-simple-portable-way-to-show-a-static-homepage-and-a-blog-index/#comments</comments>
		<pubDate>Tue, 04 Jun 2013 07:38:22 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://stkywll.com/?p=460</guid>
		<description><![CDATA[I&#8217;m sure there are quite a few ways to do this, but here&#8217;s the problem I recently encountered, and a solution. I wanted to make an entirely portable theme with a non-standard (meaning not just a blog list) homepage, and a blog archive page (ie &#8212; an archive of all my posts) at a particular [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=460&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m sure there are quite a few ways to do this, but here&#8217;s the problem I recently encountered, and a solution.</p>
<p>I wanted to make an entirely portable theme with a non-standard (meaning not just a blog list) homepage, and a blog archive page (ie &#8212; an archive of all my posts) at a particular non-root URL &#8212; in my case <a href="http://www.something.com/blog" rel="nofollow">http://www.something.com/blog</a>.  I think this is a pretty common scenario, and the usual way to deal with it is to use the settings under Settings -&gt; Reading -&gt; <a href="http://codex.wordpress.org/Settings_Reading_SubPanel#Reading_Settings">Front page displays</a>:</p>
<p><a href="http://mattoperry.files.wordpress.com/2013/05/screen-shot-2013-05-31-at-6-34-49-pm.png"><img class="aligncenter size-full wp-image-453" alt="Screen Shot 2013-05-31 at 6.34.49 PM" src="http://mattoperry.files.wordpress.com/2013/05/screen-shot-2013-05-31-at-6-34-49-pm.png?w=590"   /></a></p>
<p>So you&#8217;d create a couple pages, perhaps named &#8220;home&#8221; and &#8220;blog&#8221;, and use these and the <strong>home.php</strong> and <strong>front-page.php</strong> templates to create the <a href="http://codex.wordpress.org/Creating_a_Static_Front_Page">desired effect</a>.  But this solution did not make me entirely happy for a couple of reasons:</p>
<ul>
<li>I find WordPress&#8217; behavior under various combinations of these settings and various presences/absences of theme templates to be overly-complicated.  As you can see from reading about these settings, there are several combinations of conditions that can obtain, and the template cascade becomes a bit hard to describe <em>in general.</em></li>
<li>Perhaps more importantly, I was going for <em>portability</em> here and did not want to require the presence of particularly-named pages for my URLs to work.  (Nor did I want the theme to create these pages on install &#8212; problems abound with that.)</li>
</ul>
<p>Instead, I came up with the following solution, which I&#8217;m sure is not unique, but I&#8217;m quite sure is not really that well known.  (<strong>I&#8217;ll also note loudly that from a performance and technical point of view, it&#8217;s entirely possible that this technique may have various dark cosequences, and I welcome comments to that effect if I&#8217;ve overlooked something.</strong>)  </p>
<p>So here&#8217;s how to do this:</p>
<p>1.  Leave the Front Page setting on &#8220;<strong>your latest posts</strong>&#8220;.</p>
<p>2.  Include a <strong>front-page.php</strong> template in your theme.  This will <em>always</em> display when WordPress thinks you want the homepage.  In this template include the markup etc. for your homepage.</p>
<p>3.  Now the fun begins.  We need to trick WordPress into showing us the blog index page on a URL without using a page.  In my case, I use <strong>archive.php </strong>for listings like this, but in your case it might be something else, like <strong>index.php </strong>or whatever.  In <strong>functions.php</strong>, add the following code:</p>
<pre>
//set blog_index as a valid query variable
function add_blog_index_var( $v ) {
  $v[] = 'blog_index';
  return $v;
}

//use the archive template whenever blog_index is set
function set_blog_index_template() {
  if( get_query_var( 'blog_index' ) ) {
    include( get_template_directory() . '/archive.php' );
    exit();
  }
}

//rewrites for blog index
add_rewrite_rule('blog/?$', 'index.php?blog_index=1', 'top');
add_rewrite_rule('blog/page/?([0-9]{1,})/?$', 'index.php?blog_index=1&amp;paged=$matches[1]', 'top');

//add filter for query var
add_filter('query_vars', 'add_blog_index_var');

//add action for template swap
add_action( 'template_redirect', 'set_blog_index_template' );
</pre>
<p>So what does this do?</p>
<p>We first write the <code>add_blog_index_var</code> to add the <code>blog_index</code> variable as a valid query var that will be retrievable by <code>get_query_var()</code> and set-able from the URL.  This addition is done below by filtering <code>add_blog_index_var</code>.  This is a required internal mechanism that WordPress uses to regulate what variables can make the leap from <code>$_GET</code> to the <code>WP_Query</code> object.</p>
<p>We then write a function called <code>set_blog_index_template</code> that forces the <strong>archive.php</strong> template to be used if the <code>blog_index</code> query var is set.  This function is then attached to the action hook <a href="http://codex.wordpress.org/Plugin_API/Action_Reference/template_redirect">template_redirect</a>.</p>
<p>The only thing left to do is to force WordPress to set this get variable at a particular URL &#8230; hence the two calls to <code>add_rewrite_rule</code> &#8230; one for /blog/ (in my case &#8230; it could be any URI for you) and one for pagination like /blog/page/2/ etc.</p>
<p><strong>Remember to flush rewrite rules before expecting this to work.</strong>  (See Daniel Bachhuber&#8217;s excellent <a href="http://wordpress.org/plugins/rewrite-rules-inspector/">Rewrite Rules Inspector</a> plugin if you need to sort out just what&#8217;s going on with your rules.</p>
<p>I hope this is useful to someone out there &#8212; it took me a while to figure out a decent way to do this without supporting special pages or futzing too much with the homepage settings.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattoperry.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattoperry.wordpress.com/460/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=460&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stkywll.com/2013/06/04/wordpress-homepage-settings-trick-a-simple-portable-way-to-show-a-static-homepage-and-a-blog-index/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/541c3c99119c466b89471f5a531342a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattoperry</media:title>
		</media:content>

		<media:content url="http://mattoperry.files.wordpress.com/2013/05/screen-shot-2013-05-31-at-6-34-49-pm.png" medium="image">
			<media:title type="html">Screen Shot 2013-05-31 at 6.34.49 PM</media:title>
		</media:content>
	</item>
		<item>
		<title>CodeWithMe Portland</title>
		<link>http://stkywll.com/2013/05/04/codewithme-portland/</link>
		<comments>http://stkywll.com/2013/05/04/codewithme-portland/#comments</comments>
		<pubDate>Sun, 05 May 2013 00:39:41 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Whatever]]></category>

		<guid isPermaLink="false">http://stkywll.com/?p=444</guid>
		<description><![CDATA[So I&#8217;m at code with me in Portland this weekend.  Code with me is a great organization run by Tom Giratikanon and Sisi Wei that pairs technologists and journalists to spread the foundations of HTML, CSS and JavaScript.  Here&#8217;s a picture of everyone in the big  (windowless) conference room at the Oregonian. To understand what a [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=444&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>So I&#8217;m at <a href="http://codewithme.us/portland/">code with me</a> in Portland this weekend.  Code with me is a great organization run by <a href="https://twitter.com/giratikanon">Tom Giratikanon</a> and <a href="https://twitter.com/sisiwei">Sisi Wei</a> that pairs technologists and journalists to spread the foundations of HTML, CSS and JavaScript.  Here&#8217;s a picture of everyone in the big  (windowless) conference room at the Oregonian.</p>
<p><a href="http://mattoperry.files.wordpress.com/2013/05/codewithme.jpg"><img class="aligncenter size-full wp-image-445" alt="Code With Me Portland" src="http://mattoperry.files.wordpress.com/2013/05/codewithme.jpg?w=590&#038;h=442" width="590" height="442" /></a></p>
<p>To understand what a dedicated group this is, you should probably also check out the current weather in Portland, which is &#8212; to say the least &#8212; spectacular.</p>
<p><a href="http://mattoperry.files.wordpress.com/2013/05/weather.png"><img class="wp-image-446 alignleft" alt="weather" src="http://mattoperry.files.wordpress.com/2013/05/weather.png?w=151&#038;h=269" width="151" height="269" /></a></p>
<p>Events like this (in foul weather or fair) are really exciting.  You&#8217;d think there would be more opportunities for journalists and technologists to not only <a href="http://hackshackers.com/">spend time together</a>, but also trade knowledge and work together.  But really opportunities like these (open, learning, semi-structured events with lots of project time) are pretty rare, and I&#8217;m grateful to be involved this weekend.  I&#8217;m also psyched to be working with two journalists: <a href="https://twitter.com/evonnebenedict">Evonne Benedict</a> of <a href="http://www.king5.com/">King5</a> TV in Seattle and <a href="https://twitter.com/rachelwalexande">Rachel Alexander</a> of Whitman College and <a href="https://twitter.com/ubnews">Union-Bulletin News</a>.  Much fun!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattoperry.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattoperry.wordpress.com/444/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=444&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stkywll.com/2013/05/04/codewithme-portland/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/541c3c99119c466b89471f5a531342a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattoperry</media:title>
		</media:content>

		<media:content url="http://mattoperry.files.wordpress.com/2013/05/codewithme.jpg" medium="image">
			<media:title type="html">Code With Me Portland</media:title>
		</media:content>

		<media:content url="http://mattoperry.files.wordpress.com/2013/05/weather.png" medium="image">
			<media:title type="html">weather</media:title>
		</media:content>
	</item>
		<item>
		<title>Annoying Robots and the Chameleon Botnet</title>
		<link>http://stkywll.com/2013/03/20/annoying-robots-and-the-chameleon-botnet/</link>
		<comments>http://stkywll.com/2013/03/20/annoying-robots-and-the-chameleon-botnet/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 02:36:50 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Whatever]]></category>

		<guid isPermaLink="false">http://stkywll.com/?p=440</guid>
		<description><![CDATA[The Chameleon botnet discovered by Spider.io is of a type that I may have encountered before while at Grist.org.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=440&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Yesterday <a href="https://www.spider.io">Spider.io</a> announced the discovery of the <a href="http://www.spider.io/blog/2013/03/chameleon-botnet/">Chameleon Botnet</a>, a mega-collection of infected Windows machines, based largely in the US.  The purpose of the botnet is/was to generate large amounts of distributed, hard-to-detect traffic over sites displaying certain ads (or ads from certain networks), thereby generating bogus income via a network of 202 bogus content sites and defrauding advertisers out of something like $6 million/month.  The characteristics of the traffic of this botnet are suspciously similar to the sort of traffic <a href="http://stkywll.com/2012/03/02/annoying-cyborgs-attach-distort-analytics/">I wrote about over a year ago</a> when I worked at <a href="http://www.grist.org">Grist</a>.  In particular, the traffic instantiates JavaScript, identifies itself using a particular windows user agent, and is extremely homogeneous &#8212;  which is basically what we saw at Grist.  The Chameleon traffic differs in that it evidences real but apparently random mouse and click events:</p>
<p>&nbsp;</p>
<div id="attachment_441" class="wp-caption aligncenter" style="width: 600px"><a href="http://mattoperry.files.wordpress.com/2013/03/botnetengagement.png"><img class="size-full wp-image-441" alt="image:  spider.io" src="http://mattoperry.files.wordpress.com/2013/03/botnetengagement.png?w=590&#038;h=291" width="590" height="291" /></a><p class="wp-caption-text"> Random distribution of clicks and mouse traces over a square ad on an infected site:  image: spider.io</p></div>
<p>&#8230; and apparently were confined to the part of the screen containing the ad.</p>
<p>We&#8217;ll probably never know if the Grist phenomenon was of this sort, but I think it might be worth developing some sort of detector for botnets of this type <em>if </em>the possibility exists that they are affecting more than the small number that Spider.io&#8217;s report implies are affected by Chameleon.  It would seem to me that botnets of this sort have both an incentive and a disincentive to include non-target sites on their hitlist.  The incentive is simply that by including legitimate targets they obfuscate their scheme from advertisers to some extent (though it&#8217;s unclear if most advertisers directly review the distribution patterns of their ads through networks.) The disincentive is that targeting legitimate sites carries a risk of detection, though most sites would probably not notice if this were to start happening.</p>
<p>This was of great interest to me (and should really be to anyone who runs a site with significant traffic) because it&#8217;s the first public announcement of a botnet capable of running a complete client stack.</p>
<p>I would think that some analytics and advertising platforms like Google would be interested in understanding phenomena of this type better &#8211;I&#8217;d appreciate any links or info regarding countermeasures or detection of stuff like this.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattoperry.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattoperry.wordpress.com/440/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=440&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stkywll.com/2013/03/20/annoying-robots-and-the-chameleon-botnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/541c3c99119c466b89471f5a531342a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattoperry</media:title>
		</media:content>

		<media:content url="http://mattoperry.files.wordpress.com/2013/03/botnetengagement.png" medium="image">
			<media:title type="html">image:  spider.io</media:title>
		</media:content>
	</item>
		<item>
		<title>How to make EE Fast(ER)</title>
		<link>http://stkywll.com/2012/09/13/how-to-make-ee-faster/</link>
		<comments>http://stkywll.com/2012/09/13/how-to-make-ee-faster/#comments</comments>
		<pubDate>Thu, 13 Sep 2012 23:48:15 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[ExpressionEngine]]></category>

		<guid isPermaLink="false">http://stkywll.com/?p=430</guid>
		<description><![CDATA[Tonight I&#8217;m talking to the cool-ass Seattle Expression Engine meetup about how to scale EE sites.  It&#8217;s a bit of a quick tour of the subject, but I hope people find it useful.  If you want to download the slides from this (.pdf) you can do so here.  By the by, how much do I wish [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=430&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Tonight I&#8217;m talking to the cool-ass Seattle <a href="http://www.meetup.com/expressionengine-seattle/">Expression Engine meetup</a> about how to scale EE sites.  It&#8217;s a bit of a quick tour of the subject, but I hope people find it useful.  If you want to download the slides from this (.pdf) you can <a href="http://mattoperry.files.wordpress.com/2012/09/ee-scaling.pdf">do so here</a>.  By the by, how much do I wish someone had written and add-on for EE like <a href="http://www.causingeffect.com/software/expressionengine/ce-cache">CE-cache</a> a few years ago , when it was desperately needed at Grist &#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattoperry.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattoperry.wordpress.com/430/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=430&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stkywll.com/2012/09/13/how-to-make-ee-faster/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/541c3c99119c466b89471f5a531342a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattoperry</media:title>
		</media:content>
	</item>
		<item>
		<title>A big change</title>
		<link>http://stkywll.com/2012/09/04/a-big-change-coming-up/</link>
		<comments>http://stkywll.com/2012/09/04/a-big-change-coming-up/#comments</comments>
		<pubDate>Tue, 04 Sep 2012 23:00:40 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[announcements]]></category>

		<guid isPermaLink="false">http://stkywll.com/?p=422</guid>
		<description><![CDATA[I'm going to be leaving Grist after 4 great years.  Read about it here.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=422&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For those of you who know me reasonably well, you&#8217;ll know that I really love what I do.</p>
<p>I love building stuff online, learning new technologies, thinking up new ways to cause change on the web.  The fact that for the last four years I&#8217;ve been able to do pretty much all of this, all the time, in my work at <a href="http://grist.org">Grist</a> is something that fills me with a great deal of gratitude.  Any list of people who have impacted me in my time at Grist will be incomplete (and so I&#8217;m loathe to even try) but I&#8217;d be totally remiss if I did not mention both the amazing mentors I&#8217;ve had here.  These include folks like Scott Rosenberg, Rebecca Farwell, Lori Schmall, and (going a few years back) Dean Ericksen.  And then there are the people I&#8217;ve been privileged to work with every day &#8212; Nathan Letsinger, Hanna Welch, and (more recently) Mignon Khargie and Mr. Ben Brooks.  And then there&#8217;s Chip Giller, founder and CEO of Grist, and a person whose generosity, vision and faith have benefited me in many ways.</p>
<p>On September 13, I will be moving on from Grist to a new and totally amazing challenge at <a href="http://front.moveon.org/">MoveOn.org</a>. It involves lots of work with technology, data and audience-building.  It&#8217;s a daunting, but also very exciting challenge for me, and I promise to post more about that soon.</p>
<p>Right at this very moment, however, I&#8217;m thinking a lot about how I can remain connected to Grist in the future &#8212; as a fan, a reader, a community member, a friend, a (small-time) donor and (if they&#8217;ll let me) interloper at the <a href="http://www.owlnthistle.com/">Owl and Thistle Pub</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattoperry.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattoperry.wordpress.com/422/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=422&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stkywll.com/2012/09/04/a-big-change-coming-up/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/541c3c99119c466b89471f5a531342a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattoperry</media:title>
		</media:content>
	</item>
		<item>
		<title>Twitter&#8217;s new API policy in plain english</title>
		<link>http://stkywll.com/2012/08/16/twitters-new-api-policy-in-plain-english/</link>
		<comments>http://stkywll.com/2012/08/16/twitters-new-api-policy-in-plain-english/#comments</comments>
		<pubDate>Fri, 17 Aug 2012 00:07:19 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Whatever]]></category>

		<guid isPermaLink="false">http://stkywll.com/?p=406</guid>
		<description><![CDATA[Twitter announced new API policies for version 1.1 of their API today.  The announcement was accompanied by a diagram which IMHO was bit hard to understand at first and caused a bit of useless debate and worry on Twitter.  Here&#8217;s my dumbed-down version of the diagram, or at least my understanding of it.  The x [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=406&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://mattoperry.files.wordpress.com/2012/08/untitled-artwork-2012-08-16-05-03-34-517-pm.jpg"><img class="aligncenter size-full wp-image-408" title="Twitter API diagram" src="http://mattoperry.files.wordpress.com/2012/08/untitled-artwork-2012-08-16-05-03-34-517-pm.jpg?w=590" alt=""   /></a></p>
<p>Twitter announced <a href="https://dev.twitter.com/blog/changes-coming-to-twitter-api">new API policies</a> for version 1.1 of their API today.  The announcement was accompanied by a diagram which IMHO was bit hard to understand at first and caused a bit of useless debate and worry on Twitter.  Here&#8217;s my dumbed-down version of the diagram, or at least my understanding of it.  The x axis represents who your application is for:  the general public or, for lack of a better word, <em>nerds</em> (developers, business owners etc.)  The y axis represents what your application allows those people to do:  either count stuff (tweets, links etc etc.) or do stuff (tweet, search, etc etc)</p>
<p>Here&#8217;s Twitter&#8217;s (better) version of this:</p>
<p><a href="http://mattoperry.files.wordpress.com/2012/08/screen-shot-2012-08-16-at-5-04-51-pm.png"><img class="aligncenter size-full wp-image-409" title="Screen Shot 2012-08-16 at 5.04.51 PM" src="http://mattoperry.files.wordpress.com/2012/08/screen-shot-2012-08-16-at-5-04-51-pm.png?w=590" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattoperry.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattoperry.wordpress.com/406/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=406&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stkywll.com/2012/08/16/twitters-new-api-policy-in-plain-english/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/541c3c99119c466b89471f5a531342a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattoperry</media:title>
		</media:content>

		<media:content url="http://mattoperry.files.wordpress.com/2012/08/untitled-artwork-2012-08-16-05-03-34-517-pm.jpg" medium="image">
			<media:title type="html">Twitter API diagram</media:title>
		</media:content>

		<media:content url="http://mattoperry.files.wordpress.com/2012/08/screen-shot-2012-08-16-at-5-04-51-pm.png" medium="image">
			<media:title type="html">Screen Shot 2012-08-16 at 5.04.51 PM</media:title>
		</media:content>
	</item>
		<item>
		<title>Grist at WCSF12</title>
		<link>http://stkywll.com/2012/08/02/grist-at-wcsf12/</link>
		<comments>http://stkywll.com/2012/08/02/grist-at-wcsf12/#comments</comments>
		<pubDate>Thu, 02 Aug 2012 18:22:38 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Whatever]]></category>

		<guid isPermaLink="false">http://stkywll.com/?p=365</guid>
		<description><![CDATA[This weekend the some of team Grist will be in SF for WordCamp.  I&#8217;m really excited to get to give a talk about our journey to becoming a WordPress operation.  This year (in fact, almost exactly this year, as WCSF11 represented a bit of an introduction to WordPress for us) has been a huge adventure [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=365&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-366" title="Screen Shot 2012-08-02 at 10.59.30 AM" src="http://mattoperry.files.wordpress.com/2012/08/screen-shot-2012-08-02-at-10-59-30-am1.png?w=590" alt=""   /></p>
<p>This weekend the <a href="http://wordyard.com">some of</a> <a href="http://benbrooks.net/">team</a> <a href="https://twitter.com/natebot">Grist</a> will be in SF for <a href="http://2012.sf.wordcamp.org/">WordCamp</a>.  I&#8217;m really excited to get to give a talk about our journey to becoming a WordPress operation.  This year (in fact, almost exactly <em>this year</em>, as WCSF11 represented a bit of an introduction to WordPress for us) has been a huge adventure &#8212; we learned lots about the WordPress API, moved our content and hosting to a new platform, adopted a new operating model, developed a theme and began to seriously grow our audience.</p>
<p>[UPDATE]</p>
<p>Here&#8217;s <a href="http://stkywll.com/wcsf12/">dump of the slides</a> I used in this presentation.  Please feel free to <a href="http://twitter.com/mattoperry">hit me up on twitter</a> with any questions or to talk about any of this.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattoperry.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattoperry.wordpress.com/365/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=365&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stkywll.com/2012/08/02/grist-at-wcsf12/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/541c3c99119c466b89471f5a531342a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattoperry</media:title>
		</media:content>

		<media:content url="http://mattoperry.files.wordpress.com/2012/08/screen-shot-2012-08-02-at-10-59-30-am1.png" medium="image">
			<media:title type="html">Screen Shot 2012-08-02 at 10.59.30 AM</media:title>
		</media:content>
	</item>
		<item>
		<title>What you get when you move to the cloud</title>
		<link>http://stkywll.com/2012/05/31/what-you-get-when-you-move-to-the-cloud/</link>
		<comments>http://stkywll.com/2012/05/31/what-you-get-when-you-move-to-the-cloud/#comments</comments>
		<pubDate>Thu, 31 May 2012 18:44:08 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Whatever]]></category>

		<guid isPermaLink="false">http://stkywll.com/?p=358</guid>
		<description><![CDATA[<a href="http://gristlabs.com/2012/05/31/the-hardware-formerly-known-as-grist/"><img src="http://mattoperry.files.wordpress.com/2012/05/photo-1.jpg" alt="What you get when you move to the cloud" class="size-full wp-image-357" /></a><p>Grist's former web hardware arrived at the office today.  </p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=358&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://gristlabs.com/2012/05/31/the-hardware-formerly-known-as-grist/"><img src="http://mattoperry.files.wordpress.com/2012/05/photo-1.jpg?w=590" alt="What you get when you move to the cloud" class="size-full wp-image-357" /></a>
<p>Grist&#8217;s former web hardware arrived at the office today.  </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattoperry.wordpress.com/358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattoperry.wordpress.com/358/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=358&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stkywll.com/2012/05/31/what-you-get-when-you-move-to-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/541c3c99119c466b89471f5a531342a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattoperry</media:title>
		</media:content>

		<media:content url="http://mattoperry.files.wordpress.com/2012/05/photo-1.jpg" medium="image">
			<media:title type="html">What you get when you move to the cloud</media:title>
		</media:content>
	</item>
		<item>
		<title>Annoying Robots:  A Solution for Google Analytics</title>
		<link>http://stkywll.com/2012/04/27/annoying-robots-a-solution-for-google-analytics/</link>
		<comments>http://stkywll.com/2012/04/27/annoying-robots-a-solution-for-google-analytics/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 06:27:20 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://stkywll.com/?p=314</guid>
		<description><![CDATA[Last month I posted about a surge of illegitimate traffic we&#8217;ve experienced on Grist.  Given that they did things like load JavaScript, these impressions were difficult to distinguish from real traffic, except they were all from IE and all of very low quality. A large number of people who run websites are experiencing the same [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=314&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Last month I <a href="http://stkywll.com/2012/03/02/annoying-cyborgs-attach-distort-analytics/">posted</a> about a surge of illegitimate traffic we&#8217;ve experienced on Grist.  Given that they did things like load JavaScript, these impressions were difficult to distinguish from real traffic, except they were all from IE and all of very low quality.</p>
<p>A <a href="http://www.webmasterworld.com/analytics/4420174.htm">large number of people who run websites</a> are experiencing the same problem, which is only really a problem because it can massively distort analytics (like Google Analytics for example) and also skews AdSense to a destructive degree.  While many affected folks have simply removed AdSense from the affected pages, until now, I&#8217;ve seen no report of anyone excluding the traffic from Google Analytics.</p>
<p>We&#8217;ve just begun testing a solution that does this, and I&#8217;d like to post about it sooner rather than later so that others may both try it out and potentially benefit from it.</p>
<p>The premise of this solution came from a suggestion in <a href="https://groups.google.com/a/googleproductforums.com/forum/#!msg/analytics/BsZ41iF2iFM/qW9nBG6M80oJ">this thread</a> by <a href="http://www.darrinward.com/">Darrin Ward</a> who suggested:</p>
<blockquote>
<div>1) For IE users only, serve the page with everything loaded in a JS variable and do a document.write of it only when some mouse cursor movmement takes place (GA wouldn&#8217;t execute until the doc.write).</div>
<div>2) Use the same principle, but only load the GA code when a mouse movement takes place.</div>
</blockquote>
<div>&nbsp;</div>
<p>While we didn&#8217;t exactly do either of these things, we did take the idea of using DOM events that are indicative of a real human (mouse movement, keystroke) to differentiate the zombie traffic from the real.  The good news is that this seems &#8212; largely &#8212; to work.  Here&#8217;s how to do it:</p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>1.  First of all, you must be using the Google Analytics&#8217;s current (i.e. &#8212; <a href="https://developers.google.com/analytics/devguides/collection/gajs/asyncTracking">asynchronous</a>) method for this to make any sense.  If you&#8217;re not, you probably should be anyway, so it&#8217;s a good time to quickly switch.  Your page loads will improve if you do.</p>
<div></div>
<p>2.  We recommend as a first step that you implement some <a href="https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide">Google Analytics Events</a> to differentiate good traffic from bad.  This will continuing tracking impressions on all page loads, but will fire off a special event that will differentiate the good traffic from the bad.  Later, once you are happy that the exclusion is happening properly, you can actually exclude impression tracking  (see below).<br />
To do so, insert this code in your site header after the code that loads Google Analytics:</p>
<pre>	//Evil Robot Detection

	var category = 'trafficQuality';
	var dimension = 'botDetection';
	var human_events = ['onkeydown','onmousemove'];

	if ( navigator.appName == 'Microsoft Internet Explorer' &amp;&amp; !document.referrer) {
		for(var i = 0; i &lt; human_events.length; i++){
			document.attachEvent(human_events[i], ourEventPushOnce);
		}
	}else{
		_gaq.push( [ '_trackEvent', category, dimension, 'botExcluded', 1, true ] );
	}

	function ourEventPushOnce(ev) {

		_gaq.push( [ '_trackEvent', category, dimension, 'on' + ev.type, 1, true ] );

		for(var i = 0; i &lt; human_events.length; i++){
			document.detachEvent(human_events[i], ourEventPushOnce);
		}

	} // end ourEventPushOnce()

	//End Evil Robot Detection</pre>
<div>This code causes a GA event of category &#8220;trafficQuality&#8221; and dimension &#8220;botDetection&#8221; with a label that will whenever possible contain the type of event, to be pushed to Google Analtyics.  It will also push a &#8220;botExcluded&#8221; event with this dimension and category whenever for any non-IE browser or any page view with a referrer.   This means you <em>won&#8217;t </em>get a Google Analytics event <em>only</em> when there&#8217;s a direct IE impression with <em>no</em> mousemove or keydown, which is what we want.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>4.  So how does this help you?  Well, now in Google Analytics you&#8217;ll be able to tell the good traffic from the bad.  The good will have an event.  The bad won&#8217;t.  The easiest way to check this in Google Analytics is to check <strong>content -&gt; events -&gt; events overview</strong>.  Within a few hours of pushing the above code you should see events begin to accumulate there.</p>
<p>5.  To restore more sanity to your Google Analtyics, you could also define a goal.  (under <strong>admin</strong> go to <strong>goals</strong> and define a new goal like this:)</p>
<p><img class="alignnone size-full wp-image-315" title="Screen Shot 2012-04-25 at 6.39.26 PM" src="http://mattoperry.files.wordpress.com/2012/04/screen-shot-2012-04-25-at-6-39-26-pm.png?w=590" alt=""   /></p>
<p>5.  Once you implement this goal, Google Analytics will know what traffic has achieved the goal and what hasn&#8217;t &#8212; based on this you&#8217;ve defined a conversion.  This means that on any report in Google Analytics, you can restrict the view of the report to only those visits that converted &#8212; this is done in the advanced segments menu:</p>
<p><img class="alignnone size-full wp-image-316" title="Screen Shot 2012-04-25 at 6.41.50 PM" src="http://mattoperry.files.wordpress.com/2012/04/screen-shot-2012-04-25-at-6-41-50-pm.png?w=590" alt=""   /></p>
<p>6.  Note that this affects only <em>new</em> data that enters Google Analytics &#8212; it does not scrub old data unfortunately.  In our case, it&#8217;s restored Google Analytics to its normal self after a couple of months of frustration.</p>
<p>7.  Eventually, you may want to stop Google Analytics from even recording an impression in the case of bad traffic.  To do that, just remove the</p>
<pre>_gaq.push( [ '_trackEvent', ...</pre>
<p>lines above and replace them with</p>
<pre>_gaq.push(['_trackPageview']);</pre>
<p>Of course, don&#8217;t forget to remove the call to <em>_trackPageview</em> from it&#8217;s normal place outside the conditional.</p>
<p>I&#8217;d love to hear about any ideas for improvement anyone has for this.  We don&#8217;t use adSense, but in that case you could just use this technique to conditionalize the insertion of adCode into the DOM.</p>
<p>Good luck bot killers!</p>
<p>[UPDATE May 8, 2012]  Added the final argument to _trackEvent to precent distortion of bounce rates.  Thanks Chase!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattoperry.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattoperry.wordpress.com/314/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=314&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stkywll.com/2012/04/27/annoying-robots-a-solution-for-google-analytics/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/541c3c99119c466b89471f5a531342a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattoperry</media:title>
		</media:content>

		<media:content url="http://mattoperry.files.wordpress.com/2012/04/screen-shot-2012-04-25-at-6-39-26-pm.png" medium="image">
			<media:title type="html">Screen Shot 2012-04-25 at 6.39.26 PM</media:title>
		</media:content>

		<media:content url="http://mattoperry.files.wordpress.com/2012/04/screen-shot-2012-04-25-at-6-41-50-pm.png" medium="image">
			<media:title type="html">Screen Shot 2012-04-25 at 6.41.50 PM</media:title>
		</media:content>
	</item>
		<item>
		<title>Style Tiles</title>
		<link>http://stkywll.com/2012/03/29/style-tiles/</link>
		<comments>http://stkywll.com/2012/03/29/style-tiles/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 14:54:16 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Whatever]]></category>

		<guid isPermaLink="false">http://stkywll.com/2012/03/29/style-tiles/</guid>
		<description><![CDATA[<p><a href="http://designshack.net/articles/graphics/style-tiles-the-flip-side-of-wireframes/" title="Style Tiles">Style Tiles</a></p><p>Catchy name for a good idea.  "Style Guide" always seemed to vague and formal.</p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=295&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://designshack.net/articles/graphics/style-tiles-the-flip-side-of-wireframes/" title="Style Tiles">Style Tiles</a></p>
<p>Catchy name for a good idea.  &#8221;Style Guide&#8221; always seemed to vague and formal.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mattoperry.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mattoperry.wordpress.com/295/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stkywll.com&#038;blog=31398057&#038;post=295&#038;subd=mattoperry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stkywll.com/2012/03/29/style-tiles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/541c3c99119c466b89471f5a531342a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mattoperry</media:title>
		</media:content>
	</item>
	</channel>
</rss>
