<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Brane Dump</title>
    <description>The Thoughts of Matt Palmer</description>
    <link>http://hezmatt.org/~mpalmer/blog/</link>
    <link type="application/rss+xml" rel="self" href="http://hezmatt.org/~mpalmer/blog/rss.xml"/>
    <language>en-au</language>
    <pubDate>Sat, 25 May 2013 10:21:38 EST</pubDate>
    <lastBuildDate>Sat, 25 May 2013 10:21:38 EST</lastBuildDate>

    
    <item>
      <title>A Modest Vocabulary Proposal</title>
      <link>http://hezmatt.org/~mpalmer/blog/2013/05/14/a-modest-vocabulary-proposal.html</link>
      <pubDate>Tue, 14 May 2013 00:00:00 EST</pubDate>
      <author>mpalmer@hezmatt.org (Matt Palmer)</author>
      <guid isPermalink="false">http://hezmatt.org/~mpalmer/blog/2013/05/14/a-modest-vocabulary-proposal</guid>
      <description>&lt;p&gt;I would like to suggest that the word “unprofessional” be struck from the
dictionary – and anyone who uses it struck &lt;em&gt;with&lt;/em&gt; a dictionary.  It is a
word which conveys no useful information or proposal for action, and is thus
nothing but meaningless noise.&lt;/p&gt;

&lt;p&gt;The purpose of communication is to adjust another person’s process of
cognition.  I’ve heard it said that “all communication is persuasion”, which
is quite true – you’re trying to persuade someone to change what they
think.  We can consider the intention and effectiveness of an attempt to
communicate in this light.&lt;/p&gt;

&lt;p&gt;What is someone trying to achieve when they label a person or behaviour
“unprofessional”?  If we’re being charitable, we would probably say that
they’re trying to highlight that something is bad, or could be better. 
However, just stamping our foot and saying “bad!” isn’t enough – it’s also
important to provide some information that the recipient can act upon.&lt;/p&gt;

&lt;p&gt;The problem with the word “unprofessional” is that it really isn’t specific
enough on the subject of “what is wrong”.  Have you ever had someone say
something like, “your behaviour yesterday was really unprofessional”? 
They’re assuming you know what they’re talking about – and you might well
have a reasonable guess – but what if you guess wrong?  Should you never do
&lt;em&gt;anything&lt;/em&gt; you did yesterday, just in case that particular thing was
unprofessional?&lt;/p&gt;

&lt;p&gt;When I’ve caught myself thinking, “that was unprofessional”, of my own
behaviour, or someone else’s, I think about what caused me to think that. 
Once I drill down into it, I usually come to the conclusion that what I
really meant was, “I don’t like that”.  Since I’m not paid to &lt;em&gt;like&lt;/em&gt; things,
that’s pretty much irrelevant as a reason to tell someone not to do
something.&lt;/p&gt;

&lt;p&gt;On the occasions when I come up with something more concrete, it is
invariably a more useful expression than “unprofessional”.  Things like, “it
frustrates the customer”, or “it pisses off the person sitting in the next
cube” are a much better expression of &lt;em&gt;why&lt;/em&gt; something is bad than
“unprofessional”.&lt;/p&gt;

