<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Robin Clarke - Perl and Life</title>
	<atom:link href="http://www.robinclarke.net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.robinclarke.net</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 09 Apr 2012 22:21:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>The paperless office with Linux</title>
		<link>http://www.robinclarke.net/archives/the-paperless-office-with-linux</link>
		<comments>http://www.robinclarke.net/archives/the-paperless-office-with-linux#comments</comments>
		<pubDate>Mon, 09 Apr 2012 22:21:19 +0000</pubDate>
		<dc:creator>robin</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ocr]]></category>
		<category><![CDATA[paperless]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[s1500]]></category>
		<category><![CDATA[scanimage]]></category>
		<category><![CDATA[scanning]]></category>
		<category><![CDATA[scansnap]]></category>

		<guid isPermaLink="false">http://www.robinclarke.net/?p=674</guid>
		<description><![CDATA[A few days ago I took delivery of a used Fujitsu ScanSnap S1500 (currently about 400€ new, I got mine for 235€ on eBay), and started on the long job of making my home office paperless. xsane The best news: it works out of the box with Linux (Ubuntu 11.10).  Just install xsane as scanning software [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I took delivery of a used <a title="Fujitsu ScanSnap S1500" href="http://www.amazon.de/gp/product/B001VGJ7JM/ref=as_li_ss_tl?ie=UTF8&amp;tag=robiclar-21&amp;linkCode=as2&amp;camp=1638&amp;creative=19454&amp;creativeASIN=B001VGJ7JM" target="_blank">Fujitsu ScanSnap S1500</a> (currently about 400€ new, <strong>I got mine for 235€ on eBay</strong>), and started on the long job of making my home office <strong>paperless</strong>.</p>
<h1>xsane</h1>
<p>The best news: <strong>it works out of the box with Linux</strong> (Ubuntu 11.10).  Just install xsane as scanning software and you&#8217;re running.  xsane is great for custom scanning (where you want some colour, some higher resolution (the scanner does up to <strong>600dpi</strong>), lineart, duplex &#8230;).</p>
<h1>scanbuttond</h1>
<p>&#8230;but for your run-of-the-mill office scanning, you probably just want <strong>grey at 150dpi</strong> with fairly high compression (comes out at ~150kb per pdf page), and the ability to <strong>whack in stacks of paper</strong> and just keep on <strong>hitting the &#8220;Go&#8221; button</strong>.  For this I installed scanbuttond and sane-utils on my home server (a little box under my table) and put together a little buttonpressed.sh script so every time the button is pressed, it creates a pdf in a <strong>network shared folder</strong> (which has the advantage that I can access my scanned documents from <strong>any computer in the house</strong>, and even scan without turning my desktop on!)</p>
<pre>#!/bin/bash</pre>
<pre>OUT_DIR=/mnt/raid/scan
TMP_DIR=`mktemp -d`
cd $TMP_DIR</pre>
<pre>echo "################## Scanning ###################"
scanimage \
 --resolution 150 \
 --batch=scan_%03d.tif --format=tiff \
 --mode Gray \
 --device-name "fujitsu:ScanSnap S1500:7739" \
 -y 297 -x 210 \
 --page-width 210 --page-height 297 \
 --sleeptimer 1</pre>
<pre>echo "############## Converting to PDF ##############"
#Use tiffcp to combine output tiffs to a single mult-page tiff
#tiffcp -c lzw scan_*.tif output.tif
tiffcp scan_*.tif output.tif
#Convert the tiff to PDF
tiff2pdf output.tif -j -q 60 -p A4 &gt; $OUT_DIR/scan_`date +%Y%m%d-%H%M%S`.pdf
cd ..
echo "################ Cleaning Up ################"
rm -rf $TMP_DIR</pre>
<p>I took much of the inspiration for the script from <a title="OCR scanning" href="http://jduck.net/2008/01/05/ocr-scanning/" target="_blank">this article</a>, which also uses <strong>tesseract</strong> for OCR, but that just makes a separate text file with the recognised text&#8230; I don&#8217;t like that, so I&#8217;m still looking for a way to<strong> embed the detected text into the pdf</strong>&#8230;</p>
<p>As you can see I had to<strong> hard code the scanner name</strong> because scanbuttond (last updated in <strong>2006</strong>&#8230;) passes the device address, but the current version of scanimage needs the device name as given by scanimage -L , so they&#8217;re not really compatible with each other any more&#8230; :-/</p>
<p>I&#8217;ve also set it such that all pdfs will be A4, and like I said earlier, only 150dpi, and pretty lossy jpeg compression &#8211; that&#8217;s my default preference, YMMV.</p>
<h1>The S1500 in detail</h1>
<p>Now a little about the <a title="Fujitsu ScanSnap S1500" href="http://www.fujitsu.com/us/services/computing/peripherals/scanners/scansnap/scansnap-s1500.html" target="_blank">scanner itself</a>.  It&#8217;s about the size and weight of a <strong>compact inkjet printer</strong> (or a cat).</p>
<p><a href="http://www.robinclarke.net/wp-content/uploads/2012/04/s1500_open.gif"><img class="alignnone size-full wp-image-675" style="border-style: initial; border-color: initial; border-image: initial; border-width: 0px;" title="S1500 Open" src="http://www.robinclarke.net/wp-content/uploads/2012/04/s1500_open.gif" alt="" width="300" height="200" /></a><a href="http://www.robinclarke.net/wp-content/uploads/2012/04/s1500-closed.jpg"><img class="alignnone size-full wp-image-676" style="border-style: initial; border-color: initial; border-image: initial; border-width: 0px;" title="s1500 Closed" src="http://www.robinclarke.net/wp-content/uploads/2012/04/s1500-closed.jpg" alt="" width="200" height="132" /></a></p>
<p>The fold-in/out mechanism is pretty easy, so I think even though I&#8217;m ultimately lazy, I might even <strong>flip that shut when I&#8217;m done to dust protect it</strong>.  Other than that there&#8217;s not much to say&#8230; it has <strong>one button: bright blue</strong>&#8230; I know some people may have a fit at that&#8230;).  It comes with a 240VAC to 24VDC adapter, and a usb cable.  The paper feed opens with a little button on the right, and the insides are readily <strong>understandable and cleanable</strong>.  Did I mention it has two scanning heads, so it does <strong>duplex</strong>? <img src='http://www.robinclarke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h1>De-papering my office</h1>
<p>My first task with the scanner was to scan in my business receipts from last year &#8211; that&#8217;s about <strong>300 items</strong>, but many of the smaller receipts (bus tickets etc.) are pasted onto A4 sheets (many to a sheet).  It took me about <strong>30 minutes to scan the lot</strong>, including the time to remove any staples or clips (a must!), and a few paper jams.  I have no idea how long that would have taken with my old flatbed&#8230;</p>
<p>The s1500 <strong>isn&#8217;t resistant against paper jams</strong>, but I was surprised to see it handled all the worst sheets (lots of different receipts pasted to one sheet) easily, and only had difficulty with the recycled paper we use where the individual sheets stick a bit more to one another because of the rougher surface.  With a bit of practice <strong>fanning</strong> the sheets, this isn&#8217;t much of an issue either, but you do have to keep an eye on it as it&#8217;s scanning to <strong>be sure it got each individual sheet</strong>&#8230;</p>
<p>All in all, <strong>I&#8217;m very happy with the decision</strong>, and am looking forward to shredding and archiving lots of paper out of my office!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robinclarke.net/archives/the-paperless-office-with-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving to Shotwell</title>
		<link>http://www.robinclarke.net/archives/moving-to-shotwell</link>
		<comments>http://www.robinclarke.net/archives/moving-to-shotwell#comments</comments>
		<pubDate>Fri, 10 Feb 2012 14:33:57 +0000</pubDate>
		<dc:creator>robin</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[f-spot]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[picture]]></category>
		<category><![CDATA[shotwell]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.robinclarke.net/?p=671</guid>
		<description><![CDATA[I just spent a few days getting my old media archives in order. I&#8217;ve previously used F-Spot for managing my photos, and errr&#8230; folders for videos. Unfortunately F-Spot development seems to be stagnating, and I&#8217;m not too impressed with the performance and frequency of crashes&#8230; Sooo I opened up Shotwell (the (not so) new default [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent a few days getting my old media archives in order.</p>
<p>I&#8217;ve previously used <a title="F-Spot" href="http://f-spot.org/" target="_blank">F-Spot</a> for managing my photos, and errr&#8230; folders for videos. Unfortunately F-Spot development seems to be stagnating, and I&#8217;m not too impressed with the performance and frequency of crashes&#8230;<br />
Sooo I opened up <a title="Shotwell" href="http://yorba.org/shotwell/" target="_blank">Shotwell</a> (the (not so) new default photo manager on Ubuntu), and proceeded to import all my photos. I can&#8217;t say it went without a hitch &#8211; I had to fiddle around with a few batches of photos which got tags I never defined hooked on them in a way Shotwell wouldn&#8217;t remove, and some other tags just dissapeared altogether&#8230; but all in all the effort for migrating ~25k photos was acceptable, and the end result: Shotwell is pretty sweet!<br />
Shotwell is soooo much faster and responsive than F-Spot, and I love the way that any enhancements you make on a picture (cropping, colour/hue adjustment etc.) are stored as transformations in the database, and only applied to exported pictures &#8211; the original image data remains untouched. The F-Spot solution to this was to create Modified versions, but that always bugged me having so many versions of the same file hanging around, and progressive loss of quality&#8230;<br />
Also I love that tagging in Shotwell is much faster than in F-Spot (for a keyboard junkie like me): [ctrl]-t, and type in (auto-complete) a list of tags.<br />
For video editing (I recently got a camcorder) I tried out <a title="Kino" href="http://www.kinodv.org/" target="_blank">Kino</a> (no development in last year and a half, and working with .MOD files was a pain) and <a title="Cinelerra" href="http://cinelerra.org/" target="_blank">Cinalerra</a> (horrible GUI&#8230;) but ended up settling for <a title="OpenShot video editor" href="http://www.openshotvideo.com/" target="_blank">OpenShot</a>, and while it probably can&#8217;t be considered a fully fledged video editor, it&#8217;s more than enough for my needs, and pretty intuitive.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robinclarke.net/archives/moving-to-shotwell/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl interface to Google Directions API</title>
		<link>http://www.robinclarke.net/archives/perl-interface-to-google-directions-api</link>
		<comments>http://www.robinclarke.net/archives/perl-interface-to-google-directions-api#comments</comments>
		<pubDate>Wed, 01 Feb 2012 19:55:50 +0000</pubDate>
		<dc:creator>robin</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[Ironman]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[directions]]></category>
		<category><![CDATA[ironman]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.robinclarke.net/?p=664</guid>
		<description><![CDATA[Google has a pretty neat service for getting driving/cycling/walking directions between places, and now there&#8217;s a perl interface to it: Google::Directions (and on GitHub) It&#8217;s Moosey and it&#8217;s juicy&#8230; I hope it helps you get from A to B with Perl a bit faster! If anybody is top-fit with Moose::Util::TypeConstraints, I have some issues in this module [...]]]></description>
			<content:encoded><![CDATA[<p>Google has a pretty neat service for getting driving/cycling/walking directions between places, and now there&#8217;s a perl interface to it: <a title="Google::Directions" href="http://search.cpan.org/perldoc?Google::Directions" target="_blank">Google::Directions</a> (and on <a title="Google::Directions on GitHub" href="https://github.com/robin13/Google-Directions" target="_blank">GitHub</a>)</p>
<p>It&#8217;s Moosey and it&#8217;s juicy&#8230; I hope it helps you get from A to B with Perl a bit faster! <img src='http://www.robinclarke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If anybody is top-fit with Moose::Util::TypeConstraints, I have some issues in this module which I don&#8217;t understand and would really appreciate some tips with. <img src='http://www.robinclarke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>And here&#8217;s some sample code:</p>
<pre>#!/usr/bin/env perl</pre>
<pre>use strict;
use warnings;
use Google::Directions::Client;
use Getopt::Long;</pre>
<pre>my %params;
GetOptions( \%params,
 'origin=s',
 'destination=s',
 );</pre>
<pre>my $goog = Google::Directions::Client-&gt;new();</pre>
<pre>my $response = $goog-&gt;directions( %params );
my $first_leg = $response-&gt;routes-&gt;[0]-&gt;legs-&gt;[0];
printf( "That journey will take you %0.1f minutes and %0.1fkm\n",
 ( $first_leg-&gt;duration / 60 ),
 ( $first_leg-&gt;distance / 1000 ),
 );</pre>
<pre># $&gt; ./test_directions.pl --origin "Munich, Germany" --destination "Hamburg, Germany"</pre>
<pre># That journey will take you 443.8 minutes and 778.5km</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.robinclarke.net/archives/perl-interface-to-google-directions-api/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The effects of cycling 10000km</title>
		<link>http://www.robinclarke.net/archives/the-effects-of-cycling-10000km</link>
		<comments>http://www.robinclarke.net/archives/the-effects-of-cycling-10000km#comments</comments>
		<pubDate>Tue, 31 Jan 2012 12:22:21 +0000</pubDate>
		<dc:creator>robin</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[cycling]]></category>
		<category><![CDATA[munich]]></category>

		<guid isPermaLink="false">http://www.robinclarke.net/?p=660</guid>
		<description><![CDATA[This post should have come out in September 2011 because that&#8217;s when the odometer on my bike wrapped from 9999km to 0km. The stats New price: 450€ (city bike, aluminium frame, solid carrier, hub dynamo, &#8230;) At the 10000km my bike was about 4 years old (but one year in storage) I cycled an average of [...]]]></description>
			<content:encoded><![CDATA[<p>This post should have come out in September 2011 because that&#8217;s when the odometer on my bike wrapped from 9999km to 0km.</p>
<h2>The stats</h2>
<ul>
<li>New price: 450€ (city bike, aluminium frame, solid carrier, hub dynamo, &#8230;)</li>
<li>At the 10000km my bike was about 4 years old (but one year in storage)</li>
<li>I cycled an average of 3300km per year that I used it</li>
<li>Never cycled outside of Munich city</li>
<li>No recreational cycling &#8211; all commuting</li>
<li>Average speed with winter tyres: 15km/h</li>
<li>Average speed with summer tyres: 18km/h</li>
</ul>
<h2>How much wear and tear on the bike?</h2>
<ul>
<li>Replaced break blocks 3 times</li>
<li>Replaced 3 tyres</li>
<li>Replaced 2 tubes</li>
<li>Replaced break and gear cables</li>
<li>One broken crank shaft bearing</li>
<li>One new saddle</li>
<li>Replaced rear sprocket</li>
<li>Replaced crank set and pedals</li>
<li>Purchased studded winter tyres</li>
<li>Replaced front halogen lamp with powerful LED lamp</li>
<li>Lots of oil&#8230;</li>
</ul>
<div>Total cost of maintenance over 3 years: ~250€</div>
<h2>Total cost of ownership</h2>
<p>Assuming a linear depreciation to 100€ over 5 years, the cost of the bicycle, plus maintenance (my work time not included): 127€/year</p>
<p>Given that at least 2/3 of the distance travelled was work related I can write off 5ct/km (flat-rate in German taxes): 110€ per year, so it only costs me <strong>~17€ per year to cycle</strong>.</p>
<p>Had I driven that distance by car (assuming a car which I would own: a 7 year old compact) it would have cost me about 200€ taxes, 500€ insurance, 400€ maintenance, and 700€ depreciation, plus 188€ for petrol: 2000€, minus the tax deduction of 660€ leaves <strong>1340€ for a small car</strong>.  Granted I wouldn&#8217;t have only driven the car in the city, so it&#8217;s not exactly comparable&#8230;</p>
<p>Had I got a year round ticked for the local municipal transport system (MVV), it would have cost me <strong>438€ for public transport. </strong>This could be written off 100% by using the flat rate.</p>
<h2>Other effects</h2>
<ul>
<li>Depending on the distance between home and work over the years, I had anything up to 1.5 hours of fresh air and light exercise per day.  At my last general medical check-up the doctor did a stress ECG on me and found all parameters well above &#8220;healthy&#8221;.  I&#8217;m sure that has something to do with cycling.</li>
<li>I haven&#8217;t had a single sick day in the last 10 years of work.  That&#8217;s not to say I was never sick, but nothing bad enough to keep me home.  Maybe not sitting in public transport (confined metal tubes full of coughing and sneezing people) helped too&#8230;</li>
<li>I hate sitting in traffic&#8230; I hardly ever sit in traffic&#8230; <img src='http://www.robinclarke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>Taking into account the time for walking to a car, driving through traffic, finding a parking spot, and walking from there to the destination, I&#8217;m always faster by bike than you will be by car in the city.</li>
<li>I&#8217;m always faster than public transport over short distances, and in the spring/summer/autumn faster over all distances (without breaking a sweat!).</li>
</ul>
<h2>Enough already?</h2>
<p>Get on your bike! <img src='http://www.robinclarke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.robinclarke.net/archives/the-effects-of-cycling-10000km/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Home Kanban board</title>
		<link>http://www.robinclarke.net/archives/home-kanban-board</link>
		<comments>http://www.robinclarke.net/archives/home-kanban-board#comments</comments>
		<pubDate>Sun, 29 Jan 2012 15:27:01 +0000</pubDate>
		<dc:creator>robin</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Project Management]]></category>

		<guid isPermaLink="false">http://www.robinclarke.net/?p=650</guid>
		<description><![CDATA[I hate having to remember stuff&#8230; so I applied some tried and tested work practices and made a home kanban board. &#160; The example above has 4 tasks Feed the dog Feed the fish Get bread and milk Water the plants Daily tasks are blue/red Weekly tasks are yellow/green. Every day we can slide the marker below along one [...]]]></description>
			<content:encoded><![CDATA[<p>I hate having to remember stuff&#8230; so I applied some tried and tested work practices and made a home <a title="Kanban" href="http://en.wikipedia.org/wiki/Kanban" target="_blank">kanban</a> board.</p>
<p>&nbsp;</p>
<p><a href="http://www.robinclarke.net/wp-content/uploads/2012/01/home_kanban_1.jpg"><img class="alignnone size-medium wp-image-651" title="Home Kanban board" src="http://www.robinclarke.net/wp-content/uploads/2012/01/home_kanban_1-300x166.jpg" alt="" width="300" height="166" /></a></p>
<p>The example above has 4 tasks</p>
<ul>
<li>Feed the dog</li>
<li>Feed the fish</li>
<li>Get bread and milk</li>
<li>Water the plants</li>
</ul>
<p>Daily tasks are <span style="color: #0000ff;"><strong>blue</strong></span>/<span style="color: #ff0000;"><strong>red</strong></span></p>
<p>Weekly tasks are <span style="color: #e9e500;"><strong>yellow</strong></span>/<span style="color: #339966;"><strong>green</strong></span>.</p>
<p>Every day we can slide the marker below along one field (there&#8217;s two weeks shown, because 7 days aren&#8217;t evenly divisible by 2, but 14 are&#8230; <img src='http://www.robinclarke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>
<p>At the end of the day, all the pegs should have the colour of the day showing.</p>
<p>In the example above, today is Monday, and it&#8217;s a <span style="color: #0000ff;"><strong>blue</strong></span> day, and a <span style="color: #339966;"><strong>green</strong></span> week.  Whoever fed the dog and the fish already turned the cloths pegs around to show the <span style="color: #0000ff;"><strong>blue</strong></span> side.  Milk and bread hasn&#8217;t been bought yet (so the peg is still showing <span style="color: #ff0000;"><strong>red</strong></span> from the day before), and the plants haven&#8217;t been watered yet this week.</p>
<p>Construction is pretty straight forward.  For the pegs, get cheap plastic cloths pegs in four colours.  Take them apart and reassemble them so that each peg has two colours:</p>
<p><a href="http://www.robinclarke.net/wp-content/uploads/2012/01/two_colour_peg.jpg"><img class="alignnone size-medium wp-image-653" title="Two colour peg" src="http://www.robinclarke.net/wp-content/uploads/2012/01/two_colour_peg-300x151.jpg" alt="" width="300" height="151" /></a></p>
<p>The board is just a piece of 3mm MDF (cardboard will do too) with a spacer on the back to give it some distance to the wall.  On the bottom area, make 14&#215;2 rows, and colour them in with the four colours of the cloths pegs you have.  The only complicated bit is making the slider.  I used a piece of over exposed film for a nice frame, and a strip of transparent folder as the strip for it to run on.  If you use something smooth for your board, you can probably get away with whiteboard markers, or just cut a piece of paper to size and write/draw your tasks on it &#8211; the handy thing about the pegs: you&#8217;ll only be turning one at a time, and the rest will hold the paper for you!</p>
<p>The advantages of having a board like this in your household:</p>
<ul>
<li>Everyone automatically knows what has been done, and what has to be done without asking each other</li>
<li>Nothing gets done twice (feeding animals too much can be bad for them)</li>
<li>Your mind is free to think about more productive things than &#8220;what did I still have to do today?&#8221;</li>
</ul>
<p>Say begone to confusion and forgetfulness in your household and go Kanban today! <img src='http://www.robinclarke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.robinclarke.net/archives/home-kanban-board/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

