<?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>Sivel.net &#187; Fun</title>
	<atom:link href="http://sivel.net/category/fun/feed/" rel="self" type="application/rss+xml" />
	<link>http://sivel.net</link>
	<description>Throwing Hot Coals</description>
	<lastBuildDate>Tue, 17 Jan 2012 22:32:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>&#8220;Mr. Jones&#8221;</title>
		<link>http://sivel.net/2011/02/mr-jones/</link>
		<comments>http://sivel.net/2011/02/mr-jones/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 17:43:12 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sivel.net/?p=1046</guid>
		<description><![CDATA[I&#8217;ve been debating launching a new theme on my site for some time. I could not decide if I wanted to write my own from scratch, hack another theme, or write a child theme. In the end I went with &#8230; <a href="http://sivel.net/2011/02/mr-jones/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been debating launching a new theme on my site for some time.  I could not decide if I wanted to write my own from scratch, hack another theme, or write a child theme.</p>
<p>In the end I went with writing a child theme for Twenty Ten.  I have such a difficult time finding a theme I like, and then find myself hacking it for hours on end because the code sucks.  Writing my own theme would have taken years, well maybe not, but would have taken far too long.</p>
<p>So here is my new WordPress child theme, titled &#8220;Mr. Jones&#8221;, inspired by the WordPress 3.0 Admin Bar and the grey color scheme.</p>
<div class='aligncenter'><p>
Well I&#8217;m a paint my picture<br />
Paint myself in blue and red and black and grey<br />
All of the beatiful colors are very, very meaningful<br />
Yeah, well you know, <strong>grey is my favorite color</strong><br />
I felt so symbolic yesterday<br />
If I knew Picasso<br />
I would buy myself a grey guitar and play</p>
<p>Mr. Jones and me&#8230;<br />
<small>- Counting Crows, Mr. Jones</small></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://sivel.net/2011/02/mr-jones/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WordPress Metric Comparison of 2.9.2 and 3.0</title>
		<link>http://sivel.net/2010/07/wordpress-metric-comparison-of-2-9-2-and-3-0/</link>
		<comments>http://sivel.net/2010/07/wordpress-metric-comparison-of-2-9-2-and-3-0/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 23:44:42 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CoolStuff]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sivel.net/2010/07/wordpress-metric-comparison-of-2-9-2-and-3-0/</guid>
		<description><![CDATA[Some times I like to look at metrics. Because I am bored? Probably. Without metrics how can really compare things. In any case I wanted to see the difference in the number of queries, generation time and peak memory usage &#8230; <a href="http://sivel.net/2010/07/wordpress-metric-comparison-of-2-9-2-and-3-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Some times I like to look at metrics.  Because I am bored?  Probably.  Without metrics how can really compare things.  In any case I wanted to see the difference in the number of queries, generation time and peak memory usage between WordPress 2.9.2 and WordPress 3.0.</p>
<p>One of the things that I have heard people say since the release of WordPress 3.0 is that it is noticably faster.  &#8220;Is it really?&#8221;, I asked myself.  No, not out loud&#8230;or was it?  Generally as much as we would like to make things faster from one release to the next, it doesn&#8217;t really happen that way.  There are new features added, rewrites of code, a new default theme and in the end metrics change.</p>
<p>So what really changed in the way of these 3 aspects of number of queries, generation time and peak memory usage?</p>
<h3>2.9.2:</h3>
<ul>
<li>18 queries</li>
<li>0.173 seconds</li>
<li>15.901 MB peak memory used</li>
</ul>
<h3>3.0:</h3>
<h4>Kubrick</h4>
<ul>
<li>16 queries</li>
<li>0.209 seconds</li>
<li>18.301 MB peak memory used</li>
</ul>
<h4>Twenty Ten</h4>
<ul>
<li>15 queries</li>
<li>0.212 seconds</li>
<li>18.32 MB peak memory used</li>
</ul>
<p>I have provided results as well for Twenty Ten, but so that we can perform a more apples to apples comparison we will use Kubrick.  We have reduced the number of queries by 2 from 2.9.2 to 3.0, but it took 0.036 seconds longer to generate the page.  In addition we now consume 2.4 MB more memory to generate the output.</p>
<p>I used the following code, placed at the very end of footer.php of the default theme for 2.9.2 and the very bottom of footer.php in twentyten.  In 2.9.2 I removed the timer_stop line that already existed in the footer.php of the default theme.</p>
<pre><code>&lt;!--
&lt;?php echo get_num_queries(); ?&gt; queries
&lt;?php timer_stop(1); ?&gt; seconds
&lt;?php echo round(memory_get_peak_usage() / 1024 / 1024, 3); ?&gt; MB Peak Memory Used
--&gt;</code></pre>
<p>The testing set up:</p>
<ul>
<li>Ubuntu 10.04</li>
<li>Apache 2.2.14</li>
<li>PHP 5.3.2 (Only enabled modules were mysql, gd and curl)</li>
<li>MySQL 5.1.41 (With all caching disabled)</li>
<li>Fresh installs of WordPress without any enabled plugins or modifications</li>
<li>Tests performed using curl against the front page</li>
<li>Averages over 25 tests per install</li>
</ul>
<p>Anyway, not really the most comprehensive metrics gathering test, but just something to look at.  But in the end, is WordPress 3.0 any faster?  With an absolute default install, no.  Does it matter that 3.0 is ever so slightly slower? No.  Should I be running WordPress 3.0 now? Yes!</p>
<p>Hopefully you find this post useful and that I didn&#8217;t waste 15 minutes of my day that I will never get back to talk about something you could care less about.</p>
]]></content:encoded>
			<wfw:commentRss>http://sivel.net/2010/07/wordpress-metric-comparison-of-2-9-2-and-3-0/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Detect wp_head and wp_footer from a Plugin</title>
		<link>http://sivel.net/2010/04/detect-wp_head-and-wp_footer-from-a-plugin/</link>
		<comments>http://sivel.net/2010/04/detect-wp_head-and-wp_footer-from-a-plugin/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 20:36:45 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[CoolStuff]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Questions]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sivel.net/?p=948</guid>
		<description><![CDATA[Normally I start these posts with &#8220;Every so often someone asks a question in the WordPress IRC channel that sparks my interest&#8221;, however today, to my great surprise someone actually caught my attention on the wp-hackers mailing list. For those &#8230; <a href="http://sivel.net/2010/04/detect-wp_head-and-wp_footer-from-a-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Normally I start these posts with &#8220;Every so often someone asks a question in the WordPress IRC channel that sparks my interest&#8221;, however today, to my great surprise someone actually <a href="http://lists.automattic.com/pipermail/wp-hackers/2010-April/031683.html">caught my attention</a> on the <a href="http://lists.automattic.com/mailman/listinfo/wp-hackers">wp-hackers</a> mailing list.</p>
<p>For those of you who didn&#8217;t click through, the question was:</p>
<blockquote><p>
Couldn&#8217;t find this on forums or anywhere else.<br />
What can I test to check if wp_footer was placed on the theme?
</p></blockquote>
<p>Before any replies came in I was already interested and when <a href="http://blog.ftwr.co.uk">Peter Westwood</a> replied with &#8220;The other way to do it is to do a http request based test which a special query arg on which you output a string on wp_footer.&#8221;, I was on the hook.</p>
<p>I spent a few minutes writing up a test plugin, to perform only this functionality and responded back to the list.  It was pretty well accepted and I got a few comments from <a href="http://planetozh.com">Ozh</a> and <a href="http://www.andrewnacin.com/">Andrew Nacin</a> on Twitter.  One of the comments was actually an idea, to extend the checks to make sure that the calls to <code>&lt;?php wp_head(); ?&gt;</code> and <code>&lt;?php wp_footer(); ?&gt;</code> were in the proper places in the code.</p>
<p>Before I get to the code, I want to spend a little time talking about the significance of wp_head() and wp_footer().  These 2 functions are the key to functionality of a lot of plugins and are the real work horses of themes.  The wp_head and wp_footer functions allow WordPress core and plugins to hook into your theme either directly before the <code>&lt;/head&gt;</code> or <code>&lt;/body&gt;</code> html tags in your theme and perform actions.  The majority of the time these actions are used to output style sheets or JavaScript, for use by plugins.  WordPress core uses it to output a lot of good functionality such as relational links to your RSS and ATOM feeds into the head of the document.  <a href="http://josephscott.org/archives/2009/04/wordpress-theme-authors-dont-forget-the-wp_head-function/">Joseph Scott</a> wrote about this nearly a year ago.  His post is fairly short but does a good job at explaining why it is important to include these functions.</p>
<p>Back to the original discussion, which was how do we detect whether or not wp_head and wp_footer are called in the active theme, and if called are they called, was it from the proper locations?</p>
<p>In my proof of concept plugin, we hook into admin_init, which will actually use wp_remote_get() to retrieve the frontend of our WordPress site.  It calls the url with 2 query vars, that if present will cause the plugin to hook into wp_head and wp_footer and output some content that we will later look for.  If the response was successful, as in returning a 200 response code, we will look at the content to see if <code>&lt;!--wp_head--&gt;</code> and <code>&lt;!--wp_footer--&gt;</code> are present.  If they are not we will see an admin notice telling us which problems were found.  If those strings were found but they were not found directly before <code>&lt;/head&gt;</code> or <code>&lt;/body&gt;</code> the notice will alert you of such.</p>
<p>Without further adieu:</p>
<p><script type='text/javascript' src='http://paste.sivel.net/embed/24.js'></script></p>
<p>Just in case you cannot see the code above, use this link: <a href="http://paste.sivel.net/24">http://paste.sivel.net/24</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sivel.net/2010/04/detect-wp_head-and-wp_footer-from-a-plugin/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Happy π Day</title>
		<link>http://sivel.net/2010/03/happy-pi-day/</link>
		<comments>http://sivel.net/2010/03/happy-pi-day/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 13:36:31 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Astronomy]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Holidays]]></category>
		<category><![CDATA[Movies]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[π]]></category>

		<guid isPermaLink="false">http://sivel.net/?p=936</guid>
		<description><![CDATA[I&#8217;ve gotten into this bad habit of not writing about anything except WordPress on this site. It&#8217;s quite sad in a way that I have this great publishing platform and I only write about WordPress, and I do so very &#8230; <a href="http://sivel.net/2010/03/happy-pi-day/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve gotten into this bad habit of not writing about anything except WordPress on this site.  It&#8217;s quite sad in a way that I have this great publishing platform and I only write about WordPress, and I do so very little.</p>
<p>Many years ago, I don&#8217;t remember how many exactly, I was challenged by my High School math teacher, that if I could memorize all the digits of π that were on the poster (86) above the white board, that I would get an &#8216;A&#8217; on the final without having to take it.  I spent a week or two, I even wrote a program for the <a href="http://en.wikipedia.org/wiki/TI-83_series">TI-83</a> to help me learn it.  In the end I learned somewhere around 280 digits of π and got that &#8216;A&#8217;.</p>
<p>From then until now, I have always held a special place in my heart for this number of numbers.  I own the movie <a href="http://en.wikipedia.org/wiki/Pi_%28film%29">π</a>, I own the book <a href="http://books.google.com/books?id=TB6jzz3ZDTEC&#038;lpg=PP1&#038;ots=3V9sqsTh4Q&#038;dq=a%20history%20of%20pi&#038;pg=PP1#v=onepage&#038;q=&#038;f=false">a history of π</a> and I have spent the last eleven to twelve years incredibly interested in this number.  Back in 1998 or so I actually ran a site dedicated to π on geocities that is now long gone and forgotten.</p>
<p>So in keeping with the color scheme of that old site I used to run, which I now realize was very Matrix-esque, have a happy <a href="http://en.wikipedia.org/wiki/Pi_Day">π day</a>!</p>
<div id="attachment_937" class="wp-caption alignnone" style="width: 510px"><img src="http://cache.sivel.net/blog/wp-content/uploads/2010/03/pi.png" alt="π" title="π" width="500" height="480" class="size-full wp-image-937" /><p class="wp-caption-text">Happy π day!</p></div>
<p>PS: From my days as an astrophysics major, I was taught that really only the first 42 digits of π are useful for computational purposes.  But what fun is that!?  Keep learning and cranking out those digits of π!</p>
]]></content:encoded>
			<wfw:commentRss>http://sivel.net/2010/03/happy-pi-day/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Where&#8217;d the CSS Go?</title>
		<link>http://sivel.net/2008/09/whered-the-css-go/</link>
		<comments>http://sivel.net/2008/09/whered-the-css-go/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 15:47:11 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Bored]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://sivel.net/?p=232</guid>
		<description><![CDATA[So I&#8217;m bored&#8230;Bored of a lot of things. So to satisfy at least part of my boredom, I killed my CSS a few minutes ago. Of course I have a backup, and yes I did kill it on purpose. Maybe &#8230; <a href="http://sivel.net/2008/09/whered-the-css-go/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m bored&#8230;Bored of a lot of things.  So to satisfy at least part of my boredom, I killed my CSS a few minutes ago.  Of course I have a backup, and yes I did kill it on purpose.  Maybe someday I will restore it.  My boredom isn&#8217;t driving me to rewrite my CSS, but destroying my CSS makes me smile, which seems to help.  UPDATE:  I just wrote a script to restore 10 lines of my css every 10 minutes.  In about 11 hours the site should be back to normal.  Perhaps I&#8217;ll write a script that continually removes all of the lines and then restores them all, 10 lines at a time.  Wouldn&#8217;t that be interesting?</p>
]]></content:encoded>
			<wfw:commentRss>http://sivel.net/2008/09/whered-the-css-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