&lt;p&gt;I’d encourage everyone to keep a careful watch over themselves and those
around them for use of the word.  When you catch yourself saying it (or
thinking it), examine your motives more closely.  Whatever the more specific
adjective is, use that instead.  If it just comes down to “I don’t like
that”, at the very least say that to the person you’re talking to.  Don’t
try and hang anything grandiose on your personal prejudices.  You might come
off as being petty, but at least you’ll be honest.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>splunkd, Y U NO FOREGROUND?!?</title>
      <link>http://hezmatt.org/~mpalmer/blog/2013/04/15/splunkd-y-u-no-foreground.html</link>
      <pubDate>Mon, 15 Apr 2013 00:00:00 EST</pubDate>
      <author>mpalmer@hezmatt.org (Matt Palmer)</author>
      <guid isPermalink="false">http://hezmatt.org/~mpalmer/blog/2013/04/15/splunkd-y-u-no-foreground</guid>
      <description>&lt;p&gt;I am led to believe that splunkd (some agent for feeding log entries into
the Grand Log Analysis Tool Of Our Age™) has no capability for running
itself in the foreground.  This is stupid.  Do not make these sorts of
assumptions about how the user will want to run your software.  Some people
use sane service-management systems that are capable of handling the
daemonisation for you and automatically restart the managed process on
crash.  These systems are typically much easier to configure and debug, and
they don’t need bloody PID files and the arguments about where to put them
(tmpfs, inside or outside chroots…  oh my) and who should update them and
how to reliably detect that they’re out of date when they crash without
causing race conditions and whether non-root-running processes should place
their PID files in the same place and how do you deal with the permissions
issues and… bugger that for a game of skittles.&lt;/p&gt;

&lt;p&gt;In short, if you provide a service daemon and do not provide some
well-documented means of saying “don’t background”, I will hurt you.  This
goes double if your shitware is not open source.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>RSpec the easy way</title>
      <link>http://hezmatt.org/~mpalmer/blog/2013/04/11/rspec-the-easy-way.html</link>
      <pubDate>Thu, 11 Apr 2013 00:00:00 EST</pubDate>
      <author>mpalmer@hezmatt.org (Matt Palmer)</author>
      <guid isPermalink="false">http://hezmatt.org/~mpalmer/blog/2013/04/11/rspec-the-easy-way</guid>
      <description>&lt;p&gt;Anyone that has a fondness for good ol’ RSpec knows that there’s a fair
number of matchers and predicates and whatnot involved.  Life isn’t helped
by the recent (as of 2.11) decision to switch to using &lt;code&gt;expect&lt;/code&gt; everywhere
instead of &lt;code&gt;should&lt;/code&gt; (apparently &lt;code&gt;should&lt;/code&gt; will be going away entirely at some
point in the future).&lt;/p&gt;

&lt;p&gt;There is a good looking RSpec cheatsheet out on the ‘net, but it dates from
2006, and things have changed since then.  We’re using RSpec at work a lot
at the moment, though, so our tech writer kindly updated it for the
new-style syntax, gave it a nice blue tint, and put it out there for the
world at large to use.  Here is our &lt;a href=&quot;http://www.anchor.com.au/blog/2013/03/updated-rspec-cheatsheet/&quot;&gt;updated RSpec
cheatsheet&lt;/a&gt;
for anyone who is interested.&lt;/p&gt;

&lt;p&gt;I can tell you for certain that a double-sided, laminated version of this
sucker looks very nice, and is a handy addition to the desk-of-many-things.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Managing your Databases</title>
      <link>http://hezmatt.org/~mpalmer/blog/2013/03/22/managing-your-databases.html</link>
      <pubDate>Fri, 22 Mar 2013 00:00:00 EST</pubDate>
      <author>mpalmer@hezmatt.org (Matt Palmer)</author>
      <guid isPermalink="false">http://hezmatt.org/~mpalmer/blog/2013/03/22/managing-your-databases</guid>
      <description>&lt;p&gt;&lt;a href=&quot;http://www.standalone-sysadmin.com/blog/&quot;&gt;The Standalone Sysadmin&lt;/a&gt; asks,
“&lt;a href=&quot;http://www.standalone-sysadmin.com/blog/2013/03/how-do-you-manage-database-server-instances/&quot;&gt;How do you manage database server
instances?&lt;/a&gt;”:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Do you have one (or a few) centralized database servers, either standalone
or clustered, or do you spread the load like we are currently?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;His argument for centralisation is one of easing the management burden of
configuration and backups, whereas the distributed approach eliminates a
central point of failure and performance degradation.&lt;/p&gt;

