<?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>sampablokuper_com &#187; hacking</title>
	<atom:link href="http://www.sampablokuper.com/category/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sampablokuper.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 27 Aug 2010 15:12:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Catfood for breakfast</title>
		<link>http://www.sampablokuper.com/2010/07/02/catfood-for-breakfast/</link>
		<comments>http://www.sampablokuper.com/2010/07/02/catfood-for-breakfast/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 17:54:03 +0000</pubDate>
		<dc:creator>sampablokuper</dc:creator>
				<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.sampablokuper.com/?p=927</guid>
		<description><![CDATA[I&#8217;m in the late stages of a prolonged and extensive spring clean. One of the things I&#8217;ll be getting rid of is my Trangia-style stove and cook set. Why? Mainly because of this cat food tin.

That&#8217;s right folks, I want my outdoor meals to make me smile like this man:

But you can&#8217;t buy Fancy Feast [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the late stages of a prolonged and extensive spring clean. One of the things I&#8217;ll be getting rid of is my <a href="http://en.wikipedia.org/wiki/Trangia">Trangia</a>-style stove and cook set. Why? Mainly because of <a href="http://www.andrewskurka.com/advice/technique/fancyfeaststove.php">this cat food tin</a>.</p>
<p><span id="more-927"></span></p>
<p>That&#8217;s right folks, I want my outdoor meals to make me smile like this man:</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/RF0tsVSXGyI&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/RF0tsVSXGyI&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="450"></embed></object></p>
<p><q>But you can&#8217;t buy Fancy Feast in the UK!</q> I hear you cry.</p>
<p>Well, worry not, friends, because Andrew Skurka&#8217;s article gives away the tin&#8217;s dimensions: it&#8217;s 2.5&#8243; in diameter, and by holding up a ruler to my screen I was able to estimate its height too. Converted to metric, it&#8217;s approximately 3.3cm tall and 6.4cm in diameter.</p>
<p>To my surprise, no-one batted an eyelid when I whipped out a tape measure in the canned goods section of the nearby Asda supermarket. (I know, I know: Asda = Walmart = bleurgh. I normally avoid the place. But it has the largest canned goods aisle of any of the supermarkets I&#8217;m aware of on my side of town, and I happened to be passing.) I found three products sold in cans of very nearly those dimensions:</p>
<ul>
<li>Princes Tuna Chunks in sunflower oil. Comes as a pack of 3&#215;80g tins.</li>
<li>Princes Tuna Chunks in brine. Comes as a pack of 3&#215;80g tins.</li>
<li>Essentials from HiLife Tuna Royale cat food. Sold in single 85g tins.</li>
</ul>
<p>I recommend the latter. It&#8217;s about half the price of either of the others, per can, and because it&#8217;s sold in single tins you don&#8217;t need to buy any excess. Also, although both products claim to be dolphin friendly, Princes has a <a href="http://www.greenpeace.org.uk/oceans/tuna-league-table-2008-princes20080804">poor corporate responsibility record</a> (and besides, the cat food is probably mostly made of waste meat). Furthermore, the Princes cans have reinforced rims top and bottom, whereas the cat food cans just have a reinforced top rim. The catfood cans are therefore closer in spec (and may well be identical) to the cans Andrew uses.</p>
<p>Now I just need a cat and a hole punch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sampablokuper.com/2010/07/02/catfood-for-breakfast/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Unit conversion in Google Docs spreadsheets</title>
		<link>http://www.sampablokuper.com/2010/05/18/unit-conversion-in-google-docs-spreadsheets/</link>
		<comments>http://www.sampablokuper.com/2010/05/18/unit-conversion-in-google-docs-spreadsheets/#comments</comments>
		<pubDate>Tue, 18 May 2010 17:31:11 +0000</pubDate>
		<dc:creator>sampablokuper</dc:creator>
				<category><![CDATA[Life is language]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.sampablokuper.com/?p=901</guid>
		<description><![CDATA[You may already be aware that Google&#8217;s search interface can be used as a calculator. Google Calculator, as this feature is known, offers access to the kinds of functions (addition, multiplication, and more) offered by conventional electronic calculators. Unlike conventional electronic calculators, however, Google Calculator is able to utilise information about the external world, such [...]]]></description>
			<content:encoded><![CDATA[<p>You may already be aware that <a href="http://en.wikipedia.org/wiki/Google_Search">Google&#8217;s search interface</a> can be used as a calculator. Google Calculator, as this feature is known, offers access to the kinds of functions (addition, multiplication, and more) offered by conventional electronic calculators. Unlike conventional electronic calculators, however, Google Calculator is able to utilise information about the external world, such as exchange rate data or measurement unit ratios. This allows you ask Google what <a href="http://www.google.co.uk/search?q=1lb+in+kg">1lb is in kg</a>, or what <a href="http://www.google.co.uk/search?q=250+usd+in+gbp">$250 (US) is in pounds sterling</a>. You can combine the traditional calculator functions with these information look-up functions, too, which means you can do things like calculate what a <a href="http://www.google.co.uk/search?q=250+usd+*1.175+in+gbp">$250 (US) item would cost in pounds sterling if you paid import duty of 17.5% on it</a>. There&#8217;s a bit of a learning curve but it&#8217;s fairly gentle despite Google&#8217;s documentation of the syntax of these functions being a bit patchy.</p>
<p><span id="more-901"></span></p>
<p>So far, so handy. Handier still is the fact that these Google Calculator features can also be accessed in a <a href="http://en.wikipedia.org/wiki/Google_Docs">Google Docs</a> spreadsheet. Want a cell in your spreadsheet to show the value of $250 (US) in pounds sterling? Enter this in the cell:</p>
<p><code>=GoogleFinance("CURRENCY:USDGBP")*19.9</code></p>
<p>Great! Now you can, for instance, compare the cost of international products or services no matter which currency they&#8217;re given in.*</p>
<p>Want a second cell to show what 1lb is in kg? Enter this in the second cell:</p>
<p><code>=GoogleLookup("1lb","in kg")</code></p>
<p>There&#8217;s a gotcha here, though. The above will give you <q>0.45kg</q>. That&#8217;s not just <q>0.45</q> with a cosmetic <q>kg</q>: it&#8217;s as though you&#8217;d typed <q>0.45kg</q> into the cell. Having some non-numerical information in the cell (the <q>kg</q> part) makes Google Docs treat the entire contents of the cell as text rather than numerical data. That means you can&#8217;t use it for mathematical calculations unless you process it first to strip away the non-numerical part. Here&#8217;s an example of how to do that:</p>
<p><code>=substitute(GoogleLookup("1lb","in kg"),"kg","")</code></p>
<p>Now, go forth and multiply!</p>
<p><span style="color: #999999;">* If I&#8217;m not mistaken, Google updates its currency information 20 minutes after the live currency exchange markets. This means you probably shouldn&#8217;t use Google Docs for, say, currency trading… but since ethically speaking you probably shouldn&#8217;t trade currencies anyhow, I won&#8217;t be sorry if you make a fat loss on the currency markets by trying to use Google Docs as your analysis platform.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sampablokuper.com/2010/05/18/unit-conversion-in-google-docs-spreadsheets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Commercially copying the fab lab</title>
		<link>http://www.sampablokuper.com/2010/04/19/commercially-copying-the-fab-lab/</link>
		<comments>http://www.sampablokuper.com/2010/04/19/commercially-copying-the-fab-lab/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 15:00:42 +0000</pubDate>
		<dc:creator>sampablokuper</dc:creator>
				<category><![CDATA[Ethics]]></category>
		<category><![CDATA[Poor man's patents]]></category>
		<category><![CDATA[eureka]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.sampablokuper.com/?p=884</guid>
		<description><![CDATA[Many urban Americans will be familiar with Kinko&#8217;s, a retail chain specialising in the photocopying, faxing, scanning and printing of documents. The branches I&#8217;ve seen offer a choice of self-service or full service for at least some tasks &#8211; photocopying, for instance &#8211; and many branches also offer graphic design, internet access, and other services. [...]]]></description>
			<content:encoded><![CDATA[<p>Many urban Americans will be familiar with <a href="http://en.wikipedia.org/wiki/FedEx_Office">Kinko&#8217;s</a>, a retail chain specialising in the photocopying, faxing, scanning and printing of documents. The branches I&#8217;ve seen offer a choice of self-service or full service for at least some tasks &#8211; photocopying, for instance &#8211; and many branches also offer graphic design, internet access, and other services. In short, each branch of Kinko&#8217;s works like a <a href="http://en.wikipedia.org/wiki/Fab_lab">fab lab</a> for 2D information on screen or on paper. You can copy this information, move it from electronic storage to paper storage or vice versa, manipulate it, and send or receive it.<br />
<span id="more-884"></span></p>
<p>(A quick aside: there are many companies providing copy shop services, some independent, some parts of larger retail chains. The interesting thing about Kinko&#8217;s, to me, is that it&#8217;s so ubiquitous in the US that (a) <q>Kinko&#8217;s</q> has become practically synonymous with <q>copy shop</q>, and (b) people know which services they will find on offer at branches of Kinko&#8217;s, and at what cost. This sort of combination of scalability and predictability is, I think, useful for customers, even though it is in other respects a rather sadly homogenising influence on modern consumer culture.)</p>
<p>Now, in an urban environment where room is scarce, flexibility is key, and travelling distances are short, companies like this make a lot of sense. Students, hobbyists and professionals alike may well need the services Kinko&#8217;s offers, but may not have the space or the budget to accommodate the necessary equipment or operators. Kinko&#8217;s, essentially, allows these customers to time-share their equipment, staff and floor space, on an as-needed basis. Even for those customers who have the facilities to print/scan/etc themselves, having a Kinko&#8217;s is useful: it provides a backup option in case the customer&#8217;s own equipment goes kaput shortly before a deadline.</p>
<p>That&#8217;s all well and good, but let&#8217;s get back to fab labs. Increasingly, students, hobbyists and professionals are interested in manipulating 3D information and materials for prototyping purposes, or for very limited production runs. New recipes for rapid prototyping tools like <a href="http://www.instructables.com/id/Milkscanner-V1.0/">3D scanners</a>, <a href="http://en.wikipedia.org/wiki/3D_printing">3D printers</a>, <a href="http://buildyourcnc.com/default.aspx">CNC routers</a>, electronic fabrics and items that can be made using them appear frequently in the pages of <a href="http://en.wikipedia.org/wiki/Make_%28magazine%29">Make</a> magazine, <a href="http://en.wikipedia.org/wiki/Instructables">Instructables.com</a> and other modern DIY publications. This does increase the affordability of such things but the trouble is, even the basic tools (drills, saws, etc) and materials required to follow some of these recipes take up a fairly large amount of space relative to the size of a small urban apartment or office. If you want more sophisticated options like 3D scanning and printing to be available to you as well, then you need even more space. This is much like the problem once faced by students, hobbyists and professionals who needed 2D information tools like photocopying available to them; the problem Kinko&#8217;s business model is based on ameliorating.</p>
<p>I&#8217;m going to advocate that someone &#8211; maybe even FedEx (the owner of Kinko&#8217;s); it doesn&#8217;t really matter who &#8211; creates a chain of Fabrication Stations that operate on roughly the same principle as Kinko&#8217;s. For a small fee, these outlets should offer to perform, either with the customer&#8217;s assistance or while the customer waits, such services as:</p>
<ul>
<li>3D scanning</li>
<li>3D printing (at least one kind)</li>
<li>PCB manufacture</li>
<li>Sewing (using conventional, high-tensile, or conductive thread as desired)</li>
<li>Drilling</li>
<li>Cutting</li>
<li>Grinding</li>
<li>Sanding</li>
<li>Buffing</li>
<li>3-axis milling/routing</li>
</ul>
<p>Just as Kinko&#8217;s stocks various kinds of paper and ink to run their equipment, so the Fabrication Stations should stock standard PCB boards, commonly-used construction fabrics and threads, and any consumables necessary for their 3D scanning and printing devices.</p>
<p>This isn&#8217;t so far-fetched &#8211; several universities already have fab labs providing these services &#8211; and it needn&#8217;t require a large amount of real estate: it&#8217;s possible to fit a fab lab <a href="http://en.wikipedia.org/wiki/Mobile_fab_lab">into a trailer</a> (and they come in <a href="http://haitifablab.org/2010/02/pecha-kucha-for-haiti-presentation/">many other shapes and sizes too</a>).</p>
<p>It&#8217;s likely that Fabrication Stations having commercial viability as their primary requirement might differ somewhat from the standard <a href="http://fab.cba.mit.edu/about/faq/">fab lab specs</a>, which seem to assume a non-profit environment, but although this might mean they would be slightly less suitable as educational tools, they would appear to be a socially valuable proposition nonetheless.</p>
<p>Why am I writing all this? I&#8217;ve got a list of handy things I&#8217;d like to create, but I don&#8217;t have the time or equipment to make them all. Having a Fabrication Station in my neighbourhood where I could get some of the more equipment-intensive parts of the fabrication completed would tip the balance in favour of <em>getting (these) things done</em> rather than <em>putting them off</em>, and I&#8217;m all in favour of the former!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sampablokuper.com/2010/04/19/commercially-copying-the-fab-lab/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bundles of musical joy</title>
		<link>http://www.sampablokuper.com/2009/11/26/bundles-of-musical-joy/</link>
		<comments>http://www.sampablokuper.com/2009/11/26/bundles-of-musical-joy/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 20:33:14 +0000</pubDate>
		<dc:creator>sampablokuper</dc:creator>
				<category><![CDATA[Poor man's patents]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.sampablokuper.com/?p=814</guid>
		<description><![CDATA[I&#8217;ve not tried every online music store nor every music file format, but far as I know, there&#8217;s no file format that replicates the experience of buying a physical record, whether that record&#8217;s on vinyl, CD, cassette, or some more esoteric format. All I mean by &#8220;replicates the experience&#8221; is that the file format should [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve not tried every online music store nor every music file format, but far as I know, there&#8217;s no file format that replicates the experience of buying a physical record, whether that record&#8217;s on vinyl, CD, cassette, or some more esoteric format. All I mean by &#8220;replicates the experience&#8221; is that the file format should provide the songs in the highest quality the medium will allow, should include all the album artwork and liner or inlay card that would come with the purchase of the physical album, and should provide a recommended playlist order for the tracks complete with a recommended gap between each track.</p>
<p><span id="more-814"></span></p>
<p>It&#8217;s not a lot to ask.</p>
<p>I propose that online music stores should, except perhaps when they are selling solitary songs, sell their records in a format that includes all of this. It would probably be something like a <a href="http://en.wikipedia.org/wiki/JAR_(file_format)">JAR</a> file but for musical records instead of Java programs. Each file would have a copy of the inlay card and cover art as a PDF or suchlike, and a playlist in <a href="http://en.wikipedia.org/wiki/XSPF">XSPF</a> or <a href="http://gonze.com/playlists/playlist-format-survey.html">similar</a>. The tracks would also be included in the JAR (or whatever; let&#8217;s call it a UZQ file in honour of <a href="http://en.wikipedia.org/wiki/Mike_Paradinas">Michael Paradinas</a>&#8217;s best-known alias) file as FLAC files.</p>
<p>How hard would this be to implement? For a major online music retailer like <a href="http://en.wikipedia.org/wiki/7digital">7digital</a> or <a href="http://en.wikipedia.org/wiki/ITunes_Store">iTunes</a>, not very difficult. What about player software? Most player software could very rapidly be extended to accommodate such a file structure.</p>
<p>So, why hasn&#8217;t this been done? Is the industry waiting for someone to write a UZQ file format specification? Has someone already written an archive file specification for music based on JAR, <a href="http://en.wikipedia.org/wiki/Tar_(file_format)">TAR</a>, <a href="http://code.google.com/p/xar/wiki/whyxar">XAR</a> or <a href="http://duplicity.nongnu.org/new_format.html">similar</a>, but it didn&#8217;t catch on? Please leave your thoughts and insights as comments below. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sampablokuper.com/2009/11/26/bundles-of-musical-joy/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Dear Mr Brodman</title>
		<link>http://www.sampablokuper.com/2009/06/07/dear-mr-brodman/</link>
		<comments>http://www.sampablokuper.com/2009/06/07/dear-mr-brodman/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 17:43:40 +0000</pubDate>
		<dc:creator>sampablokuper</dc:creator>
				<category><![CDATA[Ethics]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.sampablokuper.com/?p=734</guid>
		<description><![CDATA[I sent an email just now to the CTO of T-Mobile USA, Cole Brodman (whose email address is, I have inferred from a few bits of publicly available information, probably cole.brodman@t-mobile.com). If you're interested in open mobile communications, you might want to send him an email too. Feel free to use mine as a basis [...]]]></description>
			<content:encoded><![CDATA[<p>I sent an email just now to the CTO of T-Mobile USA, Cole Brodman (whose email address is, I have inferred from a few bits of publicly available information, probably <a href="mailto:cole.brodman@t-mobile.com">cole.brodman@t-mobile.com</a>). If you're interested in open mobile communications, you might want to send him an email too. Feel free to use mine as a basis for your own.</p>
<span id="more-734"></span>
<blockquote>
<p>Dear Mr Brodman,</p>
<p>I write to you with some concern that T-Mobile may have misled customers over the use of tethering apps on the Android phones T-Mobile sells. Specifically, <a href="http://www.engadget.com/2008/09/23/t-mobiles-cto-on-g1-unlocking-and-tethering-plus-a-few-detai/">you suggested</a>, I believe, that tethering apps would not be blocked. Yet it appears that at least one <a href="http://www.falsedichotomies.org/node/73">has been removed</a> from the Android Market in the US.</p>
<p>I call on you to openly address your customers' concerns, and to work with Google to ensure that of those customers, the Android users who wish to use tethering apps can do so with the aid of the delivery platform that the Android Market provides.</p>
<p>Yours sincerely,</p>
<p>Sam Kuper</p>
</blockquote>]]></content:encoded>
			<wfw:commentRss>http://www.sampablokuper.com/2009/06/07/dear-mr-brodman/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rimmed &amp; shafted</title>
		<link>http://www.sampablokuper.com/2009/05/02/rimmed-shafted/</link>
		<comments>http://www.sampablokuper.com/2009/05/02/rimmed-shafted/#comments</comments>
		<pubDate>Sat, 02 May 2009 15:08:15 +0000</pubDate>
		<dc:creator>sampablokuper</dc:creator>
				<category><![CDATA[Ethics]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.sampablokuper.com/?p=674</guid>
		<description><![CDATA[My bicycle is a Dahon Piccolo, and - for the most part - I've been happy with it. It has a fairly compact fold, which I value highly, and it's nippy. Its rear end, however, has caused me some problems.



The first problem was a series of broken spokes on the rear wheel, when the bike [...]]]></description>
			<content:encoded><![CDATA[<p>My bicycle is a <a href="http://www.dahon.com/archive/2005/piccolod3.htm">Dahon Piccolo</a>, and - for the most part - I've been happy with it. It has a fairly compact fold, which I value highly, and it's nippy. Its rear end, however, has caused me some problems.</p>

<span id="more-674"></span>

<p>The first problem was a series of broken spokes on the rear wheel, when the bike was around two years old. I had the wheel rebuilt (at some cost!), and this stopped the spoke breakage. Unfortunately, <a href="http://www.benhaywardcycles.co.uk">the shop mechanic</a> who rebuilt the wheel messed up the rim tape while doing so, and also left some burrs on the spoke nipples inside the rim, which caused me a series of <a href="http://www.sampablokuper.com/2009/04/29/flat/">punctures</a> until I figured out where the problem lay and fixed it myself.</p>

<p>Next came a crack in the seat tube. This necessitated a new frame, though fortunately this was covered under warranty. Still, it meant the <a href="http://www.sampablokuper.com/2008/08/05/caved/">substantial hassle and expense</a> of shipping my bike back to the <a href="http://www.chwhite.btinternet.co.uk/">original deale</a>r for repair, and hiring a replacement for the interim.</p>

<p>Now, about a week ago I had my bike serviced. I thought it probably needed new pedals - or maybe bottom bracket, or both - because I could feel a clicking/popping/grinding when I was pedalling. It turned out it probably did need new pedals, but the clicking and popping wasn't due to the pedals, it was due to a crack in the rear rim. The staff at the <a href="http://www.cambridgeonline.co.uk/listings/8228/">shop</a> where I'd had my bike serviced said they hadn't been able to source any suitable rims and suggested that I try elsewhere.</p>

<p>Naturally enough, I tried the dealer I originally bought the bike from. They told me that a lack of rear rims for Dahon Piccolos and Dahon Curves was a longstanding problem, but that entire rear wheels (spokes, hub gear and all) were available for £145. That's half the new cost of the bike! Asking some other Dahon dealers the same question produced the same answer.</p>

<p>So, I had a choice between buying a whole new rear wheel or a whole new (or second-hand) bike. Blech.</p>

<p>A bit of spread-sheeting later, and I eventually opted for the new rear wheel. None of the second-hand bikes I enquired about had their original receipts available, which made me suspect they could have been stolen; and the new bikes I looked at worked out a little dearer than the Dahon per year of warranty remaining, since my Piccolo's frame, forks and handlepost are still under warranty for about another year and a half, and presumably the new rear wheel will be covered for a year.</p>

<p>Still, I'm disappointed. All bike manufacturers should recognise that it's in their interests to do what's in their customers' interests; and it's in their customers' interests to make spare parts readily available. <a href="http://www.brompton.co.uk/">Brompton</a> does this, and so does <a href="http://www.bikefriday.com/">Bike Friday</a>. Why can't Dahon?</p>

<p>Next time it comes to a crunch like this, chances are it'll be more economical for me to get a new bike instead of repairing the Piccolo. And I don't think I'll be buying a Dahon again.</p>]]></content:encoded>
			<wfw:commentRss>http://www.sampablokuper.com/2009/05/02/rimmed-shafted/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Flat</title>
		<link>http://www.sampablokuper.com/2009/04/29/flat/</link>
		<comments>http://www.sampablokuper.com/2009/04/29/flat/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 23:55:47 +0000</pubDate>
		<dc:creator>sampablokuper</dc:creator>
				<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.sampablokuper.com/?p=652</guid>
		<description><![CDATA[There are three common, separate kinds of puncture that may afflict standard bicycle tyres (that is, those with inner tubes; tubeless tyres are rather different, and I have no experience of them).

Probably the most common is the foreign-body puncture, in which a solid object penetrates the tyre from the outside, piercing the inner tube. I [...]]]></description>
			<content:encoded><![CDATA[<p>There are three common, separate kinds of puncture that may afflict standard bicycle tyres (that is, those with inner tubes; tubeless tyres are rather different, and I have no experience of them).</p>
<span id="more-652"></span>
<ol><li>Probably the most common is the <strong>foreign-body puncture</strong>, in which a solid object penetrates the tyre from the outside, piercing the inner tube. I have three tips for dealing with these:
<ol>
<li>Use tyres with a kevlar belt, or some other effective barrier between the tyre rubber and the inner tube. I use <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D0%26ref%255F%3Dnb%255Fss%255Fsg%255F0%255F9%26y%3D0%26field-keywords%3Dschwalbe%2520marathon%26url%3Dsearch-alias%253Dsporting%26sprefix%3Dschwalbe%2520&#038;tag=sampablokuper-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=390957">Schwalbe Marathons</a> because they're the easiest to obtain for my wheel diameter; you may wish to shop around.</li>
<li>Ensure your tyres are inflated to the recommended pressure. I prefer to use a pump with a built-in pressure gauge, for this. Don't over-inflate the tyres or you risk both blowing them and also increasing the shock your wheel experiences when it hits a bump in the road. Don't under-inflate either, or the tyres will pick up stones and glass shards like a sponge and you'll also increase your risk of pinch flats (see below).</li>
<li>Use tyres with no more crenellation than is necessary for your riding conditions, as every nook in a tyre's tread can harbour a sharp that becomes worked deeper into the rubber during subsequent revolutions of the wheel.</li>
</ol>
</li>
<li><strong>Pinch flats</strong> affect the sides of the inner tube, and are caused by the inner tube being pinched between the rim and the bead of the tyre. A well-inflated tyre seated in a rim of matching size, with an appropriately sized inner tube, should never suffer a pinch flat unless you're cornering fast enough to skid badly (in which case, you've got other worries).</li>
<li><strong>Spoke nipple wear</strong> can happen to an inner tube that is not sufficiently well isolated from spoke nipples. This isolation is normally achieved by rim tape, but rim tape can wear through. I've found cloth rim tape to work better than rubber rim tape. <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26rs%3D%26ref%255F%3Dsr%255Fnr%255Fi%255F0%26keywords%3Dvelox%2520rim%2520tape%26qid%3D1240875639%26rh%3Di%253Aaps%252Ck%253Avelox%2520rim%2520tape%252Ci%253Asporting&#038;tag=sampablokuper-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=390957">Velox rim tape</a> is probably the most common, but there are other brands of cloth rim tape too. The most important thing is to make sure that your rim tape is fitted snugly. One the one hand, it mustn't be able to move from side to side - it must fill the well of the rim. On the other hand, it shouldn't extend too far up the sides of the rim, or it could fold up under the force from the inner tube, potentially pinching the inner tube in the fold.</li>
</ol>
<p>I hope that this information will be as useful to someone else as it has been to me while I've been acquiring it over the last few years! If you want to learn more about bicycle wheels and their maintenance, you could hardly do better than to visit the <a href="http://sheldonbrown.com/wheels/index.html">website</a> of the unique, incomparable, and now sadly deceased Sheldon Brown.</p>]]></content:encoded>
			<wfw:commentRss>http://www.sampablokuper.com/2009/04/29/flat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>svn revert to revision</title>
		<link>http://www.sampablokuper.com/2009/03/27/svn-revert-to-revision/</link>
		<comments>http://www.sampablokuper.com/2009/03/27/svn-revert-to-revision/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 06:50:28 +0000</pubDate>
		<dc:creator>sampablokuper</dc:creator>
				<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.sampablokuper.com/?p=575</guid>
		<description><![CDATA[Sometimes I wish there was a '-r' argument to Subversion's svn&#160;revert command, so that I could revert my working copy back to a given revision. There isn't one, however, so how else can this be achieved?



The free Red Bean Subversion book gives some details here, but it's a bit vague on an important point. If [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes I wish there was a '<code>-r</code>' argument to <a href="http://en.wikipedia.org/wiki/Subversion_(software)">Subversion's</a> <code>svn revert</code> command, so that I could revert my working copy back to a given revision. There isn't one, however, so how else can this be achieved?</p>

<span id="more-575"></span>

<p>The free Red Bean Subversion book gives some details <a href="http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.branchmerge.commonuses.undo">here</a>, but it's a bit vague on an important point. If you follow its instructions, and if your working copy contains uncommitted changes, then those uncommitted changes will be retained in the working copy. If that's what you want, then you're fine, but if not - in other words if you want to replace your working copy with a snapshot of the repository as it was at the point of the revision you want to "revert" to, you ought to:</p>

<ol>
	<li>Change to the top directory within your working copy (assuming you want to roll back the whole of the working copy).</li>
	<li>run <code>svn revert</code> to revert your working copy's files to the state they were in when you last committed/checked out.</li>
	<li>run <code>svn status -v</code> to see which revision number your working copy now corresponds to (it's the highest revision number in the list that <code>svn status -v</code> produces).</li>
	<li>run <code>svn merge -rXX:YY</code> where XX is the number you obtained in the previous step and YY is the number of the revision you want to revert to.</li>
	<li>Done! The possible exception to this is that files in your working copy that didn't exist when revision YY was originally made, will still be there, because by default svn doesn't remove things. If you want to get rid of them, run a <code>svn del [filename]</code> on each of them.</li>
	<li>Well done! Now play with your working copy as though all those intermediate edits had never happened <img src='http://www.sampablokuper.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  . And when you're ready to commit your efforts, just use <code>svn commit</code> as usual!</li>
</ol>

<p>Hopefully I won't be the only person this information has helped. <img src='http://www.sampablokuper.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
			<wfw:commentRss>http://www.sampablokuper.com/2009/03/27/svn-revert-to-revision/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to paste text into Vim</title>
		<link>http://www.sampablokuper.com/2009/03/24/how-to-paste-text-into-vim/</link>
		<comments>http://www.sampablokuper.com/2009/03/24/how-to-paste-text-into-vim/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 22:04:07 +0000</pubDate>
		<dc:creator>sampablokuper</dc:creator>
				<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.sampablokuper.com/?p=563</guid>
		<description><![CDATA[Sometimes, when pasting code into Vim, I've found that each new line gets indented, so that if the text I copied started out like this:

My nice list:
    Foo
    Bar
    Moo
    Zoo



It ends up looking like this:

My nice list:
    Foo
  [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, when pasting code into <a href="http://en.wikipedia.org/wiki/Vim_(text_editor)">Vim</a>, I've found that each new line gets indented, so that if the text I copied started out like this:</p>

<pre>My nice list:
    Foo
    Bar
    Moo
    Zoo</pre>

<span id="more-563"></span>

<p>It ends up looking like this:</p>

<pre>My nice list:
    Foo
        Bar
            Moo
                Zoo</pre>

<p>It's a pretty annoying problem, especially if you're pasting in a lot of text that was neatly aligned or indented to begin with and which would now have to be re-aligned/indented all over again. Fortunately, it's an easy problem to solve.</p>

<p>The reason it happens is that Vim has an <a href="http://www.vim.org/htmldoc/options.html#'autoindent'">automatic indentation feature</a>. This feature is useful for programming, because if you indent a line of code that you're writing, Vim will remember the indentation and apply it again when you begin the next line, which is ideal if that first indented line was the start of an indented block of code. Unfortunately, it's a slightly dumb feature in the sense that it's unintelligent. It just blindly indents the start of each new line as much as the previous one.</p>

<p>In the list above, because each item in the list was on a line that began with some indenting whitespace, Vim - if it had autoindent turned on - would indent the first item by the amount of whitespace it already possessed, and would then start the next line with that same amount of whitespace before pasting in the contents of the line. So the second item ends up with double the indentation of the first, and so on.</p>

<p>If this is happening to you, it probably means you've got a line in your <a href="http://www.vim.org/htmldoc/usr_05.html">.vimrc file</a> which reads, <code>set ai</code> or <code>set autoindent</code> (these two commands are exactly equivalent: <q>ai</q> is just an alias for <q>autoindent</q>). If you don't need the autoindent feature switched on, just delete that line from your .vimrc. Alternatively, if you want it on most of the time, but not when you're pasting in text that's already indented, just make sure you're in command mode (by pressing the <code>&lt;ESC&gt;</code> key) and type:</p>

<pre>:set noai</pre>

<p>(note the colon at the beginning). Then hit <code>&lt;Enter&gt;</code>, and you'll have switched off autoindenting. Now enter insert mode where you want to paste your text (that is, use the keyboard to move your cursor to the appropriate place, and press <code>i</code>). Then paste your text, e.g. using Ctrl+v if you're on Windows or Apple-v if you're on a Mac. The indentations in the pasted text should have been preserved!</p>

<p>Now restore autoindent by going back to command mode (press <code>&lt;ESC&gt;</code> again), and type:</p>

<pre>:set ai</pre>

<p>Hit <code>&lt;Enter&gt;</code> again, and you're done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sampablokuper.com/2009/03/24/how-to-paste-text-into-vim/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Darling Dear</title>
		<link>http://www.sampablokuper.com/2009/03/18/darling-dear/</link>
		<comments>http://www.sampablokuper.com/2009/03/18/darling-dear/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 02:54:38 +0000</pubDate>
		<dc:creator>sampablokuper</dc:creator>
				<category><![CDATA[Ethics]]></category>
		<category><![CDATA[Life is language]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.sampablokuper.com/?p=547</guid>
		<description><![CDATA[DARLING DEARYOU ARE MY LOVING LUST: MY BEAUTIFUL HUNGER. MY AFFECTION LUSTS FOR YOUR WINNING HEART. YOU ARE MY DEVOTED FERVOUR: MY SYMPATHETIC LONGING.YOURS AFFECTIONATELYM. U. C.
... and people say the British are not romantic.

One of the earliest electronic computers, I recently discovered, was used to write love poetry. The Manchester Mark 1 was programmed [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>DARLING DEAR<br/>YOU ARE MY LOVING LUST: MY BEAUTIFUL HUNGER. MY AFFECTION LUSTS FOR YOUR WINNING HEART. YOU ARE MY DEVOTED FERVOUR: MY SYMPATHETIC LONGING.<br/>YOURS AFFECTIONATELY<br/>M. U. C.</p></blockquote>
<p>... and people say the British are not romantic.</p>
<span id="more-547"></span>
<p>One of the earliest electronic computers, I recently discovered, was used to write love poetry. The <a href="http://en.wikipedia.org/wiki/Manchester_Mark_1">Manchester Mark 1</a> was programmed by <a href="http://en.wikipedia.org/wiki/Christopher_Strachey">Christopher Strachey</a> with the <q>Loveletters</q> program in 1952. (The letter above was outputted shortly before I wrote this blog post, by a Mark 1 emulator <a href="http://www.alpha60.de/research/muc/">running the same program</a>.) The <q>Loveletters</q> program constructs partially random sentences from a limited, but affectionate, vocabulary. Since many of the early electronic and electromechanical computers were motivated by military concerns, it's nice to see that the Mark 1 was used for something a little less combative.</p>
<p>Computer-generated partially random texts may no longer be very novel, but they are becoming increasingly sophisticated. The most engaging example I've seen so far, SCIgen, was written in 2005, and it generates <q>scientific</q> papers, based on a vocabulary of computer science terms. It's realistic to the point of satire - try it <a href="http://pdos.csail.mit.edu/scigen/">here</a>, and be sure to click the <q>Generate another one</q> link when you want to see another <q>paper</q>. Incredibly, some of the texts it has generated have been <a href="http://pdos.csail.mit.edu/scigen/#examples">accepted</a> as <a href="http://pdos.csail.mit.edu/scigen/#relwork">submissions</a> for supposedly reputable academic conferences and journals.</p>]]></content:encoded>
			<wfw:commentRss>http://www.sampablokuper.com/2009/03/18/darling-dear/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
