<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
<title>Wettone.com</title>
<link>http://wettone.com/</link>
<description>Stephen Wettone is a software engineer who discovered the Internet in 1994 and hasn't slept since. This is his story.</description>
<language>en-gb</language>
<managingEditor>stephen@wettone.com (Stephen Wettone)</managingEditor>
<webMaster>stephen@wettone.com (Stephen Wettone)</webMaster>
<pubDate>Thu, 20 Apr 2006 09:11:30 +0100</pubDate>
<lastBuildDate>Thu, 20 Apr 2006 09:08:10 +0100</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<ttl>60</ttl>

<item>
<title>Reducing SlimStat's database size</title>
<link>http://wettone.com/weblog/2006/04/20/reducing-size</link>
<description>&lt;p&gt;One of the most common themes in the feedback I get is that the database becomes quite large over time. That was the main reason behind the Admin plug-in. I've been tinkering with my database this evening and I thought I'd recount what I've done so other people could try it and see how their performance is affected.&lt;/p&gt;

&lt;p&gt;The main difference between the databases in ShortStat and SlimStat is that I added lots of indexes. These are the main reason SlimStat is faster than ShortStat, but they are also the main reason that the database grows so quickly.&lt;/p&gt;

&lt;p&gt;I added indexes on multiple fields, for maximum speed when selecting. The downside is that their cardinality can be huge. For some of them there is one entry in the index for each row in the table. So an obvious strategy is to reduce these to single fields and therefore reduce their cardinality and size.&lt;/p&gt;

&lt;p&gt;To remove the multiple-field indexes, run these queries:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ALTER TABLE `slimstat` DROP INDEX `resource_total_uniques`;
ALTER TABLE `slimstat` DROP INDEX `searchterms_total_uniques`;
ALTER TABLE `slimstat` DROP INDEX `domain_total_uniques`;
ALTER TABLE `slimstat` DROP INDEX `platform_total_uniques`;
ALTER TABLE `slimstat` DROP INDEX `browser_version_total_uniques`;
ALTER TABLE `slimstat` DROP INDEX `country_total_uniques`;
ALTER TABLE `slimstat` DROP INDEX `language_total_uniques`;
ALTER TABLE `slimstat` DROP INDEX `dt_total_uniques`;
ALTER TABLE `slimstat` DROP INDEX `visit_total_uniques`;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then add new single-field indexes:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ALTER TABLE `slimstat` ADD INDEX (`resource`);
ALTER TABLE `slimstat` ADD INDEX (`searchterms`);
ALTER TABLE `slimstat` ADD INDEX (`domain`);
ALTER TABLE `slimstat` ADD INDEX (`resource`);
ALTER TABLE `slimstat` ADD INDEX (`platform`);
ALTER TABLE `slimstat` ADD INDEX `browser_version` (`browser`,`version`);
ALTER TABLE `slimstat` ADD INDEX (`country`);
ALTER TABLE `slimstat` ADD INDEX (`language`);
ALTER TABLE `slimstat` ADD INDEX (`visit`);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will all take quite a while, so I suggest pasting it all in at once and going to put the kettle on. If removing any index breaks, that probably indicates a bug in the setup script, so please let me know. :)&lt;/p&gt;

&lt;p&gt;There's still one multiple-field index in there, on &lt;code&gt;browser&lt;/code&gt; and &lt;code&gt;version&lt;/code&gt;, but it's a useful index to have because one of the modules uses both those fields. I decided not to create an index on &lt;code&gt;dt&lt;/code&gt; because it would still have large cardinality, as it's based on a timestamp to the nearest second. If there were separate fields for year, month, day, hour, minute and second, indexing them would probably be worthwhile. That's something I have been considering changing.&lt;/p&gt;

&lt;p&gt;Almost forgot: before you do any of this, you may want to remove the HTML comments from line 190 of index.php, so you can see the execution time on screen more easily. It just shows the number of seconds that it took to display the current page. Having several before-and-after times would be useful.&lt;/p&gt;

&lt;p&gt;If you do try this, please send feedback with as much detail as you like. I've noticed a bit of slowdown, but nothing drastic. My database is certainly significantly smaller, so I think I'm going to alter the setup script unless I get vastly negative feedback.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a href=&quot;http://wettone.com/weblog/comments/2006/04/20/reducing-size&quot;&gt;Comments&lt;/a&gt;&lt;/p&gt;
</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2006/04/20/reducing-size</guid>
<pubDate>Thu, 20 Apr 2006 09:08:10 +0100</pubDate>
</item>