&lt;p&gt;I go for distributed, all the way.  For a start, we run so many databases
for so many customers that there’s no way on earth we could stand up a small
number of database servers and handle all the load (hell, we’ve got single
customers who consume a cluster of machines with 384GB of RAM and all the
SSDs you can eat).  Security and permissions is a whole other kettle of
fish; the contortions we’d have to do to allow customers the level of
management they need with a centralised database system would be immense. 
Then there’s the need of some customers for MySQL, some for PgSQL, different
performance tuning for different workloads… nope, centralised DBs don’t
work for us.&lt;/p&gt;

&lt;p&gt;Given this, we’ve bitten the bullet and solved pretty much all of the
management problems.  Installation and configuration is all handled via
Puppet, and backups are trivial – the same system that installs the DB
server itself also drops a hook script that the backup agent uses to know
that it has to dump a database server.  Monitoring that this backup is
taking place successfully is also automatically provisioned, so we know that
we’re not missing anything.&lt;/p&gt;

&lt;p&gt;Ultimately, this same approach applies to practically anything that you’re
tossing up between centralised and distributed.  At scale, you can never
rely on centralisation, so you may as well bite the bullet and learn how to
do it distributed pretty much from the start.  That saves some serious
system shock when you discover what your hardware vendor wants for the next
step up in big iron hardware…&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>libvirt errors that are not helpful</title>
      <link>http://hezmatt.org/~mpalmer/blog/2013/02/25/libvirt-errors-not-helpful.html</link>
      <pubDate>Mon, 25 Feb 2013 00:00:00 EST</pubDate>
      <author>mpalmer@hezmatt.org (Matt Palmer)</author>
      <guid isPermalink="false">http://hezmatt.org/~mpalmer/blog/2013/02/25/libvirt-errors-not-helpful</guid>
      <description>&lt;p&gt;Since there is absolutely zero Google juice on this problem, here’s some
hints in case someone else is out there beating their heads on their
keyboard in frustration.&lt;/p&gt;

&lt;p&gt;The problem: when trying to define a storage pool (or 90+% of other &lt;code&gt;virsh&lt;/code&gt;
commands), you get this sort of result:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# virsh pool-define /tmp/pooldef
error: Failed to define pool from /tmp/pooldef
error: this function is not supported by the connection driver: virStoragePoolDefineXML
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Or this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# virsh pool-create /tmp/pooldef
error: Failed to create pool from /tmp/pooldef
error: this function is not supported by the connection driver: virStoragePoolCreateXML
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Not helpful at all.  The problem is (or, at least it was for me) that I have
both KVM and virtualbox installed (I prefer KVM, but vagrant uses virtualbox
and I’m playing around with it).  It would appear that libvirt is preferring
to use virtualbox over KVM, which is stupid because virtualbox doesn’t
appear to be fully supported (as evidenced by the extensive set of functions
that are not supported by the virtualbox connection driver).&lt;/p&gt;

&lt;p&gt;The solution: edit &lt;code&gt;/etc/libvirt/libvirt.conf&lt;/code&gt;, and ensure that the
following line is defined:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;uri_default = &quot;qemu:///system&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will tell libvirt to use KVM (via qemu) rather than virtualbox, and you
can play with pools to your hearts’ content.&lt;/p&gt;

</description>
    </item>
    
    <item>
      <title>When is a guess not a guess?</title>
      <link>http://hezmatt.org/~mpalmer/blog/2013/01/22/when-is-a-guess-not-a-guess.html</link>
      <pubDate>Tue, 22 Jan 2013 00:00:00 EST</pubDate>
      <author>mpalmer@hezmatt.org (Matt Palmer)</author>
      <guid isPermalink="false">http://hezmatt.org/~mpalmer/blog/2013/01/22/when-is-a-guess-not-a-guess</guid>
      <description>&lt;p&gt;… when it’s a “prediction”.&lt;/p&gt;

