<?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/"
	>

<channel>
	<title>Mark.</title>
	<atom:link href="http://mark.watero.us/feed/" rel="self" type="application/rss+xml" />
	<link>http://mark.watero.us</link>
	<description>Wordpress stuff, a statistics plugin, and jello</description>
	<lastBuildDate>Wed, 30 Dec 2009 04:02:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The future of kStats Reloaded statistics for Wordpress</title>
		<link>http://mark.watero.us/2009/12/future-of-kstats-reloaded-statistics-wordpress/</link>
		<comments>http://mark.watero.us/2009/12/future-of-kstats-reloaded-statistics-wordpress/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 04:02:45 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[kStats Reloaded]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[kstats]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://mark.watero.us/?p=577</guid>
		<description><![CDATA[I&#8217;m not sure how to say this, so I think I&#8217;ll just spit it out; there are some major changes on the horizon for kStats. These are good changes, and I will go into more detail farther on, but they are changes that I may negatively impact current users of the plugin. Out of 6,000+ [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure how to say this, so I think I&#8217;ll just spit it out; there are some major changes on the horizon for kStats. These are good changes, and I will go into more detail farther on, but they are changes that I may negatively impact current users of the plugin. Out of 6,000+ downloads, this could mean anywhere between a 2-3 dozen web sites! &lt;/tongue-in-cheek></p>
<h4>Humble Beginnings</h4>
<p>As I&#8217;ve mentioned a few hundred times, kStats began as a simple fork of StatPress Reloaded to speed things up and create a plugin more suited to larger applications of Wordpress.</p>
<p>Due to the nature of how StatPress chose to store statistics and report on them, a StatPress table had a tendency of growing extremely large, extremely fast. Not only did this approach create a severe bottleneck when visitors tried to access your site, but it was sadly even worse when you tried to retrieve the resulting data on the administrative side.</p>
<p>Due to this, I figured the best approach for kStats was to restructure the existing format to use aggregated data. Much smaller more accessible records that gave you a fast look at real time numbers combined with past totals.</p>
<h4>Statistics are important</h4>
<p>This approach worked great at first. kStats was fast, it recorded data quickly and it reported it to the site administrator just as fast. But over time, it&#8217;s starting to show its weakness. It gives you the numbers, but what about the meat of your stats? What if you want to see what happened last month? What about 3 weeks ago? Or 16 weeks ago?</p>
<p>I started to develop a new aggregate process which would store almost four times as much data, allowing the existing system to remain in place, and the reports to grow in features considerably. I could still sense impending doom with this approach though. What about further down the road? Would there be a ceiling to how much data I could store in an aggregate form? Would I just move the bloat from one storage method to another, winding up in the same pit that StatPress did?</p>
<h4>Learning from our mistakes</h4>
<p>In the end, I think StatPress was on the right track. I think I was too, but instead of forking down a completely different road, I think the best approach would be to learn a lesson from both approaches, and to turn that into a single new approach.</p>
<p>I was drowning in workload over the holidays, while simultaneously trying to keep up with family functions. I didn&#8217;t get a lot of time to work on kStats, and I must apologize to anybody I left out to dry as a result. There were some bug fixes desperately needed, and while they&#8217;re out now, they should&#8217;ve been out then. However while I didn&#8217;t have as much time to work on kStats as I would have liked, I did find some time here and there in the mornings and evenings to get some reading in.</p>
<h4>It&#8217;s all about the database</h4>
<p>I consider myself fairly competent when it comes to MySQL, and more importantly database design. The more I learn though (as with life), the more I realize I don&#8217;t know. SQL by itself, without the various layers that bring it to life on the web, is an art form all by itself.</p>
<p>I&#8217;ve been studying up on the subject, because I know it&#8217;s a very important part of this design process, as well as the design and development of a few other projects I&#8217;m working on right now, and I think I&#8217;ve drawn an outline for a new database structure that will allow kStats to break the mold a little when it comes to statistics recording and analysis for Wordpress.</p>
<p>Using a combination of MySQL engines, such as the ARCHIVE engine, and a completely redesigned schema, I think I can bring the speed without sacrificing any data. There&#8217;s no reason you shouldn&#8217;t be able to look up historical periods of time and see exactly what occurred. There&#8217;s no reason you shouldn&#8217;t be able to click a button and produce a detailed report using any piece of recorded data as the focus (as opposed to being restricted to predefined reports). This is what statistics are for after all, right?</p>
<h4>The bad news</h4>
<p>While the plugin is still technically considered a beta, I would rather not release a version that destroys all the data that&#8217;s been recorded to date. This may be unavoidable to some degree though.</p>
<p>While data that currently exists in the raw table of your kStats install is easy enough to move over to the new format with no data loss, the data that&#8217;s already been summarized might not be so easy to transfer.</p>
<p>Before I dive headlong into this new strategy I&#8217;m going to do everything in my power to determine how we can avoid such a loss. It may be as easy as providing a legacy utility which will store the historical data in a different format, and retrieve it when building certain reports. The problem I&#8217;m facing is that this aggregate data may be unusable in producing certain reports that require a particular level of accuracy.</p>
<p>It&#8217;s tough. I have a project board dedicated to brainstorming this, so I&#8217;ll be sure to keep everybody up to date on how it&#8217;s going to go down, well before it does.</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.watero.us/2009/12/future-of-kstats-reloaded-statistics-wordpress/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>kStats bugfix release 0.7.4</title>
		<link>http://mark.watero.us/2009/12/kstats-bugfix-release-074/</link>
		<comments>http://mark.watero.us/2009/12/kstats-bugfix-release-074/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 03:17:06 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[kStats Reloaded]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[compatibility]]></category>
		<category><![CDATA[kstats]]></category>

		<guid isPermaLink="false">http://mark.watero.us/?p=565</guid>
		<description><![CDATA[It&#8217;s been awhile since I&#8217;ve written anything on here or been able to do much work on kStats, and I must apologize for the absence. The holiday season came, and paid projects piled up for a short period that kept me far away from getting some much needed updates out.
Now that the holidays are nearing [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been awhile since I&#8217;ve written anything on here or been able to do much work on kStats, and I must apologize for the absence. The holiday season came, and paid projects piled up for a short period that kept me far away from getting some much needed updates out.</p>
<p>Now that the holidays are nearing an end, I&#8217;m still finding myself under a heavy workload. While this is of course a priority to put some food on the table, I am going to do my best to balance some free time in to continue development of kStats &#8211; I have some big plans that I hope to start implementing soon, of which I will write more about in a future post.</p>
<h4>The fixes</h4>
<p>I have a new permanent note written on my project board; &#8216;Check compatibility&#8217;. I chose with the last release to make use of PHP&#8217;s built in <a href="http://us.php.net/filter_var"><code>filter_var()</code></a> functionality, in lieu of reinventing the wheel for a validation routine. This method however wasn&#8217;t introduced until PHP 5.2.0, and caused the plugin to not function properly for anybody using it previous to that release. Fixed.</p>
<p>There was also a problem with the charts not displaying correctly on new installs. Despite the setting on the options page, a chart would only display as many days as it had data for, and didn&#8217;t fill in the blanks. This has been fixed, and should now display a full chart, regardless of data for a particular day.</p>
<p><a href="http://wordpress.org/extend/plugins/kstats-reloaded/">Download Here</a> &nbsp; <a href="http://wordpress.org/extend/plugins/kstats-reloaded/changelog/">Changelog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mark.watero.us/2009/12/kstats-bugfix-release-074/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Out of town for a few more days&#8230;</title>
		<link>http://mark.watero.us/2009/12/out-of-town-few-more-days/</link>
		<comments>http://mark.watero.us/2009/12/out-of-town-few-more-days/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 18:17:57 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[announcement]]></category>

		<guid isPermaLink="false">http://mark.watero.us/?p=499</guid>
		<description><![CDATA[I just wanted to let everybody know that me and my wife are out of town for the next few days &#8211; we had to take some time out to drive up to the children&#8217;s hospital again (for anybody who remembers that we were in and out quite a bit back in september), but everything [...]]]></description>
			<content:encoded><![CDATA[<p>I just wanted to let everybody know that me and my wife are out of town for the next few days &#8211; we had to take some time out to drive up to the children&#8217;s hospital again (for anybody who remembers that we were in and out quite a bit back in september), but everything is okay. We&#8217;re on a better be safe than sorry trip, and after a short trip to the OR earlier today we should be being discharged as early as tomorrow.</p>
<p>We&#8217;ve got a little christmas shopping to do after, as an earlier planned trip in the other direction is now highly improbable, but we will be home by Sunday. At that time I promise to immediately get on top of responding to all the comments I have received here since then, as well as to my email which I don&#8217;t currently have access to. I apologize for any inconvenience, and I&#8217;ll talk to you all again when we&#8217;re back home!</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.watero.us/2009/12/out-of-town-few-more-days/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5,000 downloads, and a little mod-security</title>
		<link>http://mark.watero.us/2009/12/kstats-5000-downloads-and-mod-security/</link>
		<comments>http://mark.watero.us/2009/12/kstats-5000-downloads-and-mod-security/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 08:46:20 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[kStats Reloaded]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[kstats]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://mark.watero.us/?p=495</guid>
		<description><![CDATA[kStats Reloaded just passed 5,000 downloads!
Thank you to everyone who has been part of the development, by supporting the plugin through using it, writing about it in your blogs, sending me feedback via comments, email or bug reports, and anything I missed mentioning! It&#8217;s been a lot of fun, and I hope to see it [...]]]></description>
			<content:encoded><![CDATA[<p>kStats Reloaded just passed 5,000 downloads!</p>
<p>Thank you to everyone who has been part of the development, by supporting the plugin through using it, writing about it in your blogs, sending me feedback via comments, email or bug reports, and anything I missed mentioning! It&#8217;s been a lot of fun, and I hope to see it continue growing in popularity.</p>
<p>I&#8217;ve got a list a mile long of new features that are up and coming, and I&#8217;m currently working on yet more improvements to the database structure as we speak in further attempts to ensure that this is not only an accurate and feature rich plugin, but a lil&#8217; speed demon too. Again, thank you all, and don&#8217;t be shy about sending me your criticisms or suggestions!</p>
<h3>Mod What?</h3>
<p>I just recently installed <a href="http://modsecurity.org/">Mod Security</a> on my server in an attempt to reduce the number of attacks on my blog and the ridiculous referrer spam that I&#8217;ve been getting lately. I&#8217;m sorry, but I have no interest in taking a screenshot of the latest kStats and showing everybody that 5 out of ten of my top referrers are coming from some stupid subdomain of a**f***d****.com (you&#8217;ll notice the most recent screenshot has the top referrers chart collapsed for a reason).</p>
<p>While it deals mainly in HTTP and regular expressions, of which I&#8217;m familiar with, the syntax is completely new to me. I hope I haven&#8217;t turned on any rules that result in any odd behaviour for anyone; If you notice anything out of the ordinary while trying to perform common tasks such as leaving comments, please let me know so that I can fix it asap. I already had to rewrite a few rules because I managed to make it believe using phpMyAdmin was some form of attempted SQL injection attack&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.watero.us/2009/12/kstats-5000-downloads-and-mod-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Entities bugfix 0.7.2</title>
		<link>http://mark.watero.us/2009/12/html-entities-bugfix-072/</link>
		<comments>http://mark.watero.us/2009/12/html-entities-bugfix-072/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 04:03:33 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[kStats Reloaded]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[kstats]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://mark.watero.us/?p=492</guid>
		<description><![CDATA[As I was writing my kStats introductory post for 0.7.1 I concurrently received a bug report which should be fixed now.
The problem was with the htmlentities() php function I was using &#8212; all information coming from the database should be trustworthy, due to sanitization on the way in. However I figured it couldn&#8217;t hurt to [...]]]></description>
			<content:encoded><![CDATA[<p>As I was writing my kStats introductory post for 0.7.1 I concurrently received a bug report which should be fixed now.</p>
<p>The problem was with the htmlentities() php function I was using &#8212; all information coming from the database should be trustworthy, due to sanitization on the way in. However I figured it couldn&#8217;t hurt to wrap it on the way out again, and make sure on both sides of the equation.</p>
<p>Since PHP 5.2.3 htmlentities() has allowed for a fourth argument, which if set to false won&#8217;t encode already encoded html entities. By running this on data to be displayed I figured it would help catch any mistakes that slipped by on the way in and ensure no malicious javascript could be injected into your dashboard. The problem is I forgot to read the changelog on the function and didn&#8217;t realize at first that it was only available on 5.2.3 and up, causing an error to be displayed for anybody running an earlier version.</p>
<p>The wrapper has been updated with a version check. If you&#8217;re running 5.2.3 and up it runs with the flag set. If you&#8217;re running an earlier version, it simply decodes the string first then encodes it again to make sure all html entities are caught.</p>
<p>Remember to upgrade your copy of PHP, or harass your sysadmin to do so for you! Not just to cover my blind spots (though it doesn&#8217;t hurt!) but for the sake of your own security. Keep up to date. (Disclaimer: I realize this responsibility is most often supposed to be that of the host. Hosts, despite providing otherwise exceptional service, can be dinosaurs when it comes to upgrading. Harass them.)</p>
<p>Thanks for catching that one Jake.</p>
<p><a href="http://wordpress.org/extend/plugins/kstats-reloaded/">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mark.watero.us/2009/12/html-entities-bugfix-072/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asynchronous and kStats; delivering fast statistics</title>
		<link>http://mark.watero.us/2009/12/asynchronous-kstats-delivering-fast-statistic/</link>
		<comments>http://mark.watero.us/2009/12/asynchronous-kstats-delivering-fast-statistic/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 03:19:14 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[kStats Reloaded]]></category>
		<category><![CDATA[kstats]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://mark.watero.us/?p=489</guid>
		<description><![CDATA[I don&#8217;t know why, but this blog has been really hard to write. Could be the fact that I&#8217;m still extremely sore from ripping the garage apart and cleaning it top to bottom, or the fact that I&#8217;m bummed out about my new intake for my car not being in the mail today, but I [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know why, but this blog has been really hard to write. Could be the fact that I&#8217;m still extremely sore from ripping the garage apart and cleaning it top to bottom, or the fact that I&#8217;m bummed out about my new intake for my car not being in the mail today, but I just don&#8217;t find writing easy at the moment. So I&#8217;ll just try and spit it out, and eventually it will get lost in my archives anyways&#8230;</p>
<h3>What&#8217;s new in 0.7.1?</h3>
<p>You won&#8217;t notice any major visual changes or fancy new features in this release. I fixed a possible vulnerability in the way that some of the data was stored and retrieved and added a new opt-in program which benefits the plugin and another program, both of which I&#8217;ll go into further detail on below.</p>
<p>I did however bump up the versioning from 0.6.x to 0.7.x because there&#8217;s something new going on behind the scenes that will be a long term benefit to kStats and the people who use it on their blogs.</p>
<h3>The Old Way</h3>
<p>The aggregate is tripped every night by somebody visiting your web site. Long story short, this would be better accomplished via a cron process run directly off the server, but due to the nature of plugins and Wordpress, expecting a user to set such a thing up just to use kStats would be asking a little too much.</p>
<p>When the aggregate was tripped, previous to this release, the process would run fast as fast can be and sort your data from the raw table into the seperate totals and charts tables. This of course allows kStats to run faster on a regular basis, and store more information with a <em>much</em> smaller footprint than its predecessor did. The pitfall was that the poor sap who tripped the process had to wait anywhere from 1-3 seconds extra for their page to load (possibly even longer on high traffic web sites).</p>
<p>In this age of broadband expectations, 3 seconds is an eternity.</p>
<h3>The New Way</h3>
<p>kStats now uses what is called an Asynchronous HTTP Request to run the aggregate. When the scheduled time comes, kStats fires off an HTTP request to an interface that runs the whole process in the background. This means that poor sap we were talking about above no longer notices a delay in their page load, no matter what the size of your database is or how much traffic you&#8217;re getting. </p>
<p>I promised when I started this project that the primary focus, regardless of features and capabilities, was to bring you the fastest plugin I could. I believe this update goes a long way to solidifying the groundwork of that promise.</p>
<h3>Odds and Ends</h3>
<p>There&#8217;s a new opt-in program that can be found on the Options page under the Definitions Utility &#8211; while I&#8217;m still looking for a more reliable Geolocation API (hint, hint), the user agent facility (determining OS, Browser, etc) is powered by the API provided by <a href="http://user-agent-string.info/">user-agent-string.info</a>.</p>
<p>Should you choose to participate, what happens is when kStats stumbles across a user agent it can&#8217;t identify, it will immediately fire it off to user-agent-string.info so that they can identify it and include it in the next update of their API. The more user agents we can identify, the more accurate the process will be in determining exactly what people are using when they visit your site.</p>
<p>In addition, a possible security vulnerability has been closed up in the way that some data was being stored and returned from the database. The upgrade process will clean your current database and all information entered from now on is completely verified and sanitized. Please note that this was not an SQL injection vulnerability but instead a much smaller XSS vulnerability.</p>
<p><a href="http://wordpress.org/extend/plugins/kstats-reloaded/">Download</a> <a href="http://wordpress.org/extend/plugins/kstats-reloaded/changelog/">Changelog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mark.watero.us/2009/12/asynchronous-kstats-delivering-fast-statistic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>0.6.x feature freeze in effect.</title>
		<link>http://mark.watero.us/2009/11/06x-feature-freeze-effect/</link>
		<comments>http://mark.watero.us/2009/11/06x-feature-freeze-effect/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 04:06:07 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[kStats Reloaded]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[kstats]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://mark.watero.us/?p=484</guid>
		<description><![CDATA[I have yet to track down the source of the problem. It&#8217;s hard to fix a problem that you can&#8217;t a) reproduce and b) even if you could, since the process is run deep behind the scenes you can&#8217;t step through it.
So other than some changes I made to the bar graph, I&#8217;m putting a [...]]]></description>
			<content:encoded><![CDATA[<p>I have yet to track down the <a href="http://mark.watero.us/2009/11/data-loss-during-nightly-cleanup/">source of the problem</a>. It&#8217;s hard to fix a problem that you can&#8217;t a) reproduce and b) even if you could, since the process is run deep behind the scenes you can&#8217;t step through it.</p>
<p>So other than some changes I made to the bar graph, I&#8217;m putting a complete freeze on adding new features to kStats until I&#8217;ve got this one nailed down. I&#8217;m going to go through each and every file and line of code one by one, and see where I can make improvements, fixes, or just finish commenting if nothing else.</p>
<h3>Tracking down the beast</h3>
<p>At the same time, since the only feasible source of the problem I can see is the nightly cleanup routines (as nothing else interacts directly with the totals table), I&#8217;ve taken a few steps. I&#8217;m now running a logger on it, so every time it trips I have a neat little text file that spits out every query, object and variable that&#8217;s part of the routine. I&#8217;m also running the wp-cron hook on an hourly basis, instead of nightly like regular users, so that it runs in a day what would normally take almost a month.</p>
<p>So far I haven&#8217;t seen the data get truncated again, so it may have been as simple as adding the call to <code>ignore_user_abort()</code>.</p>
<h3>In the meantime</h3>
<p>There may be a few rapid fire bugfix releases of the 0.6.x series in the next few days.</p>
<p>Due to the feature freeze, they will not include any database changes or major updates that require you to run the upgrade utility. Each one should drop into place and self-update without any headache caused on your part.</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.watero.us/2009/11/06x-feature-freeze-effect/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Data loss during nightly cleanup</title>
		<link>http://mark.watero.us/2009/11/data-loss-during-nightly-cleanup/</link>
		<comments>http://mark.watero.us/2009/11/data-loss-during-nightly-cleanup/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 10:04:33 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[kStats Reloaded]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[kstats]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://mark.watero.us/?p=482</guid>
		<description><![CDATA[I&#8217;ve had reports of it for many releases now &#8211; data is lost from the totals table, for no apparent reason. I&#8217;ve seen it in the search terms people use to find my site and the kStats plugin, and I&#8217;ve had bug reports and numerous comments about it. Until now, I&#8217;ve never seen it happen [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had reports of it for many releases now &#8211; data is lost from the totals table, for no apparent reason. I&#8217;ve seen it in the search terms people use to find my site and the kStats plugin, and I&#8217;ve had bug reports and numerous comments about it. Until now, I&#8217;ve never seen it happen and therefore had no basis to start my search in fixing it.</p>
<p>Well, after an entire week of testing 0.6.0 <em>every</em> day on my own blog to try and have kStats first major bug free release, I thought I was good to go. So I tagged it and dropped it in the repository earlier this evening, thinking &#8220;Finally!&#8221;.</p>
<p>Not an hour later, it happened.</p>
<p>My data was gone. All except for yesterday and the new hits coming in after midnight. Nothing was missing from the raw table or charts, something happened to truncate the totals (aggregate) information. The problem is, I still have no better clue what it was. It happened right after the wp-cron event for kStats was tripped, so I presume it has to be occurring during the cleanup routine. So I went in and debugged every query that was going on.</p>
<p>Every single query ran fine. I tripped the cron 7 times. Each and every time worked perfectly. So what the HECK is going on?</p>
<p>I&#8217;ve been banging my head against the walls and my dining room table for a few hours now trying to track it down. What good is a stats plugin that arbitrarily truncates data?! The only possibility I&#8217;ve come up with so far that seems remotely feasible is that it happens when a search engine or bot trips the cleanup &#8211; maybe they&#8217;re hitting a page and leaving so fast that it&#8217;s only getting part way into the process before it gets canceled?</p>
<p>So I just finished tagging 0.6.1, hopefully before too many people have already upped to 0.6.0. I added (and probably should have since day one anyways) <a href="http://us.php.net/manual/en/function.ignore-user-abort.php"><code>ignore_user_abort()</code></a> to the primary cleanup function to ensure that even if the page is exited before the script is done, it will follow through. I had this in the collector, I&#8217;m not sure why I didn&#8217;t put it there before.</p>
<p>If that doesn&#8217;t fix the problem, I&#8217;m going to turn the cron feature off and make it a utility on the Options page until the reason is tracked down. I would like to release a stable version. I can&#8217;t until this is worked out.</p>
<p>*sigh*</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.watero.us/2009/11/data-loss-during-nightly-cleanup/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Over half way there, kStats Reloaded v0.6.0</title>
		<link>http://mark.watero.us/2009/11/kstats-reloaded-v060/</link>
		<comments>http://mark.watero.us/2009/11/kstats-reloaded-v060/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 05:24:39 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[kStats Reloaded]]></category>
		<category><![CDATA[kstats]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://mark.watero.us/?p=472</guid>
		<description><![CDATA[I have to stop making changes to the user interface. Every time I&#8217;m about ready to tag a new release of kStats, I finish checking in the last of the files to Trunk, and just as I start typing svn cp trunk tags/x.x.x&#8230; Oops, forgot the new screenshots.
Would it be funny if I just left [...]]]></description>
			<content:encoded><![CDATA[<p>I have to stop making changes to the user interface. Every time I&#8217;m about ready to tag a new release of kStats, I finish checking in the last of the files to Trunk, and just as I start typing <code>svn cp trunk tags/x.x.x</code>&#8230; Oops, forgot the new screenshots.</p>
<p>Would it be funny if I just left the screenshots from 0.1.0 up forever?</p>
<h3>The path to stable</h3>
<p>So far I&#8217;ve been managing to hit all of my goals, even surpassing a few during the beta period of kStats. I fubbed up the nightly aggregates for the first little bit, until I realized half my problem was my attempt to reinvent my own wheel. The other half fell under the same umbrella, I was just making things complicated that could have been simplified. Once I crested that hill, things starting falling into place. <span id="more-472"></span></p>
<p>There have been other bumps too. Never before this have I developed a publicly released plugin, and had to deal with automatic upgrades, collective groups of database upgrades and other such freakiness. Before now, if something broke, it wasn&#8217;t a big deal. I could just fix it.</p>
<p>Now I have to make sure nothing breaks, because the general public is playing with my potential disasters. I rushed a few releases I really shouldn&#8217;t have, and had to tag bug fixes within minutes to hours of those releases. Talk about red in the face. I&#8217;m fine-tuning my release process, and this time around I&#8217;ve been running the latest version for over a week on my own blogs to try and throw everything I could at it. It was well worth the effort too, I discovered over a dozen bugs that might have been serious deterrents to people making use of my plugin.</p>
<p>We&#8217;re over halfway through the beta process now, and I want at least four version releases without a single (major) problem before I finally tag the 1.0.0 release. It&#8217;s looking up.</p>
<h3>What&#8217;s new?</h3>
<p>kStats has come quite a ways since 0.1.0 and it&#8217;s single page of statistics. Over the past few releases I&#8217;ve added both a dashboard and blog widget, organized all the statistical data into much easier to navigate pages, and developed an Options page which allows you, the user, to gain some control over how kStats works.</p>
<p>With this release, I&#8217;ve been listening.</p>
<h4>The database</h4>
<p>I&#8217;ve actually had quite a bit of help and feedback from people named Rene. One of the Rene&#8217;s <a href="http://mark.watero.us/kstats-reloaded/#comment-415">dug some skeletons out of my closet</a> and pointed out the fact that I hadn&#8217;t really updated the SQL schema since porting from StatPress. While I&#8217;ve still got some future plans to improve the capability and structure of the current schema, I took heed!</p>
<p>The tables have been updated considerably to reduce size and increase speed of access. IPs are now being translated to long so that they can be stored in a more appriopriate INT field. I dropped the ID column for now as it has yet to server a purpose, though it may come back if I go through with adding meta data tables to further improve the speed of the main raw data table. I took two fields that have set data in them and reduced them to ENUMs, and the rest are now VARCHAR.</p>
<p>The only stipulation is that you have to be running MySQL 5.0.3 or greater to take full advantage of the VARCHAR fields (and lack of disk writes that come with them in most queries). The url, referrer, and user agent columns need to handle data greater than 255 characters in length, so there is a version check in place to determine the version of your MySQL server &#8211; if you&#8217;re lower than 5.0.3 <del>you should upgrade immediately</del> kStats will automatically set these columns up as TEXT.</p>
<h4>File system structure</h4>
<p>The whole structure of the plugin has been modified to maintain the highest level of organization possible, while keeping the door wide open for future expansion in a variety of areas. A few new methods have also been added, including one that permits the Options page to load utility files. Each utility is a self contained feature that can be removed as easily as deleting the file. On the flip side, new utilities can be added (and developed) at the drop of a hat.</p>
<p>I&#8217;m not entirely sure there&#8217;s a need for plugins on a plugin &#8211; the idea was mainly to make part of my life easier and for the plugin to operate better in your lives, but it&#8217;s just another possibility for the future of kStats.</p>
<h4>Access Permissions</h4>
<p><a href="http://mark.watero.us/2009/10/statistics-analysis-wordpress-feature-requests/#comment-433">Another request</a> I had that was already on my todo list; the ability to allow other blog users to view the stats has been added. From the Options page of the plugin you can now set varying levels (based on the built in Wordpress user roles) of access to either view statistics or manage options for them.</p>
<p>Eventually I would like to upgrade this facility to deny access from everyone (including other administrators with the exception of the blog creator) if desired, or add people on a user by user basis regardless of their level. This function will also extend to MU and the looming merge to include site wide options, per blog options and their respective permissions.</p>
<h4>Deactivation != Destruction</h4>
<p>The deactivation hook of kStats no longer destroys all the accumulated data. I&#8217;ve moved this to the uninstall hook, to accommodate situations where you may want to or need to deactivate the plugin without losing everything that&#8217;s been recorded. The whole upgrade/installation process has been highly modified to streamline events.</p>
<p>If you work by hand, like I do, there is also an uninstall utility located on the Options page which will manually remove the database tables and any options added by the plugin.</p>
<h4>StatPress Conversion</h4>
<p>The Conversion utility has been upgraded again. Instead of manually backing up your old StatPress table, the utility creates a temporary table that it works from, so nothing extra is required on your part to ensure data integrity. I&#8217;ve also stopped my silliness of mangling the data directly inside of the StatPress table to populate all the kStats tables. The table is only modified as needed to transfer the data into your raw table, at which time the aggregate methods are run on the raw table to populate your totals and charts tables.</p>
<p>The option has been added to run the kStats user agent identifier on your StatPress table. While this feature will provide a much higher level of accuracy in identifying bots, browsers and operating systems, be warned! I ran it on a small table of 40 thousand some odd rows and it took over 2 minutes to complete. So if you&#8217;re going to use it, be prepared to go find yourself a snack.</p>
<p>I&#8217;ve also had the pleasure of testing it on a much larger database (over three hundred thousand rows), and though the process can be time consuming, it works!</p>
<h4>Internacionalizaci&oacute;n</h4>
<p>I should have been doing this from day one. It&#8217;s been a tedious process, but I&#8217;ve completed a huge portion of the work necessary to provide i18n support for kStats. I&#8217;d have to say tentatively that about 90% of the plugin is now running Wordpress i18n functionality, and by the next release (and many more coffee&#8217;s) I should have support completely in place and ready to go for translations.</p>
<p>I&#8217;m not sure if there&#8217;s anybody out there that will be interested, and honestly even when it&#8217;s fully in place I&#8217;d suggest that anybody willing would wait until the stable version 1.0.0 release. Things just change so much right now that it might be a bit of a stressful project to keep up with.</p>
<h4>Odds and Ends</h4>
<p>Long enough post for you? I&#8217;m sorry, I&#8217;ll try and wrap it up.</p>
<p>The interface now runs postbox&#8217;s. You can move things, collapse them, and generally it makes everything look prettier. I want this plugin to look like it belongs on Wordpress, instead of trying too hard to make it look stylish.</p>
<p>Recent Hits is now Recent Pageviews, and you can group the results by IP or by the page viewed. There&#8217;s also a search feature, where you can type in an IP or IP fragment to locate specific entries. You&#8217;ll also notice a couple of new icons down the right side. When you see these, it means that the view either comes with a referrer attached, or from a search engine. Hover over them to find out.</p>
<p>I forget the rest&#8230;</p>
<h3>What&#8217;s coming next?</h3>
<p>I&#8217;ve got some plans for improving the collector. I want to start running it against a session to trap even more information such as time spent on a page, time spent on the site as a whole, bounce rates, and more. This would eventually evolve into a system (I hope) where by you could visually map each visitors path through the site.</p>
<p>Thanks to the recent (and persistent) RFI attacks on my blog, I&#8217;m thinking of adding an exploit scanner to the plugin. Basically this would check the visitor against a list of known exploits, attempt to determine the threat level, and notify you of such attacks. Possible attacks would be highlighted in the recent pageviews list, as well as maintain their own list. Features that may extend from this would be the ability to block such people from accessing your site either intentionally (by you) or if the threat level detected is high enough, the plugin could reject them itself. </p>
<p>I just discovered the Wordpress built in Snoopy class. I&#8217;m hoping to integrate this for use by the definitions update utility, once again reducing the additional code presented by kStats and using already available features of WP.</p>
<p>I&#8217;m also going to split up the top agents charts into two &#8211; top OS and top Browser. Right now it&#8217;s running against the User Agent string itself, and thus a lot of the results seem duplicated, when in reality they&#8217;re not. It however does seem more logical to group by the extracted names rather than the string itself, as the same version of the same product can produce different UA strings dependent on outside factors.</p>
<p>As for other possible upgrades, as usual, I&#8217;m waiting to hear what you&#8217;d like to see! I hope you enjoy the plugin.</p>
<p><a href="http://wordpress.org/extend/plugins/kstats-reloaded/screenshots/">Screenshots</a> &nbsp; <a href="http://wordpress.org/extend/plugins/kstats-reloaded/changelog/">Changelog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mark.watero.us/2009/11/kstats-reloaded-v060/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>To the recent RFI attempts on my site&#8230;</title>
		<link>http://mark.watero.us/2009/11/recent-rfi-attempts/</link>
		<comments>http://mark.watero.us/2009/11/recent-rfi-attempts/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 23:28:41 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://mark.watero.us/?p=468</guid>
		<description><![CDATA[I doubt any of you script kiddiez even look at the sites you attempt to hack with your little botnet and RFI scripts, but in case you do, I just have one question for the lot of you;
Does your grandma know what you&#8217;re doing in her rent-free basement?
I&#8217;m sorry, I realize most of you probably [...]]]></description>
			<content:encoded><![CDATA[<p>I doubt any of you script kiddiez even look at the sites you attempt to hack with your little botnet and RFI scripts, but in case you do, I just have one question for the lot of you;</p>
<h3>Does your grandma know what you&#8217;re doing in her rent-free basement?</h3>
<p>I&#8217;m sorry, I realize most of you probably live at home with mommy and daddy, and I shouldn&#8217;t be bringing your grandmother&#8217;s into this, but seriously. Half of you tried to attack my site with a phpBB vulnerability. I&#8217;m sorry, last time I checked, I was running Wordpress.</p>
<p>Put down the porn, sign off your favorite MMORPG, change your clothes and shower for once in your life and walk to the front of your house. There&#8217;s a big rectangle there with a little round knobby thing on it. This is called the front door. If you open it, there&#8217;s a life somewhere out there for you. Go find it.</p>
<p>You&#8217;re not getting root on my box, trust me. I&#8217;m sure a skilled hacker could if they put enough effort into it, but you&#8217;re not.</p>
<p>I don&#8217;t know who amongst my readers might have the skills and the time, but if you want to slap some children around with a big trout, here&#8217;s a few IPs from my logs;</p>
<p><code>61.63.10.150</code><br />
<code>64.6.232.171</code><br />
<code>194.105.193.46</code><br />
<code>209.216.213.119</code></p>
<p>Have a nice day!</p>
]]></content:encoded>
			<wfw:commentRss>http://mark.watero.us/2009/11/recent-rfi-attempts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