<item>
<title>SlimStat via JavaScript</title>
<link>http://wettone.com/weblog/2006/03/14/slimstat-js</link>
<description>&lt;p&gt;Help wanted!&lt;/p&gt;

&lt;p&gt;Probably one of the most commonly-requested features for &lt;a href=&quot;/code/slimstat&quot;&gt;SlimStat&lt;/a&gt; is to be able to call it via JavaScript.&lt;/p&gt;

&lt;p&gt;If you would like to help test this new feature, please download and extract &lt;a href=&quot;/code/download/slimstat-js.zip&quot;&gt;slimstat-js.zip&lt;/a&gt;. It should all be fairly self-explanatory.&lt;/p&gt;

&lt;p&gt;The simplest thing to do is to unzip it to the &lt;code&gt;/slimstat-js/&lt;/code&gt; directory on your site, and then include &lt;code&gt;slimstat.js&lt;/code&gt; in all pages you wish to track. Note that you should stop including the PHP version of SlimStat, otherwise each hit will be recorded twice.&lt;/p&gt;

&lt;p&gt;Code like this should do the trick:&lt;/p&gt;

 &lt;pre&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;/slimstat-js/slimstat.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;p&gt;It uses Simon Willison's &lt;a href=&quot;http://simon.incutio.com/archive/2004/05/26/addLoadEvent&quot;&gt;addLoadEvent&lt;/a&gt; function, so if that's already included in another JavaScript file on the same page, you should remove it from this one.&lt;/p&gt;

&lt;p&gt;I'm looking for as much feedback as possible, from a wide variety of web servers and browsers, so please feel free to either comment here or on the &lt;a href=&quot;http://groups.google.com/group/slimstat&quot;&gt;SlimStat Google Group&lt;/a&gt;.&lt;/p&gt;</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2006/03/14/slimstat-js</guid>
<pubDate>Tue, 14 Mar 2006 21:43:33 +0000</pubDate>
</item>

<item>
<title>SlimStat 0.9</title>
<link>http://wettone.com/weblog/2006/01/24/slimstat</link>
<description>&lt;p&gt;Version 0.9 of &lt;a href=&quot;/code/slimstat&quot;&gt;SlimStat&lt;/a&gt;, my simple but powerful web stats analyser, is now available.&lt;/p&gt;

&lt;p&gt;Here's a brief summary of what's new in this version.&lt;/p&gt;

&lt;h3&gt;Ability to remove older data to reduce database size&lt;/h3&gt;

&lt;p&gt;By popular demand, you can now remove older data from SlimStat to help stop your database growing too large. Edit the &lt;code&gt;max_data_age_days&lt;/code&gt; setting in &lt;code&gt;_config.php&lt;/code&gt; and then visit the new Admin plugin (which you should see in the menu) to remove older data. SlimStat keeps a summary count of hits, visits and IPs in a separate table for posterity.&lt;/p&gt;

&lt;p&gt;It was suggested that this should all happen automatically, but I found it to be too slow. If you'd like to fiddle around in the code, it should be reasonably simple to make the relevant changes for this to happen. I would really appreciate feedback on this function.&lt;/p&gt;

&lt;h3&gt;Ability to specify the first day of the week&lt;/h3&gt;

&lt;p&gt;Weeks start on Sunday by default, but you can now edit the &lt;code&gt;week_start_day&lt;/code&gt; setting in &lt;code&gt;_config.php&lt;/code&gt; to make them start on any day you wish.&lt;/p&gt;

&lt;h3&gt;New wider layout for some modules to show more text&lt;/h3&gt;

&lt;p&gt;Some modules had too much text to show in SlimStat's layout, so I've widened a few of them to make more text visible.&lt;/p&gt;

&lt;h3&gt;Translations&lt;/h3&gt;

&lt;p&gt;Many thanks to various contributors who have translated SlimStat into these languages: German (de-de), Dutch (nl-nl), and Traditional Chinese (zh-tw). To use any of these translations, change the &lt;code&gt;i18n&lt;/code&gt; setting in &lt;code&gt;_config.php&lt;/code&gt; to your desired language code.&lt;/p&gt;

