<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><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:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Not this...</title>
	
	<link>http://blog.timbunce.org</link>
	<description>Listen. Reflect. Explore. Solve.</description>
	<pubDate>Sun, 05 Oct 2008 23:50:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<image><link>http://blog.timbunce.org</link><url>http://timbunce.wordpress.com/files/2008/02/timicon-64x64.png</url><title>Tim Bunce - Not this...</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/NotThis" type="application/rss+xml" /><item>
		<title>An “Indian Summer” day of domesticity</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/412277632/</link>
		<comments>http://blog.timbunce.org/2008/10/05/an-indian-summer-day-of-domesticity/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 23:36:38 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[food]]></category>

		<category><![CDATA[local]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=188</guid>
		<description><![CDATA[Today was a great day.
An ordinary domestic weekend kind of a day, but blessed with great weather and no engagements for any of us.

A chance for me to catch up on many of the long neglected house and garden chores, and for our family to enjoy some chilled-out time around the house.
We&#8217;ve been burning more [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today was a great day.</p>
<p>An ordinary domestic weekend kind of a day, but blessed with great weather and no engagements for any of us.</p>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/10/house-last-afternoon.jpg?w=640&#038;h=480" alt="house last afternoon.jpg" border="0" width="640" height="480" /></div>
<p>A chance for me to catch up on many of the long neglected house and garden chores, and for our family to enjoy some chilled-out time around the house.</p>
<p>We&#8217;ve been burning more wood on the fire recently and the chimney was overdue a sweep. So I blocked up the fireplace with a bin bag and some foam, then climbed on the roof and swept down from the chimney pot. It was my first time sweeping a chimney and this method made it very simple. I just left the fireplace sealed up for a few hours for the dust to settle before opening it up and shovelling out the shoot along with the old ash.
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/10/fireplace-sealed.jpg?w=160&#038;h=120" alt="fireplace sealed.jpg" border="0" width="160" height="120" /> &nbsp;<img src="http://timbunce.files.wordpress.com/2008/10/soot-in-fireplace.jpg?w=160&#038;h=120" alt="soot in fireplace.jpg" border="0" width="160" height="120" /></div>
<p>My wife had seen a recipe for &#8220;Hedgerow Jelly&#8221; by Elisabeth Luard in a magazine, so she, and our two daughters, walked out down the local lanes to find the ingredients: 1kg crab apples or Bramleys; 250g blackberries, 250g sloes or bullaces or damsons, 250g rowan berries or elderberries, 125g hawthorn berries (haws), 125g rosehips (wild or cultivated), plus about 2 litres of water and about 2kg of granulated sugar.</p>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/10/chopped-fruit-in-caserole.jpg?w=640&#038;h=480" alt="chopped fruit in caserole.jpg" border="0" width="640" height="480" /></div>
<p>(Our eldest daughter decided to take photographs of the process, which ultimately led to this blog post &mdash; I normally rarely post about home life.)</p>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/10/fruit-into-muslin.jpg?w=120&#038;h=160" alt="fruit into muslin.jpg" border="0" width="120" height="160" /> <img src="http://timbunce.files.wordpress.com/2008/10/fruit-in-muslin.jpg?w=160&#038;h=120" alt="fruit in muslin.jpg" border="0" width="160" height="120" /> <img src="http://timbunce.files.wordpress.com/2008/10/hanging-muslin.jpg?w=120&#038;h=160" alt="hanging muslin.jpg" border="0" width="120" height="160" /></div>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/10/ladling-fruit-juice.jpg?w=160&#038;h=120" alt="ladling fruit juice.jpg" border="0" width="160" height="120" /> <img src="http://timbunce.files.wordpress.com/2008/10/sieves-in-sink.jpg?w=160&#038;h=120" alt="sieves in sink.jpg" border="0" width="160" height="120" /> <img src="http://timbunce.files.wordpress.com/2008/10/hedgerow-jelly-jars.jpg?w=160&#038;h=120" alt="hedgerow jelly jars.jpg" border="0" width="160" height="120" /></div>
<p>Meanwhile, after clearing gutters and sweeping the drive, I was working down by the lake front thinning out some trees. A few months ago we had a group of big old trees one corner of our garden cut down. Mostly pine with some silver birch and hazel. (You can see in the photo the large pile of wood I still need to chop, chop, chop.) That gave us a view of the lake again. Something we&#8217;d lost over the years since we moved in as the trees have grown up and bushed out.</p>
<p>Having got that narrow view of the lake I wanted to extend it through the trees to the right by thinning out their lower branches.</p>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/10/view-to-lake.jpg?w=640&#038;h=480" alt="view to lake.jpg" border="0" width="640" height="480" /></div>
<p>The summer weather in Ireland has been pretty poor the last few years. We seem to get a few lovely weeks in spring, then summer is a mostly washout with grey skies and regular showers. Then, just after the kids go back to school, we get a few bright weeks again&mdash;the Irish &#8220;Indian Summer&#8221;&mdash;around September/October. Fabulous days like today.</p>
<p>There&#8217;s a reason Ireland is so green. It rains. A lot. Especially in the west were we are. Despite the bright sunshine today the grass was squelching under my feet. The logs need to be stored or they&#8217;ll rot over the winter. I shifted a few wheelbarrow loads today and started clearing a space off the grass to store them.</p>
<p>A friend and I wielded axes a few weeks ago so we&#8217;ve a reasonable stockpile of split logs now, which I finished stacking today. I&#8217;ve been told the wood gets harder to split the longer its left, and I don&#8217;t fancy trying to split logs on dark wet winter nights, so I guess I need to keep at it.</p>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/10/log-pile.jpg?w=640&#038;h=480" alt="log pile.jpg" border="0" width="640" height="480" /></div>
<p>Back indoors the domesticity continued with our eldest daughter making the topping for an Apple Crumble.</p>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/10/making-crumble.jpg?w=640&#038;h=480" alt="making crumble.jpg" border="0" width="640" height="480" /></div>
<p>Our eating apple tree is still recovering from the pruning I gave it last winter (it&#8217;s first for many years) but our cooking apple tree seems very happy this year.</p>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/10/cooking-apple-tree.jpg?w=640&#038;h=480" alt="cooking apple tree.jpg" border="0" width="640" height="480" /></div>
<p>Yum!</p>
<hr />
<p><em>That was the glossy edited version of the day. The uncut version includes me falling off the ladder into the lake, our youngest daughter having a tantrum and throwing handfuls of apple crumble onto the floor, and me pouring scalding hot Hedgerow Jelly over my hand. Ahh, domestic bliss!</em></p>
Posted in food, local&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=188&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=cpnZM"><img src="http://feeds.feedburner.com/~f/NotThis?i=cpnZM" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=y0seM"><img src="http://feeds.feedburner.com/~f/NotThis?i=y0seM" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/412277632" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/10/05/an-indian-summer-day-of-domesticity/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/house-last-afternoon.jpg" medium="image">
			<media:title type="html">house last afternoon.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/fireplace-sealed.jpg" medium="image">
			<media:title type="html">fireplace sealed.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/soot-in-fireplace.jpg" medium="image">
			<media:title type="html">soot in fireplace.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/chopped-fruit-in-caserole.jpg" medium="image">
			<media:title type="html">chopped fruit in caserole.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/fruit-into-muslin.jpg" medium="image">
			<media:title type="html">fruit into muslin.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/fruit-in-muslin.jpg" medium="image">
			<media:title type="html">fruit in muslin.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/hanging-muslin.jpg" medium="image">
			<media:title type="html">hanging muslin.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/ladling-fruit-juice.jpg" medium="image">
			<media:title type="html">ladling fruit juice.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/sieves-in-sink.jpg" medium="image">
			<media:title type="html">sieves in sink.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/hedgerow-jelly-jars.jpg" medium="image">
			<media:title type="html">hedgerow jelly jars.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/view-to-lake.jpg" medium="image">
			<media:title type="html">view to lake.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/log-pile.jpg" medium="image">
			<media:title type="html">log pile.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/making-crumble.jpg" medium="image">
			<media:title type="html">making crumble.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/cooking-apple-tree.jpg" medium="image">
			<media:title type="html">cooking apple tree.jpg</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/10/05/an-indian-summer-day-of-domesticity/</feedburner:origLink></item>
		<item>
		<title>NYTProf 2.04 gives you 90% smaller data files</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/410186998/</link>
		<comments>http://blog.timbunce.org/2008/10/03/nytprof-204-gives-you-90-smaller-data-files/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 11:15:27 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[perl]]></category>

		<category><![CDATA[graphs]]></category>

		<category><![CDATA[nytprof]]></category>

		<category><![CDATA[performance]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=166</guid>
		<description><![CDATA[At OSCON this year I gave a talk on my new pet project Devel::NYTProf v2 to a packed room. Turned out to be a lot of fun. 
&#8220;The first thing I need to do is talk about Devel::DProf because it needs to be taken out and shot.&#8221;
I made a screencast of the 40 minute talk [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>At OSCON this year I gave a talk on my new pet project Devel::NYTProf v2 to a packed room. Turned out to be a lot of fun. </p>
<blockquote><p>&#8220;The first thing I need to do is talk about Devel::DProf because it needs to be <a href="http://blog.timbunce.org/2008/07/12/devel-dprof-broken-by-the-passage-of-time/">taken out and shot</a>.&#8221;</p></blockquote>
<p>I made a screencast of the 40 minute talk which you can watch on blip.tv <a href="http://blip.tv/file/1130150">here</a>. Worth watching for the background on profilers, the demo of NYTProf, and the questions, not to mention the teasing I get along the way.</p>
<p>One of the final questions was about the size of the profile data file that NYTProf produces. One of the major drawbacks of statement-level profiling is the volume of data it generates while profiling your code. For every statement executed the profiler streams out the file id, the line number, and the time spent. For every statement! When trying to profile a full application doing real work the volume of data generated quickly becomes impractical to deal with. Multi-gigabyte files are common.</p>
<p>This was the major problem with <a href="http://search.cpan.org/perldoc?Devel::SmallProf">Devel::SmallProf</a>, which generated text files while profiling. Salvador Fandiño García addressed that in <a href="http://search.cpan.org/perldoc?Devel::FastProf">Devel::FastProf</a> by writing the data in a compact binary form. A <em>vast</em> improvement that contributed to Devel::FastProf (on which Devel::NYTProf is based) being the first statement-level profiler worth using on large applications. Even so, the volume of data generated was still a problem when profiling all but short running applications.</p>
<p>NYTProf 2.03 was producing profile data at the rate of about 13MB per million statements executed. That might not sound too bad until you realise that on modern systems with cpu intensive code, perl can execute millions of statements every few seconds.</p>
<p>I could see a way to approximately halve the data volume by changing the format to optimize of the common case of consecutive statements being in the same file, but that wasn&#8217;t going to be enough. The best way forward would be to add zip compression. It would be easy enough to pipe the output stream through a separate zip process, but that approach has a problem: the zip process will be soaking up cpu time asynchronously from the app being profiled. That would affect the realtime measurements in an unpredictable way.</p>
<p>I realized back <a href="http://code.google.com/p/perl-devel-nytprof/source/detail?r=333#">in June</a> that a better approach would be to embed zip compression into NYTProf itself. Around the end of July Nicholas Clark, current Perl Pumpkin, <a href="http://groups.google.com/group/develnytprof-dev/tree/browse_frm/thread/5caf1b8e598639be/8d86aa83b7ba45f0?rnum=1&amp;_done=%2Fgroup%2Fdevelnytprof-dev%2Fbrowse_frm%2Fthread%2F5caf1b8e598639be%2F9a4a6a76ca2ae013%3F#doc_55c101d6c8499465">got involved</a> and was motivated to implement the internal zipping because he was &#8220;<em>generating over 4Gb of profile data trying to profile the harness in the Perl 5 core running tests in parallel</em>&#8220;.</p>
<p>He did a great job. The zlib library is automatically detected at build time and, if available, the code to dynamically route i/o through the zip library gets compiled in. The output stream starts in normal mode, so you can easily see and read the plain text headers in the data file, then switches to zip compression for the profile data. How well did it work out? This graph tells the story:</p>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/10/nytprof-204-compression.png?w=845&#038;h=641" alt="NYTProf 2.04 compression.png" border="0" width="845" height="641" /></div>
<p><em>(The data relates to profiling perlcritic running on a portion of its own source code on my MacBook Pre 2GHz laptop. I only took one sample at each compression level so there may be some noise in the results.)</em></p>
<p>The data file size (red) plummets even at the lowest compression level. Also note the corresponding drop in system time (yellow) due to the reduction in context switches and file i/o. </p>
<p>I&#8217;ve set the default compression level to 6. I doubt you&#8217;ll want to change it, but you can by adding <code>compression=N</code> to the <code>NYTPROF</code> environment variable.</p>
<p>Here are the change notes for the 2.04 release:</p>
<pre>
  Fixed rare divide-by-zero error in reporting code.
  Fixed rare core dump in reporting code.
  Fixed detection of #line directives to be more picky.
  Fixed some compiler warnings thanks to Richard Foley.
  Added on-the-fly ~90% zip compression thanks to Nicholas Clark.
    Reduces data file size per million statements executed
    from approx ~13MB to ~1MB (depends on code being profiled).
  Added extra table of all subs sorted by inclusive time.
  No longer warns about '/loader/0x800d8c/...' synthetic file
    names perl assigns reading code from a CODE ref in @INC
</pre>
<p>Enjoy!</p>
Posted in perl&nbsp;&nbsp;&nbsp;Tagged: graphs, nytprof, performance, video&nbsp;&nbsp;&nbsp;<a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=166&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=1Qc3M"><img src="http://feeds.feedburner.com/~f/NotThis?i=1Qc3M" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=YCEUM"><img src="http://feeds.feedburner.com/~f/NotThis?i=YCEUM" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/410186998" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/10/03/nytprof-204-gives-you-90-smaller-data-files/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/10/nytprof-204-compression.png" medium="image">
			<media:title type="html">NYTProf 2.04 compression.png</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/10/03/nytprof-204-gives-you-90-smaller-data-files/</feedburner:origLink></item>
		<item>
		<title>Arithmetic, Population, and Energy</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/402770503/</link>
		<comments>http://blog.timbunce.org/2008/09/25/arithmetic-population-and-energy/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 12:51:48 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[life]]></category>

		<category><![CDATA[democracy]]></category>

		<category><![CDATA[myths]]></category>

		<category><![CDATA[trends]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=160</guid>
		<description><![CDATA[Dr. Albert Bartlett is emeritus Professor of Physics at the University of Colorado at Boulder, USA. He has given this lecture on &#8220;Arithmetic, Population, and Energy&#8221; over 1,500 times.
&#8220;The greatest shortcoming of the human race is our inability to understand the exponential function.&#8221;
A challenging statement. Having seen the lecture now I can understand why it [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://en.wikipedia.org/wiki/Albert_Bartlett">Dr. Albert Bartlett</a> is emeritus Professor of Physics at the University of Colorado at Boulder, USA. He has given this lecture on &#8220;Arithmetic, Population, and Energy&#8221; over 1,500 times.</p>
<blockquote><p>&#8220;The greatest shortcoming of the human race is our inability to understand the exponential function.&#8221;</p></blockquote>
<p>A challenging statement. Having seen the lecture now I can understand why it has been so popular, and is so important. I came across it recently and felt it was worth sharing.</p>
<p>You can watch it on YouTube <a href="http://www.youtube.com/p/EEEAC2F1961D21A9">here</a> as a series of bite-size 9 minute clips.</p>
<p>(After that you might like <a href="http://www.youtube.com/watch?v=AE6Kdo1AQmY&amp;NR=1">this</a> unrelated take on applying risk management.)</p>
Posted in life&nbsp;&nbsp;&nbsp;Tagged: democracy, myths, trends, video&nbsp;&nbsp;&nbsp;<a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=160&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=AN2kL"><img src="http://feeds.feedburner.com/~f/NotThis?i=AN2kL" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=kNhXL"><img src="http://feeds.feedburner.com/~f/NotThis?i=kNhXL" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/402770503" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/09/25/arithmetic-population-and-energy/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/09/25/arithmetic-population-and-energy/</feedburner:origLink></item>
		<item>
		<title>The Italian Perl Workshop</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/401787897/</link>
		<comments>http://blog.timbunce.org/2008/09/24/the-italian-perl-workshop/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 12:56:03 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[life]]></category>

		<category><![CDATA[perl]]></category>

		<category><![CDATA[conference]]></category>

		<category><![CDATA[myths]]></category>

		<category><![CDATA[nytprof]]></category>

		<category><![CDATA[presentation]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=141</guid>
		<description><![CDATA[I spent a very pleasant few days in Pisa, Italy, last week. I&#8217;d been invited to speak at the Fourth Italian Perl Workshop. The workshop was a great success. In fact calling it a &#8220;workshop&#8221; is selling it short. It&#8217;s more of a mini-conference:
&#8220;2 days of conference, 2 simultaneous tracks, more than 30 talks, 120 [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img src="http://timbunce.files.wordpress.com/2008/09/pisa-cathedral-wall.jpg?w=150&#038;h=320" alt="Pisa Cathedral Wall.jpg" border="0" width="150" height="320" align="right" />I spent a very pleasant few days in Pisa, Italy, last week. I&#8217;d been invited to speak at the <a href="http://conferences.yapceurope.org/ipw2008/">Fourth Italian Perl Workshop</a>. The workshop was a great success. In fact calling it a &#8220;workshop&#8221; is selling it short. It&#8217;s more of a mini-conference:</p>
<blockquote><p>&#8220;2 days of conference, 2 simultaneous tracks, more than 30 talks, 120 attendees, 20 sponsors and many international guests&#8221;</p></blockquote>
<p>The whole event ran very smoothly thanks to a great team lead by Gianni Ceccarelli, Francesco Nitido, and Enrico Sorcinelli. I&#8217;ll echo <a href="http://www.perl.it/blog/archives/000614.html">the compliments of one attendee</a> <em>&#8220;Complimenti sinceri agli organizzatori! Bravissimi! Tutto perfetto!</em>&#8220;</p>
<p>I gave short talk on Gofer on the Thursday, and then two 40 minutes talks on Friday: Perl Myths, and Devel::NYTProf. I hope to upload screencasts and slides next week. The talks were all recorded on video so I imagine they&#8217;ll be uploaded at some point. I&#8217;ll add links here to them when they are.</p>
<p>The majority of the sessions were in Italian so, since my Italian is practically non-existant, I had plenty of time to work.</p>
<p>Or at least try to. The one disappointment of the trip for me was the apparent poor quality of the Italian internet. Using <a href="http://en.wikipedia.org/wiki/Mtr_(My_traceroute)">mtr</a> I&#8217;d regularly see over 20% packet loss within <em>telecomitalia.it</em> and <em>interbusiness.it</em> from my hotel room. Occasionally over 50%. It got much better at night, so I&#8217;d do more work then. At the conference venue the Italian academic network (<em>garr.net</em>) also regularly had over 20% packet loss at its link to the internet. All this was, of course, outside the control of the organisers.</p>
<p>The &#8220;corridoor track&#8221; at perl conferences is always good. I had a chance to talk to Rafel Garcia-Suarez (and meet his lovely wife and new baby son), Matt S Trout, Hakim Cassimally, Michel Rodriguez,  Marcus Ramberg, and many others.</p>
<p>I had opted to take a very early fight so I&#8217;d have a day being a tourist in Pisa before the conference started. The weather was beautiful and I had a lovely time strolling though the streets of this ancient city.</p>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/09/pisa-knights-square.jpg?w=640&#038;h=480" alt="Pisa Knights Square.jpg" border="0" width="640" height="480" /></div>
<p>I didn&#8217;t take my camera with me, but I did take my iPhone so I was able to capture a few snaps as I strolled around and climbed the tower. (Yes, it really does lean in a disconcerting &#8220;it must be about to fall down&#8221; way. All the more dramatic when you&#8217;re up close and can appreciate the massive scale of the tower.)</p>
<div style="text-align:center;">
<img src="http://timbunce.files.wordpress.com/2008/09/pisa-framed-view.jpg"/></p>
<p><img /></p>
<p><img src="http://timbunce.files.wordpress.com/2008/09/pisa-cathedral-ceiling.jpg"/></p>
<p><img src="http://timbunce.files.wordpress.com/2008/09/pisa-tower-steps.jpg"/></p>
<p><img src="http://timbunce.files.wordpress.com/2008/09/pisa-view-over-cathedral.jpg" alt="Pisa View over Cathedral.jpg" border="0" width="640" height="480" />
</div>
Posted in life, perl&nbsp;&nbsp;&nbsp;Tagged: conference, myths, nytprof, presentation, video&nbsp;&nbsp;&nbsp;<a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=141&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=zkUiL"><img src="http://feeds.feedburner.com/~f/NotThis?i=zkUiL" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=ixbVL"><img src="http://feeds.feedburner.com/~f/NotThis?i=ixbVL" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/401787897" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/09/24/the-italian-perl-workshop/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/09/pisa-cathedral-wall.jpg" medium="image">
			<media:title type="html">Pisa Cathedral Wall.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/09/pisa-knights-square.jpg" medium="image">
			<media:title type="html">Pisa Knights Square.jpg</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/09/pisa-view-over-cathedral.jpg" medium="image">
			<media:title type="html">Pisa View over Cathedral.jpg</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/09/24/the-italian-perl-workshop/</feedburner:origLink></item>
		<item>
		<title>Hey, my own TV channel!</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/357475538/</link>
		<comments>http://blog.timbunce.org/2008/08/06/hey-my-own-tv-channel/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 14:57:32 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[life]]></category>

		<category><![CDATA[tech]]></category>

		<category><![CDATA[archive]]></category>

		<category><![CDATA[presentation]]></category>

		<category><![CDATA[presenting]]></category>

		<category><![CDATA[slideshare]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=123</guid>
		<description><![CDATA[It felt strange when I first set up this blog. What would I write about? Who would care?
For several years now I&#8217;ve been giving talks at conferences and workshops. I&#8217;d generally upload a PDF of the slides somewhere, or at least email them to anyone that asked. I&#8217;ve now added a special page on the [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It felt strange when I first <a href="http://blog.timbunce.org/2008/01/27/this-is-not-me/">set up this blog</a>. What would I write about? Who would care?</p>
<p>For several years now I&#8217;ve been giving talks at conferences and workshops. I&#8217;d generally upload a PDF of the slides somewhere, or at least email them to anyone that asked. I&#8217;ve now added a special page on the blog where I can list all the talks I&#8217;ve given. That now acts as a single location to <a href="http://blog.timbunce.org/my-presentations/">find all my talks</a> and links to slides any related materials. (It&#8217;s currently a work-in progress. I&#8217;ll be filling it in from time to time. Any major updates will be accompanied by a blog post.)</p>
<p>Slides, no matter how good, miss much of the real event. No ad-libs, no questions and answers. When writing slides I&#8217;m always caught between the desire write little, so the audience can pay attention to what I&#8217;m saying, and to write lots, so people reading the slides later still get a reasonably full picture.</p>
<p>There&#8217;s also the problem of notes. I often use &#8216;presenter notes&#8217; on the slides to give extra information. Both to myself, if I may need it while presenting, and also for links to data sources and credits for images used. I&#8217;ve uploaded <a href="http://www.slideshare.net/Tim.Bunce/slideshows">some talks to slideshare.net</a> but I have to include a separate version with notes (which is useful for download and print, but almost unreadable in their viewer.</p>
<p>I tried making a video of a talk on a camcorder. The results <a href="http://video.google.com/videoplay?docid=-8103133625772088658&amp;ei=ibaZSLqFLoiCiwL0_tDNDw&amp;q=tim+bunce">weren&#8217;t great</a>. Grainy, noisy, hard to read, and massive video files.</p>
<p>Then I decided to try using screencasting software. I bought a <a href="http://www.revolabs.com/products_wm/xtag.htm">great wireless USB microphone</a> and the amazing <a href="http://www.varasoftware.com/products/screenflow/">ScreenFlow</a> screencasting software. Now I can to capture <em>everything</em> in fine detail and edit it easily afterwards.</p>
<p>Great. Now what? I needed somewhere to host the (very large) videos. I looked around and tried a few, <a href="http://vimeo.com/1441518">like vimeo</a>, but wasn&#8217;t happy with the results. Vimo, for example, transcode to quite a low resolution and don&#8217;t let viewers download the original.</p>
<p>Eventually I found the wonder that is blip.tv. A whole laundry list of great features. If you produce videos of any kind, give them a look.</p>
<p>So, now I have <a href="http://timbunce.blip.tv/">my own TV channel</a>.</p>
<p>Strange world!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/123/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/123/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=123&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=haSz6K"><img src="http://feeds.feedburner.com/~f/NotThis?i=haSz6K" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=TrA6XK"><img src="http://feeds.feedburner.com/~f/NotThis?i=TrA6XK" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/357475538" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/08/06/hey-my-own-tv-channel/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/08/06/hey-my-own-tv-channel/</feedburner:origLink></item>
		<item>
		<title>Perl Myths - OSCON 2008</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/350445391/</link>
		<comments>http://blog.timbunce.org/2008/07/30/perl-myths-oscon-2008/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 12:23:17 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[perl]]></category>

		<category><![CDATA[conference]]></category>

		<category><![CDATA[graphs]]></category>

		<category><![CDATA[jobs]]></category>

		<category><![CDATA[perl6]]></category>

		<category><![CDATA[presentation]]></category>

		<category><![CDATA[trends]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=85</guid>
		<description><![CDATA[I gave a updated version of my earlier Perl Myths talk at OSCON this year. It includes updated numbers, updated job trend graphs (showing good growth in perl jobs) and slides for the perl6 portion that were missing from the upload of the previous talk.
Two versions of the slides are available: one with just the slides on [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I gave a updated version of my <a href="http://blog.timbunce.org/2008/03/08/perl-myths/">earlier Perl Myths talk</a> at <a href="http://en.oreilly.com/oscon2008/public/schedule/detail/3242">OSCON this year</a>. It includes updated numbers, updated job trend graphs (showing good growth in perl jobs) and slides for the perl6 portion that were missing from the upload of the previous talk.</p>
<p>Two versions of the slides are available: one with just <a href="http://timbunce.files.wordpress.com/2008/07/perl-myths-200807key.pdf">the slides</a> on a landscape page, and another with <a href="http://timbunce.files.wordpress.com/2008/07/perl-myths-200807-noteskey.pdf">slides and notes</a> on a portrait page.</p>
<p>I also have a screencast of the presentation which I hope to edit and upload before long. (I&#8217;ll update this page and post a new note when I do.)</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/85/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/85/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=85&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=MS7V6J"><img src="http://feeds.feedburner.com/~f/NotThis?i=MS7V6J" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=o1b0JJ"><img src="http://feeds.feedburner.com/~f/NotThis?i=o1b0JJ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/350445391" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/07/30/perl-myths-oscon-2008/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/07/30/perl-myths-oscon-2008/</feedburner:origLink></item>
		<item>
		<title>Interesting Items OSCON 2008 - Dealing with Streaming Data</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/341005701/</link>
		<comments>http://blog.timbunce.org/2008/07/20/interesting-items-oscon-2008-dealing-with-streaming-data/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 23:04:30 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[software]]></category>

		<category><![CDATA[concurrency]]></category>

		<category><![CDATA[conference]]></category>

		<category><![CDATA[presentation]]></category>

		<category><![CDATA[search]]></category>

		<category><![CDATA[streaming]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=77</guid>
		<description><![CDATA[This is a collection of links to things discussed, or just mentioned, at OSCON that I found interesting enough to note. Hopefully one of a series for OSCON 2008, as time allows.
These items are from a great talk on &#8220;A Streaming Database&#8221; by Rafael J. Fernández-Moctezuma at PDXPUG day.
Hancock is a C-based domain-specific language designed [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a collection of links to things discussed, or just mentioned, at OSCON that I found interesting enough to note. Hopefully one of a series for OSCON 2008, as time allows.</p>
<p>These items are from a great talk on &#8220;A Streaming Database&#8221; by <a href="http://web.cecs.pdx.edu/~rfernand/">Rafael J. Fernández-Moctezuma</a> at <a href="http://pugs.postgresql.org/pdxpugday">PDXPUG</a> day.</p>
<p><a href="http://www.research.att.com/~kfisher/hancock/">Hancock</a> is a C-based domain-specific language designed to make it easy to read, write, and maintain programs that manipulate large amounts of relatively uniform data. In addition to C constructs, Hancock provides domain-specific forms to facilitate large-scale data processing</p>
<p>The <a href="http://portal.acm.org/citation.cfm?id=1146463">CQL </a> continuous query language (<a href="http://www.google.com/search?client=safari&amp;rls=en-us&amp;q=cql+widom&amp;ie=UTF-8&amp;oe=UTF-8">google</a>)</p>
<p><a href="http://www.cs.brown.edu/research/borealis/public/"> Borealis </a> is a distributed stream processing engine. Borealis builds on previous efforts in the area of stream processing: Aurora and Medusa.</p>
<p><a href="http://research.microsoft.com/db/cedr/default.aspx">CEDR</a> is the Complex Event Detection and Response project from Microsoft Research.</p>
<p>Google <a href="http://google-opensource.blogspot.com/2008/07/protocol-buffers-googles-data.html">Protocol Buffers</a> &#8220;allow you to define simple data structures in a special definition language, then compile them to produce classes to represent those structures in the language of your choice&#8221;.<br />
 Which seems like <a href="http://developers.facebook.com/thrift/">Thrift</a> which is &#8220;a software framework for scalable cross-language services development. It combines a powerful software stack with a code generation engine to build services that work efficiently and seamlessly between langauges&#8221;.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/77/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/77/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=77&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=OJvzwJ"><img src="http://feeds.feedburner.com/~f/NotThis?i=OJvzwJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=dw858J"><img src="http://feeds.feedburner.com/~f/NotThis?i=dw858J" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/341005701" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/07/20/interesting-items-oscon-2008-dealing-with-streaming-data/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/07/20/interesting-items-oscon-2008-dealing-with-streaming-data/</feedburner:origLink></item>
		<item>
		<title>NYTProf v2 - the background story</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/336797537/</link>
		<comments>http://blog.timbunce.org/2008/07/16/nytprof-v2-the-background-story/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 06:06:37 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[perl]]></category>

		<category><![CDATA[nytprof]]></category>

		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=67</guid>
		<description><![CDATA[This is the back story to the development of NYTProf v2.
Earlier this year (2008) I needed to do some performance profiling of the source code of a large application. Like many perl developers, my first instinct was to try using Devel::DProf (actually the Apache::DProf wrapper as it was a mod_perl application). It was not a [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is the back story to the <a href="http://blog.timbunce.org/2008/07/15/nytprof-v2-a-major-advance-in-perl-profilers/">development of NYTProf v2</a>.</p>
<p>Earlier this year (2008) I needed to do some performance profiling of the source code of a large application. Like many perl developers, my first instinct was to try using Devel::DProf (actually the Apache::DProf wrapper as it was a mod_perl application). It was not a great experience.</p>
<h2>DProf</h2>
<p>DProf seems easily confused by unusual control flow, spewing &#8220;&#8230; has unstacked calls&#8221; warnings. Also, the subroutines it said were taking the most time didn&#8217;t make sense to me. Eventually I worked out that <a href="http://blog.timbunce.org/2008/07/12/devel-dprof-broken-by-the-passage-of-time/">Devel::DProf is effectively broken</a>.</p>
<p>The application I was trying to profile has quite a few large subroutines, so knowing just the time spent in the subroutine as a whole didn&#8217;t help much for those. I wanted to know <em>where</em> in the subroutine the time was being spent.</p>
<h2>FastProf</h2>
<p>That led me to look at line-based profilers. At the time there as only one worth looking at, <a href="http://search.cpan.org/perldoc?Devel::FastProf">Devel::FastProf</a> by <a href="http://search.cpan.org/~salva/">Salvador Fandiño García </a> (which was based on <a href="http://search.cpan.org/dist/Devel-SmallProf/">Devel::SmallProf</a> by <a href="http://search.cpan.org/~ashted/">Ted Ashton</a>).</p>
<p>Line profilers spit out a stream of &#8220;file id, line number, time spent&#8221; records to a file. The time between starting one statement and starting the next is measured and associated with the line number of the statement.</p>
<p>Devel::FastProf was great. Fast and effective. It gave me far more accurate timings, and when I made changes in the code it highlighted I could see an immediate effect on performance.</p>
<p>Devel::FastProf was great, but I wanted more. The lack of subroutine level timing was frustrating. When you have a ~100,000 lines of code, knowing the time spent on each, and how many times it was executed, is less useful than you may think - there&#8217;s just too much detail. Especially when looking for structural problems in the code, or for good places to add caching, or pass extra information down a call chain to save expensive calls deeper in the code. There&#8217;s a need for <em>both</em> subroutine and line level timings when profiling.</p>
<h2>Idea</h2>
<p>I&#8217;d had an idea: The line number output in the FastProf profile need not be the line number of the statement. It could output the <em>line number of the subroutine containing the statement</em>. Then you&#8217;d automatically get subroutine level timings! Simple.<br />
Then I wondered if it was possible to find the line number of the <em>block</em> the statement was in. That would give block level timing! A first for any perl profiler.</p>
<p>My perl internals knowledge was getting rusty as it was a few years since I&#8217;d been Pumpkin for the 5.4.x release, so <a href="http://markmail.org/message/rvfvucvhq2iesl3h">I asked the wizards</a> on perl5-porters. They gave me hope and enough clues to get going.</p>
<p>Salvador kindly moved the Devel::FastProf code to a public svn, so I could contribute more easily, and <a href="http://code.google.com/p/devel-fastprof/source/list">I started hacking</a>. I added code to find the nearest enclosing block or sub and it proved very useful.</p>
<p>When I&#8217;m optimizing I start by identifying &#8220;locally inefficient code&#8221;. That is, code you can optimize without significant structural changes. Without making changes outside the subroutine. Moving code outside loops is a common example. Subroutine timings identify the hot subs, then block and line timings pinpoint the hot spots in the code.</p>
<p>That&#8217;s the low hanging fruit. Easy pickings, and often very effective. But there&#8217;s a limit to how far that&#8217;ll take you.</p>
<h2>Callers and Callees</h2>
<p>There are two ways to optimize a hot piece of code: make it faster, or execute it less often. The former tends to get much more attention than the latter. It&#8217;s important to remember to keep stepping back. To keep looking for the bigger picture.</p>
<p>When I&#8217;m optimizing I often use a well defined chunk of work, like 10 requests to the same URL, so I can see of the number of times a subroutine is called &#8220;feels right&#8221;. That often shows subs being called &#8220;too often&#8221;. But what then? You need to know <em>why</em> the sub is being called too often, so you need to know <em>where</em> it&#8217;s being called from.</p>
<p>In Devel::FastProf I added counting of subroutine callers two-levels up the call stack. So I could see that foo() was called 10 times by bar() and that <em>of those 10 calls</em> from bar() 7 has come from baz() and 3 from boo(). It was very simplistic, slow (implemented in perl) and only had counts, not timings, but proved <em>very useful</em>.</p>
<p>Using these additions to Devel::FastProf I reduced the CPU usage of the application by over 40%. Not bad. (I could see another 10% or so to be gained fairly easily but had to draw the line somewhere.)</p>
<h2>NYTProf</h2>
<p>Meanwhile Adam Kaplan had forked Devel::FastProf, added a test harness and tests, made some internal improvements, grafted on an html report derived from <a href="http://search.cpan.org/perldoc?Devel::Cover">Devel::Cover</a>, and <a href="http://perlbuzz.com/mechanix/2008/03/develnytprof-is-the-hot-new-pr.html">released it as Devel::NYTProf</a>.</p>
<p>When I saw NYTProf I switched to working on that. Again, Adam was kind enough to move the code to a public <a href="http://code.google.com/p/perl-devel-nytprof/">svn repository</a>. I was attracted not so much by the html report as by the test harness. A lesson to anyone wanting to attract developers to an open source project!</p>
<p>Testing profilers is hard and Adam had come up with a good basic testing framework which was easy to extend. NYTProf now has a strong test suite that profiles 19 different perl scripts with four different combinations of profiler options. The test suite has proven <em>invaluable</em> in identifying regressions during development, and for identifying portability issues between perl versions.</p>
<p>I re-implemented the block/sub level profiling and the subroutine caller tracking from FastProf in NYTProf, but with more care, more attention to performance, and now tests.</p>
<p>I was particularly pleased with the subroutine caller tracking. It intercepts the <code>entersub</code> opcode and uses the save stack for storage and to trigger a &#8216;destructor&#8217; call to end the timing when the subroutine is exited by any means. The end result is an extremely fast and robust subroutine call profiler. I plan to add an option to disable the other profiler so you can just get subroutine profile details when you don&#8217;t need statement level details. It currently lacks the ability to give exclusive times but I think I&#8217;ve an efficient solution for that. (Update: Implemented in <a href="http://code.google.com/p/perl-devel-nytprof/source/detail?r=340">r340</a> and <a href="http://code.google.com/p/perl-devel-nytprof/source/detail?r=343">r343</a> so will be in the 2.02 release.)</p>
<h2>Accuracy</h2>
<p>Another key innovation was to fix a fundamental problem inherent in all statement profilers. Consider a statement that calls a subroutine and then performs some other work that doesn&#8217;t execute new statements, for example:</p>
<pre>    foo(...) || mkdir(...);</pre>
<p>In all other statement profilers the time spent in <em>remainder</em> of the expression (mkdir in the example) will be recorded as having been spent on <em>the last statement executed in foo()</em>! Here&#8217;s another example:</p>
<pre>    while (&lt;&gt;) {
        ...
        1;
    }</pre>
<p>After the first time around the loop, any further time spent evaluating the condition (waiting for input in this example) would be be recorded as having been spent <em>on the last statement executed in the loop</em>!</p>
<p>I fixed this in NYTProf by intercepting all the opcodes which indicate that control is returning into some previous statement and adjusting the profile accordingly.</p>
<h2>Reporting</h2>
<p>As much effort, if not more, went into the reporting side of the code. And there&#8217;s a lot more to be done there. My goal is to keep growing the data model classes to the point where any reporting code can get the information it needs easily enough that there&#8217;s no longer a need for the rather limiting Reporter class.</p>
<p>I&#8217;d like to see a single &#8216;nytprof&#8217; command line tool that loads a class to generate the report. That would replace nytprofhtml and nytprofcsv. That would make it easy for other developers to release &#8216;nytprof reporting modules&#8217; to CPAN.</p>
<p>For example, one very useful report that FastProf has but NTProf currently lacks is a list of most expensive lines (or blocks, or subs) output in the format used by compiler error messages. The format is important because most editors have a special mode for reading such files that means you can hop from one &#8216;most expensive line&#8217; to the next with a single key stroke. (For vim that&#8217;s called <a href="http://www.vim.org/htmldoc/quickfix.html">quickfix mode</a>.) That&#8217;s a wonderful way to browse the hotspots and make edits on the spot.</p>
<h2>Future</h2>
<p>There are many, many, ways NYTProf can be enhanced further. As I&#8217;ve worked on it I&#8217;ve dumped ideas, issues and random notes into the <a href="http://code.google.com/p/perl-devel-nytprof/source/browse/trunk/HACKING">HACKING</a> file.</p>
<h2>Thanks</h2>
<p>I&#8217;d like to end by expressing my thanks to Salvador Fandiño García and especially Adam Kaplan for allowing me to contribute to the modules they created and tolerating my strong ideas with understanding. Thank you both. It&#8217;s been quite a ride.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/67/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/67/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=67&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=3Y7ekJ"><img src="http://feeds.feedburner.com/~f/NotThis?i=3Y7ekJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=isSBSJ"><img src="http://feeds.feedburner.com/~f/NotThis?i=isSBSJ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/336797537" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/07/16/nytprof-v2-the-background-story/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/07/16/nytprof-v2-the-background-story/</feedburner:origLink></item>
		<item>
		<title>NYTProf v2 - A major advance in perl profilers</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/336659046/</link>
		<comments>http://blog.timbunce.org/2008/07/15/nytprof-v2-a-major-advance-in-perl-profilers/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 03:56:42 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[perl]]></category>

		<category><![CDATA[nytprof]]></category>

		<category><![CDATA[performance]]></category>

		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=52</guid>
		<description><![CDATA[After much hacking, and just in time for OSCON, I&#8217;m delighted to announce the release of Devel::NYTProf version 2. A powerful, efficient, feature-rich perl source code profiler.
&#8220;If NYTProf 1 is a Toyota, then 2.0 is a Cadillac&#8221;
— Adam Kaplan, author of NYTProf 1.
The Short Story
(I&#8217;ve written up the long story, for the record, in another [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After <em>much</em> hacking, and just in time for OSCON, I&#8217;m delighted to announce the release of Devel::NYTProf version 2. A powerful, efficient, feature-rich perl source code profiler.</p>
<blockquote><p>&#8220;If NYTProf 1 is a Toyota, then 2.0 is a Cadillac&#8221;<br />
— Adam Kaplan, author of NYTProf 1.</p></blockquote>
<h1>The Short Story</h1>
<p>(I&#8217;ve written up the long story, for the record, <a href="http://blog.timbunce.org/2008/07/16/nytprof-v2-the-background-story/">in another post</a>.)</p>
<p>Adam forked <a href="http://search.cpan.org/perldoc?Devel::FastProf">Devel::FastProf</a> (the best statement-level profiler at the time), added a test harness and tests, made some internal improvements, and grafted on an html report derived from <a href="http://search.cpan.org/perldoc?Devel::Cover">Devel::Cover</a>. The resulting Devel::NYTProf v1 was a big hit.</p>
<p>Meanwhile I&#8217;d been working on Devel::FastProf, <a href="http://code.google.com/p/devel-fastprof/source/list">contributing</a> some interesting new profiling features, but it had no test harness and no html reports. When Adam released NYTProf I switched. Attracted not so much by the html report as by the test harness. (A lesson to anyone wanting to attract developers to an open source project.)</p>
<p>I started out by adding in the same new features I&#8217;d been adding to FastProf, albeit with more polish and tests. And then I got carried away&#8230;</p>
<blockquote><p>&#8220;Holy shit! That is amazing.&#8221;<br />
— Andy Lester, after using a recent development version.</p></blockquote>
<h1>Example Screen Shots</h1>
<p>As an example I&#8217;ve used NYTProf to profile <a href="http://search.cpan.org/perldoc?perlcritic">perlcritic</a> 1.088 running on its own source code.</p>
<pre>$ cd Perl-Critic-1.088
$ perl -d:NYTProf -S perlcritic .
$ nytprofhtml
$ open nytprof/index.html</pre>
<p>The first image is the main index page, showing the top few subroutines and the start of the list of all source files.</p>
<div style="text-align:center;border:1px;"><img src="http://timbunce.files.wordpress.com/2008/07/nytprof-perlcritic-index.png?w=660&#038;h=749" border="1" alt="NYTProf perlcritic index.png" width="660" height="749" /></div>
<p>Each source file has links to separate line-level, block-level, and sub-level reports (though I hope to merge them in future). Clicking on a subroutine name takes you to the line-level report for the file it&#8217;s defined in and positions you at the subroutine definition.</p>
<p>(The color coding is based on <a href="http://en.wikipedia.org/wiki/Median_absolute_deviation">Median Absolute Deviation</a> of all the values in the column, same as in NYProf v1.)</p>
<p>Here&#8217;s the all_perl_files() subroutine, for example:</p>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/07/nytprof-perlcritic-all-perl-files.png?w=663&#038;h=552" border="1" alt="NYTProf perlcritic all_perl_files.png" width="663" height="552" /></div>
<p>The colored numbers show the number of statements executed, the total time taken, and the average. The statement times are always <em>exclusive</em> times. Time actually spent <em>on</em> that statement, the expressions and any built-in functions it uses. It doesn&#8217;t include any time spent executing statements elsewhere in subroutines called by it. In NYTProf subroutine timings are inclusive and statement timings are exclusive.</p>
<h2>Where did you come from and where are you going?</h2>
<p>Notice the grey text.</p>
<p>On lines that <em>define</em> a subroutine NYTProf now adds &#8216;comments&#8217; giving the total number of times the sub was called, the inclusive time spent in that sub, and the average. Then it adds a break-down of the same details <em>for every location that called the subroutine</em>. Here&#8217;s a better example of that:</p>
<p><img src="http://timbunce.files.wordpress.com/2008/07/nytprof-sub-callers1.png?w=725&#038;h=137" border="0" alt="NYTProf sub-callers.png" width="725" height="137" /></p>
<p>On lines that <em>call</em> subroutines NYTProf now adds &#8216;comments&#8217; giving the name of the actual subroutines called (resolving code refs to subroutine names, including the class that handled a method call). It also tells you how many calls were made and how much time was spent in that subroutine <em>for calls made from that line</em>. Here&#8217;s an example:</p>
<p><img src="http://timbunce.files.wordpress.com/2008/07/nytprof-subs-called1.png?w=817&#038;h=106" border="0" alt="NYTProf subs-called.png" width="817" height="106" /></p>
<p>When you mouse-over the grey text it turns black and you can click on embedded links to take you to the callers or callees. <em>So with a few clicks you can run up and down the call stack exploring where the time is being spent and where the hot spots are being called from</em>. The ability to <em>explore</em> the code so easily, guided by these performance signposts is incredibly useful.</p>
<h2>Rolling up for a higher level view</h2>
<p>Sometimes per-statement timing can overwhelming. In large subroutines it becomes &#8220;hard to see the wood for the trees&#8221;. So, for the first time in any Perl profiler, NYTProf now provides a block-level view of the timing data:</p>
<div style="text-align:center;"><img src="http://timbunce.files.wordpress.com/2008/07/nytprof-perlcritic-all-perl-files-block-level.png?w=662&#038;h=552" border="1" alt="NYTProf perlcritic all_perl_files block level.png" width="662" height="552" /></div>
<p>What&#8217;s happening here is that NYTProf is taking the same time measurements per statement, but instead of accumulating the time against the line the statement is on, it accumulates it against the line of the first statement in the enclosing block. (The actual line it accumulates it against isn&#8217;t ideal in some cases. I&#8217;m hoping to improve that soon.)</p>
<p>This report is a little more tricky to read but can be very useful, especially in large subroutines. (I hope to improve the readability with some css :hover magic in future.)</p>
<p>The subroutine-level report is very similar except that all the timings are accumulated against line of the first statement in the subroutine.</p>
<h2>Have a Look</h2>
<p>Back in June I gave a talk at the <a>Irish Open Source Technology</a> conference where I showed the first version of the annotated html report (which I&#8217;d been hacking on till 3am the night before while struggling with a cold - presentations are great motivators). You can see the 15 minute video <a href="http://link.brightcove.com/services/link/bcpid1659850726/bctid1662507092">here</a> or <a href="http://idisk.mac.com/tim.bunce-Public/perl/NYTProf/NYTProf-200806c.mov">here</a>).</p>
<h2>Explore for yourself</h2>
<p>I&#8217;ve uploaded the full set of reports for you to explore <a href="http://idisk.mac.com/tim.bunce-Public/perl/NYTProf/nytprof-perlcritic-20080812/index.html" target="_new">here</a>. Take a look. Let me know what you think.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/52/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/52/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=52&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=MIXKgJ"><img src="http://feeds.feedburner.com/~f/NotThis?i=MIXKgJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=hXrkVJ"><img src="http://feeds.feedburner.com/~f/NotThis?i=hXrkVJ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/336659046" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/07/15/nytprof-v2-a-major-advance-in-perl-profilers/feed/</wfw:commentRss>

	
		<media:content url="http://feeds.feedburner.com/~r/NotThis/~5/336673513/NYTProf-200806c.mov" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/07/nytprof-perlcritic-index.png" medium="image">
			<media:title type="html">NYTProf perlcritic index.png</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/07/nytprof-perlcritic-all-perl-files.png" medium="image">
			<media:title type="html">NYTProf perlcritic all_perl_files.png</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/07/nytprof-sub-callers1.png" medium="image">
			<media:title type="html">NYTProf sub-callers.png</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/07/nytprof-subs-called1.png" medium="image">
			<media:title type="html">NYTProf subs-called.png</media:title>
		</media:content>

		<media:content url="http://timbunce.files.wordpress.com/2008/07/nytprof-perlcritic-all-perl-files-block-level.png" medium="image">
			<media:title type="html">NYTProf perlcritic all_perl_files block level.png</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/07/15/nytprof-v2-a-major-advance-in-perl-profilers/</feedburner:origLink><enclosure url="http://feeds.feedburner.com/~r/NotThis/~5/336673513/NYTProf-200806c.mov" length="56934512" type="video/quicktime" /><feedburner:origEnclosureLink>http://idisk.mac.com/tim.bunce-Public/perl/NYTProf/NYTProf-200806c.mov</feedburner:origEnclosureLink></item>
		<item>
		<title>Devel::DProf - broken by the passage of time</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/333858622/</link>
		<comments>http://blog.timbunce.org/2008/07/12/devel-dprof-broken-by-the-passage-of-time/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 23:05:53 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[perl]]></category>

		<category><![CDATA[nytprof]]></category>

		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=48</guid>
		<description><![CDATA[&#8220;Measure twice, cut once.&#8220;
To measure the performance of your Perl code many developers instinctively reach for Devel::DProf. The venerable perl profiler dates back to 1995.
When profiling you have two broad choices: cpu-time vs wallclock time, and subroutine-level profiling vs line-level profiling. DProf is a subroutine-level profiler. (I&#8217;ll talk more about subroutine-level profiling vs line-level profiling [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><blockquote><p>&#8220;<em>Measure twice, cut once.</em>&#8220;</p></blockquote>
<p>To measure the performance of your Perl code many developers instinctively reach for Devel::DProf. The venerable perl profiler dates back to 1995.</p>
<p>When profiling you have two broad choices: cpu-time vs wallclock time, and subroutine-level profiling vs line-level profiling. DProf is a subroutine-level profiler. (I&#8217;ll talk more about subroutine-level profiling vs line-level profiling in an upcoming post about <span style="text-decoration:line-through;">the soon-to-be-released</span> <a href="http://blog.timbunce.org/2008/07/15/nytprof-v2-a-major-advance-in-perl-profilers/">NYTProf 2.0</a>.)</p>
<p>Measuring cpu-time should, in theory, give you a clear picture of the time spent by perl executing your code, independent of the load on the machine or delays waiting for i/o. Sadly life isn&#8217;t so simple.</p>
<p>The big problem is that on most systems cpu-time measurement has a resolution of 0.01 seconds (a HZ value of 100). That may not sound like much time, but you can execute a <em>lot</em> of perl code, and a lot of subroutine calls, in that time.</p>
<p>So any profiler using cpu-time with such a course granularity is going to give &#8216;noisy&#8217; results. Some subroutines may appear to be slow because the cpu-time &#8216;tick&#8217; happened to occur more while those subs were running. Other subroutines may appear to be fast because the cpu-time &#8216;tick&#8217; doesn&#8217;t happen much while they&#8217;re running.</p>
<p>Try playing around with the venerable <a href="http://search.cpan.org/perldoc?Devel::DProf">Devel::DProf</a> like this:</p>
<pre>$ perl -we 'print "sub s$_ { sqrt(42) for 1..100 }; s$_({});\n" for 1..1000' &gt; x.pl
$ perl -d:DProf x.pl
$ dprofpp
Total Elapsed Time = 0.047999 Seconds
  User+System Time = 0.047999 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 20.8   0.010  0.010      1   0.0100 0.0100  main::s986
 20.8   0.010  0.010      1   0.0100 0.0100  main::s29
 20.8   0.010  0.010      1   0.0100 0.0100  main::s321
 0.00       - -0.000      1        -      -  main::s322
 0.00       - -0.000      1        -      -  main::s323
 0.00       - -0.000      1        -      -  main::s329
 0.00       - -0.000      1        -      -  main::s330</pre>
<p>Clearly nonsense. Out of 1000 subroutines that would all take about the same length of time, a cpu-time &#8216;tick&#8217; happened to occur in those three. The rest of the subroutines appear to be &#8216;free&#8217;. (If you play with this yourself you&#8217;ll probably need to adjust the 1..100 to see the effect on your system.)</p>
<p>Using <code>dprofpp -r</code> (to &#8220;display elapsed real times&#8221; instead of cpu-times) gives a very similar granular result. That&#8217;s because Devel::DProf <em>artificially reduces the resolution of real time to match the granular cpu-time</em>! It&#8217;s also odd that <code>dprofpp</code> doesn&#8217;t provide an option to <em>sort</em> by elapsed time, but there&#8217;d be little value anyway given the low resolution.</p>
<p>Many people have reported strange results from Devel::DProf over the years. Design decisions that made sense back in 1995 are now causing problems as CPUs have got so much faster. Several have implemented <a href="http://search.cpan.org/search?query=devel+prof&amp;mode=dist">alternative profilers</a>.</p>
<p>Using cpu-time is effectively a kind of <a href="http://en.wikipedia.org/wiki/Performance_analysis#Statistical_profilers">statistical sampling</a>. That&#8217;s fine as long as you remember it and interpret the results accordingly. The work-around for the course granularity is to execute the code for long enough for the effects to be averaged out. But that can be inconvenient, and how do you know how much is enough?</p>
<p>Personally I&#8217;d recommend using wallclock time for profiling. I <em>want</em> to know how much time was spent waiting for network, waiting for disk, waiting for cpu. Those are often significant factors in performance issues. Too many network round trips, or too many individual disk requests, for example, can easily kill performance. If you only profile cpu time you may not spot these kinds of problems. You may just be chasing the random ghosts of occasional cpu clock ticks.</p>
<p> </p>
<p>So which profiler would I recommend? <span style="text-decoration:line-through;">Stay tuned for an announcement in a day or so.</span> Easy! <a href="http://blog.timbunce.org/2008/07/15/nytprof-v2-a-major-advance-in-perl-profilers/">NYTProf 2.0</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/48/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/48/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=48&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=sV3gaJ"><img src="http://feeds.feedburner.com/~f/NotThis?i=sV3gaJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=f8xFqJ"><img src="http://feeds.feedburner.com/~f/NotThis?i=f8xFqJ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/333858622" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/07/12/devel-dprof-broken-by-the-passage-of-time/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/07/12/devel-dprof-broken-by-the-passage-of-time/</feedburner:origLink></item>
		<item>
		<title>Concurrency and Erlang, and more</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/324761252/</link>
		<comments>http://blog.timbunce.org/2008/07/02/concurrency-and-erlang-and-more/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 09:49:02 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[software]]></category>

		<category><![CDATA[concurrency]]></category>

		<category><![CDATA[erlang]]></category>

		<category><![CDATA[language]]></category>

		<category><![CDATA[parrot]]></category>

		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=47</guid>
		<description><![CDATA[Just found the excellent Concurrency and Erlang page by André Pang. (I&#8217;m not sure how I got there, but I started froma post by Pedro Melo.)
The page has great links to quality articles and resources with commentary and context for each. It also includes sections specific to C, Objective-C, C++, Java, Python, JavaScript, and Haskell.
What, [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just found the excellent <a href="http://www.algorithm.com.au/talks/concurrency-erlang/">Concurrency and Erlang</a> page by André Pang. (I&#8217;m not sure how I got there, but I started from<a href="http://www.simplicidade.org/notes/archives/2008/07/rabbitmq_added.html">a post</a> by Pedro Melo.)</p>
<p>The page has great links to quality articles and resources with commentary and context for each. It also includes sections specific to C, Objective-C, C++, Java, Python, JavaScript, and Haskell.</p>
<p>What, no Perl? Well, using threads in Perl 5 is <a href="http://www.perlmonks.org/index.pl?node_id=288022">rather painful</a>. I&#8217;ve never had to use threads with Perl 5 (beyond making DBI thread safe a few years ago) and I&#8217;d be happy to never have to.</p>
<p>On the other hand, I believe people are using threads successfully, though I&#8217;ve no handy links for you beyond pointing out that CPAN offers a number of solid Thread:: modules.</p>
<p>All this reminded me that I&#8217;d never got around to reading Parrot&#8217;s <a href="http://www.parrotcode.org/docs/pdd/pdd25_concurrency.html">Concurrency design document</a>. So I did. I liked it as a statement of direction, though it&#8217;s a little thin on the interaction between schedulers.</p>
<p>I couldn&#8217;t find many interesting links discussing both Parrot and Erlang. An O&#8217;Reilly Radar post called <a href="http://radar.oreilly.com/archives/2007/09/parrot-and-multithreading.html">Parrot and Multi-threading</a> from September 2007 was hopeful.</p>
<p>I&#8217;m still wondering if Parrot could act as a virtual machine for Erlang. I think that would be a valuable test case for the quality and scalability of the concurrency design.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/47/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/47/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=47&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=xXJGeJ"><img src="http://feeds.feedburner.com/~f/NotThis?i=xXJGeJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=28TtRJ"><img src="http://feeds.feedburner.com/~f/NotThis?i=28TtRJ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/324761252" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/07/02/concurrency-and-erlang-and-more/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/07/02/concurrency-and-erlang-and-more/</feedburner:origLink></item>
		<item>
		<title>Lisbon Treaty</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/312502893/</link>
		<comments>http://blog.timbunce.org/2008/06/15/lisbon-treaty/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 17:49:14 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[ireland]]></category>

		<category><![CDATA[life]]></category>

		<category><![CDATA[democracy]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=45</guid>
		<description><![CDATA[Well, that&#8217;s put the cat among the pigeons1.
Of the commentary I read, Breda O&#8217;Brien in the Irish Times rang most true for me.
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Well, that&#8217;s put the cat among the pigeons<a href="http://www.usingenglish.com/reference/idioms/cat+among+the+pigeons.html"><sup>1</sup></a>.</p>
<p>Of the commentary I read, <a href="http://www.ireland.com/newspaper/opinion/2008/0614/1213369837224.html">Breda O&#8217;Brien in the Irish Times</a> rang most true for me.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/45/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/45/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=45&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=LnKGII"><img src="http://feeds.feedburner.com/~f/NotThis?i=LnKGII" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=AN5rAI"><img src="http://feeds.feedburner.com/~f/NotThis?i=AN5rAI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/312502893" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/06/15/lisbon-treaty/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/06/15/lisbon-treaty/</feedburner:origLink></item>
		<item>
		<title>Leonard Cohen Live</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/312491252/</link>
		<comments>http://blog.timbunce.org/2008/06/15/leonard-cohen-live/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 17:31:30 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[ireland]]></category>

		<category><![CDATA[life]]></category>

		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=44</guid>
		<description><![CDATA[If you enjoy his music and can possibly get a ticket for one of his world tour dates, do. Now. Stop reading and go buy them now.
I crossed the country to see the concert in Dublin on Friday night. I&#8217;m struggling against the urge to write a stream of superlatives. Others can do that better [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you enjoy his music and can possibly get a ticket for one of his <a href="http://www.leonardcohen.com/tour.cgi">world tour dates</a>, do. Now. Stop reading and go buy them now.</p>
<p>I crossed the country to see the concert in Dublin on Friday night. I&#8217;m struggling against the urge to write a stream of superlatives. <a href="http://www.webheights.net/speakingcohen/tourrev5.html">Others</a> can do that <a href="http://www.thestar.com/article/439151">better</a> than I.</p>
<p>Got your tickets yet?</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/44/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/44/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=44&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=E4iQHI"><img src="http://feeds.feedburner.com/~f/NotThis?i=E4iQHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=MPMbII"><img src="http://feeds.feedburner.com/~f/NotThis?i=MPMbII" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/312491252" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/06/15/leonard-cohen-live/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/06/15/leonard-cohen-live/</feedburner:origLink></item>
		<item>
		<title>Irish Open Source Technology Conference - June 18th-20th</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/304091333/</link>
		<comments>http://blog.timbunce.org/2008/06/03/irish-open-source-technology-conference-june-18th-20th/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 23:19:12 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[ireland]]></category>

		<category><![CDATA[perl]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[conference]]></category>

		<category><![CDATA[presenting]]></category>

		<category><![CDATA[slideshare]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=43</guid>
		<description><![CDATA[I&#8217;ll be speaking at the Irish Open Source Technology Conference this year. It&#8217;s on at Dublin&#8217;s CineWorld Complex, from June 18th for three days. They&#8217;re running a 2-for-1 offer on tickets at the moment.
I&#8217;ll be speaking about something Perl&#8217;ish, naturally.
The &#8220;Perl Myths&#8221; presentation I gave at IWTC earlier this year turned out to be a [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ll be speaking at the <a href="http://iotc.firstport.ie">Irish Open Source Technology Conference</a> this year. It&#8217;s on at Dublin&#8217;s CineWorld Complex, from June 18th for three days. They&#8217;re running a <a href="http://iotc.firstport.ie/blog/archive/wooo-100-free-iotc-2008-tickets/">2-for-1 offer on tickets</a> at the moment.</p>
<p>I&#8217;ll be speaking about something Perl&#8217;ish, naturally.</p>
<p>The &#8220;Perl Myths&#8221; presentation I gave at <a href="http://iwtc.firstport.ie/">IWTC</a> earlier this year turned out to be a hit. (At least, it was after the event. There were less than ten people in the room at the time, including me! Perl clearly isn&#8217;t a hot topic among Irish web developers.)</p>
<p>My <a href="http://timbunce.wordpress.com/2008/03/08/perl-myths/">blog post</a>, with embedded slides and video, has topped 7400 hits, plus another 3000 or so views on slideshare.</p>
<p>I&#8217;m upgrading my methods for this next talk. I&#8217;ve bought a <a href="http://www.revolabs.com/products_wm/xtag.htm">great wireless USB microphone</a> and the amazing<br />
<a href="http://www.varasoftware.com/products/screenflow/">ScreenFlow</a> screencasting software to capture everything in detail.</p>
<p>So I&#8217;m going all high-tech. No more &#8220;camcorder perched on a chair at the back&#8221; for me!</p>
<p>It&#8217;ll be a good trial run for <a href="http://en.oreilly.com/oscon2008/public/content/home">OSCON</a> where <a href="http://en.oreilly.com/oscon2008/public/schedule/speaker/6816">I&#8217;m speaking</a> in July.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/43/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/43/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=43&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=Pn6qeI"><img src="http://feeds.feedburner.com/~f/NotThis?i=Pn6qeI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=HTzWvI"><img src="http://feeds.feedburner.com/~f/NotThis?i=HTzWvI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/304091333" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/06/03/irish-open-source-technology-conference-june-18th-20th/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/06/03/irish-open-source-technology-conference-june-18th-20th/</feedburner:origLink></item>
		<item>
		<title>Announcing Apache2::AuthPAM</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/300142038/</link>
		<comments>http://blog.timbunce.org/2008/05/28/announcing-apache2authpam/#comments</comments>
		<pubDate>Wed, 28 May 2008 22:36:47 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[perl]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[gofer]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=41</guid>
		<description><![CDATA[I&#8217;ve been working on a mod_perl2 based admin interface for a pool of Gofer servers recently.
I needed to secure it and PAM plus SSL was the simplest way to go.
The Authen::PAM module is old (2005), doesn&#8217;t have good reviews, and the test results are poor, but it worked for us.
That just left the question of [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been working on a mod_perl2 based admin interface for a pool of <a href="http://backpan.perl.org/authors/id/T/TI/TIMB/Gofer-200707.pdf">Gofer</a> servers recently.</p>
<p>I needed to secure it and <a href="http://en.wikipedia.org/wiki/Pluggable_Authentication_Modules">PAM</a> plus SSL was the simplest way to go.</p>
<p>The <a href="http://search.cpan.org/perldoc?Authen::PAM">Authen::PAM</a> module is old (2005), doesn&#8217;t have good reviews, and the <a href="http://bbbike.radzeit.de/~slaven/cpantestersmatrix.cgi?dist=Authen-PAM+0.16">test results are poor</a>, but it worked for us.</p>
<p>That just left the question of how to interface with Apache 2. There&#8217;s an <a href="http://search.cpan.org/dist/Apache-AuthPAM/">Apache::AuthPAM</a> module but that&#8217;s even older (2002), has more failing test reports than passes, and was mod_perl 1 only.</p>
<p>I emailed the author but got no reply so I&#8217;ve gone ahead and hacked it into a new module for mod_perl2: <a href="http://search.cpan.org/perldoc?Apache2::AuthPAM">Apache2::AuthPAM</a>. The source code is <a href="http://code.google.com/p/apache2-authpam/">hosted by google</a>.</p>
<p>Realistically I&#8217;m unlikely to touch it again, unless we find problems, so I&#8217;d be delighted if anyone wants to take it over, or even just co-maintain it.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/41/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/41/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=41&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=bB7DOH"><img src="http://feeds.feedburner.com/~f/NotThis?i=bB7DOH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=gDJgGH"><img src="http://feeds.feedburner.com/~f/NotThis?i=gDJgGH" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/300142038" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/05/28/announcing-apache2authpam/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/05/28/announcing-apache2authpam/</feedburner:origLink></item>
		<item>
		<title>Dynamic Languages Strike Back</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/290089278/</link>
		<comments>http://blog.timbunce.org/2008/05/14/dynamic-languages-strike-back/#comments</comments>
		<pubDate>Wed, 14 May 2008 10:41:55 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[software]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[language]]></category>

		<category><![CDATA[parrot]]></category>

		<category><![CDATA[performance]]></category>

		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=40</guid>
		<description><![CDATA[Just a quick note to echo Ovid and recommend Steve Yegge&#8217;s excellent talk on dynamic languages.
Great talk, interesting perspective, good references. Well worth a read if you&#8217;re interested in the evolution and future of programming languages.
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just a quick note to echo <a href="http://use.perl.org/~Ovid/journal/36391">Ovid</a> and recommend Steve Yegge&#8217;s excellent <a href="http://steve-yegge.blogspot.com/2008/05/dynamic-languages-strike-back.html">talk on dynamic languages</a>.</p>
<p>Great talk, interesting perspective, good references. Well worth a read if you&#8217;re interested in the evolution and future of programming languages.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/40/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/40/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=40&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=CN98WH"><img src="http://feeds.feedburner.com/~f/NotThis?i=CN98WH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=IngydH"><img src="http://feeds.feedburner.com/~f/NotThis?i=IngydH" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/290089278" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/05/14/dynamic-languages-strike-back/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/05/14/dynamic-languages-strike-back/</feedburner:origLink></item>
		<item>
		<title>Finding the cause of inexplicable warnings in XS code</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/285996603/</link>
		<comments>http://blog.timbunce.org/2008/05/08/finding-the-cause-of-inexplicable-warnings-in-xs-code/#comments</comments>
		<pubDate>Thu, 08 May 2008 10:28:06 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=39</guid>
		<description><![CDATA[Occasionally you may run across an odd warning like this:
&#160;&#160;&#160;Use of uninitialized value in subroutine entry at X line Y
where the code at that line is a call to an XS subroutine (let&#8217;s call it xsub()) and you&#8217;re certain that the arguments you&#8217;re passing are not undefined.
Somewhere, deep in the XS/C code, an undefined value [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Occasionally you may run across an odd warning like this:</p>
<p><code>&nbsp;&nbsp;&nbsp;Use of uninitialized value in <em>subroutine entry</em> at X line Y</code></p>
<p>where the code at that line is a call to an XS subroutine (let&#8217;s call it <code>xsub()</code>) and you&#8217;re certain that the arguments you&#8217;re passing are not undefined.</p>
<p>Somewhere, deep in the XS/C code, an undefined value is being used. But where? And why is perl reporting that line?</p>
<p>Perl is reporting the last line of perl code that was executed <em>at the same or higher level in the stack</em>. So other perl code, such as a callback, may have been executed between entering <code>xsub()</code> and the warning being generated, but that perl code must have returned before the warning was triggered.</p>
<p>Assuming XS/C code is large and complex, like mod_perl, how can you locate the code that&#8217;s triggering the warning?</p>
<p>Here&#8217;s a trick I&#8217;ve used a few times over the years:</p>
<pre>
    $SUB{__WARN__} = sub {
        CORE::dump if $_[0] =~ /uninitialized value in subroutine entry/;
        warn @_;
    }
</pre>
<p>That make the program abort and generate a core dump file at the point the warning is generated. You can then use a debugger, or <a href="http://search.cpan.org/perldoc?Devel::CoreStack">Devel::CoreStack</a>, to report the C call stack at the time. It&#8217;s a savage but effective technique.</p>
<p>If the XS/C code was compiled with options to keep debug info (i.e., -g) then that&#8217;ll show you <em>exactly</em> where in the XS/C code the undefined value is being used. If not, then it&#8217;ll at least show you the name of the XS/C function and the overall call stack.</p>
<p>(The <a href="http://perldoc.perl.org/functions/dump.html"><code>dump</code></a> function is a curious vestige of old ways. You could use <code><a href="http://perldoc.perl.org/functions/kill.html">kill</a>(9, $$)</code>. I&#8217;m not sure about the portability of either, for this purpose, beyond unix-like systems.)</p>
<p>I suggested the technique to <a href="http://www.linkedin.com/in/gbarr">Graham Barr</a> recently and it proved effective in tracking down the source of that warning in a very large mod_perl application. The warning pointed the finger at a <code>$r-&gt;internal_redirect($uri)</code> call. The actual cause was a <code>PerlInitHandler</code> returning undef. (The handler was an old version of <a href="http://search.cpan.org/perldoc?DashProfiler">DashProfiler</a>::start_sample_period_all_profiles.)</p>
<p>Anyway, it dawned on me this morning that I should update the technique. It doesn&#8217;t have to be so savage. On modern systems you don&#8217;t need to shoot the process dead to get a C stack trace.</p>
<p>A few approaches came to mind:</p>
<ul>
<li>spawn a &#8220;<a href="http://developers.sun.com/solaris/articles/manage_core_dump.html#CreateProcess">gcore</a> $$&#8221; command (<a href="http://blogs.sun.com/eschrock/date/20050318">or similar</a>) to get a core file from the running process</li>
<li>spawn a &#8220;<a href="http://linuxcommand.org/man_pages/pstack1.html">pstack</a> $$&#8221; command (<a href="http://sourceforge.net/projects/lsstack/">or similar</a>) to directly dump the stack trace from the running process</li>
<li>spawn a &#8220;gdb $$ &amp;&#8221; (to attach to the running process) followed immediately by <code>kill(17, $$)</code> to send a SIGSTOP to the process to give time for the debugger to attach and for you to investigate the state of the live process.</li>
</ul>
<p>I think the second of those would be most useful most of the time.</p>
<p>Hopefully this will be useful to someone.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/39/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/39/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=39&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=P2B0bH"><img src="http://feeds.feedburner.com/~f/NotThis?i=P2B0bH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=BD32dH"><img src="http://feeds.feedburner.com/~f/NotThis?i=BD32dH" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/285996603" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/05/08/finding-the-cause-of-inexplicable-warnings-in-xs-code/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/05/08/finding-the-cause-of-inexplicable-warnings-in-xs-code/</feedburner:origLink></item>
		<item>
		<title>Pay no attention to that callback behind the curtain!</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/281401533/</link>
		<comments>http://blog.timbunce.org/2008/05/01/pay-no-attention-to-that-callback-behind-the-curtain/#comments</comments>
		<pubDate>Thu, 01 May 2008 10:32:13 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[perl]]></category>

		<category><![CDATA[dbi]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=38</guid>
		<description><![CDATA[So you&#8217;ve got some perl code that connects to a particular database via a particular DBI driver. You want it to connect to a different database or driver. But you can&#8217;t change that part of the code. What can you do?
I ran into this problem recently. A large application is using an old version of [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So you&#8217;ve got some perl code that connects to a particular database via a particular DBI driver. You want it to connect to a different database or driver. <em>But you can&#8217;t change that part of the code.</em> What can you do?</p>
<p>I ran into this problem recently. A large application is using an old version of <a href="http://search.cpan.org/dist/DBIx-HA/">DBIx::HA</a> which doesn&#8217;t support <a href="http://search.cpan.org/perldoc?DBD::Gofer">DBD::Gofer</a>. DBIx::HA can&#8217;t be upgraded (long story, don&#8217;t ask) but I wanted to use DBD::Gofer to provide <a href="http://search.cpan.org/~timb/DBI/lib/DBD/Gofer.pm#cache">client-side caching</a> via <a href="http://search.cpan.org/perldoc?Cache::FastMmap">Cache::FastMmap</a>. (I&#8217;ll save more details of that, and the 40% reduction in database requests it gave, for another post.)</p>
<p>I needed a way for DBIx::HA to think that it was connecting to a particular driver and database, but for it to actually connect to another. Using <code>$ENV{DBI_AUTOPROXY}</code> wasn&#8217;t an option because that has global effect whereas I needed fine control over which connections were affected. It&#8217;s also fairly blunt instrument in other ways.</p>
<p>It seemed like I was stuck. Then I remembered the DBI callback mechanism - it would provide an elegant solution to this. I added it to DBI 1.49 back in November 2005 and enhanced it further in 1.55. I&#8217;d never documented it though. I think I was never quite sure it had sufficient functionality to be really useful. Now I&#8217;m sure it has.</p>
<p>The DBI callback mechanism lets you intercept, and optionally replace, <em>any</em> method call on a DBI handle. At the extreme, it lets you become a puppet master, deceiving the application in any way you want.</p>
<p><span style="text-align:center; display: block;"><a href="http://blog.timbunce.org/2008/05/01/pay-no-attention-to-that-callback-behind-the-curtain/"><img src="http://img.youtube.com/vi/YWyCCJ6B2WE/2.jpg" alt="" /></a></span></p>
<p>Here&#8217;s how the code looked (with a few irrelevant details changed):</p>
<pre>
    # The following section of code uses the DBI Callback mechanism to
    # intercept connect() calls to DBD::Sybase and, where appropriate,
    # reroute them to DBD::Gofer.
    our $in_callback;

    # get Gofer $drh and make it pretend to be named Sybase
    # to keep DBIx::HA 0.62 happy
    my $gofer_drh  = DBI-&gt;install_driver("Gofer");
    $gofer_drh-&gt;{Name} = "Sybase";

    # get the Sybase drh and install a callback to intercept connect()s
    my $sybase_drh = DBI-&gt;install_driver("Sybase");
    $sybase_drh-&gt;{Callbacks} = {
        connect =&gt; sub {
            # protect against recursion when gofer itself makes a connection
            return if $in_callback; local $in_callback = 1;

            my $drh = shift;
            my ($dsn, $u, $p, $attr) = @_;
            warn "connect via callback $drh $dsn\n" if $DEBUG;

            # we're only interested in connections to particular databases
            return unless $dsn =~ /some pattern/;

            # rewrite the DSN to connect to the same DSN via Gofer
            # using the null transport so we can use Gofer caching
            $dsn = "transport=null;dsn=dbi:Sybase(ReadOnly=1):$dsn";

            my $dbh = $gofer_drh-&gt;connect($dsn, $u, $p, $attr);

            if (not $dbh) { # gofer connection failed for some reason
                warn "connect via gofer failed: $DBI::errstr\n"
                    unless our $connect_via_gofer_err++; # warn once
                return; # DBI will now call original connect method
            }

            undef $_;    # tell DBI not to call original connect method
            return $dbh; # tell DBI to return this $dbh instead
        },
    };
</pre>
<p>So the application, via DBIx::HA, executed</p>
<p><code>&nbsp;&nbsp;$dbh = DBI-&gt;connect("dbi:Sybase:foo",...)</code></p>
<p>but what it got back was a DBD::Gofer dbh, as if the application has executed</p>
<p><code>&nbsp;&nbsp;$dbh = DBI-&gt;connect("dbi:Gofer:transport=null;dsn=dbi:Sybase(ReadOnly=1):foo",...)</code>.</p>
<p>I guess I should document the callback mechanism now. Meanwhile the closest thing  to documentation is <a href="http://search.cpan.org/src/TIMB/DBI-1.604/t/70callbacks.t">the test file</a>.</p>
<p>I&#8217;ve always enjoyed this kind of &#8220;plumbing&#8221;. If you come up with any interesting uses of DBI callbacks, do let me know.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/38/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/38/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=38&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=3wIuyH"><img src="http://feeds.feedburner.com/~f/NotThis?i=3wIuyH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=06Fy0H"><img src="http://feeds.feedburner.com/~f/NotThis?i=06Fy0H" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/281401533" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/05/01/pay-no-attention-to-that-callback-behind-the-curtain/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>

		<media:content url="http://img.youtube.com/vi/YWyCCJ6B2WE/2.jpg" medium="image" />
	<feedburner:origLink>http://blog.timbunce.org/2008/05/01/pay-no-attention-to-that-callback-behind-the-curtain/</feedburner:origLink></item>
		<item>
		<title>This is a perl blog, too. At least partly.</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/279617268/</link>
		<comments>http://blog.timbunce.org/2008/04/28/this-is-a-perl-blog-too-at-least-partly/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 20:27:14 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=36</guid>
		<description><![CDATA[Just in case it wasn&#8217;t clear, perl programming is one of my interests, so this is, at least partly, a perl blog.
I&#8217;m only spelling it out like this because, by saying &#8220;perl blog&#8220;, I help to keep Mr. Schwern happy, and I&#8217;m saying &#8220;perl programming&#8221; purely for my own amusement.
While I&#8217;m here I might as [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just in case it wasn&#8217;t clear, <em>perl programming</em> is one of my interests, so this is, at least partly, a <em>perl blog</em>.</p>
<p>I&#8217;m only spelling it out like this because, by saying &#8220;<em>perl blog</em>&#8220;, I help to <a href="http://use.perl.org/~schwern/journal/36263">keep Mr. Schwern happy</a>, and I&#8217;m saying &#8220;<em>perl programming</em>&#8221; purely <a href="http://blog.timbunce.org/2008/04/12/tiobe-or-not-tiobe-lies-damned-lies-and-statistics/">for my own amusement</a>.</p>
<p>While I&#8217;m here I might as well spread some Link Love to other notable perl blogs and the like: <a href="http://use.perl.org/">use.perl.org</a>, <a href="http://perlmonks.org/">perlmonks.org</a>, <a href="http://news.perlfoundation.org/"> news.perlfoundation.org</a> and of course <a href="http://planet.perl.org/">planet.perl.org</a> super blog which lists many more.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=36&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=jE7ugG"><img src="http://feeds.feedburner.com/~f/NotThis?i=jE7ugG" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/NotThis?a=nk3SSG"><img src="http://feeds.feedburner.com/~f/NotThis?i=nk3SSG" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NotThis/~4/279617268" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timbunce.org/2008/04/28/this-is-a-perl-blog-too-at-least-partly/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/timbunce-128.jpg" medium="image">
			<media:title type="html">TimBunce</media:title>
		</media:content>
	<feedburner:origLink>http://blog.timbunce.org/2008/04/28/this-is-a-perl-blog-too-at-least-partly/</feedburner:origLink></item>
		<item>
		<title>Lies, damn lies, and search engine rankings</title>
		<link>http://feeds.feedburner.com/~r/NotThis/~3/277557063/</link>
		<comments>http://blog.timbunce.org/2008/04/25/lies-damn-lies-and-search-engine-rankings/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 10:56:49 +0000</pubDate>
		<dc:creator>TimBunce</dc:creator>
		
		<category><![CDATA[tech]]></category>

		<category><![CDATA[graphs]]></category>

		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=35</guid>
		<description><![CDATA[I started a related recent post with a quote that seems just as apt here:
&#8220;Figures often beguile me, particularly when I have the arranging of them myself; in which case the remark attributed to Disraeli would often apply with justice and force: &#8216;There are three kinds of lies: lies, damned lies, and statistics.
- Mark Twain
If [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I started a related <a href="http://blog.timbunce.org/2008/04/12/tiobe-or-not-tiobe-lies-damned-lies-and-statistics/">recent post</a> with a quote that seems just as apt here:</p>
<blockquote><p>&#8220;Figures often beguile me, <em>particularly when I have the arranging of them myself</em>; in which case the remark attributed to Disraeli would often apply with justice and force: &#8216;There are three kinds of lies: lies, damned lies, and statistics.<br />
- Mark Twain</p></blockquote>
<p>If you regularly use just one search engine, as I tend to do, it&#8217;s very easy to be lulled into a false sense of security about the quality and relevance of the results.</p>
<p>I was <a href="http://blog.timbunce.org/2008/04/20/tiobe-or-not-tiobe-an-update/">recently reminded</a> of the significant differences that can occur in the results of different search engines. That, in turn, reminded me of tools I&#8217;d come across previously to highlight those differences. In particular one that gives a very clear picture of the differences in ranking. After a little digging I found it at <a href="http://www.langreiter.com/exec/yahoo-vs-google.html">langreiter.com</a> (via <a href="http://www.seocompany.ca/tool/5-compare-search-engine-ranking-tools.html">list of tools</a> at www.seocompany.ca).</p>
<p>As a demonstration, here&#8217;s a comparison of the top results for <a href="http://www.langreiter.com/exec/yahoo-vs-google.html?q=%2B%27perl+programming%27">+&#8221;perl programming&#8221;</a> at Google (top) and Yahoo (bottom):</p>
<p><img style="border:0 none;margin:10px 0;" src="http://timbunce.files.wordpress.com/2008/04/google-vs-yahoo-rankings-for-perl-programming-via-langreiter.png?w=908&#038;h=218" border="0" alt="google vs yahoo rankings for perl programming via langreiter.png" width="908" height="218" align="left" /></p>
<p>and here&#8217;s the same for <a href="http://www.langreiter.com/exec/yahoo-vs-google.html?q=%2B%27python+programming%27">+&#8221;python programming&#8221;</a>:</p>
<p><img style="border:0 none;margin-top:10px;margin-bottom:10px;" src="http://timbunce.files.wordpress.com/2008/04/google-vs-yahoo-rankings-for-python-programming-via-langreiter.png?w=910&#038;h=222" border="0" alt="google vs yahoo rankings for python programming via langreiter.png" width="910" height="222" align="left" /></p>
<p>Each dot represents a result url, with the top ranked results on the left. Where a url appears in the top 100 results on both Google and Yahoo then a line is drawn between them to highlight the different rankings. On the <a href="http://www.langreiter.com/exec/yahoo-vs-google.html">site</a> you can hover over the dots to see the corresponding url.</p>
<p>I remember being very surprised when I first saw these kinds of results a few years ago. I&#8217;m no less surprised now. If fact more so, as I&#8217;d had (naïvely) expected Yahoo and Google to have converged somewhat in their concept of relevancy. At least for top results.</p>
<p>The particular queries I used above are not exceptional. I couldn&#8217;t find <em>any</em> query that didn&#8217;t have significant differences in rankings. Don&#8217;t believe me? Go try it yourself at <a href="http://www.langreiter.com/exec/yahoo-vs-google.html">http://www.langreiter.com/exec/yahoo-vs-google.html</a>.</p>
<p>That so many of the top 20 from one search engine don&#8217;t even appear in the top 100 of the other is&#8230; is&#8230; well, I&#8217;m not quite sure what to make of it. At first sight it seems like a bad thing, but I also have to admit that it&#8217;s a good thing. At least in some ways. Diversity is important in any ecosystem.</p>
<p>If you only use one major search engine then you have to accept that you&#8217;re getting just one view of the internet. Most of the time you may be happy with that. It&#8217;s worth keeping it in mind, though, for those times when you&#8217;re struggling to find good results.</p>
<p>One way to avoid the issue is to use a <a href="http://en.wikipedia.org/wiki/Metasearch_engine">meta search engine</a> that&#8217;ll query multiple search engines for you and merge the results. There are <a href="http://www.dmoz.org/Computers/Internet/Searching/Metasearch/">lots of them</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/timbunce.wordpress.com/35/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/timbunce.wordpress.com/35/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbunce.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbunce.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbunce.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbunce.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbunce.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbunce.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbunce.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbunce.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbunce.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbunce.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.timbunce.org&blog=2562816&post=35&subd=timbunce&ref=&feed=1" /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/NotThis?a=40vCdWG"><img src="http://feeds.feedburner.com/~f/NotThis?i=40vCdWG" border="0"></img></a> <a href="http://fee