<?xml version="1.0"?>
<!-- name="generator" content="blosxom/2.0" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
 <channel>
  <title>Brane Dump</title>
  <link>http://www.hezmatt.org/~mpalmer/blog</link>
  <description>The Thoughts of Matt Palmer</description>
  <language>en</language>

  <item>
   <title>My Hero!</title>
   <link>http://www.hezmatt.org/~mpalmer/blog/general/my_hero.html</link>
   <description>&lt;p&gt;
I just have to say that &lt;a
href=&quot;http://www.youtube.com/watch?v=U2OBDu0enuw&quot;&gt;this bull&lt;/a&gt; is my hero. 
That is all.
&lt;/p&gt;
</description>
  </item>

  <item>
   <title>Anticlimax</title>
   <link>http://www.hezmatt.org/~mpalmer/blog/general/anticlimax.html</link>
   <description>&lt;p&gt;

&lt;a
href=&quot;http://jobs.github.com/positions/74a3c478-9fd9-11df-856a-9352d1fc9db9&quot;&gt;This&lt;/a&gt;
sounds exciting:
&lt;/p&gt;
&lt;blockquote&gt;
We think developers who want to work on the best, most dynamic, and most
interesting open-source web technology project on the planet have no better
place to work than here -
&lt;/blockquote&gt;
&lt;p&gt;
Fwowr, dynamic and interesting open-source web technology project! 
Sign me up!
&lt;/p&gt;
&lt;blockquote&gt;
working on Drupal.
&lt;/blockquote&gt;
&lt;p&gt;
That wasn't where I thought that was going.  Those words obviously
have very different meanings to different people.  Never mind.
&lt;/p&gt;
</description>
  </item>

  <item>
   <title>On lDAP objectClasses</title>
   <link>http://www.hezmatt.org/~mpalmer/blog/general/on_ldap_objectclasses.html</link>
   <description>&lt;p&gt;
	Does anyone else think that a naming scheme that produces an
	identifier called &lt;tt&gt;dNSDomain&lt;/tt&gt; is utterly broken, and should be taken
	out and shot immediately?
&lt;/p&gt;
</description>
  </item>

  <item>
   <title>Using Virgin Mobile Broadband with wvdial</title>
   <link>http://www.hezmatt.org/~mpalmer/blog/general/using_virgin_mobile_broadband_with_wvdial.html</link>
   <description>&lt;p&gt;
&lt;em&gt;File Under:&lt;/em&gt; Stuff I'm guaranteed to forget if I don't write it down
&lt;/p&gt;
&lt;p&gt;
I just went a bit wild and decided to get myself some mobile broadband love
-- I'm finding that I crave a bit of light 'net when I'm out and about, and
an impending change in circumstances will mean that I'm out and about a lot
more than I am currently.
&lt;/p&gt;
&lt;p&gt;
I have:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Hardware:&lt;/b&gt; Huawei E160e USB dongle, USB ID 12d1:1003&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Provider:&lt;/b&gt; Virgin Mobile Australia &lt;b&gt;Prepaid&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;OS:&lt;/b&gt; Debian GNU/Linux 5.0 with an upgraded 2.6.32 kernel&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
My wvdial.conf stanza looks like:
&lt;/p&gt;
&lt;pre&gt;
[Dialer virgin]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0
Init3 = AT+CGDCONT=1,&quot;IP&quot; &quot;VirginBroadband&quot;
Stupid Mode = 1
ISDN = 0
Phone = *99#
Modem = /dev/ttyUSB0
Modem Type = USB Modem
Username = irrelevant
Dial Command = ATDT
Password = irrelevant
Baud = 460800
&lt;/pre&gt;
&lt;p&gt;
I also had to disable CHAP (by putting &lt;tt&gt;-chap&lt;/tt&gt; in
&lt;tt&gt;/etc/ppp/options&lt;/tt&gt;, although I suspect the same would have worked in
&lt;tt&gt;/etc/ppp/peers/wvdial&lt;/tt&gt;).
&lt;/p&gt;
&lt;p&gt;
After that, a simple &lt;tt&gt;sudo wvdial virgin&lt;/tt&gt; and I was away.
&lt;/p&gt;
&lt;p&gt;
Scarily enough, there was actually some &lt;a
href=&quot;http://virginmobile.custhelp.com/app/answers/detail/a_id/57/~/supported-usb-mobile-broadband-modems&quot;&gt;useful
information&lt;/a&gt; on the Virgin support site regarding the settings, which
helped me confirm that I was on the right track.  I have no doubt that the
universe will find some alternate means of punishing me down the line.
&lt;/p&gt;
</description>
  </item>

  <item>
   <title>Making pbuilder just that little bit faster</title>
   <link>http://www.hezmatt.org/~mpalmer/blog/general/making_pbuilder_faster.html</link>
   <description>&lt;p&gt;
	Give yourself a small, slightly late christmas present, and put a tmpfs on
	&lt;tt&gt;/var/cache/pbuilder/build&lt;/tt&gt;.  It makes a noticable difference,
	especially if you're on a laptop system (like I am) with a disk that's not
	going to win any speed records.