&lt;p&gt;If you've translated SlimStat into a different language, please send me the file and I'll include it in future releases. I've created a mailing list for discussion of i18n at &lt;a href=&quot;http://groups.google.com/group/slimstat-i18n&quot;&gt;Google Groups&lt;/a&gt;.&lt;/p&gt;
</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2006/01/24/slimstat</guid>
<pubDate>Tue, 24 Jan 2006 23:22:59 +0000</pubDate>
</item>

<item>
<title>Windows Media Components for QuickTime</title>
<link>http://wettone.com/weblog/2006/01/12/quicktime</link>
<description>Free download from Microsoft for playing Windows Media in QuickTime; much nicer than their own player.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2006/01/12/quicktime</guid>
<pubDate>Thu, 12 Jan 2006 18:11:48 +0000</pubDate>
</item>

<item>
<title>Best blonde joke ever</title>
<link>http://wettone.com/weblog/2006/01/12/blonde-joke</link>
<description>Words fail me. This is absolutely brilliant.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2006/01/12/blonde-joke</guid>
<pubDate>Thu, 12 Jan 2006 17:52:23 +0000</pubDate>
</item>

<item>
<title>Cryptoquote</title>
<link>http://wettone.com/weblog/2006/01/11/cryptoquote</link>
<description>Crack the code to reveal the hidden quotation. Horribly addictive.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2006/01/11/cryptoquote</guid>
<pubDate>Wed, 11 Jan 2006 13:32:18 +0000</pubDate>
</item>

<item>
<title>Google Safe Browsing</title>
<link>http://wettone.com/weblog/2005/12/15/safe-browsing</link>
<description>A new plugin for Firefox 1.5 that alerts you if the web site you're visiting is asking for your information under false pretences. Nice one.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/12/15/safe-browsing</guid>
<pubDate>Thu, 15 Dec 2005 09:53:27 +0000</pubDate>
</item>

<item>
<title>The Elements of Typographic Style Applied to the Web</title>
<link>http://wettone.com/weblog/2005/12/14/typography</link>
<description>Stepping through the principles from the book &lt;em&gt;The Elements of Typographic Style&lt;/em&gt; and applying them to the web.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/12/14/typography</guid>
<pubDate>Wed, 14 Dec 2005 15:39:07 +0000</pubDate>
</item>

<item>
<title>Google Homepage API</title>
<link>http://wettone.com/weblog/2005/12/14/google-homepage-api</link>
<description>Wow. It's now possible for anyone to write modules that can appear on your personalised Google homepage.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/12/14/google-homepage-api</guid>
<pubDate>Wed, 14 Dec 2005 12:37:22 +0000</pubDate>
</item>

<item>
<title>Samorost 2</title>
<link>http://wettone.com/weblog/2005/12/13/samorost</link>
<description>Sequel to the brilliant Flash game. Chapter 1 is free, but if you get addicted you'll have to pay $9.90 for Chapter 2.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/12/13/samorost</guid>
<pubDate>Tue, 13 Dec 2005 11:54:13 +0000</pubDate>
</item>

<item>
<title>SlimStat 0.8</title>
<link>http://wettone.com/weblog/2005/12/13/slimstat</link>
<description>&lt;p&gt;Version 0.8 of SlimStat, my simple but powerful web stats analyser, is now available.&lt;/p&gt;

&lt;p&gt;Here's a brief summary of what's new in this version.&lt;/p&gt;

&lt;h3&gt;Huge internal rewrite for better extensibility&lt;/h3&gt;

&lt;p&gt;This version doesn't have many changes visible on the front end, but SlimStat's internals have been rewritten and code has moved around quite a bit. This is really just another step towards making a useful API for which plugins can be written in future.&lt;/p&gt;

&lt;h3&gt;New 'Referrers' module which appears when filtering by domain&lt;/h3&gt;

&lt;p&gt;Select a domain to filter by, and you'll see a new module showing all referrers from that domain. So if your site is linked to from various pages on a site, you can see a breakdown of which specific URLs are generating the most hits. This is also handy for looking at what strings people enter in search engines when they find you.&lt;/p&gt;

&lt;h3&gt;Links to whois services when filtering by visitor or domain&lt;/h3&gt;

&lt;p&gt;Now when you filter by visitor or domain, you'll see a question mark appear next to the filter's label. This links to a whois server where you can find out more about your visitors.&lt;/p&gt;

&lt;h3&gt;i18n&lt;/h3&gt;

