<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"> <channel><title>Gary Pendergast</title> <link>http://pento.net</link> <description>I'm on the Internet</description> <lastBuildDate>Sat, 03 Dec 2011 09:27:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <cloud domain="pento.net" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" /> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/GaryPendergast" /><feedburner:info uri="garypendergast" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>An Automattic Adventure</title><link>http://feedproxy.google.com/~r/GaryPendergast/~3/ZbU3_sPlhsg/</link> <comments>http://pento.net/2011/11/13/an-automattic-adventure/#comments</comments> <pubDate>Sun, 13 Nov 2011 21:46:50 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[Automattic]]></category> <category><![CDATA[VideoPress]]></category> <category><![CDATA[WordPress]]></category> <guid isPermaLink="false">http://pento.net/?p=643</guid> <description><![CDATA[Today I officially begin my role as a TransCoder1 at Automattic. As a TransCoder, I&#8217;ll be doing new and exciting things with VideoPress, our video hosting service. For the last 4 years or so, I&#8217;ve been working at MySQL (which was swallowed by Sun, which in turn was consumed by Oracle), based 100% out of [...]]]></description> <content:encoded><![CDATA[<p>Today I officially begin my role as a <em>TransCoder</em><sup
class='footnote'><a
href='#fn-643-1' id='fnref-643-1'>1</a></sup> at <a
href="http://automattic.com">Automattic</a>. As a TransCoder, I&#8217;ll be doing new and exciting things with <a
href="http://videopress.com">VideoPress</a>, our video hosting service.</p><p>For the last 4 years or so, I&#8217;ve been working at MySQL (which was swallowed by Sun, which in turn was consumed by Oracle), based 100% out of my home office. The thread of working as part a distributed company is something I&#8217;m very happy to be continuing at Automattic.<br
/> <img
class="alignright size-full wp-image-645" style="margin-left: 10px;" title="Employee:Visitors ratio" src="http://pento.net/blog/wp-content/uploads/2011/11/employee-ratio.png" alt="" width="300" height="324" /></p><h4>What else is cool?</h4><p><em>Impact is cool.</em> Automattic is around 100 people, but WordPress.com is one of the top 20 websites in the world, getting millions of visitors a day. Look at that employee:visitor ratio in the table over there. Isn&#8217;t that a beautiful thing?</p><p><em>Getting things done is cool.</em> The smart people at Automattic<sup
class='footnote'><a
href='#fn-643-2' id='fnref-643-2'>2</a></sup> have done a great job of making <a
href="http://toni.org/2010/05/19/in-praise-of-continuous-deployment-the-wordpress-com-story/">continuous deployment</a> scale as they&#8217;ve grown, so engineers can rapidly develop, launch and iterate features. There&#8217;s nothing quite like launching a new feature, seeing it run millions of times an hour, then tweaking it based on how people are using it.</p><p><em>Working with awesome people is cool.</em> I&#8217;ve had the privilege of getting to know the folks at Automattic recently, and even meeting a few of them. When work turns from the usual day-to-day, into hanging out with friends and doing interesting things, you know you&#8217;re onto something.</p><h4>The Automattic Creed</h4><p>I don&#8217;t think I&#8217;ve ever worked for a company that has a creed, but I like this one.</p><blockquote><p>I will never stop learning. I won’t just work on things that are assigned to me. I know there’s no such thing as a status quo. I will build our business sustainably through passionate and loyal customers. I will never pass up an opportunity to help out a colleague, and I’ll remember the days before I knew everything. I am more motivated by impact than money, and I know that Open Source is one of the most powerful ideas of our generation. I will communicate as much as possible, because it’s the oxygen of a distributed company. I am in a marathon, not a sprint, and no matter how far away the goal is, the only way to get there is by putting one foot in front of another every day. Given time, there is no problem that’s insurmountable.</p></blockquote><h4>What will happen to my other projects?</h4><p><a
href="http://ponyedit.com">PonyEdit</a> development is continuing strongly. We&#8217;re working on a bunch of serious performance improvements, expect to see it out soon.</p><p><a
title="WordPress Job Manager Plugin" href="http://pento.net/projects/wordpress-job-manager-plugin/">Job Manager</a> is slowly waking up from the long winter of bug-fix releases only. With a little luck, I&#8217;ll be able to start making some serious inroads on the next feature release.</p><p>I also have some ideas I want to play around with, and now sounds like a good time to see what works. Stayed tuned. <img
src='http://pento.net/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p><h4>One more thing&#8230;</h4><p>If you want to join in the fun, go and check out our <a
href="http://automattic.com/work-with-us/">Work With Us</a> page, and apply! You may end up becoming my TransCoding sidekick (we&#8217;ll get superhero costumes, and our own theme music).</p><div
class='footnotes'><div
class='footnotedivider'></div><ol><li
id='fn-643-1'>This title is a terrible geeky pun. Blame <a
href="http://ma.tt">Matt</a>. <span
class='footnotereverse'><a
href='#fnref-643-1'>&#8617;</a></span></li><li
id='fn-643-2'>Do you like how I implied that I&#8217;m a smart people now, too? <span
class='footnotereverse'><a
href='#fnref-643-2'>&#8617;</a></span></li></ol></div> <img src="http://feeds.feedburner.com/~r/GaryPendergast/~4/ZbU3_sPlhsg" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://pento.net/2011/11/13/an-automattic-adventure/feed/</wfw:commentRss> <slash:comments>3</slash:comments> <feedburner:origLink>http://pento.net/2011/11/13/an-automattic-adventure/</feedburner:origLink></item> <item><title>Avoiding HTC Locations</title><link>http://feedproxy.google.com/~r/GaryPendergast/~3/Ia_vS2TyB4E/</link> <comments>http://pento.net/2011/07/12/avoiding-htc-locations/#comments</comments> <pubDate>Tue, 12 Jul 2011 05:05:49 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[Misc]]></category> <category><![CDATA[Android]]></category> <category><![CDATA[Desire HD]]></category> <category><![CDATA[HTC]]></category> <guid isPermaLink="false">http://pento.net/?p=612</guid> <description><![CDATA[I recently updated my HTC Desire HD to Android 2.3, which is quite nice. Unfortunately, HTC has used this upgrade to force its Locations app into the system &#8211; if you select an address in Calendar, then Locations will open, even if you have another mapping application set to default. Happily, if this is something [...]]]></description> <content:encoded><![CDATA[<p>I recently updated my HTC Desire HD to Android 2.3, which is quite nice.</p><p>Unfortunately, HTC has used this upgrade to force its Locations app into the system &#8211; if you select an address in Calendar, then Locations will open, even if you have another mapping application set to default.</p><p>Happily, if this is something that bothers you, there&#8217;s an easy workaround for this.</p><ol><li>If you haven&#8217;t already, install a file browser app &#8211; I use <a
href="https://market.android.com/details?id=com.metago.astro">ASTRO File Manager</a>.</li><li>If you haven&#8217;t already, register an account on <a
href="http://androidforums.com/register.php">Android Forums</a>.</li><li>Go to <a
href="http://androidforums.com/htc-droid-incredible/250029-htc-vs-android-calendar.html#post2623147">this post</a>, and download the attached file, com.google.android.calendar.apk. This is the default Android Calendar app.</li><li>Plug your phone into your computer, so it appears as an attached drive, and copy com.google.android.calendar.apk to your phone. Once it has finished copying, disconnect your phone.</li><li>Open ASTRO File Manager, and locate com.google.android.calendar.apk. Select it, then use the &#8220;Open App Manager&#8221; option.</li><li>Install it.</li><li>Go to your Apps, and open the Calendar app. The first time you open it, it&#8217;ll crash &#8211; you can just Force Close it.</li><li>Open the Calendar app again, and open an event &#8211; it will ask you which Calendar app you want to use as default, select the one with the Blue calendar icon.</li></ol><p>Okay, so there are a few steps involved, but if you&#8217;re familiar with side-loading apps, it shouldn&#8217;t take you more than a few minutes.</p><p>After this, individual events will open in Google Calendar, which <em>does</em> use your default mapping application. It won&#8217;t disable HTC Locations completely, but it&#8217;s the best option we have.</p><p>Finally, an open letter:</p><blockquote><p>Dear HTC,</p><p>Respect system defaults.</p><p>Love,<br
/> Android users everywhere.</p></blockquote> <img src="http://feeds.feedburner.com/~r/GaryPendergast/~4/Ia_vS2TyB4E" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://pento.net/2011/07/12/avoiding-htc-locations/feed/</wfw:commentRss> <slash:comments>3</slash:comments> <feedburner:origLink>http://pento.net/2011/07/12/avoiding-htc-locations/</feedburner:origLink></item> <item><title>PonyEdit: It’s really fast</title><link>http://feedproxy.google.com/~r/GaryPendergast/~3/5agteG208TA/</link> <comments>http://pento.net/2011/06/27/ponyedit-its-really-fast/#comments</comments> <pubDate>Mon, 27 Jun 2011 13:36:33 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[PonyEdit]]></category> <category><![CDATA[cloud development]]></category> <category><![CDATA[editor]]></category> <guid isPermaLink="false">http://pento.net/?p=603</guid> <description><![CDATA[Over the past few months, a friend and I have been hard at work on a new breed of text editor that we call PonyEdit. If you&#8217;ve ever found yourself cursing over the lag of working on remote cloud servers, this is the editor for you. It’s not just another SFTP editor… Reading and writing [...]]]></description> <content:encoded><![CDATA[<p>Over the past few months, a friend and I have been hard at work on a new breed of text editor that we call PonyEdit. If you&#8217;ve ever found yourself cursing over the lag of working on remote cloud servers, this is the editor for you.</p><blockquote><p><strong>It’s not just another SFTP editor…</strong></p><p>Reading and writing files over SFTP is nothing new; dozens of text editors can do it. But it’s always slow, clunky and feels like the feature was bolted on as an afterthought. You’ll find yourself using separate shortcuts to open files locally vs remotely, and dealing with sometimes painful save times with every edit, no matter how minor.</p><p>PonyEdit gets rid of this terribly slow method of working by connecting over SSH, and using <strong>edit streaming</strong> to push changes to the server in the background as-you-type.</p></blockquote><p>Head on over to <a
href="http://ponyedit.com">PonyEdit.com</a> to download a free trial, and let me know what you think! Oh, and&#8230;</p><blockquote><p>Stand by to have your mind blown.</p></blockquote> <img src="http://feeds.feedburner.com/~r/GaryPendergast/~4/5agteG208TA" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://pento.net/2011/06/27/ponyedit-its-really-fast/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://pento.net/2011/06/27/ponyedit-its-really-fast/</feedburner:origLink></item> <item><title>Preventing Users From Accessing wp-admin</title><link>http://feedproxy.google.com/~r/GaryPendergast/~3/t941MLn9i74/</link> <comments>http://pento.net/2011/06/19/preventing-users-from-accessing-wp-admin/#comments</comments> <pubDate>Sun, 19 Jun 2011 05:58:45 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[WordPress]]></category> <category><![CDATA[hack]]></category> <guid isPermaLink="false">http://pento.net/?p=592</guid> <description><![CDATA[If you have a WordPress site that you allow people to sign up for, you often don&#8217;t want them to be able to access wp-admin. It&#8217;s not that there are any security issues, you just want to ensure that your users are accessing your site in a predictable manner. To block non-admin users from getting [...]]]></description> <content:encoded><![CDATA[<p>If you have a WordPress site that you allow people to sign up for, you often don&#8217;t want them to be able to access wp-admin. It&#8217;s not that there are any security issues, you just want to ensure that your users are accessing your site in a predictable manner.</p><p>To block non-admin users from getting into wp-admin, you just need to add the following code to your <tt>functions.php</tt>, or somewhere similar:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'blockusers_init'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> blockusers_init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span> current_user_can<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'administrator'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		wp_redirect<span style="color: #009900;">&#40;</span> home_url<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>Ta-da! Now, only administrator users can access wp-admin, everyone else will be re-directed to the homepage.</p> <img src="http://feeds.feedburner.com/~r/GaryPendergast/~4/t941MLn9i74" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://pento.net/2011/06/19/preventing-users-from-accessing-wp-admin/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://pento.net/2011/06/19/preventing-users-from-accessing-wp-admin/</feedburner:origLink></item> <item><title>Partitioning the WordPress Comments Table</title><link>http://feedproxy.google.com/~r/GaryPendergast/~3/rua8enmy76I/</link> <comments>http://pento.net/2011/04/28/partitioning-the-wordpress-comments-table/#comments</comments> <pubDate>Thu, 28 Apr 2011 07:19:41 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[MySQL]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[Partitioning]]></category> <guid isPermaLink="false">http://pento.net/?p=579</guid> <description><![CDATA[WordPress sites can get big. Really big. When you&#8217;re looking at a site of Cheezburger, Engadget or Techcrunch proportions, you get hundreds of comments per post, on dozens of posts per day, which adds up to millions of comments per year. In order to keep your site running in top condition, you don&#8217;t want to [...]]]></description> <content:encoded><![CDATA[<p>WordPress sites can get big. Really big. When you&#8217;re looking at a site of Cheezburger, Engadget or Techcrunch proportions, you get hundreds of comments per post, on dozens of posts per day, which adds up to millions of comments per year.</p><p>In order to keep your site running in top condition, you don&#8217;t want to be running queries against tables with lots of rarely accessed rows, which is what happens with most comments &#8211; after the post drops off the front page, readership drops, so the comments are viewed much less frequently. So, what we want to do is remove these old comments from the primary comment table, but keep them handy, for when people read the archives.</p><p>Enter partitioning.</p><p>The idea of MySQL partitioning is that it splits tables up into multiple logical tablespaces, based on your criteria. Running a query on a single partition of a large table is much faster than running it across the entire table, even with appropriate indexes.</p><p>In the case of the WordPress comments table, splitting it up by the `comment_post_ID` seems to be the most appropriate . This should keep the partitions to a reasonable size, and ensure that there&#8217;s minimal cross-over between partitions.</p><p>First off, we need to add the `comment_post_ID` column to the Primary Key. This can be a slow process if you already have a massive `wp_comments` table, so you may need to schedule some downtime to handle this. Alternatively, there many methods for making schema changes with no downtime, such as judicious use of Replication, Facebook&#8217;s <a
href="https://www.facebook.com/notes/mysql-at-facebook/online-schema-change-for-mysql/430801045932">Online Schema Change Tool</a>, or the currently-in-development <a
href="http://code.google.com/p/maatkit/issues/detail?id=1268">mk-online-schema-change</a>, for Maatkit.</p><div
class="wp_syntax"><div
class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">ALTER</span> <span style="color: #990099; font-weight: bold;">TABLE</span> wp_comments <span style="color: #990099; font-weight: bold;">DROP</span> <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span><span style="color: #000033;">,</span> <span style="color: #990099; font-weight: bold;">ADD</span> <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span> <span style="color: #FF00FF;">&#40;</span>comment_ID<span style="color: #000033;">,</span> comment_post_ID<span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div><p>Now that we&#8217;ve altered this index, we can define the partitions. For this example, we&#8217;ll say we want the comments for 1000 posts per partition. This query can take a long time to run, if you already have many comments in your system.</p><div
class="wp_syntax"><div
class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">ALTER</span> <span style="color: #990099; font-weight: bold;">TABLE</span> wp_comments PARTITION BY RANGE<span style="color: #FF00FF;">&#40;</span>comment_post_ID<span style="color: #FF00FF;">&#41;</span> <span style="color: #FF00FF;">&#40;</span>
    PARTITION p0 <span style="color: #990099; font-weight: bold;">VALUES</span> LESS THAN <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">1000</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    PARTITION p1 <span style="color: #990099; font-weight: bold;">VALUES</span> LESS THAN <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">2000</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    PARTITION p2 <span style="color: #990099; font-weight: bold;">VALUES</span> LESS THAN <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">3000</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    PARTITION p3 <span style="color: #990099; font-weight: bold;">VALUES</span> LESS THAN <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">4000</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    PARTITION p4 <span style="color: #990099; font-weight: bold;">VALUES</span> LESS THAN <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">5000</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    PARTITION p5 <span style="color: #990099; font-weight: bold;">VALUES</span> LESS THAN <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">6000</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    PARTITION p6 <span style="color: #990099; font-weight: bold;">VALUES</span> LESS THAN MAXVALUE
<span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div><p>When you&#8217;re approaching the next partition divider value, adding a new partition is simple. For example, you&#8217;d run this query around post 6000.</p><div
class="wp_syntax"><div
class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">ALTER</span> <span style="color: #990099; font-weight: bold;">TABLE</span> wp_comments REORGANIZE PARTITION p6 <span style="color: #990099; font-weight: bold;">INTO</span> <span style="color: #FF00FF;">&#40;</span>
    PARTITION p6 <span style="color: #990099; font-weight: bold;">VALUES</span> LESS THAN <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">7000</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    PARTITION p7 <span style="color: #990099; font-weight: bold;">VALUES</span> LESS THAN MAXVALUE
<span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div><p>Naturally, this process is most useful for very large WordPress sites. If you&#8217;re starting a new site with big plans, however, you may just want to factor this into your architecture.</p><p><strong>UPDATE:</strong> Changed the partition definition to better reflect how WordPress uses the wp_comments table, per Giuseppe&#8217;s comments.</p> <img src="http://feeds.feedburner.com/~r/GaryPendergast/~4/rua8enmy76I" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://pento.net/2011/04/28/partitioning-the-wordpress-comments-table/feed/</wfw:commentRss> <slash:comments>6</slash:comments> <feedburner:origLink>http://pento.net/2011/04/28/partitioning-the-wordpress-comments-table/</feedburner:origLink></item> <item><title>Job Manager HOWTO: Customizing the Job List</title><link>http://feedproxy.google.com/~r/GaryPendergast/~3/xXMUtBaNkyk/</link> <comments>http://pento.net/2011/02/20/job-manager-howto-customizing-the-job-list/#comments</comments> <pubDate>Sun, 20 Feb 2011 00:37:19 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[Job Manager]]></category> <category><![CDATA[Projects]]></category> <category><![CDATA[WordPress Plugins]]></category> <category><![CDATA[HOWTO]]></category> <guid isPermaLink="false">http://pento.net/?p=569</guid> <description><![CDATA[A common problem I hear people having with Job Manager is that they don&#8217;t know how to customize how the Job List looks. In this post, I&#8217;ll try to break down how to write your own Job List templates, so you can get it looking pretty. First of all, open your wp-admin, and go to [...]]]></description> <content:encoded><![CDATA[<p>A common problem I hear people having with Job Manager is that they don&#8217;t know how to customize how the Job List looks. In this post, I&#8217;ll try to break down how to write your own Job List templates, so you can get it looking pretty.</p><p>First of all, open your wp-admin, and go to <em>Job Manger</em>-&gt;<em>Settings</em>-&gt;<em>Display Settings</em>. Scroll down to the box called <em>Job Templates</em>. Like many other plugins allow in Posts and Pages, Job Manager templates use shortcodes. All of the shortcodes are described in this text box, but I&#8217;ll only be using a handful of them here to demonstrate.</p><p>The default template shows an expanded view of each job, but many sites only want a summary table, so people can click through to the job. Here&#8217;s an example of that:</p><p>To start with, decide which fields you want to show in the table. From the default fields, you might decide to use the Job Title, the Location, and the Start Date. On a default installation of Job Manager, these have the shortcodes <tt>[job_title]</tt>, <tt>[job_field4]</tt> and <tt>[job_field2]</tt>, respectively.</p><p>Now we can start writing our template. Start with the table header:</p><div
class="wp_syntax"><div
class="code"><pre class="html" style="font-family:monospace;">&lt;table&gt;
    &lt;tr&gt;
        &lt;th&gt;Title&lt;/th&gt;
        &lt;th&gt;[job_field4_label]&lt;/th&gt;
        &lt;th&gt;[job_field2_label]&lt;/th&gt;
    &lt;/tr&gt;</pre></div></div><p>Notice that we&#8217;ve used the <tt>job_field<em>i</em>_label</tt> shortcodes. These will be replaced by the Field Labels you can define in <em>Job Form Settings</em>.</p><p>Next up, we need to define the Job Loop. <tt>[job_loop]</tt> is a special tag, because it has a start tag (<tt>[job_loop]</tt>) and an end tag (<tt>[/job_loop]</tt>). Everything between those tags will be repeated for every job being displayed, which means we only have to write the HTML for one table row, like so:</p><div
class="wp_syntax"><div
class="code"><pre class="html" style="font-family:monospace;">[job_loop]
    &lt;tr&gt;
        &lt;td&gt;[job_link][job_title][/job_link]&lt;/td&gt;
        &lt;td&gt;[job_field4]&lt;/td&gt;
        &lt;td&gt;[job_field2]&lt;/td&gt;
    &lt;/tr&gt;
[/job_loop]</pre></div></div><p>Notice that we&#8217;ve also used the <tt>[job_link]</tt> tag, which will make the Job Title link to the full Job description.</p><p>Finally, we just need to close the table.</p><div
class="wp_syntax"><div
class="code"><pre class="html" style="font-family:monospace;">&lt;/table&gt;</pre></div></div><p>Naturally, you might choose to include extra things in your template, this is a very cut-down example. But hopefully it should give you some ideas for you how can expand the templating system to create wonderful new layouts!</p> <img src="http://feeds.feedburner.com/~r/GaryPendergast/~4/xXMUtBaNkyk" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://pento.net/2011/02/20/job-manager-howto-customizing-the-job-list/feed/</wfw:commentRss> <slash:comments>28</slash:comments> <feedburner:origLink>http://pento.net/2011/02/20/job-manager-howto-customizing-the-job-list/</feedburner:origLink></item> <item><title>What I’m Listening To</title><link>http://feedproxy.google.com/~r/GaryPendergast/~3/3Yz28xczfDs/</link> <comments>http://pento.net/2010/12/09/what-im-listening-to/#comments</comments> <pubDate>Thu, 09 Dec 2010 01:15:26 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[CDs]]></category> <category><![CDATA[Music]]></category> <category><![CDATA[Review]]></category> <guid isPermaLink="false">http://pento.net/?p=555</guid> <description><![CDATA[That 1 Guy &#8211; Packs A Wallop! Heavy metallic beats, rocking guitar, gravel filled voice &#8211; there&#8217;s no mistaking this for anything other than That 1 Guy&#8216;s latest album. Unlike his previous albums, which consisted of songs that had been performed and refined in front of audiences, Packs A Wallop! was composed and constructed entirely [...]]]></description> <content:encoded><![CDATA[<h3>That 1 Guy &#8211; Packs A Wallop!</h3><p>Heavy metallic beats, rocking guitar, gravel filled voice &#8211; there&#8217;s no mistaking this for anything other than <strong>That 1 Guy</strong>&#8216;s latest album.</p><p>Unlike his previous albums, which consisted of songs that had been performed and refined in front of audiences, Packs A Wallop! was composed and constructed entirely in the studio, <em>&#8220;I went in there with zero &#8211; nothing finished &#8211; and I lived there for a month. It was really hard work, really long days, and I forced myself to craft some stuff.&#8221;</em></p><p>As it turns out, this was a good plan. It opens with the heavy <em>Modern Man</em>, and meanders its way through various styles, eventually winding up at <em>Stones Throw</em>, one of the chillest tracks I think I&#8217;ve ever heard. When I copied the CD to my iPod, the genre field gave an excellent one word description of this album &#8211; Unclassifiable. That&#8217;s always been That 1 Guy&#8217;s <em>modus operandi</em>, and I&#8217;m happy to hear it continuing.</p><p>He&#8217;s also renowned for putting on a great show, and just happens to be in the middle of an <a
href="http://www.that1guy.com/events?page=1">Australian tour</a> right now, playing Melbourne tonight and Sydney tomorrow. You should probably check him out.</p><h3>Brandon Flowers &#8211; Flamingo</h3><p>As the distinctive voice of <strong>Brandon Flowers</strong> wafts around the room &#8211; a little bit nasal, a little bit clean, strangely hypnotic &#8211; one is forced to consider how much of <strong>The Killers</strong> personality is made by Flowers alone. The style is very much like where The Killers having been heading (not that this is a bad thing).</p><p>In case you forgot (hardly likely), Flowers is a Las Vegas boy, he reminds us all with the opening track, <em>Welcome to Fabulous Las Vegas</em>. This sets the tone for the entire album, the glitz of Vegas is almost overwhelming.</p><p>I enjoyed this album immensely, as will any fan of The Killers. If I were allowed one complaint, it would be that this album is a little <em>too</em> Killers-esque, I really would have liked to hear Flowers experiment some more. Certainly, his voice ties him strongly to The Killers, but that doesn&#8217;t mean he can&#8217;t mix things up &#8211; compare <strong>Bernard Fanning</strong>&#8216;s solo album <strong>Tea &amp; Sympathy</strong> to his work as lead singer of <strong>Powderfinger</strong>.</p><p>Finally, the album art: if you need a reminder that Flowers is quite a pretty man, you need look no further than here. Consisting of photos in and around Vegas, Flowers looks at home in a 70&#8242;s themed hotel, surrounded by showgirls, or out in the desert. You have to hand it to a guy who can pull off the &#8220;double denim&#8221; look without looking like someone who escaped the purge of early 90&#8242;s fashion.</p><h3>Billy Corgan &#8211; The Future Embrace</h3><p><strong>Billy Corgan</strong> &#8211; his name can&#8217;t be mentioned without bringing up certain associations. Brilliant musician. Artist. Egomaniac. Bald. <strong>The Future Embrace</strong> is a few years old now, I just happened to have gotten around to picking it up recently. I&#8217;m happy to report, it ain&#8217;t half bad.</p><p>Like Brandon Flowers, Corgan struggles to separate his style from that of <strong>The Smashing Pumpkins</strong> (We&#8217;ll pretend that <strong>Zwan</strong> never existed). That said, his cover of <em>To Love Somebody</em> is worth the price of admission alone.</p><p>On a mostly unrelated note, Billy Corgan is also the source of one of my greatest regrets. Allow me to construct a scene for you:</p><blockquote><p>You&#8217;re sitting at a table in a smoky, dimly lit bar. In a nearby corner, a small stage is illuminated by a single spot light, a high stool and a microphone stand all that&#8217;s on display. You cough, and take a sip of your drink as a shadowy figure approaches the stage and seats himself, starting pensively at the floor for a moment. The beret stops most of the glare of the light reflecting off the bald head underneath. Slowly, he looks up, and launches into the most pretentious poetry you&#8217;ve ever heard in your life.</p></blockquote><p>And now for the back story: whilst walking around Bologna one day, I noticed a poster on a wall for a poetry reading by a Mr B. Corgan, his unmistakable dome hiding behind the large title text. Unfortunately, in a daze of imagination, conjuring images of how wonderfully terrible it would be, I wandered off forgetting to note down the date and venue. When I went back the next day the poster was gone, no doubt souvenired by an enthusiast fan. To this day, I&#8217;ve been left wondering what it would have been like to listen to a recital of the poetry of B. Corgan.</p><h3>Grinderman &#8211; Grinderman 2</h3><p>Oh, <strong>Nick Cave</strong>. I try hard to like your music, I really do. But I just can&#8217;t get into it. Don&#8217;t get me wrong, I like the stuff that ends up on radio, and <em>Into My Arms</em> playing at the end of <strong>He Died With a Fellafel In His Hand</strong> is one of my most memorable movie moments. But every time I listen to one of your albums, it just grates against me. It&#8217;s cool, I still like you &#8211; I just didn&#8217;t really like this album.</p><h3>The Key of Sea</h3><p>This is an album of pairs. Australian music and World music. Popular Australian musicians and unknown musicians from around the world, who&#8217;ve come to live in Australia. A great CD and a great cause.</p><p>Amongst many others, there are two styles of music I like: modern Australian indie, and world music. As luck would have it, the good folks behind <strong>The Key of Sea</strong> project were kind of enough to provide us all with exactly that combination. The idea of this project was to pair <em>&#8220;artists that you already know and artists who have brought their incredible musical skills and cultures to Australia. It represents the efforts of an entire community who joined together in search of a common goal.&#8221;</em></p><p>From Australian music main stayers like <strong>Tim Rogers</strong>, <strong>Blue King Brown</strong> and <strong>The Cat Empire</strong>, through to some of the newest popular bands like <strong>Oh Mercy</strong>, <strong>Urthboy</strong> and <strong>Philadelphia Grand Jury</strong>, this album has something for everyone.  Combined with the talent of international artists like <strong>Group 120</strong>, <strong>Diafrix</strong> and <strong>Yousif Aziz</strong>, you get a bit of a strange mix that just happens to work really well.</p><p>For this album, I can only recommend that you go out and buy it &#8211; there&#8217;s great music, and you&#8217;re supporting an excellent cause.</p> <img src="http://feeds.feedburner.com/~r/GaryPendergast/~4/3Yz28xczfDs" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://pento.net/2010/12/09/what-im-listening-to/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://pento.net/2010/12/09/what-im-listening-to/</feedburner:origLink></item> <item><title>Welcome, SkySQL!</title><link>http://feedproxy.google.com/~r/GaryPendergast/~3/NIsxErZrVno/</link> <comments>http://pento.net/2010/10/12/welcome-skysql/#comments</comments> <pubDate>Tue, 12 Oct 2010 10:04:49 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[MySQL]]></category> <category><![CDATA[SkySQL]]></category> <guid isPermaLink="false">http://pento.net/?p=545</guid> <description><![CDATA[It seems the SkySQL website just went live, which I hope will breath some life back into the MySQL ecosphere &#8211; it&#8217;s been a while since there&#8217;s been some new competition, especially in the style of classic MySQL services. For those too lazy to read the SkySQL site, the services offered are similar to what [...]]]></description> <content:encoded><![CDATA[<p>It seems the <a
href="http://skysql.com/">SkySQL website</a> just went live, which I hope will breath some life back into the MySQL ecosphere &#8211; it&#8217;s been a while since there&#8217;s been some new competition, especially in the style of classic MySQL services.</p><p>For those too lazy to read the SkySQL site, the services offered are similar to what you&#8217;d be familiar with from Oracle:</p><ul><li>SkySQL&#8217;s <a
href="http://skysql.com/en/services/consulting">Consulting</a> and <a
href="http://skysql.com/en/services/training">Training</a> are pretty much the same as Oracle&#8217;s <a
href="http://www.mysql.com/consulting/">existing</a> <a
href="http://www.mysql.com/training/">offerings</a>, though a bit more limited. I expect this to grow as SkySQL grows, however.</li><li>SkySQL&#8217;s <a
href="http://skysql.com/en/products/skysql-enterprise">Support</a> has been simplified slightly, removing the equivalent of MySQL Enterprise Gold support.</li><li>They are offering monitoring and query editing, (which Oracle offers with <a
href="http://www.mysql.com/products/enterprise/monitor.html">MySQL Enterprise Monitor</a>, and <a
href="http://www.mysql.com/products/workbench/">MySQL Workbench</a>) through what I can only assume are branded versions of <a
href="http://www.webyog.com/">Webyog</a>&#8216;s MONyog and SQLyog. A smart move on their part &#8211; rather than having to develop something in house on a startup budget and timeframe, they can offer a mature product off the bat.</li></ul><p>Sadly, prices aren&#8217;t listed, so we can&#8217;t really compare that.</p><p>I do hope to see SkySQL evolve further &#8211; I count many of SkySQL&#8217;s founding employees as friends, and I know they won&#8217;t stop at just offering the same services as Oracle. I&#8217;m always a fan of a bit of friendly competition! <img
src='http://pento.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>Lycka till, SkySQL!</p> <img src="http://feeds.feedburner.com/~r/GaryPendergast/~4/NIsxErZrVno" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://pento.net/2010/10/12/welcome-skysql/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://pento.net/2010/10/12/welcome-skysql/</feedburner:origLink></item> <item><title>Below the Line Voting Data: Roll Your Own Analysis</title><link>http://feedproxy.google.com/~r/GaryPendergast/~3/f4GK8FOsFtA/</link> <comments>http://pento.net/2010/09/22/below-the-line-voting-data-roll-your-own-analysis/#comments</comments> <pubDate>Wed, 22 Sep 2010 09:16:10 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[Misc]]></category> <category><![CDATA[Australia 2010]]></category> <guid isPermaLink="false">http://pento.net/?p=506</guid> <description><![CDATA[I&#8217;ve had a few people ask where I got the data for my last couple of posts, so I thought I&#8217;d put together a quick how-to for performing the same analysis, or running your own queries. I&#8217;ve used MySQL for this, but you should be able to easily convert these statements to work with your [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve had a few people ask where I got the data for my <a
href="http://pento.net/2010/09/18/voting-below-the-line-its-the-new-black/">last couple</a> <a
href="http://pento.net/2010/09/21/conroy-and-fielding-the-battle-for-last-place/">of posts</a>, so I thought I&#8217;d put together a quick how-to for performing the same analysis, or running your own queries. I&#8217;ve used <a
href="http://mysql.com/">MySQL</a> for this, but you should be able to easily convert these statements to work with your data store of choice. (Feel free to post them in the comments!)</p><p>First of all, you&#8217;re going to need to get the raw data. The AEC provides this as a bunch of CSV files, available for download on their site. The <a
href="http://vtr.aec.gov.au/SenateDownloadsMenu-15508-csv.htm">2010 data can be found here</a>, the <a
href="http://results.aec.gov.au/13745/Website/SenateDownloadsMenu-13745-csv.htm">2007 data can be found here</a>.<sup
class='footnote'><a
href='#fn-506-1' id='fnref-506-1'>1</a></sup> Grab the <em>National list of Candidates</em>, and the <em>State Below the Line Preferences</em> files.</p><p>Next up, create some tables to hold this data. Here&#8217;s the table definition for the candidates table:</p><div
class="wp_syntax"><div
class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008000;">`2010<span style="color: #008080; font-weight: bold;">_</span>candidates`</span> <span style="color: #FF00FF;">&#40;</span>
    <span style="color: #008000;">`state`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">3</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`party`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">5</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`party<span style="color: #008080; font-weight: bold;">_</span>name`</span> <span style="color: #999900; font-weight: bold;">text</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`candidate<span style="color: #008080; font-weight: bold;">_</span>id`</span> <span style="color: #999900; font-weight: bold;">bigint</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">20</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`surname`</span> <span style="color: #999900; font-weight: bold;">text</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`name`</span> <span style="color: #999900; font-weight: bold;">text</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`elected`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">1</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`historic<span style="color: #008080; font-weight: bold;">_</span>elected`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">1</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #990099; font-weight: bold;">KEY</span> <span style="color: #008000;">`party`</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`party`</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #990099; font-weight: bold;">KEY</span> <span style="color: #008000;">`candidate<span style="color: #008080; font-weight: bold;">_</span>state`</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`candidate<span style="color: #008080; font-weight: bold;">_</span>id`</span><span style="color: #000033;">,</span><span style="color: #008000;">`state`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">ENGINE</span><span style="color: #CC0099;">=</span><span style="color: #990099; font-weight: bold;">InnoDB</span><span style="color: #000033;">;</span></pre></div></div><p>You&#8217;ll also need to create a table for each state. You could put it in one big table, but I was doing all of this on my local machine with a limited amount of RAM, so I wanted to keep the tables small:</p><div
class="wp_syntax"><div
class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008000;">`2010<span style="color: #008080; font-weight: bold;">_</span>prefs<span style="color: #008080; font-weight: bold;">_</span>nsw`</span> <span style="color: #FF00FF;">&#40;</span>
    <span style="color: #008000;">`candidate<span style="color: #008080; font-weight: bold;">_</span>id`</span> <span style="color: #999900; font-weight: bold;">bigint</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">20</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`preference`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`batch`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`paper`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #990099; font-weight: bold;">KEY</span> <span style="color: #008000;">`candidate<span style="color: #008080; font-weight: bold;">_</span>pref`</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`candidate<span style="color: #008080; font-weight: bold;">_</span>id`</span><span style="color: #000033;">,</span><span style="color: #008000;">`preference`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">ENGINE</span><span style="color: #CC0099;">=</span><span style="color: #990099; font-weight: bold;">InnoDB</span><span style="color: #000033;">;</span></pre></div></div><p>Importing the data is pretty easy. Just run this query for the Candidate file:</p><div
class="wp_syntax"><div
class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">LOAD</span> <span style="color: #990099; font-weight: bold;">DATA</span> <span style="color: #990099; font-weight: bold;">LOCAL</span> <span style="color: #990099; font-weight: bold;">INFILE</span> <span style="color: #008000;">&quot;/path/to/SenateCandidatesDownload-15508.csv&quot;</span> <span style="color: #990099; font-weight: bold;">INTO</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008080;">2010</span>_candidates <span style="color: #990099; font-weight: bold;">FIELDS</span> <span style="color: #990099; font-weight: bold;">TERMINATED BY</span> <span style="color: #008000;">','</span> <span style="color: #990099; font-weight: bold;">IGNORE</span> <span style="color: #008080;">2</span> <span style="color: #990099; font-weight: bold;">LINES</span><span style="color: #000033;">;</span></pre></div></div><p>Similarly, run this query for each state (modifying for the correct file name and table name, of course).</p><div
class="wp_syntax"><div
class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">LOAD</span> <span style="color: #990099; font-weight: bold;">DATA</span> <span style="color: #990099; font-weight: bold;">LOCAL</span> <span style="color: #990099; font-weight: bold;">INFILE</span> <span style="color: #008000;">&quot;/path/to/﻿SenateStateBTLPreferences-15508-NSW.csv&quot;</span>  <span style="color: #990099; font-weight: bold;">INTO</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008080;">2010</span>_prefs_nsw <span style="color: #990099; font-weight: bold;">FIELDS</span> <span style="color: #990099; font-weight: bold;">TERMINATED BY</span> <span style="color: #008000;">','</span> <span style="color: #990099; font-weight: bold;">IGNORE</span> <span style="color: #008080;">2</span> <span style="color: #990099; font-weight: bold;">LINES</span><span style="color: #000033;">;</span></pre></div></div><p>You now have all of the raw data. I preferred to make a summary table to hold the preference count for each candidate:</p><div
class="wp_syntax"><div
class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008000;">`2010<span style="color: #008080; font-weight: bold;">_</span>prefs<span style="color: #008080; font-weight: bold;">_</span>summary`</span> <span style="color: #FF00FF;">&#40;</span>
    <span style="color: #008000;">`candidate<span style="color: #008080; font-weight: bold;">_</span>id`</span> <span style="color: #999900; font-weight: bold;">bigint</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">20</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`preference`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`preference<span style="color: #008080; font-weight: bold;">_</span>total`</span> <span style="color: #999900; font-weight: bold;">bigint</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">20</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #990099; font-weight: bold;">KEY</span> <span style="color: #008000;">`candidate<span style="color: #008080; font-weight: bold;">_</span>pref`</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`candidate<span style="color: #008080; font-weight: bold;">_</span>id`</span><span style="color: #000033;">,</span><span style="color: #008000;">`preference`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">ENGINE</span><span style="color: #CC0099;">=</span><span style="color: #990099; font-weight: bold;">InnoDB</span><span style="color: #000033;">;</span></pre></div></div><p>Populating this table is pretty easy. Just repeat this query for each state (note the reference to the 2010_prefs_nsw table, and the &#8220;NSW&#8221; WHERE clause):</p><div
class="wp_syntax"><div
class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">INSERT</span> <span style="color: #990099; font-weight: bold;">INTO</span> <span style="color: #008080;">2010</span>_prefs_summary
    <span style="color: #FF00FF;">&#40;</span> <span style="color: #990099; font-weight: bold;">SELECT</span>
        c.candidate_id<span style="color: #000033;">,</span> p.preference<span style="color: #000033;">,</span> <span style="color: #000099;">count</span><span style="color: #FF00FF;">&#40;</span> p.preference <span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">AS</span> preference_total
    <span style="color: #990099; font-weight: bold;">FROM</span>
        <span style="color: #008080;">2010</span>_candidates c
    <span style="color: #000099;">LEFT</span> <span style="color: #990099; font-weight: bold;">JOIN</span>
        <span style="color: #008080;">2010</span>_prefs_nsw p
    <span style="color: #990099; font-weight: bold;">ON</span>
        c.candidate_id<span style="color: #CC0099;">=</span>p.candidate_id
    <span style="color: #990099; font-weight: bold;">WHERE</span>
        p.state<span style="color: #CC0099;">=</span><span style="color: #008000;">&quot;NSW&quot;</span> <span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div><p>Now, grabbing the preference data for any candidate is quite easy, you just need to know their candidate_id (look it up in the 2010_candidates table):</p><div
class="wp_syntax"><div
class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">FROM</span> <span style="color: #008080;">2010</span>_prefs_summary <span style="color: #990099; font-weight: bold;">WHERE</span> candidate_id<span style="color: #CC0099;">=</span><span style="color: #008080;">12345</span><span style="color: #000033;">;</span></pre></div></div><p>Have fun! If you come up with anything interesting, <a
href="http://twitter.com/garypendergast">let me know on Twitter</a>, I&#8217;d love to hear about it!</p><div
class='footnotes'><div
class='footnotedivider'></div><ol><li
id='fn-506-1'>I&#8217;ve contacted the AEC, but it seems they don&#8217;t have data available from before the 2007 federal election &#8211; I assume they just didn&#8217;t store the raw counting data. <span
class='footnotereverse'><a
href='#fnref-506-1'>&#8617;</a></span></li></ol></div> <img src="http://feeds.feedburner.com/~r/GaryPendergast/~4/f4GK8FOsFtA" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://pento.net/2010/09/22/below-the-line-voting-data-roll-your-own-analysis/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://pento.net/2010/09/22/below-the-line-voting-data-roll-your-own-analysis/</feedburner:origLink></item> <item><title>Conroy and Fielding: The Battle for Last Place</title><link>http://feedproxy.google.com/~r/GaryPendergast/~3/jyThRzFinn4/</link> <comments>http://pento.net/2010/09/21/conroy-and-fielding-the-battle-for-last-place/#comments</comments> <pubDate>Tue, 21 Sep 2010 04:33:32 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[Misc]]></category> <category><![CDATA[Australia 2010]]></category> <category><![CDATA[Stephen Conroy]]></category> <category><![CDATA[Steve Fielding]]></category> <guid isPermaLink="false">http://pento.net/?p=488</guid> <description><![CDATA[The 2010 Australian Federal Election saw a battleground being drawn &#8211; between those who advocated voting Stephen Conroy last (for his “insist[ence] on pressing ahead with a Mandatory Internet Filter for Australia”), and those advocating voting Steve Fielding last. As it turned out, voters were cool with letting them share last and second last places. [...]]]></description> <content:encoded><![CDATA[<p>The 2010 Australian Federal Election saw a battleground being drawn &#8211; between those who advocated <a
href="http://filter-conroy.com/">voting Stephen Conroy last</a> (for his “insist[ence] on pressing ahead with a Mandatory Internet Filter for Australia”), and those advocating <a
href="http://www.crikey.com.au/2010/06/17/vote-last-steve-fielding-a-prize-idiot-in-the-maternity-leave-debate/">voting Steve Fielding last</a>. As it turned out, voters were cool with letting them share last and second last places.</p><p>Thanks to the amazing amount of data the AEC make available, we&#8217;re able to analyse how people voted Below the Line on their senate ticket. This graph shows how many people placed these two candidates at each position (click for full-size):</p><p
style="text-align: center;"><a
href="http://pento.net/blog/wp-content/uploads/2010/09/fielding-conroy.png"><img
class="size-large wp-image-520" title="Fielding/Conroy preference statistics" src="http://pento.net/blog/wp-content/uploads/2010/09/fielding-conroy-1024x541.png" alt="" width="600" height="316" /></a></p><p>There are several points of interest here. For Senator Conroy, his largest spikes by far were at 2 and 8. This suggests that a large chunk of people are voting Labor first or second, probably after the Greens. Similarly, the spike at 57 would coincide with voters putting Labor last. Senator Fielding sees a similar pattern, the spike at 1 being people putting Family First first on their preferences, the group of spikes at the end would be Family First being voted towards last, the final spike at 56 being a large group of voters putting Family First as the last party on their ballot.</p><p>Far more interesting, however, are the last few places on the ballot. If people were voting by party, this should drop off significantly. Instead, we see both candidates having a significant proportion of voters<sup
class='footnote'><a
href='#fn-488-1' id='fnref-488-1'>1</a></sup> putting them last or second last.</p><p>As I mentioned in my previous post regarding <a
href="http://pento.net/2010/09/18/voting-below-the-line-its-the-new-black/">Below the Line statistics</a>, both NSW and Queensland saw an increase in the proportion of voters choosing to vote Below the Line, a 0.37% and 0.3% increase, respectively. As the proportion of Below the Line voters tends to increase as the number of candidates decreases, one would expect Victoria to see a similar increase. As it turns out, the push for people to vote Below the Line saw a greater effect in Victoria, with a 0.89% increase. I would attribute most, if not all, of this growth to the campaigns mentioned above, and the availability of tools like <a
href="http://www.belowtheline.org.au/">Vote Below the Line</a>.</p><p>So, what can we take away from these numbers? First of all, given that both of these campaigns were entirely word-of-mouth based, with zero advertising, they were surprisingly effective. Contacting and convincing 7-9% of voters to vote in a particular way is no mean feat. Social media certainly played a large part of this, whether it be new media like Twitter and Facebook, blogs like <a
href="http://www.crikey.com.au/">Crikey</a>, or forums like <a
href="http://whirlpool.net.au/">Whirlpool</a>.</p><p>Secondly, voters should see this as clear evidence that every individual does have a voice, when put together, can add up to a shout!</p><p>Finally, both of these Senators, along with all candidates, should read it as a clear message &#8211; voters do associate particular behaviour with particular politicians, and are capable of organising to send a protest vote to them.</p><div
class='footnotes'><div
class='footnotedivider'></div><ol><li
id='fn-488-1'>Fielding: 8.9%, Conroy: 7% <span
class='footnotereverse'><a
href='#fnref-488-1'>&#8617;</a></span></li></ol></div> <img src="http://feeds.feedburner.com/~r/GaryPendergast/~4/jyThRzFinn4" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://pento.net/2010/09/21/conroy-and-fielding-the-battle-for-last-place/feed/</wfw:commentRss> <slash:comments>9</slash:comments> <feedburner:origLink>http://pento.net/2010/09/21/conroy-and-fielding-the-battle-for-last-place/</feedburner:origLink></item> </channel> </rss><!-- Dynamic page generated in 2.067 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-01-29 06:31:30 --><!-- Compression = gzip -->