&lt;/p&gt;
</description>
  </item>

  <item>
   <title>When Scientists Get Into The Kitchen...</title>
   <link>http://www.hezmatt.org/~mpalmer/blog/general/when_scientists_get_into_the_kitchen.html</link>
   <description>&lt;p&gt;
	You get a rigorous analysis of the science behind &lt;a
href=&quot;http://www.seriouseats.com/2009/10/the-food-lab-science-of-how-to-cook-perfect-boiled-eggs.html&quot;&gt;boiling
eggs&lt;/a&gt;.  I want one of those thermal circulators for Christmas.
&lt;/p&gt;
</description>
  </item>

  <item>
   <title>Cool Regex Win-of-the-week</title>
   <link>http://www.hezmatt.org/~mpalmer/blog/general/cool_regex_win_of_the_week.html</link>
   <description>&lt;p&gt;
	I just had a need to match a regex where there were two occurances
	of the same string, and it would be really, really nice to make sure that
	both occurances were actually the same (rather than both being different
	strings that just happen to match the same regex).  Just to be funny, I tried
	this:
&lt;/p&gt;
&lt;pre&gt;
  /([a-z0-9\.-]+).*\1/
&lt;/pre&gt;
&lt;p&gt;
	And knock me down with a feather, &lt;b&gt;it worked&lt;/b&gt;!  This is using
	Ruby's regex handling, but I'd be stunned if Perl didn't also handle this
	case.
&lt;/p&gt;
&lt;p&gt;
	The world just got a little bit awesomer today.
&lt;/p&gt;
</description>
  </item>

  <item>
   <title>Is There Something Wrong With Me...</title>
   <link>http://www.hezmatt.org/~mpalmer/blog/general/is_there_something_wrong_with_me.html</link>
   <description>&lt;p&gt;
	When the first thing I thought of when I saw &lt;a
	href=&quot;http://www.clevercuties.com/shopexd.asp?id=181&quot;&gt;this baby
	outfit&lt;/a&gt; was &quot;What sort of cretin wrote that code?&quot;, rather than
	anything more &quot;paternal&quot;?
&lt;/p&gt;
</description>
  </item>

  <item>
   <title>I want those two day of my life back, Puppet</title>
   <link>http://www.hezmatt.org/~mpalmer/blog/general/i_want_those_two_days_of_my_life_back_puppet.html</link>
   <description>&lt;p&gt;
	Pop Quiz time, everyone (well, the Puppet-using subset of
	&quot;everyone&quot;, anyway).  Where is the dependency loop in the following
	manifest:
&lt;/p&gt;
&lt;pre&gt;
class klass {
   file { ['/tmp/a']: ensure =&gt; present }
}

define def_file() {
   include klass

   file { $name:
      ensure =&gt; present,
      require =&gt; File['/tmp/a']
   }
}

def_file { '/tmp/b': }