&lt;p&gt;It's now possible to internationalise SlimStat. All the text is now in a separate file, which can be rewritten in the language of your choice.&lt;/p&gt;

&lt;p&gt;To translate SlimStat, add a new file at &lt;code&gt;i18n/foo/index.php&lt;/code&gt;, by making a copy of &lt;code&gt;i18n/en-gb/index.php&lt;/code&gt;, where &lt;code&gt;foo&lt;/code&gt; is the language code. To use the new language, change the &lt;code&gt;language&lt;/code&gt; setting in &lt;code&gt;_config.php&lt;/code&gt; from its default of &lt;code&gt;en-gb&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you've translated SlimStat into a different language, please send me the file and I'll include it in future releases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I've created a mailing list for discussion of i18n at &lt;a href=&quot;http://groups.google.com/group/slimstat-i18n&quot;&gt;Google Groups&lt;/a&gt;.&lt;/p&gt;
</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/12/13/slimstat</guid>
<pubDate>Tue, 13 Dec 2005 11:45:06 +0000</pubDate>
</item>

<item>
<title>Ten reasons to learn and use web standards</title>
<link>http://wettone.com/weblog/2005/12/07/web-standards</link>
<description>Show this to anyone who doubts that web standards are a good thing.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/12/07/web-standards</guid>
<pubDate>Wed, 07 Dec 2005 17:13:32 +0000</pubDate>
</item>

<item>
<title>Snowstorm</title>
<link>http://wettone.com/weblog/2005/12/07/snowstorm</link>
<description>Good game for winter: clear away all the snow.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/12/07/snowstorm</guid>
<pubDate>Wed, 07 Dec 2005 17:03:25 +0000</pubDate>
</item>

<item>
<title>Ricky Gervais podcasts for The Guardian</title>
<link>http://wettone.com/weblog/2005/12/03/ricky-gervais</link>
<description>Starting on Monday, he'll be making a series of 12 podcasts, tackling the big questions such as, &amp;ldquo;Jellyfish - do we need them?&amp;rdquo; Should be interesting.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/12/03/ricky-gervais</guid>
<pubDate>Sat, 03 Dec 2005 11:01:48 +0000</pubDate>
</item>

<item>
<title>Best of 2005</title>
<link>http://wettone.com/weblog/2005/12/03/best-of-2005</link>
<description>Like &lt;a href=&quot;/weblog/2004/12/06/best-of-2004&quot;&gt;last year&lt;/a&gt;, here's a page that's keeping track of all the 'best of 2005' lists.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/12/03/best-of-2005</guid>
<pubDate>Sat, 03 Dec 2005 10:57:43 +0000</pubDate>
</item>

<item>
<title>Streetcar</title>
<link>http://wettone.com/weblog/2005/11/30/streetcar</link>
<description>A self-service pay-as-you-go car rental service.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/11/30/streetcar</guid>
<pubDate>Wed, 30 Nov 2005 23:29:50 +0000</pubDate>
</item>

<item>
<title>Time travel</title>
<link>http://wettone.com/weblog/2005/11/30/time-travel</link>
<description>Design of a time-based Tube map.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/11/30/time-travel</guid>
<pubDate>Wed, 30 Nov 2005 23:29:15 +0000</pubDate>
</item>

<item>
<title>Conversion University</title>
<link>http://wettone.com/weblog/2005/11/24/conversion-university</link>
<description>An excellent series of articles from Google on how to drive traffic to your site and how to convert visitors into buyers once they're there.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/11/24/conversion-university</guid>
<pubDate>Thu, 24 Nov 2005 12:53:39 +0000</pubDate>
</item>

<item>
<title>35mm Lego camera</title>
<link>http://wettone.com/weblog/2005/11/23/lego-camera</link>
<description>Very cool. Who needs a digital camera when you could make yourself one of these?</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/11/23/lego-camera</guid>
<pubDate>Wed, 23 Nov 2005 14:04:13 +0000</pubDate>
</item>

<item>
<title>5 men in a limo</title>
<link>http://wettone.com/weblog/2005/11/22/5men</link>
<description>You may not recognise their faces, but their voices are oddly familiar.</description>
<author>stephen@wettone.com (Stephen Wettone)</author>
<guid isPermaLink="true">http://wettone.com/weblog/2005/11/22/5men</guid>
<pubDate>Tue, 22 Nov 2005 09:53:01 +0000</pubDate>
</item>

</channel>
</rss>