&lt;p&gt;In the 4th January edition of the Guardian Weekly , the front page story,
entitled “Meet the world’s new boomers”&lt;sup id=&quot;fnref:nolink&quot;&gt;&lt;a href=&quot;#fn:nolink&quot; class=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; contained this little gem:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Back in 2006, [PricewaterhouseCoopers] made some forecasts about what the
global economy might look like in 2050, and it has now updated the
predictions in the light of the financial crisis and its aftermath.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Delightful.  They made some forecasts about what the global economy &lt;em&gt;might&lt;/em&gt;
look like.  Given that they clearly didn’t include any impact of the GFC in
their forecasts, it clearly wasn’t a particularly accurate forecast.&lt;/p&gt;

&lt;p&gt;Y’know what an inaccurate prediction is called?  &lt;em&gt;Guesswork&lt;/em&gt;.  Let’s call a
spade a spade here.  I see this all the time, and it’s starting to shit me. 
People making predictions and forecasts and projections hither and yon, and
they’re almost always complete bollocks, and they &lt;em&gt;never&lt;/em&gt; get called on it. 
I read &lt;a href=&quot;http://greaterfool.ca/&quot;&gt;the Greater Fool blog&lt;/a&gt; now and then, and
that blog is chock full of examples of people making predictions which have
very little chance of being in any way accurate.&lt;/p&gt;

&lt;p&gt;While &lt;a href=&quot;http://www.badscience.net/about-dr-ben-goldacre/&quot;&gt;Dr Ben Goldacre&lt;/a&gt;
and others are making inroads into requiring &lt;a href=&quot;http://www.badscience.net/&quot;&gt;full disclosure in clinical
trials&lt;/a&gt;, I’m not aware of anyone taking a
similar stand against charlatans making dodgy-as-hell predictions over and
over again, with the sole purpose of getting attention, without any
responsibility for the accuracy of those predictions.&lt;/p&gt;

&lt;p&gt;Is anyone aware of anyone doing work in this area, or do I need to register
&lt;code&gt;badpredictions.net&lt;/code&gt; and start calling out dodginess?&lt;/p&gt;
&lt;div class=&quot;footnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:nolink&quot;&gt;
      &lt;p&gt;Sorry, I don’t have a link, the whole site’s behind a paywall.  I
read it on dead tree.&lt;a href=&quot;#fnref:nolink&quot; class=&quot;reversefootnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Everything's Better With Cats</title>
      <link>http://hezmatt.org/~mpalmer/blog/2013/01/03/everythings-better-with-cats.html</link>
      <pubDate>Thu, 03 Jan 2013 00:00:00 EST</pubDate>
      <author>mpalmer@hezmatt.org (Matt Palmer)</author>
      <guid isPermalink="false">http://hezmatt.org/~mpalmer/blog/2013/01/03/everythings-better-with-cats</guid>
      <description>&lt;p&gt;The ancient Egyptians were a pretty cool bunch, but their &lt;a href=&quot;http://en.wikipedia.org/wiki/Cats_in_ancient_Egypt&quot;&gt;worship of
cats&lt;/a&gt; really added
something to their civilisation (double bonus: their word for “cat” was
“mau”).  The Internet itself, while undeniably a fantastic resource, reached
new heights with the introduction of &lt;a href=&quot;http://lolcats.com/&quot;&gt;LOLCats&lt;/a&gt;.  If you
are cat-poor, you can &lt;a href=&quot;http://cats4gold.com/&quot;&gt;swap your shabby tat for a tabby
cat&lt;/a&gt;, while if you’ve gone a bit overboard you can
sell your excess cats to &lt;a href=&quot;http://www.catconverters.com/&quot;&gt;cat converters&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However, cats have found minimal employment in systems administration. 
Until now.  As &lt;a href=&quot;http://www.anchor.com.au/&quot;&gt;the day job&lt;/a&gt; have been early
adopters of &lt;a href=&quot;http://btrfs.wiki.kernel.org/&quot;&gt;btrfs&lt;/a&gt;, everyone at work has
been very interested in the reported &lt;a href=&quot;http://crypto.junod.info/2012/12/13/hash-dos-and-btrfs/&quot;&gt;hash DoS of
btrfs&lt;/a&gt;.  It has
been a topic of considerable discussion around the office.  However, it can
be a tough topic to explain to people less well versed in the arcana of
computer science.&lt;/p&gt;