def_file { '/tmp/c': require =&gt; File['/tmp/b'] }
&lt;/pre&gt;
&lt;p&gt;
	This seems pretty straightforward: &lt;tt&gt;/tmp/c&lt;/tt&gt; can't be created
	until &lt;tt&gt;/tmp/b&lt;/tt&gt; (via the direct require) and &lt;tt&gt;/tmp/a&lt;/tt&gt;
	(via the define) have been created, while &lt;tt&gt;/tmp/b&lt;/tt&gt; can't be
	created until &lt;tt&gt;/tmp/a&lt;/tt&gt; is created.  You can draw some pretty
	graphs and see that everything looks fine.
&lt;/p&gt;
&lt;p&gt;
	However, if you run this manifest, you will find that roughly half
	the time, you will get a failure saying that there's a dependency
	loop (and the other half of the time it'll work fine), like this:
	&quot;&lt;tt&gt;err: Could not apply complete catalog: Found dependency cycles
	in the following relationships&lt;/tt&gt;&quot;.
&lt;/p&gt;
&lt;p&gt;
	So, where is the loop?  It's because the require on the
	&lt;tt&gt;/tmp/c&lt;/tt&gt; resource also applies to the &lt;tt&gt;/tmp/a&lt;/tt&gt;
	resource -- &lt;em&gt;iff the &lt;tt&gt;include klass&lt;/tt&gt; directive is applied
	to the &lt;tt&gt;/tmp/c&lt;/tt&gt; resource&lt;/em&gt;.  So `/tmp/a` then requires
	`/tmp/b`, and `/tmp/b` requires `/tmp/a`, and it's LOOP TIME!
&lt;/p&gt;
&lt;p&gt;
	Whether or not this loop occurs on a particular Puppet run is
	controlled by fickle Lady Fate (because Ruby hashes, which are used
	at some point internally in this process, don't have a well-defined
	or stable order).  As to why the &lt;tt&gt;include&lt;/tt&gt; only applies to
	one of the defines rather than all of them, well, that's related to
	the fact that a class only gets evaluated once, and I think someone
	was having a lazy day when they wrote that part of the system (I
	can't imagine it would be the end of the world if each instance of
	the class was linked to the defined resource in the scope tree).
&lt;/p&gt;
&lt;p&gt;
	Now, when you've only got the above manifest, it's relatively
	straightforward to isolate the problem and fix it -- I had it sorted
	in about an hour.  The two days prior to that were isolating the bug
	from the live manifest, because there are about 20 instances of
	&lt;tt&gt;def_file&lt;/tt&gt; in our live manifest, and so I'd have to run
	Puppet (on average) 20 times to make the problem appear every time I
	had a new hypothesis (and since I didn't know whether the bug was
	client-side or server-side, I had to run it in the real, full-blown
	environment, which slows things down further).  If the
	class-handling stuff had been written &lt;em&gt;properly&lt;/em&gt;, then the
	error would have been constant, rather than intermittent, and I
	would have been asking for a couple of hours credit, not a couple of
	days.
&lt;/p&gt;
&lt;p&gt;
	The fix?  Use virtual resources instead of the class, which does
	$DEITY-only-knows-what to the scope tree.  These have their own
	giant buckets of ugliness, but our options, at this point, are
	unpleasantly limited.
&lt;/p&gt;
&lt;p&gt;
	I really do wonder why I'm not a raging alcoholic sometimes.  The
	reasons not to are strangely hard to recall right at this moment...
&lt;/p&gt;
</description>
  </item>

  <item>
   <title>Oh Firefox...</title>
   <link>http://www.hezmatt.org/~mpalmer/blog/general/oh_firefox.html</link>
   <description>&lt;p&gt;
	What are you doing in that the 1.1GB of resident memory (1357m of
	virtual memory) you have decided to consume in order to display three
	web pages?  All fairly basic pages -- no flash, no excessive Javascript, and I
	haven't even done anything particularly exciting in the browser -- just loaded the
	pages up and
	let them sit for a few days.
&lt;/p&gt;
&lt;p&gt;
	Time to look at Conkeror on the Netbook, I suppose.  I'm unlikely to
	be needing Firebug on there any time soon.
&lt;/p&gt;
</description>
  </item>

  </channel>
</rss>