<?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>Zarathustra Shall Speak &#187; WordPress</title>
	<atom:link href="http://zarathustrashallspeak.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://zarathustrashallspeak.com</link>
	<description>And you yourself are also this Will to Power.</description>
	<lastBuildDate>Tue, 17 Jan 2012 20:44:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Activity Streamage Complete.</title>
		<link>http://zarathustrashallspeak.com/2011/10/30/activity-streamage-complete/</link>
		<comments>http://zarathustrashallspeak.com/2011/10/30/activity-streamage-complete/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 02:39:03 +0000</pubDate>
		<dc:creator>Akairenn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Internets]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://zarathustrashallspeak.com/?p=888</guid>
		<description><![CDATA[Mission start.]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;ve gotten around to finishing off the site&#8217;s activity stream &#8211; well, at least the Last.fm/Github/Twitter streams.   I encountered a ton of hilarious Perl limitations along the way &#8211; for example, perl-DBD-MySQL, on RHEL5 systems, isn&#8217;t capable of handling UTF8.  I can&#8217;t fault RedHat here; the fact that it took so long for a core library to get UTF8 support is absurd.   I&#8217;ve had to handle three separate input types &#8211; XML, Atom and JSON &#8211; and handling JSON is irritating at best in Perl.   But, here we are.</p>
<p>Why&#8217;d I go to the trouble of all this, instead of just using random WordPress plugins?  A couple of reasons:</p>
<ul>
<li>WordPress plugins tend to do real-time pulls</li>
<li>WordPress plugins are exceedingly limited when it comes to customizing how data is displayed</li>
<li>WordPress plugins are, well, WordPress plugins</li>
</ul>
<h3>WordPress Plugins and Real-Time Pulls</h3>
<p>The activity stream plugins I&#8217;ve found for WordPress generally had one thing in common.  Well, they had a lot of things in common, but the first tour-de-farce is this: They tend to rely on real-time access to a third-party service.   That is, when a browser hits a page with a Twitter stream, a request is sent to Twitter.   Makes sense, no?   It provides up-to-the-minute accuracy, right?   What could be wrong with that?</p>
<p>So, what happens when, say, Twitter is down?   The better plugins allowed for a timeout and a failure message.   I actually hesitate to say better &#8211; better than what?</p>
<p>Here&#8217;s what&#8217;ll happen.   A browser will hit your site; the page will begin loading, and the user will be treated to a spinning circle of death, or a rotating beach ball of death, or some similar irritant.  For how long?   That depends.  What&#8217;s your timeout value?   For the pull request?   For PHP&#8217;s execution?   Whatever it is, chances are, it&#8217;s too long.  We live in a world of instant gratification, and the easiest way to lose visitors is by having slow or partially loading pages.   I don&#8217;t partificularly care about browsers and page views and traffic on this site, but if you&#8217;re going to do something, you might as well do it right.</p>
<p>Even assuming your real-time pull fails gracefully, what then?   Do you display your own fail whale?   Someone with a clue will say, &#8220;Oh, Twitter&#8217;s down.&#8221;  The vast majority of people out there don&#8217;t have a clue.   A computer is a magic box; the Internets are dark sorceries understood only by the Pope and/or Stephen Hawking.   Display an error message, and your browsers will believe it is <em>your</em> site that is broken.</p>
<p>Finally, there&#8217;s traffic.   What happens when you&#8217;re suddenly slammed with over 9000 hits per second?   Are your pulls asynchronous, or is Apache going to be left holding connections to individual browsers for no good reason, consuming increasingly massive amounts of RAM and spiking load until a small puddle of molten steel drips from your rack?  And are you going to have your API account taken out for abuse?</p>
<p>Direct pulls are stupid.</p>
<p>Granted, your average website about cats isn&#8217;t likely to have any of these problems.   But they&#8217;re so easily avoided in the first place.</p>
<h3>WordPress Plugins and Data Customization</h3>
<p>The single most important thing to me, and the reason pretty much every WordPress plugin failed, was customization of how data is presented.   The average plugin presented data in a fixed manner; if you wanted to change how it was displayed, you&#8217;d have to modify the plugin itself.  You can go that route, sure &#8211; but good luck keeping up with plugin updates after that.  And I&#8217;d rather maintain my own code than someone else&#8217;s.</p>
<p>Of course, this is sometimes a limitation of the third-party service &#8211; my Github stream, for example, is fairly h4x, because the atom feed spews broken links and a bunch of crufty markup.</p>
<h3>WordPress Plugins and WordPress</h3>
<p>Finally, WordPress plugins are designed to work with WordPress.   What a shocking revelation, I know.   That&#8217;s fine for now, really.  WordPress presently suits my needs.  What if it doesn&#8217;t, in the future?   The obvious answer is to switch to whatever activity stream capabilities any new platform might have.   There&#8217;s no guarantee that any given platform has the capabilities I need, however &#8211; and I&#8217;d have to deal with the first two items on this list all over again.</p>
<p>This certainly wasn&#8217;t a determining factor &#8211; but since I wasn&#8217;t happy with real-time data pulling, or the lack of customized presentation, this issue was solved as a bonus.</p>
<h3>Right, then&#8230;</h3>
<p>So, taking these problems into consideration, and espousing the Unix Way(tm), I wrote a series of small scripts to handle the matter entirely.   The scripts are invoked via cron, and can thus provide anything from occasional to near real-time data.  The scripts parse data returned via API or feed (in the case of Github), and insert any records not previously seen into a MySQL database table.  That &#8211; the involvement of SQL &#8211; eliminates problems.  Which problems?  <en>All of the problems.</em></p>
<p>Since a page load now references the local MySQL database, there&#8217;s no risk of users sitting around waiting for the page to load while Last.fm, Github and Twitter are contacted.   Those services <em>have already been contacted</em>.   There&#8217;s no issues of connection failure between the site and third-party services &#8211; if a data pull fails, <em>users will merely see out of date information</em>.  There&#8217;s no risk of API abuse, no matter how much traffic is involved &#8211; because the traffic hitting my webserver <em>is not resulting in additional API requests</em>.</p>
<p>In terms of presentation of data, I can do whatever the hell I want.   I can select precisely the data I need, and plug it into the markup I desire.  There is an exception &#8211; as noted, Github and its Atom feed &#8211; but even that&#8217;s now easier to customize.</p>
<p>Finally, since the data&#8217;s pulled into MySQL, it&#8217;s available to anything.  In my case, I am using my WordPress database for storage, but I can easily have other software reference the database and tables.  Or export and import the data into a different database.   The data pull will function regardless of what CMS (or lack thereof) I use for the site; the historic data can be transferred to any other software.  Hell, with a quick bit of scripting, I could have the entirety of my activity stream scroll by on a USB LED message board&#8230;</p>
<p>&#8230;You know, I might actually do that. ;)</p>
<p>At any rate, data customization really was my primary drive here &#8211; but the other benefits are icing on the cake.  Suet in the pudding.  Rum in the coke.  Bacon in the omelette.</p>
]]></content:encoded>
			<wfw:commentRss>http://zarathustrashallspeak.com/2011/10/30/activity-streamage-complete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>O hai.</title>
		<link>http://zarathustrashallspeak.com/2009/11/07/o-hai/</link>
		<comments>http://zarathustrashallspeak.com/2009/11/07/o-hai/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 20:21:50 +0000</pubDate>
		<dc:creator>Akairenn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Animu]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://zarathustrashallspeak.com/?p=107</guid>
		<description><![CDATA[Guns and Content Management Systems]]></description>
			<content:encoded><![CDATA[<p class="imgcent"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/qOKo1Mm7DZ4&#038;hl=en&#038;fs=1&#038;color1=0x2b405b&#038;color2=0x6b8ab6"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qOKo1Mm7DZ4&#038;hl=en&#038;fs=1&#038;color1=0x2b405b&#038;color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br />
<em>Gunslinger Girl &#8211; Il Teatrino ~ Opening 1<br />tatta hitotsu no omoi ~ KOKIA</em></p>
<p>So I&#8217;ve finally gotten around to finishing off Gunslinger Girl: Il Teatrino.  The first opening, as seen above, is purely epic.  It has a nice grounding effect with regard to the ridiculously brutal extreme that GSG took the &#8216;girls with guns&#8217; theme to &#8211; the real-world images merging with the series&#8217; theme is simply delicious.   Il Teatrino mainly revolves around Triela, rather than Henrietta.  Plot&#8217;s fairly decent; the only real hole is how cybernetically enhanced killing machines are capable of having issues dealing with a human assassin.   Like the first season, Il Teatrino is filled with plenty of pure WTF moments &#8211; this time mostly revolving around the origins of the girls.</p>
<p>All in all a worthy successor to the first season.  Then again, I&#8217;m a sucker for anything that takes an overly cutesy theme and twists it into something grim and dark. :p</p>
<p>In other news, I&#8217;ve gotten around to finishing the conversion from Drupal to WordPress.  That was easy(tm).  WordPress, frankly, owns the living crap out of Drupal in terms of running a blog.  Granted, Drupal can do <em>so much more</em>, but, well &#8211; I&#8217;m running a blog here.  WordPress &gt; Drupal for this use case.  The right tool for the job, and all that.</p>
<p>Still have some stuff to work out, mostly revolving around comments and image positioning in posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://zarathustrashallspeak.com/2009/11/07/o-hai/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