&lt;p&gt;Not to be deterred, Barney, our tech writer, took the standard explanation,
added some cats, and came up with &lt;a href=&quot;http://www.anchor.com.au/blog/2012/12/how-to-explain-hash-dos-to-your-parents-by-using-cats/&quot;&gt;an explanation of the btrfs hash DoS
that your parents can
understand&lt;/a&gt;. 
The density of cat-related puns is impressive.&lt;/p&gt;

&lt;p&gt;(Incidentally, if you don’t need cats to understand btrfs hash DoS attacks,
and live in the Sydney area, you might be interested in &lt;a href=&quot;http://www.anchor.com.au/about-us/jobs/&quot;&gt;working for
Anchor as a sysadmin&lt;/a&gt;).&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>The e-mail PDA</title>
      <link>http://hezmatt.org/~mpalmer/blog/2012/10/26/the-email-pda.html</link>
      <pubDate>Fri, 26 Oct 2012 00:00:00 EST</pubDate>
      <author>mpalmer@hezmatt.org (Matt Palmer)</author>
      <guid isPermalink="false">http://hezmatt.org/~mpalmer/blog/2012/10/26/the-email-pda</guid>
      <description>&lt;p&gt;I’ve been a wannabe GTD afficionado for some years.  I’ve &lt;em&gt;wanted&lt;/em&gt; to do it,
but managing lists has always been something that has too much friction,
overhead, or whatever.  Finally, though, I think I might have found a way to
manage lists that works.&lt;/p&gt;

&lt;p&gt;My use-case isn’t unique, although I will concede I’m perhaps being more
dogmatic than most.  I want something that:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Is electronic (yes, the hipster PDA is a cool idea, but my handwriting is
beyond woeful and I already carry enough crap in my pockets as it is);&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Works offline (because I often do);&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Will work on both my phone and laptop (because I want to have my lists
with me when I’m not at my computer, but long-form data entry or
manipulation on a phone is painful);&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Makes it easy to add, browse, modify, and above all &lt;em&gt;remove&lt;/em&gt; items; and&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Is “mine” (no central databases I don’t control, proprietary apps on my
phone, etc).&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My previous attempt was a tool I called “tagnote” – it was a
&lt;a href=&quot;https://github.com/vimoutliner/vimoutliner&quot;&gt;vim-outliner&lt;/a&gt; file full of
hierarchically organised outliner entries, with tags inlined.  It was a neat
idea, but it wasn’t smooth to add/browse/delete items, and didn’t work with
my phone at all (trying to use vim for any length of time on a
bottom-of-the-range Android phone would kill me).&lt;/p&gt;

&lt;p&gt;The current iteration, as the title of this post suggests, is a list manager
that entirely uses e-mail.  It really is a perfect symbiosis:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;I want lists of text items with titles (&lt;code&gt;Subject:&lt;/code&gt;), potentially other
metadata (&lt;code&gt;X-Whatever&lt;/code&gt; headers), and possibly some notes (the body of the
e-mail);&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I need to be able to browse and remove completed items (that’s what e-mail
clients are &lt;em&gt;for&lt;/em&gt;);&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Getting new items into the system is trivial (Anything I send to my PDA’s
e-mail address goes straight into the INBOX, which I can then process as
time permits); and&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Syncing between my laptop and PDA is as simple as offlineimap and K-9
mail.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So what have I got, exactly?  It’s fairly straightforward:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;An IMAP account on my existing mail server;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;A slightly tweaked copy of mutt (different colours so I don’t confuse
myself, and a different layout of the index page to get rid of unnecessary
columns);&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Another offlineimap account;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Another &lt;a href=&quot;https://github.com/k9mail&quot;&gt;K-9 mail&lt;/a&gt; account;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.appoxy.note2self&amp;amp;hl=en&quot;&gt;Note2self&lt;/a&gt;
(a neat little app to take a typed or voice-transcribed note and e-mail it
to a pre-set address) on the phone, pre-programmed to e-mail any notes I
write to the PDA’s inbox; and&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;A small shell script to make it trivial to create new lists (which has to
be done on the IMAP server for reasons of offlineimap), add new items to a
list, sync my lists (in other words, “run offlineimap”), display my lists
(in other words, “run mutt”), and process my “tickler” file.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last point is the one I’m really happy I achieved.  I’ve always been a
fan of “hide it until you need it”, but my previous system didn’t let me do
that.  Now, though, I have a separate list called &lt;code&gt;tickler&lt;/code&gt;, and all the
items in there have an &lt;code&gt;X-Tickle&lt;/code&gt; header, which specifies the date I want to
see them.  Each night a cronjob runs through the tickler and moves anything
for today into the INBOX.  An &lt;code&gt;X-Tickle-Repeat&lt;/code&gt; header lets me have things
that repeat over and over again.&lt;/p&gt;

&lt;p&gt;So in short, using entirely open-source tools and a couple of hours of my
time doing things I enjoy anyway (shell scripts!  woo!), I’ve now got a list
manager that doesn’t get in my way more than it absolutely has to.  We’ll
see how long I last this time before I feel the urge to “improve” my lists
again.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Podcasting protip</title>
      <link>http://hezmatt.org/~mpalmer/blog/2012/07/23/podcasting-protip.html</link>
      <pubDate>Mon, 23 Jul 2012 00:00:00 EST</pubDate>
      <author>mpalmer@hezmatt.org (Matt Palmer)</author>
      <guid isPermalink="false">http://hezmatt.org/~mpalmer/blog/2012/07/23/podcasting-protip</guid>
      <description>&lt;p&gt;Don’t spend the first two minutes of the first episode of your podcast
telling everyone what a “micropodcast” is, and how iTunes only lets you have
20MB per episode.  The only exception to this might be if you were making a
podcast about podcasting.  Which you weren’t.&lt;/p&gt;

&lt;p&gt;That is all.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Melt your cores with Rake's multitask</title>
      <link>http://hezmatt.org/~mpalmer/blog/2012/07/19/melt-your-cores-with-rake-multitask.html</link>
      <pubDate>Thu, 19 Jul 2012 00:00:00 EST</pubDate>
      <author>mpalmer@hezmatt.org (Matt Palmer)</author>
      <guid isPermalink="false">http://hezmatt.org/~mpalmer/blog/2012/07/19/melt-your-cores-with-rake-multitask</guid>
      <description>&lt;p&gt;Reading documentation &lt;em&gt;does&lt;/em&gt; pay off.  Browsing through the &lt;a href=&quot;http://rake.rubyforge.org/files/doc/rakefile_rdoc.html&quot;&gt;Rakefile format
documentation&lt;/a&gt; for
&lt;a href=&quot;http://rake.rubyforge.org/&quot;&gt;Rake&lt;/a&gt;, just now, I found mention of the
&lt;code&gt;multitask&lt;/code&gt; method – which declares that all of that task’s prerequisites
can be executed in parallel.&lt;/p&gt;

&lt;p&gt;A comparison run:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ rake clean; time rake build
real    0m7.116s
user    0m6.788s
sys     0m0.260s

$rake clean; time rake multibuild
real    0m3.820s
user    0m8.809s
sys     0m0.288s
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is a trivially small build I’m doing, I must admit, but halving the
build time (in this case at least) pays huge dividends in my perceived
productivity.  It really blows the dust out of my CPU cores, too, which tend
to be woefully underutilised (being this is a quad-core laptop and all).&lt;/p&gt;

&lt;p&gt;So I say unto you all: go forth and &lt;code&gt;multitask&lt;/code&gt;!&lt;/p&gt;
</description>
    </item>
    

  </channel> 
</rss>
