<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
        <title>tomm.org</title>
        <description>tomm.org - Tom McAdam</description>
        <link>https://tomm.org/</link>
        <atom:link href="https://tomm.org/rss.xml" rel="self" type="application/rss+xml" />
        <lastBuildDate>2026-10-05T11:15:09+00:00</lastBuildDate>
        <pubDate>2026-10-05T11:15:09+00:00</pubDate>
        <ttl>1800</ttl>


        <item>
                <title>Citizens abroad deserve a voice</title>
                <description>&lt;p&gt;There were many things to support in the Lib Dem &lt;a href=&quot;https://www.libdems.org.uk/conference/motions/autumn-2026/f24&quot;&gt;strategy motion&lt;/a&gt; at Autumn Conference. It includes confident liberalism, modern campaigning, and reaching new communities. However, there is one notable exclusion. In fact, around five million notable exclusions: citizens abroad.&lt;/p&gt;

&lt;p&gt;The strategy talks about reaching out to all communities in our country. These five million people are not in the UK, but they are served by our democracy. I live in Switzerland now, having moved for a job. Yet decisions made in Westminster continue to affect my life.&lt;/p&gt;

&lt;p&gt;The starkest of those in recent years was of course Brexit. Many of the million British citizens living and working in Europe spent years in limbo after the referendum, not knowing what residency status they would eventually be afforded in the country in which they had built a life. We continue to see Britons being removed from EU countries, most recently &lt;a href=&quot;https://www.theguardian.com/world/2026/sep/20/british-man-torn-from-swedish-wife-and-home&quot;&gt;Charles&lt;/a&gt;, a British citizen deported from Sweden.&lt;/p&gt;

&lt;p&gt;All because of a decision made in Westminster.&lt;/p&gt;

&lt;p&gt;It doesn’t stop there. A pensioner retiring to Australia from the UK in 2006 would now receive less than half the basic State Pension of a pensioner who stayed in the UK, despite having made exactly the same contributions.&lt;/p&gt;

&lt;p&gt;A family looking to repatriate to the UK from abroad, bringing a non-citizen spouse, had their income requirement increased by nearly 60% in 2024: a decision by a Government wanting to look tough on immigration, using citizens living abroad as scapegoats.&lt;/p&gt;

&lt;p&gt;As liberals, we believe democracy means more than simply having the right to put a cross in a box. Voters need the opportunity to make an informed choice. Yet at the last general election I received no campaign material from any candidates standing in my Twickenham constituency. Many candidates don’t even put their leaflets online, so a determined voter like me can’t even do their own research. Not that I would’ve voted for anyone other than Munira, of course.&lt;/p&gt;

&lt;p&gt;The strategy calls for more video content to reach people beyond our traditional ground campaign. Citizens abroad are perhaps the clearest example of people our ground campaign cannot reach.&lt;/p&gt;

&lt;p&gt;Five million citizens abroad deserve a voice, and those entitled to vote deserve to be reached, so it is regrettable that Lib Dems Abroad’s amendment was not selected. We weren’t asking for a wholesale rewrite of the strategy, but for small tweaks to language that we felt inadvertently excluded citizens abroad: for example, by replacing “in our country” with “served by our democracy”.&lt;/p&gt;

&lt;p&gt;We may live beyond Britain’s borders, but we are still part of its democracy. Westminster’s decisions still affect our lives, and our party’s strategy should have recognised that.&lt;/p&gt;

&lt;hr width=&quot;50%&quot; /&gt;

&lt;p&gt;&lt;small&gt;This article was first &lt;a href=&quot;https://www.libdemvoice.org/citizens-abroad-and-party-strategy-80513.html&quot;&gt;published&lt;/a&gt; in &lt;a href=&quot;https://www.libdemvoice.org/&quot;&gt;LibDem Voice&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/politics/party-strategy-overseas-citizens</link>
                <guid>https://tomm.org/politics/party-strategy-overseas-citizens</guid>
                <pubDate>2026-09-27T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>The Representation of the People Bill is a missed opportunity for overseas voters</title>
                <description>&lt;p&gt;It is obviously disappointing that the new &lt;a href=&quot;https://publications.parliament.uk/pa/bills/cbill/59-01/0384/240384.pdf&quot;&gt;Representation of the People Bill&lt;/a&gt; makes no mention of proportional representation. In a modern democracy, it is frankly absurd that we cling to a system where millions of votes simply do not count. Fairer representation benefits all citizens, and its absence is a glaring omission.&lt;/p&gt;

&lt;p&gt;But even within the confines of our current system, the Bill fails to address the most crying injustices faced by British citizens living abroad.&lt;/p&gt;

&lt;h3 id=&quot;no-improvements-for-overseas-voters&quot;&gt;No improvements for overseas voters&lt;/h3&gt;

&lt;p&gt;The &lt;a href=&quot;https://www.gov.uk/government/publications/representation-of-the-people-bill-policy-summaries&quot;&gt;policy summaries&lt;/a&gt; are full of warm words about “modernising” our elections, yet for the millions of us living overseas, the Victorian-era infrastructure remains untouched.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;https://committees.parliament.uk/publications/48937/documents/256975/default/&quot;&gt;2024 general election review&lt;/a&gt; made it abundantly clear that the current system is broken, with less than half of overseas ballots being returned in time. Thousands of overseas voters were effectively disenfranchised because their postal ballots arrived too late to be returned in time. Its recommendation that “A system capable of reliably allowing eligible voters to cast their ballot must be in place in time for the next general election” has been ignored.&lt;/p&gt;

&lt;p&gt;In &lt;a href=&quot;https://www.gov.uk/government/publications/electoral-commissions-reports-on-the-2024-elections-government-response/electoral-commissions-reports-on-the-2024-elections-government-response&quot;&gt;its response&lt;/a&gt; to the Electoral Commission’s &lt;a href=&quot;https://www.electoralcommission.org.uk/research-reports-and-data/our-reports-and-data-past-elections-and-referendums/report-2024-uk-parliamentary-general-election-and-may-2024-elections&quot;&gt;report&lt;/a&gt; on the 2024 General Election, the Goverment said “Overseas electors are legitimate voters who should be able to exercise their vote without unnecessary barriers”, yet its Bill contains nothing to remove the barriers. No electronic distribution of ballots (even just to print at home), no extension of timetables, and no ability to vote at embassies. We continue to be treated as an afterthought.&lt;/p&gt;

&lt;p&gt;We heard of countless stories during the election of people desparately trying to get their postal vote back. Some resorted to couriering from Australia, others could only hope, without success, their ballot turned up with enough time to be returned. Voting from abroad shouldn’t be a lottery.&lt;/p&gt;

&lt;h3 id=&quot;automatic-voter-registration-but-not-for-us&quot;&gt;Automatic voter registration… but not for us&lt;/h3&gt;

&lt;p&gt;One of the headline measures is &lt;a href=&quot;https://www.gov.uk/government/publications/representation-of-the-people-bill-policy-summaries/improving-voter-registration&quot;&gt;improving voter registration&lt;/a&gt; through automated processes. The government plans to use data from other public services to automatically add people to the register.&lt;/p&gt;

&lt;p&gt;This is a good step, but only for those living in the UK. But it seemingly excludes overseas voters entirely. The government holds plenty of data on us: passport renewals, student loan repayments, tax returns. None of this appears to be in scope for helping us register. We will seemingly still be stuck with the manual, repetitive declaration that catches so many people out.&lt;/p&gt;

&lt;h3 id=&quot;no-overseas-constituencies&quot;&gt;No overseas constituencies&lt;/h3&gt;

&lt;p&gt;Finally, there is still no move towards overseas constituencies. Countries like France and Italy have dedicated MPs representing their citizens abroad, ensuring their unique concerns—pensions, healthcare, citizens’ rights—are heard in parliament.&lt;/p&gt;

&lt;p&gt;Instead, my vote is cast in a constituency I may not have lived in for decades, for an MP who has no reason to care about the specific issues affecting the British diaspora. It dilutes the local vote for residents and gives me a representative who cannot effectively represent me. It is a system that fails everyone.&lt;/p&gt;

&lt;p&gt;We need to fix voting from abroad, not just tinker around the edges. This Bill was the chance to do it, and it looks like that chance has been squandered.&lt;/p&gt;
</description>
                <link>https://tomm.org/politics/representation-of-the-people-bill</link>
                <guid>https://tomm.org/politics/representation-of-the-people-bill</guid>
                <pubDate>2026-02-14T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Breaking Up (With Meta) is Hard to Do: A story of two successes and a failure</title>
                <description>&lt;p&gt;I thought removing Meta from my life would be too hard, especially WhatsApp. But I’ve made great progress in 2025.&lt;/p&gt;

&lt;p&gt;Back in January, Meta decided to make their &lt;a href=&quot;https://transparency.meta.com/policies/community-standards/hateful-conduct&quot;&gt;hateful conduct policy&lt;/a&gt; homophobic and transphobic. It now says:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Do not post content targeting a person or group of people on the basis of their protected characteristic(s) with insults about mental characteristics… We do allow allegations of mental illness or abnormality &lt;strong&gt;when based on gender or sexual orientation&lt;/strong&gt;, given political and religious discourse about transgenderism and homosexuality.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I think it’s unacceptable to be on a platform, generating revenue for its owners, that explicitly allows harassment of LGBTQ people, and so my de-Metafication began. I had Facebook, Instagram, and WhatsApp. Let’s see where I’m at today.&lt;/p&gt;

&lt;h2 id=&quot;instagram&quot;&gt;Instagram&lt;/h2&gt;

&lt;p&gt;Status: Success! 🎉&lt;/p&gt;

&lt;p&gt;This one was easy. I suspended my account in January and deleted it last week. I do miss the updates from friends around the world, whose lives I’d catch glimpses of through their stories, which would occasionally provoke a quick conversation after a few months of not chatting. I’ve tried to make up for that by being more intentional about keeping in touch.&lt;/p&gt;

&lt;h2 id=&quot;facebook&quot;&gt;Facebook&lt;/h2&gt;

&lt;p&gt;Status: Failure ❌&lt;/p&gt;

&lt;p&gt;I immediately suspended my account. It was no great loss, except in a couple of areas. Firstly, Facebook Groups. There are a number of groups for political activists that exist solely there. I tried a few different things to encourage people to move, which got a universal response: “Everyone’s here already and there’s nowhere else to go”. I accept that Facebook Groups have the benefit of most people having a Facebook account, but should organisations really be using the services of a company that has repeatedly shown itself to fly in the face of their values? From &lt;a href=&quot;https://en.wikipedia.org/wiki/Facebook%E2%80%93Cambridge_Analytica_data_scandal&quot;&gt;Cambridge Analytica&lt;/a&gt; to this new policy, the use of Facebook is dripping with hypocrisy. I wish people would try harder to find alternatives. That’s what true allyship would look like.&lt;/p&gt;

&lt;p&gt;I gave in and reactivated my Facebook account last week. I felt too left out of the groups. I have reduced my account to a shell, unfriending everyone, making all my pictures private, and setting my profile picture to a “No Facebook” image. There’s no way to unfriend hundreds of people in bulk, so I resorted to automating it with the help of Gemini. If you’d like to do the same, check out &lt;a href=&quot;https://github.com/tfm/ghostbook&quot;&gt;the scripts&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Secondly, Facebook Messenger. My initial approach was to keep that active since you can suspend your Facebook account without suspending Messenger. After a while I got alternative channels of communication going with people I only spoke to on Messenger, but it was a hassle.&lt;/p&gt;

&lt;h2 id=&quot;whatsapp&quot;&gt;WhatsApp&lt;/h2&gt;

&lt;p&gt;Status: Trending towards success 📈&lt;/p&gt;

&lt;p&gt;WhatsApp is by far the hardest. It’s how I keep in touch with most people I know. Until this year it was mostly only tech folk I know using &lt;a href=&quot;https://signal.org&quot;&gt;Signal&lt;/a&gt;. However, that’s been changing. Members of political groups were very willing to give it a go for our group chats, so we moved.&lt;/p&gt;

&lt;p&gt;I didn’t want to move family until the much-awaited backup feature in Signal was launched. That happened a few weeks ago on iOS, so I suggested to each family member that we move, and gave the reasons why. It was surprisingly frictionless, and we even have my 85-year-old relatives moved over.&lt;/p&gt;

&lt;p&gt;Yesterday, 75% of my active conversation channels (individual and group chats) were on Signal. Result!&lt;/p&gt;

&lt;h2 id=&quot;a-challenge-to-your-group&quot;&gt;A challenge to your group&lt;/h2&gt;

&lt;p&gt;If you are part of a group using Meta products, ask them today: is this convenience worth subsidising hate? Just because a move might seem hard, it’s worth it. A move to Signal from WhatsApp is easy. Consider evaluating Discord as a Facebook Groups alternative.&lt;/p&gt;

&lt;p&gt;I know I’d appreciate that thought, and I expect LGBTQ members of your community would too.&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/breaking-up-with-meta-is-hard-to-do</link>
                <guid>https://tomm.org/tech/breaking-up-with-meta-is-hard-to-do</guid>
                <pubDate>2025-12-14T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>We need to fix voting from abroad but online voting isn't the answer</title>
                <description>&lt;p&gt;“This is bullshit”, Marc Lewandowski quite rightly &lt;a href=&quot;https://www.theguardian.com/world/2019/may/22/european-elections-overseas-brits-complain-absent-ballot-papers&quot;&gt;said&lt;/a&gt; when his ballot arrived in Melbourne with just three days to get back to the UK before polling day. With stories like Marc’s emerging every election, it’s natural for online voting to come up as a possible solution. It’s not though, as it introduces too many risks to election integrity.&lt;/p&gt;

&lt;p&gt;Ask nearly any computer security expert &lt;a href=&quot;https://verifiedvoting.org/wp-content/uploads/2023/10/VerifiedVoting-CastingVotesSafely-2023-FIN.pdf&quot;&gt;why not&lt;/a&gt;. &lt;a href=&quot;https://www.eff.org/issues/e-voting&quot;&gt;Ask the EFF&lt;/a&gt;. Don’t ask me. I’ve worked in computer security and I know enough to not consider myself an expert. I do understand security tradeoffs though and having read their advice I agree it’s not worth it.&lt;/p&gt;

&lt;p&gt;Elections are at the heart of a democracy. Question their integrity and the whole system risks collapsing. This is not theoretical. Look at what happened in Brazil in 2023. Bolsonaro made false accusations of election fraud, which led to his supporters storming the Congress, Supreme Court, and Presidential Palace.&lt;/p&gt;

&lt;p&gt;It doesn’t need someone to hack an election system. It merely needs them to sow seeds of doubt in the result. That’s so much easier with online voting, where paper trails may be missing or where accusations of tampering with them are easier to make stick. That someone can be a candidate or a nation state actor. Russia interfered in the 2016 US Presidential Election. &lt;a href=&quot;https://www.theguardian.com/technology/2024/feb/08/chinese-hack-us-transportation-infrastructure&quot;&gt;Chinese hackers hacked US infrastructure for 5 years&lt;/a&gt;. Put these two together and you could bring down the whole system.&lt;/p&gt;

&lt;p&gt;Let’s look at the problems we are trying to fix and find innovative solutions that maintain election security. This is exactly what we did when we were consulted with as part of the implementation of the Elections Act 2022. We met with Chloe Smith, the Minister responsible, and pushed for approaches to ensure all votes are counted by having electronic distribution of ballots and involving embassies in distribution or collection. These suggestions were unfortunately ignored and didn’t make it into law.&lt;/p&gt;

&lt;p&gt;With 2.1 million British citizens abroad newly-eligible to vote, we’ll continue to push for such solutions to ensure the voice is heard of everyone who chooses to exercise their democratic right, not just the voices of those that live close enough for their vote to be counted.&lt;/p&gt;

</description>
                <link>https://tomm.org/politics/no-to-online-voting</link>
                <guid>https://tomm.org/politics/no-to-online-voting</guid>
                <pubDate>2024-03-01T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>How to waste money hosting a website: load balancer edition</title>
                <description>
&lt;p&gt;I was pretty excited about finding a project that would give me an excuse to learn Rust. That excitement faded away after just a few minutes when I realised the data-based website I wanted to build was simple enough that I could punt everything to the frontend and let it handle the filtering and sorting.&lt;/p&gt;

&lt;p&gt;So I dusted off my Angular skills and threw together a little site in a couple of hours.&lt;/p&gt;

&lt;h2 id=&quot;a-lesson-in-expensive-hosting&quot;&gt;A lesson in expensive hosting&lt;/h2&gt;

&lt;p&gt;Next question, how to host this.&lt;/p&gt;

&lt;p&gt;“What a great opportunity to play with Google Cloud,” I thought. I opted for throwing the files onto &lt;a href=&quot;https://cloud.google.com/storage&quot;&gt;Google Cloud Storage&lt;/a&gt;, but then needed a way to serve the site from my own HTTPS hostname. My usual go-to for HTTPS proxying is Cloudflare, but I wanted to go GCP-native so popped a load balancer in front of the storage bucket. That worked a charm!&lt;/p&gt;

&lt;p&gt;Until the first bill appeared. 18 CHF for a month of serving what a generous estimate of traffic would be 100 requests/day (the site isn’t launched yet and I’ll be honest I don’t expect that much more when it goes GA). That’s about 0.5 Rappen per request. Ouch. Of course, load balancers are just VMs so it makes sense. But for a hobby project that’s way too much money.&lt;/p&gt;

&lt;h2 id=&quot;adding-a-bit-of-flare&quot;&gt;Adding a bit of flare&lt;/h2&gt;

&lt;p&gt;So back to Cloudflare it was. One quick redeploy later and after stopping the load balancer, I expect my bill to be ~0 next month. Much better.&lt;/p&gt;

&lt;p&gt;It’s worth noting that if I’d not wanted to serve over HTTPS I wouldn’t have needed to add the load balancer so it would’ve been roughly free to host from a storage bucket, but I needed HTTPS, alas.&lt;/p&gt;

</description>
                <link>https://tomm.org/tech/how-to-waste-money-hosting-a-website</link>
                <guid>https://tomm.org/tech/how-to-waste-money-hosting-a-website</guid>
                <pubDate>2023-04-11T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Preparing for the worst </title>
                <description>&lt;p&gt;I love my data and do everything I can to keep it. When I recently rebuilt my home server I took the opportunity to improve my &lt;strike&gt;backup&lt;/strike&gt;recovery strategy in case the worst happens. Here’s the new setup:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/backups-diagram.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I have two sets of files I care about:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Documents: stored on the laptop and home server&lt;/li&gt;
  &lt;li&gt;Media library: stored only on the home server&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Documents are stored on my laptop and synced with my home server using &lt;a href=&quot;https://www.resilio.com/&quot;&gt;Resilio Sync&lt;/a&gt;. I prefer this to Apple’s Time Machine, as I can access my documents from elsewhere when I don’t have my laptop on me: either using my phone with their iOS client, or over an SSH connection.&lt;/p&gt;

&lt;h2 id=&quot;online-backups-on-my-home-server&quot;&gt;Online backups on my home server&lt;/h2&gt;

&lt;p&gt;ZFS volumes are snapshotted daily; the defaults provided by the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zfs-auto-snapshot&lt;/code&gt; package were fine for me so it was as simple as running&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo apt-get install zfs-auto-snapshot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;cloud-backups&quot;&gt;Cloud backups&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://restic.net/&quot;&gt;Restic&lt;/a&gt; backups up to a &lt;a href=&quot;https://www.backblaze.com/&quot;&gt;Backblaze&lt;/a&gt; volume weekly.&lt;/p&gt;

&lt;h2 id=&quot;offline-backups&quot;&gt;Offline backups&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://rsnapshot.org/&quot;&gt;rsnapshot&lt;/a&gt; copies to a LUKS-encrypted volume on external hard drive, which I keep off-site and update every month or so.&lt;/p&gt;

&lt;h2 id=&quot;testing&quot;&gt;Testing&lt;/h2&gt;

&lt;p&gt;The old adage goes that you’re only as good as your last restore, so I have some automated restore testing in place. I don’t do complete restore tests for a couple of cost reasons: I don’t want to pay the egress costs, nor do I have enough disk space lying around to restore onto. Instead I:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;restic check&lt;/code&gt; to verify 1% of the backup weekly&lt;/li&gt;
  &lt;li&gt;Restore a test corpus of files weekly and compare them to the source. A new file is added weekly to the corpus through a cronjob with contents from /dev/urandom, and a comparison made between the two.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here’s the simple script to create the test file, executed weekly through the cron:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#! /bin/bash

set -e

TEST_DIRECTORY=/vol/1/restic-restore-test/
TEST_FILE=$TEST_DIRECTORY/test-`date +%s`

dd if=/dev/random of=$TEST_FILE count=1024 &amp;gt;/dev/null 2&amp;gt;&amp;amp;1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And the script that performs a test restore:&lt;/p&gt;

&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#! /bin/bash&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-e&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; /etc/restic-env

&lt;span class=&quot;nv&quot;&gt;RESTORE_DIR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;mktemp&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;

cleanup&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
	/usr/bin/rm &lt;span class=&quot;nt&quot;&gt;-r&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;RESTORE_DIR&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;trap&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
 &lt;span class=&quot;s2&quot;&gt;&quot;{ exit 255; }&quot;&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
 SIGINT SIGTERM ERR EXIT

&lt;span class=&quot;nv&quot;&gt;TEST_DIRECTORY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/vol/1/restic-restore-test/
&lt;span class=&quot;nv&quot;&gt;LAST_BACKUP_TS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;restic snapshots latest &lt;span class=&quot;nt&quot;&gt;--json&lt;/span&gt; | jq &lt;span class=&quot;nt&quot;&gt;-r&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;max_by(.time) | .time&apos;&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;## Restore test corpus from the latest backup&lt;/span&gt;

restic &lt;span class=&quot;nt&quot;&gt;-r&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$RESTIC_REPOSITORY&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
       restore latest &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
       &lt;span class=&quot;nt&quot;&gt;--target&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$RESTORE_DIR&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
       &lt;span class=&quot;nt&quot;&gt;--path&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;/vol&quot;&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
       &lt;span class=&quot;nt&quot;&gt;--include&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$TEST_DIRECTORY&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
       &lt;span class=&quot;nt&quot;&gt;--host&lt;/span&gt; redacted

&lt;span class=&quot;c&quot;&gt;## Get a list of the local files in the test corpus created before the backup&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;LOCAL_FILES&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$TEST_DIRECTORY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; find &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;nt&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-newerct&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$LAST_BACKUP_TS&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;## Diff &apos;em&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$LOCAL_FILES&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
	&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;No local test corpus found so can&apos;t compare!&quot;&lt;/span&gt;
	&lt;span class=&quot;nb&quot;&gt;exit &lt;/span&gt;1
&lt;span class=&quot;k&quot;&gt;fi

for &lt;/span&gt;LOCAL_FILE &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$LOCAL_FILES&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;do
	&lt;/span&gt;diff &lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;TEST_DIRECTORY&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;LOCAL_FILE&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;RESTORE_DIR&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;TEST_DIRECTORY&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;LOCAL_FILE&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;done

&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;restic_test_corpus_restore_ts &lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;date&lt;/span&gt; +%s&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; /var/lib/prometheus/node-exporter/restic-test-restore.prom
cleanup
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;monitoring-and-alerting&quot;&gt;Monitoring and alerting&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://prometheus.io/&quot;&gt;Prometheus&lt;/a&gt; alerts are configured for stale backups:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;A “last offline backup stale alert” is my reminder to go get the off-site disk, bring it home and do a backup.&lt;/li&gt;
  &lt;li&gt;A “Cloud backup stale alert” looks at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;restic status&lt;/code&gt; and fires if it was more than 8 days ago.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both of these just use a metric that’s written to a local file on backup completion with the current timestamp, which the node exporter picks up.&lt;/p&gt;

&lt;h2 id=&quot;room-for-improvement&quot;&gt;Room for improvement&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Append-only backup keys: Unfortunately restic to backblaze doesn’t support append-only mode, so my home server has credentials on it with a little too much power. If the server were compromised someone could wipe my cloud backups. This is a risk I’m willing to take as I also have the off-site backup, but I’d like to clean this up and only have credentials on the home server that allow creation of new backups.&lt;/li&gt;
  &lt;li&gt;Consider moving everything to the cloud and switching off my home server
    &lt;ul&gt;
      &lt;li&gt;Documents: I already use cloud storage for some documents, but I keep more confidential things off the cloud. Maybe this isn’t the right trade-off, I should revisit it.&lt;/li&gt;
      &lt;li&gt;Media library: this used to be cost-prohibitive.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;
</description>
                <link>https://tomm.org/tech/preparing-for-the-worst</link>
                <guid>https://tomm.org/tech/preparing-for-the-worst</guid>
                <pubDate>2022-09-17T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>An open letter to Uber's CEO, Dara Khosrowshahi, to investigate driver homophobia</title>
                <description>
&lt;p&gt;Dear Dara,&lt;/p&gt;

&lt;p&gt;At the end of a long day of celebrating the 50th anniversary of the dawn of the modern LGBTQ+ rights movement at Zurich Pride, my boyfriend and I ordered an Uber to go to a nearby gay bar.&lt;/p&gt;

&lt;p&gt;I didn’t think anything of it when the first driver cancelled our ride after accepting it. Nor the second or third. But by the sixth I started to wonder if it was because the destination was a gay bar. So on the seventh attempt I changed the destination to the short street the bar is on. And lo, the seventh driver accepted our ride, duly arrived, and dropped us off at our destination.&lt;/p&gt;

&lt;p&gt;Obviously it’s not possible to prove anything from this, but it’s pretty compelling circumstantial evidence that should trigger further investigation. That’s why, when I &lt;a href=&quot;https://twitter.com/tfm/status/1140222197367283712&quot;&gt;contacted&lt;/a&gt; Uber, I didn’t care for a refund but I asked that the sea of ride data be put to good use to look for signs of homophobia by drivers. During Pride Month where Uber was proudly flying the rainbow colours everywhere you could, I hoped it may be able to show some meaningful support to the LGBTQ+ community, rather than just a &lt;a href=&quot;https://www.uber.com/us/en/pride/&quot;&gt;website&lt;/a&gt; and a float at Pride.&lt;/p&gt;

&lt;p&gt;My hopes were dashed though, and after much chasing and discussion via your support channels I didn’t get anywhere—save for the refund that I couldn’t care less about—I gave up for a bit as I’d run out of energy. When I recently saw an &lt;a href=&quot;https://www.nbcnews.com/feature/nbc-out/gay-black-passengers-face-more-rideshare-cancellations-study-finds-n1059571&quot;&gt;article&lt;/a&gt; on NBC about a study that identified the same issues I &lt;a href=&quot;https://twitter.com/tfm/status/1177683301647208449&quot;&gt;contacted Uber again&lt;/a&gt;. Since then, once more, I’ve got nowhere. A few empty statements about it being looked into, but nothing more than canned responses. Never in the many communications has anyone even acknowledged my &lt;a href=&quot;https://twitter.com/tfm/status/1140225241052012545&quot;&gt;initial request&lt;/a&gt; to do a systematic review, which I repeated many times.&lt;/p&gt;

&lt;p&gt;I’m writing to you in desperation in the hope of finally being able to get a commitment from Uber to both perform an investigation into systematic homophobia, and put processes in place to identify it on an ongoing basis.&lt;/p&gt;

&lt;p&gt;That same night a friend of mine on his way home from Zurich Pride was beaten up by a gang of thugs shouting homophobic abuse. Although a few Uber drivers cancelling a ride may not seem like much, I firmly believe that every small act of homophobia legitimises others and must be fought.&lt;/p&gt;

&lt;p&gt;I will be in San Francisco in a couple of weeks and would love to meet to discuss this in person so you can hear first-hand how this has affected me.&lt;/p&gt;

&lt;p&gt;Yours sincerely,&lt;/p&gt;

&lt;p&gt;Tom McAdam&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/open-letter-to-ubers-ceo</link>
                <guid>https://tomm.org/tech/open-letter-to-ubers-ceo</guid>
                <pubDate>2019-10-20T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>No to Voter ID</title>
                <description>&lt;p&gt;“I agree with Jacob Rees-Mogg” are words I never expected to pen. However, talking about the shocking treatment of the Windrush Generation, he said&lt;/p&gt;

&lt;blockquote&gt;We are not the sort of country where you are expected to show your papers to prove who you are. The basis of our historic freedoms is that if you go about your business lawfully you never have to prove to the authorities who you are... That is something that is very precious to us.&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;https://www.bbc.co.uk/programmes/b0b2mrxy#playt=00h30m00s&quot;&gt;on Any Questions&lt;/a&gt; this week, which reminded me of the recent trials of voter ID conducted by his own Government in the UK local elections. I couldn’t agree more: no one should be required to produce ID to vote.&lt;/p&gt;

&lt;p&gt;Requiring voters to prove who they are is a fundamental shift in the balance of power between the people and the state and sets the tone of the engagement. The onus is currently on the state to prove I’m lying if I tell a police officer my name, but I would now have to prove who I am to the state to vote.&lt;/p&gt;

&lt;p&gt;Since the state controls issuing of ID, it clearly could manipulate the supply to its advantage. This isn’t just hypothetical: Alabama stood accused of &lt;a href=&quot;https://www.vox.com/policy-and-politics/2017/12/12/16767426/alabama-voter-suppression-senate-moore-jones&quot;&gt;closing&lt;/a&gt; DMV offices in predominantly black counties. They since partially reversed that, but we don’t know why they closed them in the first place.&lt;/p&gt;

&lt;p&gt;There are two further much-discussed reasons why we should fight voter ID. Firstly, as a &lt;a href=&quot;https://www.electoral-reform.org.uk/latest-news-and-research/parliamentary-briefings/letter-sent-to-chloe-smith-mp-minister-for-the-constitution/&quot;&gt;letter&lt;/a&gt; sent by the Electoral Reform Society points out, studies have shown ID requirements disadvantage groups less likely to have ID for socio-economic and accessibility reasons.&lt;/p&gt;

&lt;p&gt;Secondly, there’s no evidence of an actual problem. None of the five boroughs that trialled voter ID had a single reported instance of polling station impersonation in the last decade. Out of 44.6 million votes cast in 2017 there was &lt;a href=&quot;https://www.electoral-reform.org.uk/campaigns/upgrading-our-democracy/voter-id/&quot;&gt;one conviction&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;infogram-embed&quot; data-id=&quot;c2de7e70-9c93-4519-8d47-f180eebf2fbf&quot; data-type=&quot;interactive&quot; data-title=&quot;Scale of Voter Fraud 2015 / 2017&quot;&gt;&lt;/div&gt;
&lt;script&gt;!function(e,t,n,s){var i=&quot;InfogramEmbeds&quot;,o=e.getElementsByTagName(t)[0],d=/^http:/.test(e.location)?&quot;http:&quot;:&quot;https:&quot;;if(/^\/{2}/.test(s)&amp;&amp;(s=d+s),window[i]&amp;&amp;window[i].initialized)window[i].process&amp;&amp;window[i].process();else if(!e.getElementById(n)){var a=e.createElement(t);a.async=1,a.id=n,a.src=s,o.parentNode.insertBefore(a,o)}}(document,&quot;script&quot;,&quot;infogram-async&quot;,&quot;https://e.infogram.com/js/dist/embed-loader-min.js&quot;);&lt;/script&gt;
&lt;div style=&quot;padding:8px 0;font-family:Arial!important;font-size:13px!important;line-height:15px!important;text-align:center;border-top:1px solid #dadada;margin:0 30px&quot;&gt;&lt;a href=&quot;https://infogram.com/c2de7e70-9c93-4519-8d47-f180eebf2fbf&quot; style=&quot;color:#989898!important;text-decoration:none!important;&quot; target=&quot;_blank&quot;&gt;Scale of Voter Fraud 2015 / 2017&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://infogram.com&quot; style=&quot;color:#989898!important;text-decoration:none!important;&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Infogram&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;Obviously there may be fraud going undetected, but if this is a problem big enough to justify disenfranchising segments of the electorate, then let’s see some evidence to say it’s worth doing.&lt;/p&gt;

&lt;p&gt;In two boroughs, a trial was done requiring voters to take their polling card to the polling station. If the Government insists on being seen to be doing something to tackle this non-existent problem, this option is less bad. There will inevitably still be people turned away from polling stations, but it’s probably going to be less discriminatory against particular demographics.&lt;/p&gt;

&lt;p&gt;There must be a referendum if they push forward with this. The people need to vote on changes that affect how their representatives are elected. Those elected representatives can’t be allowed to make changes to the balance of power between the state and the people without the people agreeing to them.&lt;/p&gt;

</description>
                <link>https://tomm.org/politics/no-to-voter-id</link>
                <guid>https://tomm.org/politics/no-to-voter-id</guid>
                <pubDate>2018-05-20T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Prioritising</title>
                <description>&lt;p&gt;Moving to a new city for a new job is a good time for reflection and an opportunity to make some adjustments. I’ve done that, and it turns out it’s all boiled down to one word: prioritisation.&lt;/p&gt;

&lt;h2 id=&quot;the-reset&quot;&gt;The reset&lt;/h2&gt;

&lt;p&gt;I tend to fill my life with a lot of stuff; too much, by some accounts. So I stopped and asked myself&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Where can I be most effective and make the biggest difference to both myself and others?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Where I felt I wasn’t investing sufficient time in something, I made the tough call of whether to spend more time on it and sacrifice something else or just stop doing it.&lt;/p&gt;

&lt;p&gt;An example: a friend and I have been running a server since our university days for a bunch of people to host websites and email. This harks back to an era when you couldn’t rely on an ISP to handle your email and when GitHub pages was but a twinkle in its founder’s eyes. It generally ticks along quite nicely but there are times when it needs attention, be it routine maintenance or something more urgent. To give it the attention it deserved, and reduce our stress levels by reducing the urgency of any problems, we’d have needed to do a bunch of work to add some redundancy. There are many folks doing all this much better than we can, so we’re turning it off. A tough call but the right one.&lt;/p&gt;

&lt;h2 id=&quot;checkpoints&quot;&gt;Checkpoints&lt;/h2&gt;

&lt;p&gt;That exercise was all well and good, but what about keeping an eye on how I’m spending my time on an ongoing basis to stop things piling up or not focussing on something I want to be? For that I’ve got a couple of tricks.&lt;/p&gt;

&lt;p&gt;I set up a quarterly reminder in my calendar called “checkpoint”. When it pops up I know it’s time to spend a little time in the next week or so reflecting on what I’ve been up to and whether I want to change that. I’m finding every three months to be a good frequency: it’s not so often that I’m constantly checking up on myself but it’s often enough that the period is still fresh in my mind. Day-to-day I’m thinking less about long-term and focussing on the now, safe in the knowledge that every few months I’ll take about half an hour to think about what I’m up to. It’s like a trek in the mountains: you’re not looking at the map the whole time (or shouldn’t be). You know where you want to go and every so often you pull out the map to check you’re on the right path, spending the walk soaking in the beautiful scenery rather than staring at the map the whole time. Ok, terrible analogy over.&lt;/p&gt;

&lt;h2 id=&quot;weekly-focus&quot;&gt;Weekly focus&lt;/h2&gt;

&lt;p&gt;I learnt the second trick from a TED Talk by Laura Vanderkam on &lt;a href=&quot;https://www.ted.com/talks/laura_vanderkam_how_to_gain_control_of_your_free_time&quot;&gt;time management&lt;/a&gt;. It compliments the checkpoint idea by deciding a set of weekly priorities. I was already doing that on Friday afternoon at work, reviewing things in my “next” bucket (in the context of Getting Things Done, see below), but this includes my personal life in that process. I have a Google Keep sticky with the handful of things I want to focus on next week; three to five things in each of three lists: me, relationships, and work. Here’s one from a few weeks back:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/list.png&quot; width=&quot;300&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;distractions&quot;&gt;Distractions&lt;/h2&gt;

&lt;p&gt;Priotisation works but there are so many distractions vying for my attention. I’ve done a number of things to reduce that.&lt;/p&gt;

&lt;h3 id=&quot;getting-things-done&quot;&gt;Getting Things Done&lt;/h3&gt;
&lt;p&gt;The biggest is trying, once again, to adopt a Getting Things Done approach. At work I use GMail, and I’ve found a good way of using it for both email and tasks. I’ve used various task lists in the past but I’ve always tired of them quite quickly. I shudder to think what’s lurking in Wunderlist, Remember the Milk, and the so many more I forget the names of. The beauty of this approach is that it actually brings everything together into one place. I’ve realised that $taskapp never stuck because it was always missing a huge chunk of my to-do list in my inbox. It was a pain to keep adding tasks like “Reply to Bob”, so there would effectively be two lists. Making my email the focal point and putting other tasks in there (with a neat calendar reminder trick) fixes that. I still have the occasional wobble and find myself reverting to old habits but I’m getting better. I’ll save the detail on GTD for another post as there’s too much to go into here.&lt;/p&gt;
&lt;h3 id=&quot;noise&quot;&gt;Noise&lt;/h3&gt;
&lt;p&gt;A zero-tolerance policy on marketing emails. Instead of just archiving, I hunted down the unsubscribe link and did so. It proved very effective: my personal email went from a signal to noise ratio of maybe 1 in 20, to about 3 in 4. Whilst it didn’t take long to process those 19 spamish mails, it’s all clutter that you don’t need.&lt;/p&gt;
&lt;h3 id=&quot;notifications&quot;&gt;Notifications&lt;/h3&gt;
&lt;p&gt;Again, aggressively ditch them. Turn off email notifications. That app that’s too attention-seeking? Block its notifications or uninstall it. I’m still figuring out whether to block notifications from messaging apps, see below.&lt;/p&gt;
&lt;h3 id=&quot;im&quot;&gt;IM&lt;/h3&gt;
&lt;p&gt;Reduce the stress in feeling an obligation to reply instantly. I know it’s a midguided obligation: people don’t &lt;em&gt;expect&lt;/em&gt; an immediate response, but I often felt one. “Instant” in the name just means that messages can be sent instantly; there doesn’t need to be an instant reply. I’ve turned off “last seen time” and read receipts and found that really helps.&lt;/p&gt;

&lt;h2 id=&quot;mindfulness&quot;&gt;Mindfulness&lt;/h2&gt;

&lt;p&gt;I’ve mentioned this to a couple of friends and it’s come up how some of it sounds a lot like mindfulness, and I agree. Although each bit may seem quite obvious, I’ve found the cumulative effect really helpful as a way to make sure I’m doing the things I find important to me and be able to really focus on the now, safe in the knowledge that every so often I take some time to reflect on what I’m up to. I’m always looking for other ways to improve on it, so let me know if you’ve got any tricks.&lt;/p&gt;
</description>
                <link>https://tomm.org/misc/prioritising</link>
                <guid>https://tomm.org/misc/prioritising</guid>
                <pubDate>2017-04-08T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Cycling from Porto to Munich</title>
                <description>
&lt;p&gt;The original plan was Land’s End to John O’Groats. But that wasn’t far enough. So, naturally, I decided to ride across Europe instead. In May 2016, I set off from Porto with a rough plan to reach Munich. Six weeks, 3,200 kilometers, and countless pastries later, I actually made it.&lt;/p&gt;

&lt;h2 id=&quot;highlights-reel-40-days-in-4-minutes&quot;&gt;Highlights reel: 40 days in 4 minutes&lt;/h2&gt;

&lt;p&gt;I carried a GoPro to document the suffering. Below is a supercut of the trip: 15 minutes of time-lapse captured every morning, noon, and afternoon, plus a few full videos, condensed into four minutes.&lt;/p&gt;

&lt;div class=&quot;video-container&quot;&gt;
  &lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/4BAEPIVeRsw&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;h2 id=&quot;journal&quot;&gt;Journal&lt;/h2&gt;

&lt;p&gt;I documented the adventure, daily to begin with, then later on each rest day (mostly to prove I was still alive). Below is the complete journal, including a link to each Strava ride for those of you that believe if it wasn’t on Strava it didn’t happen.&lt;/p&gt;

&lt;div class=&quot;content-grid content-grid-1-col&quot;&gt;
   &lt;div class=&quot;content-card content-card-image content-card-small&quot; style=&quot;background-image: url(&apos;/banners/bike-assembled.jpg&apos;);&quot;&gt;
      &lt;div class=&quot;content-card-content&quot;&gt;
        &lt;a href=&quot;/outdoors/day-1&quot; class=&quot;post-link&quot;&gt;
          &lt;h3 class=&quot;content-card-title&quot;&gt;Day 1&lt;/h3&gt;
          &lt;span class=&quot;content-card-meta&quot;&gt;rolling out of Porto&lt;/span&gt;
        &lt;/a&gt;
        &lt;div class=&quot;content-card-stats&quot;&gt;
          Day 1: &lt;a href=&quot;https://www.strava.com/activities/587261523&quot;&gt;101km distance / 1533m climbing&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;

   &lt;div class=&quot;content-card content-card-image content-card-small&quot; style=&quot;background-image: url(&apos;/banners/no-bikes.jpg&apos;);&quot;&gt;
      &lt;div class=&quot;content-card-content&quot;&gt;
        &lt;a href=&quot;/outdoors/to-santiago&quot; class=&quot;post-link&quot;&gt;
          &lt;h3 class=&quot;content-card-title&quot;&gt;Day 2&lt;/h3&gt;
          &lt;span class=&quot;content-card-meta&quot;&gt;to Santiago de Compostela&lt;/span&gt;
        &lt;/a&gt;
        &lt;div class=&quot;content-card-stats&quot;&gt;
          Day 2: &lt;a href=&quot;https://www.strava.com/activities/587262470&quot;&gt;130km / 1675m&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;

   &lt;div class=&quot;content-card content-card-image content-card-small&quot; style=&quot;background-image: url(&apos;/banners/melide.jpg&apos;);&quot;&gt;
      &lt;div class=&quot;content-card-content&quot;&gt;
        &lt;a href=&quot;/outdoors/day-3-to-melide-and-rest&quot; class=&quot;post-link&quot;&gt;
          &lt;h3 class=&quot;content-card-title&quot;&gt;Day 3&lt;/h3&gt;
          &lt;span class=&quot;content-card-meta&quot;&gt;to Melide&lt;/span&gt;
        &lt;/a&gt;
        &lt;div class=&quot;content-card-stats&quot;&gt;
          Day 3: &lt;a href=&quot;https://www.strava.com/activities/587967090&quot;&gt;54km / 1010m&lt;/a&gt;&lt;br /&gt;
          Day 4: Rest
        &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;

   &lt;div class=&quot;content-card content-card-image content-card-small&quot; style=&quot;background-image: url(&apos;/banners/to-leon.jpg&apos;);&quot;&gt;
      &lt;div class=&quot;content-card-content&quot;&gt;
        &lt;a href=&quot;/outdoors/days-5-to-7-to-leon&quot; class=&quot;post-link&quot;&gt;
          &lt;h3 class=&quot;content-card-title&quot;&gt;Days 5-7&lt;/h3&gt;
          &lt;span class=&quot;content-card-meta&quot;&gt;to León&lt;/span&gt;
        &lt;/a&gt;
        &lt;div class=&quot;content-card-stats&quot;&gt;
          Day 5: &lt;a href=&quot;https://www.strava.com/activities/589724748&quot;&gt;109km / 2700m&lt;/a&gt;&lt;br /&gt;
          Day 6: &lt;a href=&quot;https://www.strava.com/activities/590630311&quot;&gt;112km / 2100m&lt;/a&gt;&lt;br /&gt;
          Day 7: &lt;a href=&quot;https://www.strava.com/activities/591694845&quot;&gt;53km / 325m&lt;/a&gt;&lt;br /&gt;
          Day 8: Rest
        &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;

   &lt;div class=&quot;content-card content-card-image content-card-small&quot; style=&quot;background-image: url(&apos;/banners/to-santillana-del-mar.jpg&apos;);&quot;&gt;
       &lt;div class=&quot;content-card-content&quot;&gt;
         &lt;a href=&quot;/outdoors/leon-to-santillana-del-mar&quot; class=&quot;post-link&quot;&gt;
           &lt;h3 class=&quot;content-card-title&quot;&gt;Days 9-12&lt;/h3&gt;
           &lt;span class=&quot;content-card-meta&quot;&gt;to Santillana del Mar&lt;/span&gt;
         &lt;/a&gt;
         &lt;div class=&quot;content-card-stats&quot;&gt;
           Day 9: &lt;a href=&quot;https://www.strava.com/activities/594003825&quot;&gt;95km / 537m&lt;/a&gt;&lt;br /&gt;
           Day 10: &lt;a href=&quot;https://www.strava.com/activities/595017842&quot;&gt;93km / 1530m&lt;/a&gt;&lt;br /&gt;
           Day 11: &lt;a href=&quot;https://www.strava.com/activities/596032602&quot;&gt;71km / 1500m&lt;/a&gt;&lt;br /&gt;
           Day 12: Rest
         &lt;/div&gt;
       &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class=&quot;content-card content-card-image content-card-small&quot; style=&quot;background-image: url(&apos;/banners/pamplona.jpg&apos;);&quot;&gt;
       &lt;div class=&quot;content-card-content&quot;&gt;
         &lt;a href=&quot;/outdoors/santillana-del-mar-to-pamplona&quot; class=&quot;post-link&quot;&gt;
           &lt;h3 class=&quot;content-card-title&quot;&gt;Days 13-16&lt;/h3&gt;
           &lt;span class=&quot;content-card-meta&quot;&gt;to Pamplona&lt;/span&gt;
         &lt;/a&gt;
         &lt;div class=&quot;content-card-stats&quot;&gt;
           Day 13: &lt;a href=&quot;https://www.strava.com/activities/598326013&quot;&gt;137km / 2300m&lt;/a&gt;&lt;br /&gt;
           Day 14: &lt;a href=&quot;https://www.strava.com/activities/599286302&quot;&gt;104km / 1957m&lt;/a&gt;&lt;br /&gt;
           Day 15: &lt;a href=&quot;https://www.strava.com/activities/600391424&quot;&gt;66km / 1175m&lt;/a&gt;&lt;br /&gt;
           Day 16: Rest
         &lt;/div&gt;
       &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class=&quot;content-card content-card-image content-card-small&quot; style=&quot;background-image: url(&apos;/banners/pyrenees.jpg&apos;);&quot;&gt;
       &lt;div class=&quot;content-card-content&quot;&gt;
         &lt;a href=&quot;/outdoors/over-the-pyrenees&quot; class=&quot;post-link&quot;&gt;
           &lt;h3 class=&quot;content-card-title&quot;&gt;Days 17-20&lt;/h3&gt;
           &lt;span class=&quot;content-card-meta&quot;&gt;over the Pyrenees to France&lt;/span&gt;
         &lt;/a&gt;
         &lt;div class=&quot;content-card-stats&quot;&gt;
           Day 17: &lt;a href=&quot;https://www.strava.com/activities/602724239&quot;&gt;136km / 1820m&lt;/a&gt;&lt;br /&gt;
           Day 18: &lt;a href=&quot;https://www.strava.com/activities/603632488&quot;&gt;78km / 2188m&lt;/a&gt;&lt;br /&gt;
           Day 19: &lt;a href=&quot;https://www.strava.com/activities/605841475&quot;&gt;72km / 793m&lt;/a&gt;&lt;br /&gt;
           Day 20: Rest - Tourmalet &lt;a href=&quot;https://www.strava.com/activities/605756131&quot;&gt;100km / 2577m&lt;/a&gt;
         &lt;/div&gt;
       &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class=&quot;content-card content-card-image content-card-small&quot; style=&quot;background-image: url(&apos;/banners/languedoc.jpg&apos;);&quot;&gt;
       &lt;div class=&quot;content-card-content&quot;&gt;
         &lt;a href=&quot;/outdoors/pyrenees-to-languedoc&quot; class=&quot;post-link&quot;&gt;
           &lt;h3 class=&quot;content-card-title&quot;&gt;Days 21-24&lt;/h3&gt;
           &lt;span class=&quot;content-card-meta&quot;&gt;to Languedoc&lt;/span&gt;
         &lt;/a&gt;
         &lt;div class=&quot;content-card-stats&quot;&gt;
           Day 21: &lt;a href=&quot;https://www.strava.com/activities/607052545&quot;&gt;122km / 858m&lt;/a&gt;&lt;br /&gt;
           Day 22: &lt;a href=&quot;https://www.strava.com/activities/608221354&quot;&gt;82km / 393m&lt;/a&gt;&lt;br /&gt;
           Day 23: &lt;a href=&quot;https://www.strava.com/activities/608889294&quot;&gt;107km / 1207m&lt;/a&gt;&lt;br /&gt;
           Day 24: Rest
         &lt;/div&gt;
       &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class=&quot;content-card content-card-image content-card-small&quot; style=&quot;background-image: url(&apos;/banners/grenoble.jpg&apos;);&quot;&gt;
       &lt;div class=&quot;content-card-content&quot;&gt;
         &lt;a href=&quot;/outdoors/to-grenoble&quot; class=&quot;post-link&quot;&gt;
           &lt;h3 class=&quot;content-card-title&quot;&gt;Days 25-29&lt;/h3&gt;
           &lt;span class=&quot;content-card-meta&quot;&gt;to Grenoble&lt;/span&gt;
         &lt;/a&gt;
         &lt;div class=&quot;content-card-stats&quot;&gt;
           Day 25: &lt;a href=&quot;https://www.strava.com/activities/611152454&quot;&gt;130km / 323m&lt;/a&gt;&lt;br /&gt;
           Day 26: &lt;a href=&quot;https://www.strava.com/activities/611999987&quot;&gt;102km / 878m&lt;/a&gt;&lt;br /&gt;
           Day 27: &lt;a href=&quot;https://www.strava.com/activities/612822170&quot;&gt;105km / 1038m&lt;/a&gt;&lt;br /&gt;
           Day 28: &lt;a href=&quot;https://www.strava.com/activities/614265662&quot;&gt;70km / 290m&lt;/a&gt;&lt;br /&gt;
           Day 29: Rest
         &lt;/div&gt;
       &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class=&quot;content-card content-card-image content-card-small&quot; style=&quot;background-image: url(&apos;/banners/glandon-ascent.jpg&apos;);&quot;&gt;
       &lt;div class=&quot;content-card-content&quot;&gt;
         &lt;a href=&quot;/outdoors/grenoble-to-zurich&quot; class=&quot;post-link&quot;&gt;
           &lt;h3 class=&quot;content-card-title&quot;&gt;Days 30-37&lt;/h3&gt;
           &lt;span class=&quot;content-card-meta&quot;&gt;Grenoble to Zurich&lt;/span&gt;
         &lt;/a&gt;
         &lt;div class=&quot;content-card-stats&quot;&gt;
           Day 30: &lt;a href=&quot;https://www.strava.com/activities/616121055&quot;&gt;98km / 3086m&lt;/a&gt;&lt;br /&gt;
           Day 31: &lt;a href=&quot;https://www.strava.com/activities/618339466&quot;&gt;98km / 1886m&lt;/a&gt;&lt;br /&gt;
           Day 32: &lt;a href=&quot;https://www.strava.com/activities/618304389&quot;&gt;99km / 2819m&lt;/a&gt;&lt;br /&gt;
           Day 33: Rest&lt;br /&gt;
           Day 34: &lt;a href=&quot;https://www.strava.com/activities/620150725&quot;&gt;111km / 1411m&lt;/a&gt;&lt;br /&gt;
           Day 35: &lt;a href=&quot;https://www.strava.com/activities/621575086&quot;&gt;107km / 2825m&lt;/a&gt;&lt;br /&gt;
           Day 36: &lt;a href=&quot;https://www.strava.com/activities/622695486&quot;&gt;111km / 1357m&lt;/a&gt;&lt;br /&gt;
           Day 37: Rest
         &lt;/div&gt;
       &lt;/div&gt;
    &lt;/div&gt;

     &lt;div class=&quot;content-card content-card-image content-card-small&quot; style=&quot;background-image: url(&apos;/banners/munich-beer.jpg&apos;);&quot;&gt;
       &lt;div class=&quot;content-card-content&quot;&gt;
         &lt;a href=&quot;/outdoors/to-munich&quot; class=&quot;post-link&quot;&gt;
           &lt;h3 class=&quot;content-card-title&quot;&gt;Days 38-41&lt;/h3&gt;
           &lt;span class=&quot;content-card-meta&quot;&gt;to Munich!&lt;/span&gt;
         &lt;/a&gt;
         &lt;div class=&quot;content-card-stats&quot;&gt;
           Day 38: &lt;a href=&quot;https://www.strava.com/activities/624987215&quot;&gt;98km / 1247m&lt;/a&gt;&lt;br /&gt;
           Day 39: &lt;a href=&quot;https://www.strava.com/activities/625692519&quot;&gt;114km / 1129m&lt;/a&gt;&lt;br /&gt;
           Day 40: &lt;a href=&quot;https://www.strava.com/activities/626533790&quot;&gt;97km / 546m&lt;/a&gt;
         &lt;/div&gt;
       &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;h2 id=&quot;retrospective&quot;&gt;Retrospective&lt;/h2&gt;

&lt;p&gt;Afterwards, I wrote a &lt;a href=&quot;retrospective&quot;&gt;retrospective&lt;/a&gt; on how it went.&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/porto-to-munich</link>
                <guid>https://tomm.org/outdoors/porto-to-munich</guid>
                <pubDate>2016-11-10T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>The Volcanoes</title>
                <description>&lt;p&gt;As you may have noticed, I’ve so far failed to write about my South American adventures. Fear not, I have been taking notes and I’ll turn them into some coherent words soon. Today, however, I’m going to write out of sequence about the last week in Ecuador, where I’ve been preparing for a big climb on Saturday night.&lt;/p&gt;

&lt;p&gt;The beautiful &lt;a href=&quot;https://www.instagram.com/p/BJLyLOJgn-d/&quot;&gt;Cayambe&lt;/a&gt; was my first stop on Tuesday. Ascending to around 5150 metres, it was the perfect location to combine some acclimatisation and snow training. Well, it would’ve been save for the vicious wind and snow. Good bad weather training, though. I was joined by a journalist who’s on a work trip writing about climbing in Ecuador. Yes, I’m sure travel writing sounds more glamorous than it actually is, but it really doesn’ t sound like a tough existence. A couple of hours with crampons and ice axes going up 60 degree slopes was actually quite straightforward once we got into the rythym, although I really wish I’d worn my thermal trousers; it would’ve helped to stop bits going numb that really shouldn’t.&lt;/p&gt;

&lt;p&gt;Next stop was &lt;a href=&quot;https://www.instagram.com/p/BJOtwJ9Afej/&quot;&gt;Ruminawi&lt;/a&gt;. At 4730 metres, it was my biggest climb so far (we got a 4x4 most of the way up Cayambe). It was all quite straightforward until the last 300 metres or so, with some scree slopes and then some rock scrambling at the top. We were rewarded with a condor coming to see what we were up to, sweeping down into the valley below when it got bored of us.&lt;/p&gt;

&lt;p&gt;Thursday saw an aborted attempt of Illianiz North. A shame, but the weather had better ideas about our climb than us. We did get to the refuge at 4700 metres but a combination of the bad weather and quite a slow pace meant we just enjoyed a nice cuppa in the refuge before heading back down, witnessing &lt;a href=&quot;https://www.instagram.com/p/BJTeIV4g3cc/&quot;&gt;some stunning views&lt;/a&gt; on the way.&lt;/p&gt;

&lt;p&gt;I’m currently sat in the refuge on &lt;a href=&quot;https://www.instagram.com/p/BJTeNioAwGP/&quot;&gt;Cotopaxi&lt;/a&gt;, where we’re spending an hour at 4860 metres drinking hot chocolate for a final bit of acclimatisation ahead of tomorrow night. I’m feeling good, so fingers crossed I’ve done enough…&lt;/p&gt;

&lt;p&gt;After the climb on Sunday I’ll be heading straight to the coast for a bit of doing absolutely nothing for the final week before the trip comes to an end with the flight back to London.&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/the-volcanoes</link>
                <guid>https://tomm.org/outdoors/the-volcanoes</guid>
                <pubDate>2016-08-19T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Days 38 to 41: to Munich</title>
                <description>&lt;p&gt;It’s with a very slightly sore head I write this final chapter in the diary of my pedal from Porto to Munich. When the waitress said they only served the beer in steins, I thought that would be fine. It was, last night. Beer goes down very well when you’re dehydrated after a 95 kilometre ride, sat in a sunny beer garden.&lt;/p&gt;

&lt;p&gt;Anyway, back to the final 3 days of cycling from Zurich to Munich. The weather forecast didn’t look great and lived up to its prediction of rain. The first only saw some light rain which was more than made up for by my arrival in Germany and both reasonable priced everything and beer gardens.&lt;/p&gt;

&lt;p&gt;Day two had the perfect storm of torrential rain and routing trying to take me down so many dirt tracks I lost count. I’ve long since learnt my lesson of not trusting the blighters so at the first sight of an unsealed road a hasty rerouting ensued every time. Many times. Both Strava and Google really really need to understand the difference between road and mountain bikes (the former being something one should ride, the latter not, of course).&lt;/p&gt;

&lt;p&gt;In what seems a blink of an eye, the final day’s cycling was upon me yesterday. It both feels like only yesterday and an age ago that I was unpacking my bike in Porto. The rain cleared, making way to perfect riding conditions: sunny and not too hot at 26 degrees. A whole 13 degrees off the trip maximum, thankfully. Some hasty rerouting was again required, adding an extra 10 kms or so to the day, which ended up being quite fortunate as I wheeled up to the hotel in Munich having done exactly 3200 km since leaving Porto. Had it been 3190 km I’d have had to go round the block a few times…&lt;/p&gt;

&lt;p&gt;It’s still sinking in that I’ve actually made it. Right now today feels like any other rest day: sore legs, slow morning writing my diary. When I don’t get in the saddle tomorrow it may start dawning on me that I’m actually done. The only apparent casualties are my wrists, which are complaining quite a lot at all the cycling. So much so that I’ve taken to the high-risk strategy of leaving toilet doors with stiff locks unlocked for fear of getting stuck in.&lt;/p&gt;

&lt;p&gt;Now’s a good time to revise those stats I posted a while back from the French side of the Pyrenees:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;5: number of countries travelled through&lt;/li&gt;
  &lt;li&gt;3,200: kilometers cycled&lt;/li&gt;
  &lt;li&gt;47,137: metres climbing&lt;/li&gt;
  &lt;li&gt;2: attempted routings via motorways&lt;/li&gt;
  &lt;li&gt;Countless: attempted routings on dirt tracks, but still only succeeded in doing so twice when I had no choice but to follow it&lt;/li&gt;
  &lt;li&gt;2: attempted routings via non-existent roads&lt;/li&gt;
  &lt;li&gt;0: punctures (yes, 0 punctures in 3,200 kms. Gatorskins are amazing)&lt;/li&gt;
  &lt;li&gt;1: mechanical (if you can call a chain coming off a mechanical)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Annoyingly I screwed up my destination and won’t be able to get over to France in time to start the Tour today, maybe next year. I did, however, cycle about the same distance as the Tour, albeit at a slightly more relaxed pace but then again I don’t see them with pannier bags.&lt;/p&gt;

&lt;p&gt;So here the adventure ends. A lazy couple of days ahead in Munich sampling the delights of beer gardens before I head back to London on Monday to see what remains of the UK. I did look at the map yesterday and contemplate just keeping riding east, but that’s for another trip. And another trip there will be. This whole travelling by bike thing is amazing, I’m a convert! The pace at which it let’s you explore beautiful places is perfect: in a car things would whizz by without you being able to take them in, and by foot you just can’t cover the ground. That day in the Alpes with Mont Blanc looking down at me all day long sealed the deal. Only question is: where to for the next trip?&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/to-munich</link>
                <guid>https://tomm.org/outdoors/to-munich</guid>
                <pubDate>2016-07-02T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Days 30 to 37: Grenoble to Zurich</title>
                <description>
&lt;p&gt;I’m really not in the mood for writing this but here goes. And we’ve got a lot to cover, too, all the way from Grenoble through to Zurich, so make yourself comfortable.&lt;/p&gt;

&lt;p&gt;I fretted over the route from Grenoble through to Zurich for a bit but finally decided to take the route through the Alpes via Chamonix rather than going via Geneva. I’m glad I did. My legs aren’t, but the rest of me is. On the downside it meant doing Alp D’Huez with luggage rather than leaving it safely stashed with Stevan and Sophie for a day, and it also meant a lot more climbing. Upsides include the route from Albertville to Chamonix where I spent much of the day with Mont Blanc peering down on me.&lt;/p&gt;

&lt;p&gt;So, after waving goodbye to some familiar faces in Grenoble, a tough three days’ riding to Vallorcine for my last rest day. Alp D’Huez was good fun, less so the final climb of the day up to a ski resort where I’d booked a chalet for the night. I’d had a cunning plan to go over the top of Huez down to the resort but was flummoxed by the “road” being only suitable for 4x4s. So, down and up it was. The Strava segment “Who booked this place?” said it all. Arriving completely off-season, it was touch and go if anywhere was even open for dinner, but the only place open in town thankfully rustled something up for me.&lt;/p&gt;

&lt;p&gt;Col du Glandon the next day was quite the challenge after Huez but the comments of the cyclist near the top on seeing my bags of “Bravo! I give you all my respect” and the &lt;a href=&quot;https://www.instagram.com/p/BG9CZR6uI9F/&quot;&gt;wonderful scenery&lt;/a&gt; were enough to get me through the final climb. Albertville, my overnight stop, didn’t really endear me as a place but I did happen upon a wonderful family run French restaurant, which was great after I’d resigned myself to eating at the generic bbq chain near the hotel.&lt;/p&gt;

&lt;p&gt;Mont Blanc &lt;a href=&quot;https://www.instagram.com/p/BG_YicsuI38/&quot;&gt;popped into view&lt;/a&gt; in the distance as I finished the first climb of the day out of Albertville and then kept me company for most of the ride to Vallorcine. I’d left early that day to avoid the predicted hot afternoon but things were slower going than I’d hoped (and a leisurely lunch in Chamonix didn’t help) so I ended up out in the sweltering 37 degree afternoon heat anyway. Oops.&lt;/p&gt;

&lt;p&gt;Vallorcine is a small Swiss/French border village sat &lt;a href=&quot;https://www.instagram.com/p/BHAjROduI-H/&quot;&gt;snugly in the mountains&lt;/a&gt;, which had the pleasure of my company for the referendum result. A much-needed rest day after 300 kms and around 8,000 m of climbing. You can see that my 110/110/50 km day plan has gone out the window of late; the ride via Chamonix was a bit longer than the Geneva route and I wanted to make sure I hit my rest day in Zurich. The rest day in Vallorcine wasn’t so much that, either, having got up at 4.45 when I couldn’t sleep any more. I wish I hadn’t. I’m not going to go on about the result here, I’ve done that elsewhere. It was fortuitous to have stumbled on a B&amp;amp;B run by Brits though, complete with British TV, so I was able to glue myself to rolling BBC coverage until I could face it no more.&lt;/p&gt;

&lt;p&gt;I’d been poring over the weather forecast for a few days since big thunderstorms were forecast on Saturday and I’m not a huge fan of lightning when on my bike. There were some forecast early Saturday in Vallorcine, then more later in the day at my destination, Visp. If I was lucky, there was a window during the day I could do the ride into Switzerland if I got up early. So, a 6.15 departure it was. The storm in Vallorcine had gone through a couple of hours earlier, so I just needed to avoid the second one. Nothing like a bit of torrential rain to start the day with, but that soon cleared up as I descended into the Rhone Valley. Right on cue, at around midday, the clouds started getting greyer and tumbling down the mountain. Glancing behind me every few minutes, the sky was getting darker and darker, and I still had about 25 kms to go. Deciding to make a dash for it, and helped by a sturdy tailwind, I raced the storm down the valley and was about 200 metres from the hotel when the I heard the first clap of thunder. Turns out I also got a top speed of 73 km/h in the process. Helped massively by the tailwind of course.&lt;/p&gt;

&lt;p&gt;Sunday was the final big climb of my trip, &lt;a href=&quot;https://www.instagram.com/p/BHHg4PagoLc/&quot;&gt;over Furkapass&lt;/a&gt; to then drop down to Zurich. My legs weren’t feeling particularly great and it took all my willpower not to succumb to the very tempting train that goes through rather than over the mountain. The ascent turned out to not be too terrible but that was made up for by the descent, with the mountain doused in cloud most of the way.&lt;/p&gt;

&lt;p&gt;The long downhill to Zurich yesterday was a welcome respite for my legs, although the roads were probably the busiest I’ve been on and Swiss lorry drives now have the prize for being the least considerate of my trip. Quite unpleasant at times, I was very relieved when I turned off the main road to embark on the small climb up and over a hill and down into Zurich, with a more pleasant pedal by the lake to finish on.&lt;/p&gt;

&lt;p&gt;And so the ride nearly draws to a close. It’s looking like I’ll have clocked up about 3,200 kms of riding over the six weeks and around 41 kms of climbing. As of yet, no punctures. Let’s see if I can make it to Munich without one…&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/grenoble-to-zurich</link>
                <guid>https://tomm.org/outdoors/grenoble-to-zurich</guid>
                <pubDate>2016-06-28T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Brexit</title>
                <description>
&lt;p&gt;It’s a shame I’m penning my update for the three most dramatic days of cycling under the cloud of the EU referendum result. I couldn’t bring myself to write yesterday on my rest day as I usually would and even now can only do it because I’m going to go on a diversion first to write about the result as I need to clear my head of it before I can write about the ride.&lt;/p&gt;

&lt;p&gt;I gave up trying to sleep at 4.45 yesterday morning and decamped to the television to watch the results come in. At around 5.40 (I think) the BBC called it as leave. For the rest of the day I went through cycles of shock, anger, disbelief and sadness.&lt;/p&gt;

&lt;p&gt;It was clear from the moment the result was called this was not about the EU. This was a proxy vote by a disenfranchised electorate against “the establishment” as many people have called it, but more obviously against the chasm between the poor and the more well-off. It was captured most vividly in the immigration argument. Many people blame immigration for all their problems: lack of jobs, housing, pushing down wages, infrastructure bursting at the seams. This is obviously not the fault of immigration but is easy to convince people it is. It is the failure of successive governments to plan, invest and legislate for employment rights. Being abroad, I didn’t manage to see much of the campaigning, but from the little bits I saw it seemed that the remain campaign shied away from this argument, focusing on the more abstract “immigration is good for the country”. They should have specifically addressed the challenges that immigration poses, or is perceived to pose, head-on and talked about what needs to be done to address them: more money. Bearing in mind immigrants are net contributers to the Treasury, this should have been an easy argument to have. It seems they were scared to talk too much about it, though.&lt;/p&gt;

&lt;p&gt;Some blame must be apportioned to our parliamentary voting system too. First Past The Post means that people are used to their votes not counting, so them being used as a protest vote. The idea that every vote matters is an alien concept when we are so used to either having wasted votes or having to vote tactically. This was captured brilliantly by the &lt;a href=&quot;http://theslot.jezebel.com/man-who-voted-for-brexit-is-a-bit-shocked-his-vote-coun-1782553004&quot;&gt;now-famous Adam&lt;/a&gt; who, when interviewed, confessed he was shocked that leave had won even though he’d voted leave, and didn’t think his vote would count.&lt;/p&gt;

&lt;p&gt;And, of course, the lion’s share of the blame is reserved for David Cameron and Boris Johnson. Without the former, we’d never have had the referendum, and without the latter it may never have gone in favour of leave. I don’t see how the nation can unite in a time of need under a prime minister who callously used the campaign to get the keys to Number 10, and who history may decide was responsible for the beginning of the end of the European project, a project that has seen the longest period of stability in the region ever.&lt;/p&gt;

&lt;p&gt;I’ve heard some people say this was “democracy in action” and “the people have spoken”  so we have to respect it. I’d rather not live in a democracy if this is the face of it. Both sides executed campaigns of fear and sometimes resorted to downright lies. The fear exploited the vulnerabilities of communities that have been neglected for generations, where it’s easy to peddle a story that their problems are down to immigration. Even though it’s not the result I wanted, I would respect it if I thought those who voted to leave did so in possession of some facts, rather than having been exploited. I don’t think the vast majority of those who voted to leave did, so I can’t respect or accept this result.&lt;/p&gt;

&lt;p&gt;The UK now faces many challenges. Quite aside from the economy tanking and the uncertainties around the deals that will be struck in the exit, the most worrying is the effect on the young. Not only will they be the worst affected in any slowdown, they also feel cheated by the old inflicting this on them, and taking them out of a union they wanted to be part of. A great way to create an entire new generation of disaffected youth who struggle to get jobs, neatly following those that started their working lives during and in the aftermath of the 2008 recession.&lt;/p&gt;

&lt;p&gt;Of all the votes to have as a vote of no confidence in our political system, we’d have done better to choose one without such devastating ramifications.&lt;/p&gt;
</description>
                <link>https://tomm.org/politics/brexit</link>
                <guid>https://tomm.org/politics/brexit</guid>
                <pubDate>2016-06-25T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Days 25 to 29: to Grenoble</title>
                <description>
&lt;p&gt;My inner dread probably isn’t coming across to any of the other cafe-dwellers enjoying their morning fix. Tomorrow sees me heading up into the Alpes, starting with the infamous Alp D’Huez. After some deliberation I’ve settled on a route heading over to Chamonix then down to the Rhone Valley in Switzerland to arrive in Zurich a week today. That means the next three days each has at least 2,000 metres of climbing. Should be fun; it will take my mind off this Thursday at least. And I say dread, but I’m obviously looking forward to it too. I think.&lt;/p&gt;

&lt;p&gt;In a break from my tried and tested pattern, it’s been four days’ cycling from Magalas to get here, with over 400 kms covered to get a rest day in ahead of tomorrow’s fun. With rain predicted for two of the days, I got very lucky and was only caught out 15 minutes before arriving in Grenoble yesterday. I got less lucky with being sick.&lt;/p&gt;

&lt;p&gt;Entirely my own fault but, enjoying the rare treat of not having pizza, I stupidly had steak tartare in a nice little place in Magalas the day before my rest day (the “rare” pun was unintended by the way). Things weren’t too terrible on the rest day itself but 90 kms into my ride the day after, following a very pleasant coastal ride, my stomach quite rightly started questioning what was going in and complained in quite a painful fashion. I hobbled through to my overnight stop in Saturargues where, when the proprietor of the place I was staying in saw I wasn’t keen on the only place in town for dinner—a pizza van—he kindly rustled up a pasta feast instead. Thankfully things started settling down the next day.&lt;/p&gt;

&lt;p&gt;My legs welcomed the flat route between Magalas and Grenoble, with only around 2,400 metres of climbing over the 4 days. The beautiful flat countryside has been quite the contrast from Spain and the Pyrenees. I’m not entirely sure the owner of the place in Magalas quite got the gist of my trip after I explained it to him, though, as he offered to drive me to Grenoble in his van. A very kind offer but it would be quite a different experience hitchhiking with my bike between Porto and Munich.&lt;/p&gt;

&lt;p&gt;I’ve grown to be quite suspicious of routes following rivers, after a few bad dirt track experiences lately, so when I saw the route into Grenoble hugged the Isère for about 30 kms I was expecting to have to reroute onto the nearby main road. After a chat with a restaurant owner en route (where I had a strange experience of a 75-year-old man coming over and shaking my hand for no apparent reason) he convinced me it was a great route and indeed it was &lt;a href=&quot;https://www.instagram.com/p/BG1aS_UOI2J/&quot;&gt;fantastic&lt;/a&gt;. After some confusion about the hand-shaking, the owner explained that the man had been a keen cyclist and had clearly noticed my Tourmalet jersey. I’ve had a number of beeps and now a hand shake due to it now; worth the investment!&lt;/p&gt;

&lt;p&gt;Time to go stock up on supplies for the next few days. I’ll be finding out the referendum result from up in the mountains on my next rest day so it if goes the wrong way I may just not come down. Perhaps I should buy supplies for more than a few days.&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/to-grenoble</link>
                <guid>https://tomm.org/outdoors/to-grenoble</guid>
                <pubDate>2016-06-20T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Days 21 to 24: Pyrenees to Languedoc</title>
                <description>
&lt;p&gt;Sleepy, pretty towns are two-a-penny throughout the south of France. A few years back we rented a villa in one such town, which I never expected to come back to. My route took me nearby, though, so I decided a little detour was in order to come back to say hello. I’m glad I did, given the great place I found to stay.&lt;/p&gt;

&lt;p&gt;This rest day was much-needed after the last 700 kms or so without one. As avid readers will recall, my last rest day was traded for a climb of Tourmalet in the Pyrenees. Combined with some longer rides to get me here, Magalas, to be able to spend the rest day here, I was very relieved at the prospect of not riding today. Except a quick jaunt to the supermarket of course.&lt;/p&gt;

&lt;p&gt;The three days from Bagneres saw heavy, sometimes torrential rain for about a day and a half but, as the long descent into the wine valley progressed, so the &lt;a href=&quot;https://www.instagram.com/p/BGo6ugOuI7T/&quot;&gt;clouds cleared&lt;/a&gt;. In a similar vein, the terrible motel I stayed in on day 22 was replaced on day 23 with a wonderful venue, &lt;a href=&quot;https://www.instagram.com/p/BGo67uQOI77/&quot;&gt;complete with pool&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Today’s planning of the next week has shown me to have been quite the optimist in planning the rough route through the Alps from the comfort of my living room. I’m not quite sure what I was thinking when I came up with about 4,000 metres of climbing one day but that clearly isn’t going to work. My legs will be a lot happier for the rerouting I figured out sat by the pool earlier.&lt;/p&gt;

&lt;p&gt;A few notes from the the last few days&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An unsealed road never improves in quality. Don&apos;t let one tempt you down it,  however OK it looks. &lt;/li&gt;
&lt;li&gt;No one ever regretted putting on overshoes at the first sight of rain. The opposite cannot be said. &lt;/li&gt;
&lt;li&gt;I give up on the UK democratic system. &lt;/li&gt;
&lt;li&gt;There is such a thing as having pizza too often. &lt;/li&gt;
&lt;li&gt;I give up on the UK democratic system. I can&apos;t bring myself to mention the US democratic system. &lt;/li&gt;
&lt;li&gt;I need to figure out how to report phantom roads on OSM.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My next stop will find me in Grenoble where I’ll need a good rest ahead of Alp D’Huez. Until then!&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/pyrenees-to-languedoc</link>
                <guid>https://tomm.org/outdoors/pyrenees-to-languedoc</guid>
                <pubDate>2016-06-15T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Days 17 to 20: Over the Pyrenees!</title>
                <description>&lt;p&gt;One of the great things about travelling is the random decisions you make that have wonderful outcomes. At the last minute I changed the destination for my latest rest day to Bagneres instead of Lourdes, as it gave me a better base from which to both tackle Tourmalet (more on that later) and a good trajectory for my journey into Languedoc next week. As a consequence, I happened upon &lt;a href=&quot;https://www.tripadvisor.com/Hotel_Review-g660466-d1438174-Reviews-Au_chat_ronfleur-Bagneres_de_Bigorre_Hautes_Pyrenees_Midi_Pyrenees.html&quot;&gt;Au Chat Ronfleur&lt;/a&gt;. Thankfully, in my haste to book I didn’t quite notice the name as I’d have had second thoughts given my views on (allergies to) cats.&lt;/p&gt;

&lt;p&gt;On arrival I met the lovely owner, who immediately made me feel at home and surprised me by offering to wash my clothes. After three weeks of hand washing clothes badly, you have no idea how great some freshly washed clothes feel to wear. She also gave me a quick run-through of what’s good to visit in the town and, given the 1400 km I’d cycled, the hot baths sounded like a perfect way to spend the afternoon. Except I didn’t have any swimming shorts. “No problem, my son’s about your size, you can borrow some of his”. Great! Except they were very, er, “French” swimming shorts. Let’s just say I’m glad I won’t be meeting any of the people from the hot baths again. They may see me for years to come in their nightmares, mind. The outdoor jacuzzi in the rain was worth it though.&lt;/p&gt;

&lt;p&gt;The last few days from Pamplona over the Pyrenees into France saw a rather warm 136 km ride out of Pamplona on Wednesday, where it hit 39 degrees in the mid-afternoon heat. I learnt my lesson on Thursday and got out at sunrise to be settled in a cafe at my destination, Laruns, by the time it got toasty. There’s been so much stunning scenery over the last few days, it’s surprising I’ve got any cycling done with all the photo stops.&lt;/p&gt;

&lt;p&gt;Today is supposed to be a rest day but when there are iconic Tour de France climbs to be done, who needs to rest? Instead of trying to tackle Tourmalet yesterday with all my luggage I decided today would be the day. And I’m thankful for that decision. It was tough enough without luggage, I can only image what another 12 kgs would’ve felt like. Great fun though, especially trying to pass a herd of cattle when coming off the mountain.&lt;/p&gt;

&lt;p&gt;So here I am in Bagneres, half way into my 6-week ride. Let’s look at some numbers.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Country number 3&lt;/li&gt;
  &lt;li&gt;1,510 km cycled&lt;/li&gt;
  &lt;li&gt;22,000 metres climbing&lt;/li&gt;
  &lt;li&gt;Routing has attempted to take me on 2 motorways&lt;/li&gt;
  &lt;li&gt;It’s attempted to take me down dirt tracks 5 times, and succeeded in doing so twice when I had no choice but to follow it&lt;/li&gt;
  &lt;li&gt;0 punctures&lt;/li&gt;
  &lt;li&gt;1 mechanical (if you can call a chain coming off a mechanical)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now it’s on to Languedoc then up to the Alps. I’m already noticing my budget going a lot less far these days; I can only imagine what’s going to happen when I get to Switzerland.&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/over-the-pyrenees</link>
                <guid>https://tomm.org/outdoors/over-the-pyrenees</guid>
                <pubDate>2016-06-11T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Days 13 to 16: Santillana del Mar to Pamplona</title>
                <description>&lt;p&gt;A quick update from me today as I didn’t quite find time to write this yesterday on my rest day, but am hammering it out over breakfast as a 130 km ride looms.&lt;/p&gt;

&lt;p&gt;The three days from Santillana del Mar through to Pamplona were quite gruelling. I did a back-of-the-envelope calculation and my little detour was about 50% further and 5 times more climbing than the direct route from León to Pamplona. I still contest it was worth it, both for the national park in the previous stint, and for the beautiful scenery through the Basque Country over the last three days. Go &lt;a href=&quot;https://instagram.com/tmcadam&quot;&gt;decide for yourself&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The undulating coastal roads from Santillana del Mar to Portugalete weren’t the most pleasant of things, nor was the what must have been a 15% track up to the hotel in Ollaberry. I must remember to check the contours around a hotel I quite randomly choose. Turns out I’d found one on top of a hill in a village next to the town I was targeting. Unfortunately hotels.com has prices but not inclines for me to take into account when booking. I planned these days to be quite long, and that they were. That was the price to pay for the detour!&lt;/p&gt;

&lt;p&gt;After a mild panic attack when it turned out my hotel in Pamplona wasn’t actually staffed but just a bunch of rooms, Visa and I managed to find a solution to delivering my new credit card and you’ll be pleased to hear I was united with my new card yesterday. I tried to celebrate by paying for my carb-loaded dinner with it, only to have the transaction declined.&lt;/p&gt;

&lt;p&gt;At some point I need to write a quick post on equipment I’ve brought with me, especially the tech side of it. I’m reminded because I was sat in a cafe yesterday route planning when someone came up to me expressing interest (confusion, more likely) in the somewhat quirky setup I have of Bluetooth keyboard and mouse attached to my phone. It’s working remarkably well now that I got some early teething problems sorted out, and I know a few things I’ll change for next time (!?) such as getting a folding keyboard I can actually fit in a small bag. Anyway, that’s all for another day. I should take advantage of the relative chill and get on the bike. It was 32 degrees yesterday and likely to hit the same today.&lt;/p&gt;

&lt;p&gt;I’m now heading towards the Pyrenees, and tomorrow I’ll say goodbye to Spain and find myself in France. It’ll be sad to say goodbye to such a beautiful country but I am looking forward to being somewhere where I can speak more than about ten words of the language. I’m still debating how I can get in a climb of Tourmalet this week: it’s either a long ride on day 3 (which is supposed to be shorter), or using my rest day (when, as the name suggests, I’m supposed to be resting). We shall see.&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/santillana-del-mar-to-pamplona</link>
                <guid>https://tomm.org/outdoors/santillana-del-mar-to-pamplona</guid>
                <pubDate>2016-06-08T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Days 9 to 12: León to Santillana del Mar</title>
                <description>&lt;p&gt;After following Camino de Santiago a bunch of the way so far, albeit in reverse mostly, the last three days saw me heading to the north coast through a stunning national park.&lt;/p&gt;

&lt;p&gt;Firstly, some numbers. I’ve now travelled about 800 km and climbed nearly 9500 metres. Nearly two weeks in, and nearly a third of the distance (phew, things seem to be going according to plan so far). This time next week I’ll have made it over the Pyrenees, too, so that 9500 metres of ascent is going to go up a chunk (sssh, don’t tell my legs).&lt;/p&gt;

&lt;p&gt;Highlights of the last three days include&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;That random decision of mine to head towards the coast because a quick Google of the national park from my living room inspired me. Really beautiful, and worth the detour and climbs.&lt;/li&gt;
  &lt;li&gt;Colin the Collie,  my new best friend. The dog in the hotel in the middle of nowhere in the national park that befriended me and for a while looked like he was going to run with me the entirety of the rest of the way to Munich. OK, so he gave up when I outpaced him on a downhill a couple of kilometres from the village. Not to mention nearly knocking me off with his weaving around the bike as I left.&lt;/li&gt;
  &lt;li&gt;The dancing waiter at the lunch stop between León and Saldaña, who put on Viva Espana to dance my pudding out to me&lt;/li&gt;
  &lt;li&gt;My bike: doing me proud and not having broken yet&lt;/li&gt;
  &lt;li&gt;I managed to deploy the Dublin joke once&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lowlights:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Strava and Google both trying to route me down dirt tracks. Google succeeding because I had no choice by that point. Thankfully my tyres held up for the 20kms or so.&lt;/li&gt;
  &lt;li&gt;Nationwide bank and Three conspiring to cancel my credit card and allege that I’m over my data allowance on the same evening. No credit card, no data. Basically no existence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Another three days’ routes are over on Strava and a bunch more pictures on Instagram. I’ve been playing around with the videos from the GoPro but don’t quite have anything to share yet. Turns out hotel wifi isn’t all that fast when uploading multiple gigs of videos.&lt;/p&gt;

&lt;p&gt;After a relatively easy couple of days, the next three are gonna be quite hard going. Tomorrow is 135 kms with 2700m climbing of coastal roads round to Portugalete, then I head inland again to arrive in Pamplona on Monday. Spotify play lists and podcasts will see me right. There may even be a new credit card waiting in Pamplona for me.&lt;/p&gt;

</description>
                <link>https://tomm.org/outdoors/leon-to-santillana-del-mar</link>
                <guid>https://tomm.org/outdoors/leon-to-santillana-del-mar</guid>
                <pubDate>2016-06-03T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Days 5 to 7: to León</title>
                <description>&lt;p&gt;First off, an update on the Garmin relationship. We seem to have reached an uneasy truce, where it realises it needs me for charging and I need it for routes, and has been cooperating much more in the last few days.&lt;/p&gt;

&lt;p&gt;I’m sat in León enjoying the beginning of my second rest day, having spent the last three days riding from Melide, about 270 kms. When I look at my position on a map, it finally feels like I’m making progress across northern Spain. And after rain, hills and threat of massive thunderstorms that’s quite pleasing.&lt;/p&gt;

&lt;p&gt;The first day out of Melide saw nearly 2300 metres of climbing, the first serious bit of climbing on this rather heavy bike. Stunning scenery saw me through the day, though; if you’ve not seen them, I’m posting a few pictures as I go over &lt;a href=&quot;https://instagram.com/tmcadam&quot;&gt;on Instagram&lt;/a&gt;. Protip: if you’re ever in need of help on a remote country road and there’s no one around for miles, just go and relieve yourself. A dozen cars will suddenly appear from nowhere.&lt;/p&gt;

&lt;p&gt;The weather forecast was looking increasingly bad for the next couple of days, with thunderstorms and heavy rain predicted. Heavy rain I can cope with but thunderstorms, on a bike, no thanks. I booked a hostel partway to my intended destination so I could stop there if things looked dicey, and started early to try to get done before the storms hit. In the event, there were no storms, just damned cold, heavy rain at 1500 metres. Only when I stopped to put on my winter gloves at the top of the hill did the rain decide to ease off.&lt;/p&gt;

&lt;p&gt;An easy 50 km ride into León yesterday, with rainclouds chasing, saw me arrive just after 11am. Thankfully I had breakfast number 2 on arrival as I’d completely forgotten how everything shuts down on a Sunday afternoon in these parts. Everything. I decided that the calories from beer were the only option so I settled in a bar with a book until the restaurants opened at 8.&lt;/p&gt;

&lt;p&gt;Tomorrow I leave this inland route and head through a national park to the north coast. An easy few days with little climbing are ahead, which will give my legs some time to prepare for the rather hilly ride along the coast and down to Pamplona. The rotations of 110/110/50 km followed by a rest day seem to be working really well, although time will tell if that’s gonna work for an entire 6 weeks…&lt;/p&gt;

&lt;p&gt;I’ll probably move to writing once every 4 days now, when I’m on my rest day, so expect the next update when I’m over in Santillana del Mar. And if you’re not following me on Strava, here are the last few days’ rides:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.strava.com/activities/589724748&quot;&gt;Day 5 - out of Melide&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.strava.com/activities/590630311&quot;&gt;Day 6 - to Astorga&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.strava.com/activities/591694845&quot;&gt;Day 7 -  to León&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
                <link>https://tomm.org/outdoors/days-5-to-7-to-leon</link>
                <guid>https://tomm.org/outdoors/days-5-to-7-to-leon</guid>
                <pubDate>2016-05-30T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Day 3 to Melide and rest day</title>
                <description>
&lt;p&gt;We started the day so well-paced, but then as the kilometres ticked along you started outpacing me. Only a little to start with; so little that I didn’t notice. But an hour in and I could barely see you in all your blueness. Then things started getting nasty. The taunts, the jibes. I was the one on tired legs, you’d not cycled the two earlier days. That didn’t seem to matter to you. You could have just left it and gone off into the distance but you wouldn’t, would you? Well, screw you, Garmin Virtual Partner. I’ve now found the menu option to turn you off, and I’ll never have to see your smug blue dot again.&lt;/p&gt;

&lt;p&gt;Glad I got that off my chest. As you may already be able to tell, &lt;a href=&quot;https://www.strava.com/activities/587967090&quot;&gt;yesterday, the “short” day (55kms)&lt;/a&gt; was quite tough going. Let’s just say I was looking forward to the rest day today. A lazy start to yesterday involving two breakfasts (I didn’t have a choice, it was bucketing down so I had to wait for the rain to stop), it was less wet than day two, but my legs were questioning my sanity in another day of riding after 235 kms the two days before. Tough it was, but worth it when I arrived in Melide with nearly 10% of the distance covered, I found a locals’ restaurant complete with a roll of paper for a tablecloth. As I asked for the bill two overflowing plates later, the waiter was very insistent I drink a coffee liqueur or two with him instead. Not quite what I had in mind for a lunch stop but it was surprisingly tasty so I shan’t complain. It certainly made the wobble to the bungalow a few kilometres away more interesting.&lt;/p&gt;

&lt;p&gt;Today’s rest day has been exactly that. I had a lie-in, a leisurely breakfast with booking.com to book hotels for a few nights’ time, lunch in the same café because it was easier than moving, then a little bike cleaning and maintenance. I’m now sat in my front porch looking out on to this view while tapping away.&lt;/p&gt;

&lt;blockquote class=&quot;instagram-media&quot; data-instgrm-version=&quot;7&quot; style=&quot; background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);&quot;&gt;&lt;div style=&quot;padding:8px;&quot;&gt; &lt;div style=&quot; background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align:center; width:100%;&quot;&gt; &lt;div style=&quot; background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;&quot;&gt;&lt;a href=&quot;https://www.instagram.com/p/BF1lU2KuIxu/&quot; style=&quot; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none;&quot; target=&quot;_blank&quot;&gt;A photo posted by Tom McAdam (@tmcadam)&lt;/a&gt; on &lt;time style=&quot; font-family:Arial,sans-serif; font-size:14px; line-height:17px;&quot; datetime=&quot;2016-05-25T16:39:07+00:00&quot;&gt;May 25, 2016 at 9:39am PDT&lt;/time&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;//platform.instagram.com/en_US/embeds.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;Tomorrow is going to be a good test of things to come. My rough plan is 4-day rotations of 110kms, 110kms, 50kms, rest day and it’ll be the first long day in the next round of travelling, so it’ll be fun to to see what my legs think to this plan.&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/day-3-to-melide-and-rest</link>
                <guid>https://tomm.org/outdoors/day-3-to-melide-and-rest</guid>
                <pubDate>2016-05-26T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Day 2: to Santiago</title>
                <description>&lt;p&gt;Today’s post is dedicated to the amazing Spanish car drivers. For once I’m not being sarcastic. Quite possibly the most considerate drivers I’ve encountered. Most would give me an entire lane when overtaking. Much needed considering all this rain. So,  thank you!&lt;/p&gt;

&lt;p&gt;So, the rain. Whoever did the rain dance so I’d not feel homesick, it was very kind but you can stop now. Please. After a near-sweltering heat and sunshine yesterday, it abruptly came to an end this morning with drizzle then bouts of heavy rain all day long. All long day long. 130 kilometres today: with a generous lunch break, and an hour’s time difference, I left at about 9.30 this morning, and rolled in to Santiago around 18.30.&lt;/p&gt;

&lt;p&gt;Only one routing via a “no cattle, cycles or horse and carts” road today, so a marked improvement. However, the situation with the Garmin is escalating and it now seems to be upset with me as well as my phone. It has taken to telling me I’m off route for just long enough for me to start believing it, detect that I’ve started slowing down, and then cheerily announce “Course found” smugly.&lt;/p&gt;

&lt;p&gt;Bit of a downgrade on the room today, a generic cheap hotel room, but in better news I did find a bar selling Dead Pony Club and 5am Saint to refuel with.&lt;/p&gt;

&lt;p&gt;Given the continuing Garmin situation, there are still no routes to upload to Strava I’m afraid. If Internet cafés still exist (do they?)  I’ll try to hunt one down tomorrow and upload them. The legs are quite pleased it’s a piddly 50kms tomorrow. Until then!&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/to-santiago</link>
                <guid>https://tomm.org/outdoors/to-santiago</guid>
                <pubDate>2016-05-24T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Day 1</title>
                <description>&lt;p&gt;Phew. Day 1 is over. In a rhetorical answer to my question yesterday, Nat, as to whether 110 kms a day would be enough: yes it is. I’ve just had a shower, stretched, devoured a sandwich and some cereal (yes, I know it’s the afternoon and, yes, I know I’m no longer a student) and just about feel human again. Turns out the extra 10kgs on the bike is quite noticeable when it’s 25 degrees and hilly.&lt;/p&gt;

&lt;p&gt;I’m going to keep it brief as I want to go enjoy a cool beer in the gardens of this amazing B&amp;amp;B half way between Porto and Santiago de Compostela shortly… So, what did I learn today?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Minor mechanicals turn into major incidents when you have bags on your bike and are too lazy to take them off before trying to get a chain back on. 100 metres from the hotel you&apos;ve just set off from. Grazed leg, bruised ego. &lt;/li&gt;
&lt;li&gt;It&apos;s difficult to tell the difference between a stonemason&apos;s forecourt and a graveyard. Apparently the route I took today is the most popular place in the world to site a stonemasons. So if you&apos;re after a headstone, you know where to come. &lt;/li&gt;
&lt;li&gt;Portugal appear to have Grade II Listed potholes. Wonderful newly laid roads with massive potholes around manhole covers left in place.&lt;/li&gt;
&lt;li&gt;However hard you try to stop it, your Garmin will always try to route you via a major trunk road where bikes are prohibited. Twice. &lt;/li&gt;
&lt;li&gt;When sitting down to lunch, remember that banana you stowed in the back pocket of your jersey. &lt;/li&gt;
&lt;li&gt;All the planning in the world, and technology will still get the upper hand. Apparently my phone and my Garmin have now had a falling out and don&apos;t want to talk to each other any more. Even after I tested it thoroughly. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And a message to hoteliers in my future. Yes, I do generally like talking about politics and the upcoming EU referendum we’re having in the UK but not just as I’ve arrived after a long ride.&lt;/p&gt;

&lt;p&gt;All in all, a good first day. Tough, but good. I’m now wondering how good an idea that little detour I added in the French Alps to take in Alp d’Huez was.&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/day-1</link>
                <guid>https://tomm.org/outdoors/day-1</guid>
                <pubDate>2016-05-23T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Two days until the off</title>
                <description>
&lt;p&gt;Well here we are. The bike’s been serviced, many things ordered online, and much (well, a little) planning done. It’s now only two days until I fly to Porto with my travelling companion for the next six weeks: my bike.&lt;/p&gt;
&lt;blockquote class=&quot;instagram-media&quot; data-instgrm-version=&quot;7&quot; style=&quot; background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);&quot;&gt;&lt;div style=&quot;padding:8px;&quot;&gt; &lt;div style=&quot; background:#F8F8F8; line-height:0; margin-top:40px; padding:62.5139043382% 0; text-align:center; width:100%;&quot;&gt; &lt;div style=&quot; background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;&quot;&gt;&lt;a href=&quot;https://www.instagram.com/p/BFd90MjOIzf/&quot; style=&quot; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none;&quot; target=&quot;_blank&quot;&gt;A photo posted by Tom McAdam (@tmcadam)&lt;/a&gt; on &lt;time style=&quot; font-family:Arial,sans-serif; font-size:14px; line-height:17px;&quot; datetime=&quot;2016-05-16T12:31:21+00:00&quot;&gt;May 16, 2016 at 5:31am PDT&lt;/time&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;//platform.instagram.com/en_US/embeds.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;I plan to next use any form of transport other than that when I fly back from Munich at the beginning of July. I’ve no idea whether I’ll follow it, but here’s a rough route I’ve put together:-&lt;/p&gt;

&lt;iframe src=&quot;//ridewithgps.com/routes/13853114/embed&quot; height=&quot;500px&quot; width=&quot;100%&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;The seemingly-random start and end points do have some reasons behind them, but not that much. Find me in a pub when I’m back, or somewhere en route, and I’ll bore you with the explanation. The poor bike has been laden down with what I thought to be a minimal amount of kit, but even just that weighs about 10 kilos. That’ll be interesting going up Alp d’Huez.&lt;/p&gt;

&lt;p&gt;I’ll probably be writing here quite regularly, posting updates on &lt;a href=&quot;https://twitter.com/tfm&quot;&gt;Twitter&lt;/a&gt; and &lt;a href=&quot;https://www.instagram.com/tmcadam/&quot;&gt;pictures and videos on Instagram&lt;/a&gt;, so check those out if you want to know what I’m up to. I’ve also set up my phone to ping my location every hour; if you’re a friend just &lt;a href=&quot;mailto:contact-location@tomm.org&quot;&gt;drop me a line&lt;/a&gt; and I’ll tell you where you can find that.&lt;/p&gt;

&lt;p&gt;Next stop Porto!&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/two-days-until-the-off</link>
                <guid>https://tomm.org/outdoors/two-days-until-the-off</guid>
                <pubDate>2016-05-20T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>A letter to my younger CTO self</title>
                <description>
&lt;p id=&quot;hw&quot;&gt;Dear Tom,&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;Sat here in April 2016, having spent the last few years inventing my time-travel letter posting machine in my spare time, I&apos;m going to test it by sending you&amp;mdash;well, 2011 me in fact&amp;mdash;some words of wisdom for the years ahead. Let&apos;s hope this machine works. Hindsight is a wonderful thing after all!&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;Before you do anything else, stop and prepare for an imminent catastrophe. Well, not quite. But it may be wise to get a broadband connection installed in your new flat before next weekend. I predict lightning in Dublin next weekend (I&apos;ll talk more about Dublin later, but let&apos;s not lose focus), which will knock out lots of Amazon&apos;s infrastructure. This will neatly highlight that you need to engineer for failure, especially in the cloud. Luckily for you, unlike me, you&apos;ll already have autoscaling, self-configuring hosts by then using Puppet or Chef so it will be a non-event. Do it now, not next week. Keep a lookout for a wonderful new thing called Docker that&apos;ll appear in a couple of years&apos; time. Jump on that &lt;strike&gt;bandwagon&lt;/strike&gt; container ship early.&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;As the company grows over the years, remember there will be growing pains. I found myself (is this the right tense? What are the grammar guidelines on writing to a former self on something that did happen but now won&apos;t?) sometimes not thinking about it until it was mid-flow. Instead, keep it at the back of your mind so they don&apos;t creep up on you and you only realise what&apos;s going on in the middle of a crisis. You&apos;ll be able to plan for them better that way. Some extra automation early on and light documentation will help. A stitch in time saves pain down the line. It will sometimes be tough to find the time for catch-ups in a cafe outside the office, but make sure you do; the walk to Freestate is always worth it.&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;Remember that Docker thing I talked about earlier? That. There&apos;ll come a point where the team are spinning up microservices like there&apos;s no tomorrow. Get on to Docker before that happens, don&apos;t wait until afterwards like I did (on this timeline at least). When Kubernetes is born, embrace it like it&apos;s your first-born. Oh, and be sure to beat down those existing monoliths before they start taking over the world.&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;As well as working on the core products, you&apos;ll have a great time working with partners on some fabulous prototypes and R&amp;amp;D projects, which will explore everything from the role of public service broadcasting to brilliantly visualise the wealth of available archive content. As you&apos;ll know from your previous job, getting rid of such things is also a challenge. All these projects have a shelf life, so make sure everyone agrees that up-front and get rid of them when they pass that date. It&apos;ll be sad to say goodbye, and it&apos;s never a good time to shut down a great project, but it&apos;ll save you a week of doing it all at once like we did on this timeline!&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;You&apos;ll find introducing continuous releases a refreshing change from those corporate quarterly release cycles you&apos;ve had in the past but get the tools in place to support it. In this reality we&apos;re not quite there yet, but you can be. That guy who&apos;s working for GitHub right now (please don&apos;t ruin the surprise for him but he&apos;ll be fired in 2015) will have some &lt;a href=&quot;https://zachholman.com/posts/deploying-software&quot;&gt;sage advice&lt;/a&gt; on how to do it. Oh wait, a hyperlink to a future web page won&apos;t work. Damn.&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;Many mutations will happen over the years; this is called evolution. Make them happen sooner, so you and everyone else can benefit from them for longer. Jump at the chance of a standing desk. No more back pain, no more slouching. I know this may sound like a daft idea, but suggest a metadata pub quiz to include at #metabeers (what the monthly team drinks will become known as). It doesn&apos;t sound like it&apos;ll be a hit, but trust me, it will be. However, your flat (I&apos;ll not ruin the surprise by telling you where you&apos;ll be living in 2016) will end up looking a bit like a jungle, with all the plants given as prizes (and to the quiz master). With the big TVs in every room of the office, get a dashboard up; a thing called Dashing will appear on the horizon in 2012 &amp;ndash; go play with it. It&apos;ll soon become your go-to point to see what&apos;s going on across the company.&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;You&apos;ll unfortunately need to second-guess vendor release plans a lot of the time. Trying to get roadmaps out of them will not be worth the hassle.&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;Finally, if anyone ever tries to tell you a joke about Dublin, stop them before they get to the punchline. It&apos;ll become the bane of your and everyone around you&apos;s life otherwise. Seriously. Oh, and don&apos;t agree to an office pun jar: it&apos;ll break the bank.&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;Lots of love,&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;Tommy (yes, that happens)&lt;/p&gt;

&lt;p id=&quot;hw&quot;&gt;PS: you don&apos;t need to eat every slice of cake offered to you in the first 6 months.&lt;/p&gt;
&lt;p id=&quot;hw&quot;&gt;PPS: next week&apos;s lottery numbers are 4, 10, 29, 32, 34, 40 and 47. Not that you&apos;ll need it but the bonus ball will be 48.&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/a-letter-to-my-younger-cto-self</link>
                <guid>https://tomm.org/tech/a-letter-to-my-younger-cto-self</guid>
                <pubDate>2016-04-29T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Don't understand some code? Delete it.</title>
                <description>
&lt;p&gt;We&apos;ve all done it. Knee-deep in some code, we&apos;ve seen a block we don&apos;t really understand and thought &quot;I&apos;ll just leave that there because I&apos;m not entirely sure what it does, but it must be doing something&quot;. It&apos;s the less risky option, right? I mean, if you don&apos;t touch the code then it won&apos;t break.&lt;/p&gt;

&lt;p&gt;In the short term, yes, but long-term the risks build up and up. I was sat in the newly-opened &lt;a href=&quot;https://twitter.com/TapWaterloo&quot;&gt;Waterloo Tap&lt;/a&gt; on Sunday enjoying a very nice IPA from a &lt;a href=&quot;http://gipsyhillbrew.com/&quot;&gt;local brewery&lt;/a&gt; discussing this with a friend. The starting point had been a talk he recently went to in New York by Gerald Jay Sussman on system flexibility (worth a &lt;a href=&quot;https://vimeo.com/151465912
&quot;&gt;watch&lt;/a&gt;), but we moved on to talking about systemic risk in technology. Having both worked in an investment bank during the financial crisis, the&amp;mdash;possibly overstretched&amp;mdash;parallels could easily be drawn.&lt;/p&gt;

&lt;p&gt;Software engineers, much like traders, are often incentivised to focus on the immediately-apparent risks, rather than long-term risks. A trader pockets their bonus at the end of the year, in spite of that badly-understood ticking time-bomb of a complex derivative that&apos;s going to be on the books for thirty years. Leaving a piece of code in place that you didn&apos;t really understand means that the release you&apos;re doing may not break things and everyone&apos;s happy with a seemingly-successful deploy, but the cruft builds up over time creating huge overall risk. Others then build systems that talk to that system and eventually everything goes pop. &lt;/p&gt;
&lt;p&gt;The RBS &lt;a href=&quot;http://www.theregister.co.uk/2013/06/21/rbs_chernobyl_one_year_on/&quot;&gt;systems failure&lt;/a&gt; in 2012 is a prime example, where some customers couldn&apos;t access their bank accounts for weeks on end. I fear this is just the tip of the iceberg, and we&apos;re going to see a lot more of this as the house of cards starts shaking under more and more layers being added.&lt;/p&gt;

&lt;p&gt;So, what do we do about it? One thing is obvious: be bold in ripping out code you don&apos;t understand. Inaction is still a decision to not do something. See some code smell? Rip it out and see what breaks. Better something small break now than everything come tumbling down catastrophically a few years down the line. This is equally important at the architecture level. It&apos;s often easy to overlook that shady interaction between systems you know really shouldn&apos;t exist. But, again, these build up over time and create a spiders&apos; nest of badly-understood dependencies.&lt;/p&gt;

&lt;blockquote&gt;If you can&apos;t measure it, you can&apos;t improve it.&lt;footer&gt;Peter Drucker&lt;/footer&gt;&lt;/blockquote&gt;

&lt;p&gt;Put some quality management software in place to measure code quality. We&apos;re using &lt;a href=&quot;http://www.sonarqube.org/&quot;&gt;SonarQube&lt;/a&gt;, and are in the process of figuring out the best ways to integrate it into our existing projects. Tools such as Scientist, which GitHub &lt;a href=&quot;http://www.wired.com/2016/02/rebuilding-modern-software-is-like-rebuilding-the-bay-bridge/&quot;&gt;have just released&lt;/a&gt;, also let you be bolder in your changes, safe in the knowledge of a safe way to roll them out.&lt;/p&gt;
&lt;p&gt;How do you manage long-term software risk? What tools do you use? Do let me know your thoughts.&lt;/p&gt;

&lt;p&gt;&lt;sub&gt;This originally appeared on &lt;a href=&quot;http://metabroadcast.com&quot;&gt;our company&lt;/a&gt; &lt;a href=&quot;https://metabroadcast.com/blog&quot;&gt;blog&lt;/a&gt;.&lt;/sub&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/dont-understand-some-code-delete-it</link>
                <guid>https://tomm.org/tech/dont-understand-some-code-delete-it</guid>
                <pubDate>2016-03-22T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>My podcasts</title>
                <description>
&lt;p&gt;The first time I get asked for a list of things I share that list with whoever asked for it. The second time I say &quot;great, I&apos;ve already got that list together for so-and-so. Here it is.&quot;. The third time I put it on the web. This has happened in the past in the form of &lt;a href=&quot;https://tomm.org/places/&quot;&gt;places I love around the world&lt;/a&gt; and &lt;a href=&quot;/tech/my-chrome-extensions&quot;&gt;my Chrome extensions&lt;/a&gt;. So today I&apos;m adding to that collection with a list of my favourite non-technical podcasts. I say podcasts, but I&apos;ll also cover those audio delights that aren&apos;t available as podcasts but through a certain custom third-party app, too, since there&apos;s some great content I&apos;d otherwise miss.&lt;/p&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.bbc.co.uk/programmes/p02pc9pj/episodes/downloads&quot;&gt;Friday Night Comedy from BBC Radio 4&lt;/a&gt;: news and current affairs comedy; either The News Quiz, Dead Ringers or The Now Show.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.bbc.co.uk/programmes/b00lvdrj/episodes/downloads&quot;&gt;Kermode and Mayo&apos;s Film Review&lt;/a&gt;: it&apos;s less about film and more about two middle-aged men bickering.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://serialpodcast.org/&quot;&gt;Serial&lt;/a&gt;: season 2 is now mid-flow, exploring the story of Bowe Bergdahl who is the only US soldier to have been captured in the Afghan war. If you&apos;ve not heard it, then you also need to listen to season 1.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://thebuglepodcast.com/&quot;&gt;The Bugle&lt;/a&gt;: updates of this comedy podcast hosted by John Oliver and Andy Zaltzman are few and far between these days. I hope it picks up a regular flow again soon, since Andy&apos;s pun runs are second to none.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://feeds.feedburner.com/tedtalks_audio&quot;&gt;TEDTalks (audio)&lt;/a&gt;: edited versions of TEDTalks, tailored to the format.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://freakonomics.com/category/freakonomics-radio/podcasts/&quot;&gt;Freakonomics Radio&lt;/a&gt;: covering everything from migration being a human right to food science, I&apos;m starting to work my way through the back catalogue of this.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.thisamericanlife.org/&quot;&gt;This American Life&lt;/a&gt;: a different theme each week, covering all aspects of Americans&apos; lives.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dancarlin.com/hardcore-history-series/&quot;&gt;Dan Carlin&apos;s Hardcore History&lt;/a&gt;: I&apos;ve not yet started listening to this, but it&apos;s at the end of my playlist currently, having been recommended to me by a few people.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unfortunately some excellent content from the BBC still isn&apos;t available as a podcast, which makes it tricky incorporating into a regular listening schedule whilst pedalling. These are worth making the effort for, though, and listening to in the iPlayer Radio app:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.bbc.co.uk/programmes/b006qnwb&quot;&gt;I&apos;m Sorry I Haven&apos;t a Clue&lt;/a&gt;: the antidote to panel games.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.bbc.co.uk/programmes/b006s5dp&quot;&gt;Just a Minute&lt;/a&gt;: panelists talk on a subject for a minute &quot;without hesitation, repetition, or deviation&quot;, and have been doing so since 1967 (not continuously, obviously).&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.bbc.co.uk/programmes/b006qgvj&quot;&gt;Any Questions&lt;/a&gt;: weekly topical debate programme. Useful for getting angry at and shouting responses which scare other cyclists around me when I&apos;m out on a ride.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As I spend a fair amount of time consuming audio I regularly run out of things. I&apos;m therefore always keen to hear recommendations of additions to the playlist. Do &lt;a href=&quot;https://twitter.com/intent/tweet?text=@tfm&quot;&gt;let me know&lt;/a&gt; if you&apos;ve got any suggestions.&lt;/p&gt;


&lt;/p&gt;
</description>
                <link>https://tomm.org/misc/my-podcasts</link>
                <guid>https://tomm.org/misc/my-podcasts</guid>
                <pubDate>2016-01-26T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Riding from Paris to London for Room To Read</title>
                <description>
&lt;p&gt;In a little over a week’s time, I’m going to be heading to Paris on the Eurostar, only to cycle back to London. Why would I do this again I hear you ask?&lt;/p&gt;

&lt;p&gt;Well, last time I went from London to Paris, so I’m doing it the other way round this time. More importantly, I’m raising money for &lt;a href=&quot;http://www.roomtoread.org/&quot;&gt;Room To Read&lt;/a&gt;. The ride is being organised by &lt;a href=&quot;https://techbikers.com/&quot;&gt;TechBikers&lt;/a&gt;; born in 2012, they’ve raised an amazing £170,000 for charity since then.&lt;/p&gt;

&lt;p&gt;As some of you may know, I don’t like asking for money for sponsorship of something I’d do anyway. However, I have no such qualms in this case because I wouldn’t be doing this if it wasn’t raising money for a charity I really believe in. When I heard about the ride, I was immediately interested and after doing some reading about Room To Read, I applied for a place. Room To Read help people in sub-Saharan Africa and Asia, focussing on literacy in early primary school years, and secondary school for girls’ education.&lt;/p&gt;

&lt;p&gt;Having spent some time in southern Africa, I witnessed first hand the contrast of extreme poverty alongside the hope and cheer. With my pedal power and your generosity, I’m looking forward to being able to give something back to such a wonderful yet desperate part of the world.&lt;/p&gt;

&lt;p&gt;I’ve a &lt;a href=&quot;https://www.justgiving.com/techbikers-paris-to-london-2015-289&quot;&gt;sponsorship page&lt;/a&gt; on JustGiving; anything you’d like to donate would be gratefully received.&lt;/p&gt;

</description>
                <link>https://tomm.org/outdoors/paris-london</link>
                <guid>https://tomm.org/outdoors/paris-london</guid>
                <pubDate>2015-09-09T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Securing AWS accounts with IAM and friends</title>
                <description>
&lt;p&gt;If you&apos;ve read a few of my posts, you&apos;ll know how much I &lt;a href=&quot;/tech/my-love-affair-with-the-cloud/&quot;&gt;love&lt;/a&gt; AWS. I especially love the flexibility of having a very large set of resources at your fingertips, ready to scale up or down at the push of a button, or automatically, as you need.&lt;/p&gt;
&lt;p&gt;That can be a disadvantage though, too. Through an accidental check-in to one of our public repositories at &lt;a href=&quot;http://metabroadcast.com/&quot;&gt;work&lt;/a&gt;, we recently had leaked some infrastructure credentials with permission to create new EC2 instances. As you probably already know, bad people &lt;a href=&quot;http://www.programmableweb.com/news/why-exposed-api-keys-and-sensitive-data-are-growing-cause-concern/analysis/2015/01/05&quot;&gt;run scanners&lt;/a&gt; looking at checkins to the likes of GitHub, searching for such gems. When found, they immediately and automatically create hundreds of EC2 instances across the world, each doing the modern equivalent of panning for gold: trying to find the next Bitcoin.&lt;/p&gt;
&lt;p&gt;The unusual activity was noticed almost immediately by both us and Amazon, and we worked quickly with them to shut down the instances.&lt;/p&gt;
&lt;p&gt;It was a good opportunity to review our AWS security, so today I&apos;m going to share what we do, including the things we&apos;ve changed, or will be, as a result of that review. I&apos;m not going to cover network or host security today, perhaps a topic for another time.&lt;/p&gt;
&lt;h3&gt;Terminology&lt;/h3&gt;
&lt;p&gt;Let me first introduce you to the key AWS systems relating to authentication and authorisation, then I&apos;ll go into detail about how we&apos;re using them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://aws.amazon.com/iam/&quot;&gt;Identity and Access Management&lt;/a&gt; (IAM): AWS accounts by default have a God-like root account: a single account with access to everything. With IAM you create separate user accounts, each with their own credentials  and associated access keys and secrets. Through policies applied at the user level or group level, fine-grained access control can be applied to AWS resources. &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html&quot;&gt;Security Token Service&lt;/a&gt; (STS): Grants temporary access tokens.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://aws.amazon.com/cloudtrail/&quot;&gt;CloudTrail&lt;/a&gt;: records audit trails of AWS control APIs.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;The root account&lt;/h3&gt;
&lt;p&gt;Don&apos;t use it. Well, use it sparingly when you need to set up everything else I talk about in this post. Why not? Well, firstly there&apos;s the &lt;a href=&quot;https://en.wikipedia.org/wiki/Principle_of_least_privilege&quot;&gt;principle of least privilege&lt;/a&gt;, which states that you should only grant privileges for what&apos;s needed. For example, a process that uploads files to an S3 bucket should only be allowed to put objects into a specific bucket. There&apos;s no need for it to be able to launch EC2 instances, or even delete files from S3. This makes sure that jobs can&apos;t get out of their tree and run amok. Since the root account is an all-doing account, there&apos;s no way to limit what it can do.&lt;/p&gt;
&lt;p&gt;Secondly, it means that you don&apos;t need to share passwords. Each person will use their own credentials to authenticate, which makes things a lot easier when someone leaves.&lt;/p&gt;
&lt;p&gt;Oh, and for pity&apos;s sake, make sure you enable multi-factor authentication (MFA) on the root account.&lt;/p&gt;
&lt;h3&gt;IAM&lt;/h3&gt;
&lt;p&gt;Each real person has their own account, which has permissions across a subset of AWS resources. Those permissions are defined by policies attached to groups, to which they belong. We used to also use special-purpose IAM users to grant access to certain resources. Take access to backups or deleting EBS snapshots, for example: this wasn&apos;t permitted from user accounts, but from separate, isolated, accounts. We&apos;ve since changed this, though; see below for how we now use roles instead.&lt;/p&gt;

&lt;p&gt;Each user would create their own AWS access key and access key secret pairs, which could be used to authenticate when using the AWS &lt;a href=&quot;https://aws.amazon.com/cli/&quot;&gt;command-line interface&lt;/a&gt;, and elsewhere. Here&apos;s the rub, though: while access to the console is protected with a MFA token, those generated access keys and secrets had no such protection once created.
&lt;/p&gt;
&lt;p&gt;So now most of the statements in the policy attached to our main group have the following condition added:
&lt;pre&gt;
&quot;Condition&quot;: {
  &quot;Bool&quot;: {
    &quot;aws:MultiFactorAuthPresent&quot;: &quot;true&quot;
  }
}
&lt;/pre&gt;
&lt;p&gt;Permissions granted through any statements with this condition attached now require that request to have been authenticated with a MFA token.&lt;/p&gt;
&lt;p&gt;That&apos;s all well and good except the command-line interface don&apos;t support authentication using an MFA token. I&apos;d love to be able to just take my IAM user access key and secret, run &lt;code&gt;aws ec2 describe-instances&lt;/code&gt; and be prompted for an MFA token. Alas not (yet, at least). Instead we need to add another step: session tokens.&lt;/p&gt;
&lt;h3&gt;STS&lt;/h3&gt;
&lt;p&gt;Security Token Service allows you to create various types of short-lived session tokens. Given we&apos;re not using enterprise authentication, we had a couple of options: &lt;code&gt;AssumeRole&lt;/code&gt; or &lt;code&gt;GetSessionToken&lt;/code&gt;. There are advantages and disadvantages to each:-&lt;/p&gt;
&lt;p&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5px&quot;&gt;
    &lt;thead&gt;&lt;tr&gt;&lt;th&gt;Approach&lt;/th&gt;&lt;th&gt;Pro&lt;/th&gt;&lt;th class=&quot;pl&quot;&gt;Con&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody&gt;
    &lt;tr&gt;&lt;td&gt;AssumeRole&lt;/td&gt;
        &lt;td&gt;
            Session tokens are granted privileges of a particular role; they don&apos;t just inherit the privileges of the user who create the token.
        &lt;/td&gt;
        &lt;td&gt;
            Maximum validity of one hour.
        &lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;
        &lt;td&gt;GetSessionToken&lt;/td&gt;
        &lt;td&gt;Maxium validity of 36 hours.&lt;/td&gt;
        &lt;td&gt;Violates the principle of least privilege as the session token inherits all permissions of the granting user.&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;We plumped for the &lt;code&gt;AssumeRole&lt;/code&gt; approach because, not only are we firm believers in the principle of least privilege, it also let us get rid of our special-purpose IAM users at the same time by creating additional roles with elevated privileges for the likes of administration of backups.&lt;/p&gt;
&lt;h3&gt;Roles&lt;/h3&gt;
&lt;p&gt;A role has an associated policy, much like a group. Amazon kindly provide a bunch of &lt;a href=&quot;https://aws.amazon.com/blogs/aws/new-managed-policies-for-aws-identity-access-management/&quot;&gt;managed policies&lt;/a&gt; for common cases, so it&apos;s easy to create a role with read-only S3 access using the &lt;code&gt;AmazonS3ReadOnlyAccess&lt;/code&gt; role, for example. A custom policy can also be attached, so you&apos;re able to fine-tune a set of permissions to match each use-case. &lt;a href=&quot;https://docs.aws.amazon.com/IAM/latest/UserGuide/ExampleIAMPolicies.html#iam-policy-example-ec2-tag-permissions&quot;&gt;Using tags in rules&lt;/a&gt; lets you only give permissions to a subset of resources.&lt;/p&gt;
&lt;p&gt;Trust relationships then allow you to control who is able to assume a role. Unfortunately, this doesn&apos;t yet allow you to specify a group so users must be listed individually. So here I&apos;m letting &lt;code&gt;tom&lt;/code&gt; and &lt;code&gt;tim&lt;/code&gt; assume the role:
&lt;pre&gt;
{
  &quot;Version&quot;: &quot;2012-10-17&quot;,
  &quot;Statement&quot;: [
    {
      &quot;Sid&quot;: &quot;&quot;,
      &quot;Effect&quot;: &quot;Allow&quot;,
      &quot;Principal&quot;: {
        &quot;AWS&quot;: [
          &quot;arn:aws:iam::448613307115:user/tim&quot;,
          &quot;arn:aws:iam::448613307115:user/tom&quot;,
        ]
      },
      &quot;Action&quot;: &quot;sts:AssumeRole&quot;
    }
  ]
}
&lt;/pre&gt;
&lt;p&gt;It&apos;s annoying that groups can&apos;t be referenced, but hopefully that&apos;ll be fixed soon.&lt;/p&gt;
&lt;p&gt;Hosts can also be &lt;a href=&quot;https://aws.amazon.com/blogs/aws/iam-roles-for-ec2-instances-simplified-secure-access-to-aws-service-apis-from-ec2/&quot;&gt;assigned roles&lt;/a&gt;. This is great if, for instance, you&apos;ve got a process running on an EC2 instance to upload files to S3, you don&apos;t need to deploy credentials to it. You just launch an instance with a particular role, then it&apos;s able to get session tokens &lt;a href=&quot;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#instance-metadata-security-credentials&quot;&gt;through the instance metadata&lt;/a&gt;. We don&apos;t use host roles yet, but will be soon.&lt;/p&gt;


&lt;h3&gt;Assuming roles&lt;/h3&gt;
&lt;p&gt;As I mentioned, the command-line interface doesn&apos;t work with session tokens natively. Instead, the workflow is:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Create access key and access key secret using an IAM user&lt;/li&gt;
  &lt;li&gt;Use these credentials to obtain a session token using &lt;code&gt;aws sts assume-role&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Use created session token in subsequent API calls&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This is Quite cumbersome if done manually as it requires a number of hops to look up various resource identifiers and the like. Instead, please give a warm welcome to our handy shell script, &lt;code&gt;assume-aws-role&lt;/code&gt;! Let&apos;s see it in action:&lt;/p&gt;
&lt;pre&gt;
// First up, we configure it by giving it an IAM user&apos;s key and secret
› assume-aws-role -s

Setting up profile iam-user. You should provide an access key
and secret for an IAM user with rights to assume roles.

Access key: ██████████████████████
Access key secret: ████████████████████████████████████████████

Credentials saved

// Let&apos;s see what roles we can assume

› assume-aws-role -l
All roles (you may not have access to any or all of these):

user-s3-readonly
user-ebs-snapshot-remove
user-backup-readwrite

› assume-aws-role user-s3-readonly 051859
Session token saved as default set of AWS credentials

› aws s3 ls
2015-04-30 15:37:27 my-first-s3-folder
...

› 
&lt;/pre&gt;
&lt;p&gt;The script works by using multiple profiles; one with the long-lived key for creating session tokens, and then the default profile to house session tokens. You&apos;re welcome to &lt;a href=&quot;https://gist.github.com/tfm/7fbda3203c6cc0c0c86b&quot;&gt;the script&lt;/a&gt; if you&apos;ve a use for it. Sold (given away) as seen, of course.&lt;/p&gt;
&lt;h3&gt;CloudTrail&lt;/h3&gt;
&lt;p&gt;Configure CloudTrail to audit all API actions, so if the worst happens, you can audit what was done. It&apos;s configured per region, so make sure you set it up everywhere.&lt;/p&gt;
&lt;h3&gt;Good work, Amazon&lt;/h3&gt;
&lt;p&gt;At the precise moment I was thinking about what I&apos;d say in this closing section about how powerful IAM and friends are, an email landed in my inbox from Amazon shouting about them having been named a &quot;Leader in Cloud Security&quot; in a recent &lt;a href=&quot;http://www.forrester.com/pimages/rws/reprints/document/113065/oid/1-SBOUWE&quot;&gt;Forrester report&lt;/a&gt;. A lot of that was about physical security, but IAM also rightly got a mention.&lt;/p&gt;
&lt;p&gt;There are still some wrinkles&amp;mdash;not all resource types support per-resource permissions for example&amp;mdash;and I really want to see some more things to really encourage best practice; namely native support for MFA tokens using their own command-line interface and a sensible default security configuration on account creation. They&apos;re continuing to invest in security, as demonstrated by the plethora of improvements such as the &lt;a href=&quot;https://docs.aws.amazon.com/IAM/latest/UsingPolicySimulatorGuide/iam-policy-simulator-guide.html&quot;&gt;policy simulator&lt;/a&gt; and managed policies, so hopefully we&apos;ll see these things soon.&lt;/p&gt;
&lt;p&gt;Another great example of what you get for free from AWS&amp;mdash;factored into your per-hour charges elsewhere, of course&amp;mdash;that you&apos;d have to build or integrate from scratch elsewhere.&lt;/p&gt;


&lt;/p&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/securing-aws-accounts-with-iam-and-friends</link>
                <guid>https://tomm.org/tech/securing-aws-accounts-with-iam-and-friends</guid>
                <pubDate>2015-05-05T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>The 15-minute rule</title>
                <description>
&lt;p&gt;You know the score: you skim-read a bunch of articles on &lt;a href=&quot;https://news.ycombinator.com/&quot;&gt;Hacker News&lt;/a&gt; and one catches your attention. You then can’t for the life of you find it again. This happened to me a while back after reading a great article on problem solving, and wanting to share it with the team. Thankfully, after a few half-hearted attempts to find it, over the period of about a month, I hit the jackpot: &lt;a href=&quot;https://blogs.akamai.com/2013/10/you-must-try-and-then-you-must-ask.html&quot;&gt;You Must Try, and then You Must Ask&lt;/a&gt;, a.k.a. &lt;em&gt;the 15-minute rule&lt;/em&gt;. An abridged version of it follows, but do go read that article yourself for the full one.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;If you find yourself stuck trying to solve a problem, give yourself another 15 minutes. Set a countdown timer if you fancy, and relax.&lt;/li&gt;
  &lt;li&gt;In the next 15 minutes, start from the top, gathering your thoughts, documenting everything as you go. Write down everything you’ve tried, the assumptions you’ve made, how you’ve reproduced the problem, etc.&lt;/li&gt;
  &lt;li&gt;After 15 minutes is up, stop. Ask for help. Once you’ve found someone to help you, start by going through all your workings you wrote down in that final 15 minutes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When I finally found the article and shared it with the team, everyone loved the idea, so we gave it a go. And here we are still using it a year later.&lt;/p&gt;

&lt;h3 id=&quot;why&quot;&gt;Why?&lt;/h3&gt;

&lt;p&gt;The rule is great for a few reasons:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It says that it’s OK to ask for help. With a rule in place, it’s perfectly clear to everyone that it’s good to ask for help, and it’s good to be asked for help.&lt;/li&gt;
  &lt;li&gt;It’s clear when to ask for help. When you’re trying to solve a problem, you can go over and over it, always kidding yourself that the answer is just around the corner. No more. When you’re stuck, you’ve got 15 minutes. That’s it. There’s light at the end of the tunnel in the form of a colleague holding a torch, ready to help you out.&lt;/li&gt;
  &lt;li&gt;Because you spend that 15 minutes gathering up all relevant information and clarifying your thoughts, you feel less bad taking someone’s time, since you’ve distilled your accumulated work already into a useful chunk of information. Similarly, others are more inclined to help out, as they know they’ll be coming to a problem with a lot of facts ready to be laid out in front of them.&lt;/li&gt;
  &lt;li&gt;The 15 minutes gives you breathing room. It’s good to come up for air when knee-deep in something. The solution may become obvious when you take the time to review it (&lt;a href=&quot;http://www.rubberduckdebugging.com/&quot;&gt;rubber duck debugging&lt;/a&gt;)!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;room-for-improvement&quot;&gt;Room for improvement&lt;/h3&gt;

&lt;p&gt;We’re always on the lookout for ways to make people’s jobs easier: from &lt;a href=&quot;http://metabroadcast.com/blog/great-minds-get-together&quot;&gt;Happy Hour&lt;/a&gt; to the 15-minute rule, we’re iterating constantly to improve things. If you’ve any suggestions for such improvements do drop me a line.&lt;/p&gt;

</description>
                <link>https://tomm.org/tech/the-15-minute-rule</link>
                <guid>https://tomm.org/tech/the-15-minute-rule</guid>
                <pubDate>2015-01-27T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Vagrant Puppet love</title>
                <description>
&lt;p&gt;At &lt;a href=&quot;http://metabroadcast.com/&quot;&gt;work&lt;/a&gt; we use &lt;a href=&quot;http://puppetlabs.com/&quot;&gt;Puppet&lt;/a&gt; to keep our server configuration, and therefore ourselves, sane. We&apos;ve recently been playing around with the venerable &lt;a href=&quot;https://www.vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt; to help in testing new configurations, without having to push to test hosts in the cloud to do so.&lt;/p&gt;
&lt;h3&gt;Why?&lt;/h3&gt;
&lt;p&gt;There are advantages galore in this approach. A couple of the biggest wins are  easier branching of configuration, and reducing the turnaround time for testing configurations since we no longer need to push a configuration to Puppet masters then have a client apply it.&lt;/p&gt;
&lt;p&gt;Our starting point was &lt;a href=&quot;https://github.com/elasticdog/puppet-sandbox&quot;&gt;puppet-sandbox&lt;/a&gt;, which will very kindly configure you up a Puppet master and a couple of clients. This works great on a fresh module but if you&apos;re wanting to play around with an existing one it gets a little tiresome copying files between your live Puppet configuration and the sandbox configuration. Much better to just point it at our configuration and have it use that.&lt;/p&gt;
&lt;p&gt;We needed to make a few tweaks to the set-up to do that. If you&apos;re in a rush, you can stop reading now and just go check out our &lt;a href=&quot;https://github.com/mbst/puppet-sandbox&quot;&gt;fork&lt;/a&gt; on GitHub. If you&apos;re not, keep reading to find out what changes we made and why, to see if this fork is for you.&lt;/p&gt;
&lt;h3&gt;Wherefore art thou, config?&lt;/h3&gt;
&lt;p&gt;The first step was to point the Vagrant Puppet master at a local checkout of our Puppet repository. Since each engineer may have it somewhere different, an environment variable seemed the best way to letting Vagrant know where to find it. So, setting &lt;code&gt;PUPPET_ROOT&lt;/code&gt; to the appropriate place will then result it being mounted at &lt;code&gt;/puppet&lt;/code&gt; on the virtual machines:&lt;/p&gt;
&lt;pre&gt;config.vm.synced_folder ENV[&apos;PUPPET_ROOT&apos;], &quot;/puppet&quot;&lt;/pre&gt;
&lt;p&gt;Some changes were needed in the provisioning of the virtual Puppet master to have it use this configuration. We symlinked a few directories in &lt;code&gt;/puppet&lt;/code&gt; to &lt;code&gt;/etc/puppet&lt;/code&gt;, since it meant we could use the &lt;code&gt;puppet.conf&lt;/code&gt; from our real configuration without modification. I&apos;ll not copy the code here, but it can all be seen over &lt;a href=&quot;https://github.com/mbst/puppet-sandbox/blob/master/provision/modules/puppet/manifests/server.pp&quot;&gt;here&lt;/a&gt; if you so desire.&lt;/p&gt;
&lt;p&gt;Then, to test a particular module or manifest, all that remains is to add a &lt;code&gt;node&lt;/code&gt; definition in &lt;code&gt;site.pp&lt;/code&gt; for &lt;code&gt;client1&lt;/code&gt; and &lt;code&gt;client2&lt;/code&gt; and you&apos;re on your way.&lt;/p&gt;
&lt;h3&gt;Don&apos;t do that&lt;/h3&gt;
&lt;p&gt;It turns out that there are some things we really don&apos;t want to do when running locally. Firstly, we don&apos;t want to install our own SSH or Puppet modules, since they break the set-up done by Vagrant&lt;a href=&quot;#footnote-1&quot;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; and aren&apos;t really of any use in this local environment. We also (usually) don&apos;t want a host being configured with Sensu checks, to avoid pestering the on-call engineer about problems with the test clients. Before you ask: yes, we learnt that one the hard way.&amp;lt;/a&amp;gt;
&lt;p&gt;So we added a Puppet &lt;a href=&quot;https://docs.puppetlabs.com/facter/2.3/custom_facts.html&quot;&gt;fact&lt;/a&gt;, &lt;code&gt;vagrant&lt;/code&gt;, which can then be tested in modules. For example, a snippet from our baseline package manifest:&lt;/p&gt;
&lt;pre&gt;
  if !str2bool($::vagrant) {
    include sshd
    include puppet
  }
&lt;/pre&gt;
&lt;h3&gt;// TODO&lt;/h3&gt;
&lt;p&gt;The one thing we&apos;ve not addressed yet is the secret stuff, which is stored encrypted using &lt;a href=&quot;https://github.com/crayfishx/hiera-gpg&quot;&gt;hiera-gpg&lt;/a&gt;. We don&apos;t want to copy keys onto the virtual machines, but I&apos;m thinking that using &lt;code&gt;gpg-agent&lt;/code&gt; on the host workstation may work nicely. If you&apos;ve done something similar do let me know what worked for you.&lt;/p&gt;
&lt;h3&gt;Up, up and away!&lt;/h3&gt;
&lt;p&gt;And now, with the wonders of Vagrant, we can create a local virtual Puppet environment that mirrors our real configuration with just one simple command:&lt;/p&gt;
&lt;pre&gt;
&amp;gt; vagrant up
.... many lines of initialisation later ...
notice: Finished catalog run in 22.92 seconds
&amp;gt; vagrant ssh puppet

Last login: Fri Sep 14 06:23:18 2012 from 10.0.2.2
vagrant@puppet:~$ 
&lt;/pre&gt;
&lt;p&gt;If this all sounds like something that would be useful to you, go look at our &lt;a href=&quot;https://github.com/mbst/puppet-sandbox&quot;&gt;fork over on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;small&gt;&lt;a name=&quot;footnote-1&quot;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; The sugar that is &lt;code&gt;vagrant ssh puppet&lt;/code&gt; breaks because our SSH config only allows certain groups to log in, and the Vagrant 
Puppet configuration uses self-signed client certificates, which works nicely for Vagrant but we do something different in our live configuration.&lt;/small&gt;&lt;/p&gt;


&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/vagrant-puppet-love</link>
                <guid>https://tomm.org/tech/vagrant-puppet-love</guid>
                <pubDate>2014-12-02T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>My love affair with the cloud</title>
                <description>
&lt;p&gt;It was last Monday afternoon that it suddenly dawned on me. The feelings had been brewing ever since I first laid eyes on it: all that resource at a click of a button, who wouldn&apos;t be swept off their feet? But it was then, after yet another day of seeing it in all its glory, I finally admitted it. I&apos;m head over heels in love with the cloud.&lt;/p&gt;

&lt;p&gt;&quot;What changed?&quot;, I hear you ask. Well, it was a pretty normal day, in all honesty. We&apos;d spun up an instance or three, and I was looking through some backups to locate some data to restore.&lt;/p&gt;

&lt;p&gt;It was slightly complicated by not knowing exactly when the data had been removed, so I embarked on a binary search across a few dozen backups to locate it. Easy peasy in &lt;a href=&quot;http://aws.amazon.com/&quot;&gt;AWS&lt;/a&gt;: grab a snapshot of an EBS volume, create a volume, mount it, check it, rinse and repeat. My mind drifted back to a previous job where I&apos;d once had to ask another team to restore a backup of their system for me into a test environment. It went something like this:-&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Me:&lt;/em&gt; “Can you restore last week’s backup?”&lt;br /&gt;
&lt;em&gt;Them:&lt;/em&gt; “Sure, I’ll get the operations people to do that. Will let you know when that’s done, tomorrow.”&lt;/p&gt;
&lt;h3&gt;Tomorrow&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Me:&lt;/em&gt; “How’s it looking?”&lt;br /&gt;
&lt;em&gt;Them:&lt;/em&gt; “Ah well, the ticket’s still in the queue. They should be able to get the tape back from the off-site facility in 3 days.”&lt;/p&gt;
&lt;h3&gt;Three days later&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Me:&lt;/em&gt; “So… about that restore.”&lt;br /&gt;
&lt;em&gt;Them:&lt;/em&gt; “There’s been a bit of a problem. The restore from backup failed. We’re going to restore from the previous day’s backup”&lt;br /&gt;
&lt;em&gt;Me:&lt;/em&gt; “Ah, ok. How long will that take?”&lt;br /&gt;
&lt;em&gt;Them:&lt;/em&gt; “It’ll be another 3 days; they need to go get the tape.”&lt;br /&gt;
&lt;em&gt;Me:&lt;/em&gt; “Well, I guess we’ll have to wait”&lt;/p&gt;
&lt;h3&gt;Three days later... again&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Me:&lt;/em&gt; “Bet you’re getting fed up with my phone calls.”&lt;br /&gt;
&lt;em&gt;Them:&lt;/em&gt; &amp;lt;nervous laugh&amp;gt;&lt;br /&gt;
&lt;em&gt;Me:&lt;/em&gt; “So?”&lt;br /&gt;
&lt;em&gt;Them:&lt;/em&gt; “That restore failed, too. They’re going to try the previous day’s backup.”&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;A few backups later, it finally worked. Total time: about 2 weeks. Total time to do this in the cloud: 1/2 day.&lt;/p&gt;
&lt;p&gt;Disclaimer: of course, what I&apos;ve just done with AWS could all be done in a physical environment with online backups but it would require custom software, effort and, in a big company, lots of arguments about shredding costs across departments. Cloud providers such as Amazon give you this out-of-the box with the smallest amount of configuration so, not only is everything there ready to use at the get-go, you don&apos;t have to have the discussions justifying the cost of all that extra software; all you pay is for the extra disk usage.&lt;/p&gt;


&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/my-love-affair-with-the-cloud</link>
                <guid>https://tomm.org/tech/my-love-affair-with-the-cloud</guid>
                <pubDate>2014-11-08T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Little code, much immutability: Java 8 streams and immutable collections</title>
                <description>
&lt;p&gt;I finally got to play with Java 8 &lt;a href=&quot;http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html&quot;&gt;streams&lt;/a&gt; and &lt;a href=&quot;http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html&quot;&gt;lambdas&lt;/a&gt; in more than a &quot;Hello, World&quot; way a couple of weeks ago. It was all pretty basic stuff&amp;mdash;a map here, a few filters there, a sprinkling of counts&amp;mdash;but it&apos;s lovely to finally have first-class support for things we&apos;ve been using in &lt;a href=&quot;https://code.google.com/p/guava-libraries/&quot;&gt;Guava&lt;/a&gt; for years, and lambdas make the syntax much more terse and readable.&lt;/p&gt;

&lt;p&gt;The only hurdle I had to overcome was making streams work nicely with Guava&apos;s &lt;a href=&quot;https://code.google.com/p/guava-libraries/wiki/ImmutableCollectionsExplained&quot;&gt;immutable collections&lt;/a&gt;. I&apos;ll not go on about why immutability is a good thing; I&apos;ve ranted before about how painful mutant mutable objects can be, so if you want to know how it burnt us &lt;a href=&quot;/tech/mutant-objects/&quot;&gt;go have a read&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It turns out that it&apos;s straightforward to have the result of processing a stream return an immutable collection, say an &lt;a href=&quot;http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/ImmutableList.html&quot;&gt;ImmutableList&lt;/a&gt;. All that&apos;s needed is an appropriate implementation of the &lt;a href=&quot;http://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html&quot;&gt;&lt;code&gt;Collector&lt;/code&gt;&lt;/a&gt; interface. I started off with one like this:-&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class ImmutableListCollector&amp;lt;T&amp;gt; 
    implements Collector&amp;lt;T, ImmutableList.Builder&amp;lt;T&amp;gt;, List&amp;lt;T&amp;gt;&amp;gt;&amp;gt; {

    @Override
    public Supplier&amp;lt;Builder&amp;lt;T&amp;gt;&amp;gt; supplier() {
        return ImmutableList::builder;
    }

    @Override
    public BiConsumer&amp;lt;Builder&amp;lt;T&amp;gt;, T&amp;gt; accumulator() {
        return (builder, e) -&amp;gt; builder.add(e);
    }

    @Override
    public BinaryOperator&amp;lt;Builder&amp;lt;T&amp;gt;&amp;gt; combiner() {
        return (b1, b2) -&amp;gt; b1.addAll(b2.build());
    }

    @Override
    public Function&amp;lt;Builder&amp;lt;T&amp;gt;, List&amp;lt;T&amp;gt;&amp;gt; finisher() {
        return (builder) -&amp;gt; builder.build();
    }

    @Override
    public Set&amp;lt;Collector.Characteristics&amp;gt; characteristics() {
        return ImmutableSet.of();
    }
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Elsewhere, an &lt;code&gt;ImmutableCollectors&lt;/code&gt; class has a static method &lt;code&gt;toImmutableList()&lt;/code&gt; to return an instance of one of these, so using this &lt;code&gt;Collector&lt;/code&gt; looks like:-&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;List&amp;lt;String&amp;gt; myList = ImmutableList.of(&quot;1&quot;, &quot;2&quot;);
List&amp;lt;String&amp;gt; filtered = myList.stream()
                              .filter(x -&amp;gt; x.equals(&quot;1&quot;))
                              .collect(ImmutableCollectors.toImmutableList());&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;All well and good, but a little verbose. I was having another read of &lt;a href=&quot;http://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html&quot;&gt;Collector&apos;s Javadoc&lt;/a&gt; when I noticed the static method &lt;code&gt;of&lt;/code&gt;. Interesting. I wonder what would happen if I used it? This happens:-&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public static &amp;lt;T&amp;gt; Collector&amp;lt;T, ImmutableList.Builder&amp;lt;T&amp;gt;, ImmutableList&amp;lt;T&amp;gt;&amp;gt; 
    toImmutableList() {
      return Collector.of(
                ImmutableList.Builder::new, 
                (builder, e) -&amp;gt; builder.add(e),
                (b1, b2) -&amp;gt; b1.addAll(b2.build()), 
                (builder) -&amp;gt; builder.build()
             );

public static &amp;lt;T&amp;gt; Collector&amp;lt;T, ImmutableSet.Builder&amp;lt;T&amp;gt;, ImmutableSet&amp;lt;T&amp;gt;&amp;gt;  
    toImmutableSet() {
      return Collector.of(
                ImmutableSet.Builder::new, 
                (builder, e) -&amp;gt; builder.add(e),
                (b1, b2) -&amp;gt; b1.addAll(b2.build()), 
                (builder) -&amp;gt; builder.build()
             );
    }
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Wow, so little code! With fewer lines than we defined an &lt;code&gt;ImmutableListCollector&lt;/code&gt; in, we&apos;ve got a &lt;code&gt;Collector&lt;/code&gt; for both an &lt;code&gt;ImmutableList&lt;/code&gt; and an &lt;code&gt;ImmutableSet&lt;/code&gt;, with lines to spare for &lt;code&gt;ImmutableMap&lt;/code&gt; some day soon!&lt;/p&gt;

&lt;p&gt;It&apos;s refreshing being able to be more succinct in Java. The next challenge is how we use all of this in existing codebases where Guava functional idioms are already used a fair bit. To preserve our sanity I suspect we&apos;ll continue to use Guava where we already do and use Java 8 shininess in new projects, but if you&apos;ve found a way of having the two live together harmoniously without driving you mad I&apos;d love to hear how.&lt;/p&gt;

&lt;p&gt;&lt;sub&gt;This originally appeared on &lt;a href=&quot;http://metabroadcast.com&quot;&gt;our company&lt;/a&gt; &lt;a href=&quot;http://metabroadcast.com/blog&quot;&gt;blog&lt;/a&gt;.&lt;/sub&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/little-code-much-immutability</link>
                <guid>https://tomm.org/tech/little-code-much-immutability</guid>
                <pubDate>2014-09-25T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Variously CORS</title>
                <description>
&lt;p&gt;To make things snappier for web clients, all our APIs at &lt;a href=&quot;http://metabroadcast.com&quot;&gt;work&lt;/a&gt; support &lt;a href=&quot;http://en.wikipedia.org/wiki/Cross-origin_resource_sharing&quot;&gt;CORS&lt;/a&gt;. Avid readers of the MetaBroadcast blog will remember that we&apos;ve already &lt;a href=&quot;http://metabroadcast.com/blog/moving-engage-to-angularjs-having-fun-with-cors&quot;&gt;talked about&lt;/a&gt; the fun and games this involves, but today I&apos;m going to cover a particular subtlety that we missed previously.&lt;/p&gt;

&lt;h3&gt;Less-than-helpful error messages are less-than-helpful&lt;/h3&gt;

&lt;p&gt;Debugging CORS problems is Not Fun. Browsers don&apos;t deliberately mislead, but they certainly don&apos;t go out of their way to give helpful error messages. So when we had an intermittent problem with a small number of requests failing, seemingly randomly, it proved a little tricky to hunt down.&lt;/p&gt;

&lt;p&gt;Before I go into the detail, I&apos;ll do a quick recap on CORS. CORS, cross-origin resource sharing, allows a website to request content from others. Validation is performed to avoid those age-old cross-site scripting vulnerabilities. It has a number of benefits over &lt;a href=&quot;http://en.wikipedia.org/wiki/JSONP&quot;&gt;JSONP&lt;/a&gt;, an older alternative, such as &lt;a href=&quot;http://metabroadcast.com/blog/who-s-faster-json-or-jsonp&quot;&gt;performance&lt;/a&gt; and support of a wider set of HTTP verbs.&lt;/p&gt;

&lt;p&gt;In essence, a server tells a web browser whether it&apos;s allowed to make a request, based on which website is making the call. For example, if I&apos;ve developed a site at http://greattvmetadata.com/ which makes calls to &lt;a href=&quot;http://voila.metabroadcast.com&quot;&gt;Voila&lt;/a&gt;, Voila will check whether a given API key is allowed to get content when called from http://greattvmetadata.com/. &lt;a href=&quot;http://metabroadcast.com/team#max&quot;&gt;Max&lt;/a&gt; already covered most of the server-side changes needed in that earlier post: adding number of headers telling a web browser which request types are allowed, and from what hosts.&lt;/p&gt;

&lt;p&gt;So, back to the problem we were having. Occasionally, apparently at random, some requests were failing with the usual, not very informative, &quot;something went wrong with CORS&quot; error. We checked the server configuration, checked for any concurrency problems on the server-side when updating said configuration, nothing.&lt;/p&gt;

&lt;h3&gt;Vary-ious caching&lt;/h3&gt;

&lt;p&gt;After a little pondering, we finally figured out what was going on. Caching. Web browsers &amp;ndash; and proxies between browsers and origin servers &amp;ndash; will cache responses from origin servers. To do this they associate a response from a web server with a key, for example:&lt;/p&gt;
&lt;p&gt;
&lt;code&gt;&quot;https://voila.metabroadcast.com/1.0/content?id=cf2&quot; =&amp;gt;  lots of data about EastEnders&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;The trick is deciding the key to use when caching responses. Obviously that involves the request URI, but with the likes of content negotiation, that&apos;s not quite good enough. Step forward the &lt;code&gt;Vary&lt;/code&gt; response header. This chap tells clients what request headers a web server will change the response for. &lt;code&gt;Accept&lt;/code&gt; is a common one to include, to cover that content negotiation case.&lt;/p&gt;

&lt;p&gt;How does this affect CORS? Well, the web browser sends an &lt;code&gt;Origin&lt;/code&gt; header to tell the server which website has made the request. The server then decides whether to allow the request, and sets a response header &lt;code&gt;Access-Control-Allow-Origin&lt;/code&gt; if so. Often a server just responds with &lt;code&gt;*&lt;/code&gt; which means requests originating from any website are allowed. We need to be more selective, though, so we respond with the client&apos;s &lt;code&gt;Origin&lt;/code&gt; header if the server is happy to carry out the request.&lt;/p&gt;

&lt;p&gt;You got it: the response &lt;em&gt;varies&lt;/em&gt; depending on the &lt;code&gt;Origin&lt;/code&gt; header. As we weren&apos;t telling the client that through the &lt;code&gt;Vary&lt;/code&gt; header it had no idea. This is what was happening:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Client requests &lt;code&gt;https://voila.metabroadcast.com/1.0/content?id=cf2&lt;/code&gt; from website &lt;code&gt;https://oursite-stage.metabroadcast.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Server responds with details about upcoming episodes of EastEnders, and includes the header &lt;code&gt;Access-Control-Allow-Origin: https://oursite-stage.metabroadcast.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;We then switch to using the production website at &lt;code&gt;https://oursite.metabroadcast.com&lt;/code&gt; (in the same browser)&lt;/li&gt;
&lt;li&gt;When a request is made for &lt;code&gt;https://voila.metabroadcast.com/1.0/content?id=cf2&lt;/code&gt; the browser decides it already has a cache of that, so returns it instead&lt;/li&gt;
&lt;li&gt;BUT that cached response has the header &lt;code&gt;Access-Control-Allow-Origin: https://oursite-stage.metabroadcast.com&lt;/code&gt;, so the web browser denies the request with a CORS error&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By adding the header &lt;code&gt;Vary: Origin&lt;/code&gt;, the browser knows to include the value of the &lt;code&gt;Origin&lt;/code&gt; request header in its cache key, so it&apos;ll look like &lt;/p&gt;
&lt;p&gt;
&lt;code&gt;&quot;Origin: https://oursite.metabroadcast.com,https://voila.metabroadcast.com/1.0/content?id=cf2&quot; =&amp;gt;  lots of data about EastEnders&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;and so not share the response across different client URIs. A one-line change, and no more CORS errors!&lt;/p&gt;
&lt;p&gt;In summary: if you&apos;re doing CORS and returning specific hosts in your &lt;code&gt;Access-Control-Allow-Origin&lt;/code&gt; response header, &lt;em&gt;make damn sure to include &lt;code&gt;Origin&lt;/code&gt; in the the &lt;code&gt;Vary&lt;/code&gt; response header too or you&apos;ll be in a world of pain&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;sub&gt;This originally appeared on &lt;a href=&quot;http://metabroadcast.com&quot;&gt;our company&lt;/a&gt; &lt;a href=&quot;http://metabroadcast.com/blog&quot;&gt;blog&lt;/a&gt;.&lt;/sub&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/variously-cors</link>
                <guid>https://tomm.org/tech/variously-cors</guid>
                <pubDate>2014-08-26T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Working from home</title>
                <description>
&lt;p&gt;We have a flexible working policy at &lt;a href=&quot;http://metabroadcast.com&quot;&gt;work&lt;/a&gt;. That means that, so long as it’s fine with your team and you’re around for our daily &lt;a href=&quot;http://metabroadcast.com/blog/great-minds-get-together&quot;&gt;Happy Hour&lt;/a&gt; at midday, then all’s good with your preferred working pattern. In that vein, some people work from home one day a week, me included.&lt;/p&gt;

&lt;p&gt;It’s quite straightforward to work from home as effectively as working from the office, but it needs a little planning and dispelling of myths. I’ll cover the planning first.&lt;/p&gt;

&lt;h3 id=&quot;logistics-and-equipment&quot;&gt;Logistics and equipment&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Be prepared: I usually work from home on a Monday so on a Friday evening as I leave the office I need to already be thinking about Monday to make sure I’ve got everything with me that I’ll need. That’s generally just my laptop (which I take home anyway), but occasionally it’s the odd scribble, too.&lt;/li&gt;
  &lt;li&gt;Kit: A bit of outlay up-front to ensure a comfortable environment is key. I use my work laptop, so that’s covered but other things I needed to purchase were:
    &lt;ul&gt;
      &lt;li&gt;The monitor: I’ve become attached to having a monitor alongside my laptop screen, so this was essential for me. I plumped for a Dell U2412M; a decent price for the size.&lt;/li&gt;
      &lt;li&gt;A comfortable office chair: Sitting at a dining room table chair may be comfortable for the duration of a meal, but it gets pretty uncomfortable if you spend all day at it. As someone who’s had the odd back problem in the past I know how important it is to get this right, and went for a home office chair from the ever-reliable John Lewis (other retailers are available, but why would you?)&lt;/li&gt;
      &lt;li&gt;Speakers: We &lt;a href=&quot;http://metabroadcast.com/blog/non-canonical-friday-or-music-to-my-ears&quot;&gt;play music in the office&lt;/a&gt; and, in order to feel part of the team when many miles away, I usually stream the same playlist. So a pair of speakers was an essential item on my list.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Set-up: much like my desk in the office, I’ve positioned my desk at home to be looking out of the window. Lots of natural light, and the windows to cool me down on hot summer days.&lt;/li&gt;
  &lt;li&gt;Spares
    &lt;ul&gt;
      &lt;li&gt;There’s nothing worse than getting home only to find you’ve left a crucial bit of kit in the office. To minimise what I lug around, I don’t take my laptop charger home, but use the one from my home laptop. As it’s an older MacBook Pro I need to use a &lt;a href=&quot;http://store.apple.com/uk/product/MD504ZM/A/magsafe-to-magsafe-2-converter&quot;&gt;converter&lt;/a&gt;. These little blighters are perfectly sized for getting lost so, after a near-miss, I’ve now got a disaster recovery plan in place involving a spare one stashed in a drawer. I’d be very unhappy to have to go into the office just for a charger!&lt;/li&gt;
      &lt;li&gt;A backup Internet connection: until now I’ve made do by tethering my phone in case of emergency but will probably invest in something like a MiFi soon.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;working-with-people&quot;&gt;Working with people&lt;/h3&gt;

&lt;p&gt;I spend a lot of my time working with other people. We use Skype a lot for chat messages, so no change there by working remotely, but I also rely on it for calls when I’m out of the office. When I call people I always have video on; it makes things feel much more personal. It does mean that I can’t sit working in my pyjamas, mind. I’ve not tried it yet, but quite like the look of &lt;a href=&quot;http://perch.co/&quot;&gt;Perch&lt;/a&gt; for making me feel part of the office even when I’m at home. It’s similar to the approach people took with &lt;a href=&quot;http://www.avistar.com/&quot;&gt;Avistar&lt;/a&gt; video calls at my old work, where they had a video link on all day long to colleagues around the globe.&lt;/p&gt;

&lt;p&gt;One of the hardest challenges is dispelling myths. Working from home only works if you can do everything you do in the office. I’ve had people say to me on more than one occasion “Oh, you’re working from home on Monday so we can sort that on Tuesday”, to which my response is always “No, we’ll be fine to cover it on Monday”. Not to mention the odd slip-up of “You’re off tomorrow”, which I swiftly reply with “No, I’m working from home”!&lt;/p&gt;

&lt;p&gt;There are very occasionally things that are easier to do around a whiteboard, so it makes sense to do them when everyone’s in the same room, but that’s easily planned. &lt;a href=&quot;http://www.whosoff.com&quot;&gt;WhosOff&lt;/a&gt; keeps track of not only holidays but also days we work from home. That way everyone knows each other’s movements.&lt;/p&gt;

&lt;p&gt;What do you find helps you when working remotely? Come tell me over a pint at &lt;a href=&quot;http://metabroadcast.com/blog/come-to-our-august-13th-metabeertalks-people-choose-people&quot;&gt;tomorrow’s #MetaBeerTalks&lt;/a&gt;.&lt;/p&gt;

</description>
                <link>https://tomm.org/misc/working-from-home</link>
                <guid>https://tomm.org/misc/working-from-home</guid>
                <pubDate>2014-08-12T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>My Chrome extensions</title>
                <description>
&lt;p&gt;I&apos;ve lost count of the number of times I&apos;ve had to dig out a link to the JSON prettifier Chrome extension I use, having been asked &quot;which JSON prettifier is that?&quot; by the person looking over my shoulder as they stare jealously at the beautifully-prettified JSON in my browser with its sexy counts of array elements.&lt;/p&gt;
&lt;p&gt;Since the search term &quot;sexy JSON formatter&quot; doesn&apos;t work too well and &quot;JSON formatter&quot; doesn&apos;t discriminate well enough across the plethora of extensions available, I have to go find the ID of the extension every time. Bored of doing this, I decided a blog post was in order to record a link to the plugin once and for all. So, without any further ado, I give you: my Chrome extensions.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en-US&quot;&gt;JSON Formatter&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The very reason for this post. The best JSON formatter in &lt;strike&gt;town&lt;/strike&gt; the Chrome web store, in my opinion. It&apos;s fast and, crucially, it gives you a lovely little count of the number of objects in an array.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/cfhdojbkjhnklbpkdaibdccddilifddb&quot;&gt;Adblock Plus&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I tired of ads following me around the Web after visiting a certain furniture website, as I ranted about at &lt;a href=&quot;http://metabroadcast.com/blog/metabeertalks-june-2014-summary&quot;&gt;#MetaBeerTalks in June&lt;/a&gt;. With this plugin I don&apos;t notice.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/obhlfmheblhjhkmacldlhdnbgbaiigba&quot;&gt;APK Downloader&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Useful for getting at Android packages from the Chrome store.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/fngmhnnpilhplaeedifhccceomclgfbg&quot;&gt;EditThisCookie&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I think you can guess what this does. You got it: add, edit, remove cookies. An added bonus is the &lt;strike&gt;Easter&lt;/strike&gt;Christmas egg.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/hipbfijinpcgfogaopmgehiegacbhmob&quot;&gt;Feedly&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;With the demise of Google Reader, I found feedly to be a good replacement. A decent browser plugin compliments the Android app for reading on-the-go.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/fllaojicojecljbmefodhfapmkghcbnh&quot;&gt;Google Analytics Opt-out&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Don&apos;t want your own hits on your website to skew your Google Analytics stats, or concerned from a privacy perspective? This plug-in will ensure your browsing information won&apos;t be sent to Google.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/gcbommkclmclpchllfjekcdonpmejbdp&quot;&gt;HTTPS Everywhere&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Because some people can&apos;t work out how to do a redirect to a more secure protocol.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/hdokiejnpimakedhajhdlcegeplioahd&quot;&gt;LastPass&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;After the umpteenth leak of plaintext, and badly hashed, passwords by companies that should know better, I decided it was high time to ween myself away from standard passwords for random websites. LastPass is truly excellent. It may not have the shiniest of interfaces but what it lacks in polish is made up for in features. Two-factor authentication, password sharing, a decent mobile app, to name but a few.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/idgpnmonknjnojddfkpgkljpfnnfcklj&quot;&gt;ModHeader&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Tweaking request headers can be very useful.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/chphlpgkkbolifaimnlloiipkdnihall&quot;&gt;OneTab&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I, like everyone else, sometimes find myself with far too many tabs open. This handy extension closes said tabs to save on memory, letting you restore them later by selecting from a list of tabs.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/ipkfnchcgalnafehpglfbommidgmalan&quot;&gt;Send to Kindle&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;An easy way to get Web pages over to my Kindle for later reading.&lt;/p&gt;
&lt;h3&gt;Others?&lt;/h3&gt;
&lt;p&gt;Some people &lt;a href=&quot;http://metabroadcast.com&quot;&gt;at work&lt;/a&gt; use &lt;a href=&quot;https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm&quot;&gt;Postman&lt;/a&gt; for playing with APIs. I&apos;m a command-line person myself, so prefer &lt;code&gt;curl&lt;/code&gt;, but you may find it useful. &lt;strike&gt;&lt;a href=&quot;http://metabroadcast.com/team#tiff&quot;&gt;Tiff&lt;/a&gt; finds &lt;a href=&quot;https://chrome.google.com/webstore/detail/boomerang-for-gmail/mdanidgdpmkimeiiojknlnekblgmpdll&quot;&gt;Boomerang for GMail&lt;/a&gt; helpful, too, for scheduling mails&lt;/strike&gt; I took a look at Boomerang and, because GMail doesn&apos;t offer any fine-grained access control, you need to give it full access to your mailbox; something there&apos;s no chance I&apos;ll do, nor could I recommend anyone else does. &lt;/p&gt;
&lt;p&gt;What Chrome extensions can&apos;t you live without? Do you have a better one for doing any of the above, or anything else for that matter? &lt;a href=&quot;https://twitter.com/intent/tweet?screen_name=tfm&quot;&gt;Drop me a line&lt;/a&gt; if you do.&lt;/p&gt;

&lt;p&gt;&lt;sub&gt;This originally appeared on &lt;a href=&quot;http://metabroadcast.com&quot;&gt;our company&lt;/a&gt; &lt;a href=&quot;http://metabroadcast.com/blog&quot;&gt;blog&lt;/a&gt;.&lt;/sub&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/my-chrome-extensions</link>
                <guid>https://tomm.org/tech/my-chrome-extensions</guid>
                <pubDate>2014-07-28T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>t2 anyone?</title>
                <description>
&lt;p&gt;I read with interest Amazon&apos;s recent &lt;a href=&quot;http://aws.amazon.com/blogs/aws/low-cost-burstable-ec2-instances/&quot;&gt;announcement&lt;/a&gt; about the new T2 range of instances with burstable performance. On the face of it, they look like the perfect fit for unpredictable workloads, such as API servers for &lt;a href=&quot;http://metabroadcast.com&quot;&gt;MetaBroadcast&lt;/a&gt;&apos;s &lt;a href=&quot;http://atlas.metabroadcast.com/&quot;&gt;Atlas API&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The API is served by instances running in an &lt;a href=&quot;http://aws.amazon.com/autoscaling/&quot;&gt;auto-scaling group&lt;/a&gt;, where we use various metrics to trigger changes to the number of instances. However, there&apos;s always going to be a lag between instructing the group to scale up and having enough resource to deal with a traffic spike. That can be as much as a couple of minutes, by which time the spike may have gone. The obvious solution is to over-provision, but your AWS bill at the end of the month will be more than it need be.&lt;/p&gt;
&lt;h3&gt;t2 instances to the rescue?&lt;/h3&gt;
&lt;p&gt;As I said, T2 instances offer burstable performance. This means you&apos;re paying for a baseline performance, and then get credits to use more CPU for some of the time. Taking the example of a T2 medium instance, you get 40% of a CPU as a baseline performance, then 24 CPU credits per hour. Each credit entitles you to increase your CPU usage to 100% for a minute, and will roll over until you have a day&apos;s worth of credits in the pot: 576 in this case.&lt;/p&gt;

&lt;p&gt;As the credits can be used immediately as demand increases, you don&apos;t have the ramp-up delay that causes problems with adding new instances to an auto-scaling group to cope with a spike. &lt;/p&gt;

&lt;p&gt;There are a couple of new CloudWatch metrics: CPUCreditUsage and CPUCreditBalance. These could be used to introduce new T2 instances into an auto-scaling group if you see you&apos;re often running out of credits - an indication of being under-resourced.&lt;/p&gt;

&lt;h3&gt;local storage&lt;/h3&gt;
&lt;p&gt;This section will be short: there is none. Fine for our API servers, which are completely stateless, but may not suit every use case. If you need local storage then it&apos;s EBS volumes with the associated cost and latency that brings.&lt;/p&gt;

&lt;h3&gt;vpc only&lt;/h3&gt;
&lt;p&gt;As with other new features released in AWS, T2 instances are only available in VPC. Not surprising, given EC2 &quot;classic&quot; is being phased out, but it highlights the need for anyone still on classic to switch to VPC as soon as they can. That&apos;s something we&apos;re in the process of doing at work, too.&lt;/p&gt;

&lt;h3&gt;cost comparison&lt;/h3&gt;

&lt;p&gt;So, is it worth it? It&apos;s a little tricky to do a direct cost comparison, since Amazon aren&apos;t publishing their normalised CPU capacity measure, the ECU, for T2 instances, but we&apos;ll take a look the bang you&apos;re getting for your buck.&lt;/p&gt;
&lt;p&gt;I&apos;ve chosen to compare the t2.medium and c3.large instance types, since they&apos;re similar in terms of memory and CPU, the measures we&apos;re interested in for our API servers.&lt;/p&gt;
&lt;p&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5px&quot;&gt;
  &lt;tr&gt;
    &lt;th&gt;Type&lt;/th&gt;
    &lt;th&gt;vCPU&lt;/th&gt;
    &lt;th&gt;ECU&lt;/th&gt;
    &lt;th&gt;Local storage&lt;/th&gt;
    &lt;th&gt;Memory&lt;/th&gt;
    &lt;th&gt;On-demand price ($/hr)&lt;/th&gt;
  &lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;t2.medium&lt;/td&gt;
  &lt;td&gt;2&lt;/td&gt;
  &lt;td&gt;Unknown &lt;sup&gt;*&lt;/sup&gt;&lt;/td&gt;
  &lt;td&gt;None&lt;/td&gt;
  &lt;td&gt;4 gb&lt;/td&gt;
  &lt;td&gt;$0.056&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;c3.large&lt;/td&gt;
  &lt;td&gt;2&lt;/td&gt;
  &lt;td&gt;7&lt;/td&gt;
  &lt;td&gt;2 x 16gb SSD&lt;/td&gt;
  &lt;td&gt;3.75 gb&lt;/td&gt;
  &lt;td&gt;$0.12&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;&lt;sup&gt;*&lt;/sup&gt;I did try to guess a value for the ECU of a t2.medium instance, but I wasn&apos;t able to do so with enough certainty to make it useful. If you assume all credits are used each hour, you&apos;d get 64% of maximum CPU per hour by my reckoning. However, the AWS blog post mentions that it&apos;s a percentage of a single CPU, which compares to 2 vCPUs on a c3.large. You appear, then, to be a whole lot worse off with a t2.medium than a c3.large for CPU, even with the discount in price.&lt;/p&gt;
&lt;h3&gt;conclusion&lt;/h3&gt;
&lt;p&gt;We continue to be impressed by the new features AWS add to their offering. The vagueness of the information available means that we don&apos;t yet know if these new instance types will result in a cost reduction or just smoother scaling of resoures as demand increases. As soon as we&apos;re done with our VPC migration, or perhaps as part of it, we&apos;ll be spinning some up and benchmarking them to find out. If you&apos;ve already used T2 instances for production workloads, I&apos;d love to hear from you. It happens to be #MetaBeerTalks on Wednesday, so why not &lt;a href=&quot;http://metabroadcast.com/blog/come-to-our-july-16th-metabeertalks-sport-in-broadcast&quot;&gt;pop by&lt;/a&gt; and we can chat then?&lt;/p&gt;

&lt;p&gt;&lt;sub&gt;This originally appeared on &lt;a href=&quot;http://metabroadcast.com&quot;&gt;our company&lt;/a&gt; &lt;a href=&quot;http://metabroadcast.com/blog&quot;&gt;blog&lt;/a&gt;.&lt;/sub&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/t2-anyone</link>
                <guid>https://tomm.org/tech/t2-anyone</guid>
                <pubDate>2014-07-14T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>support, anywhere</title>
                <description>
&lt;p&gt;A new competitor to Team Sky has recently emerged from the heart of Bloomsbury. Composed of &lt;a href=&quot;http://metabroadcast.com/team/&quot;&gt;MetaBroadcats&lt;/a&gt; past and present, and with three members cycling &lt;a href=&quot;http://www.prudentialridelondon.co.uk/&quot;&gt;RideLondon&lt;/a&gt; this year, Team MetaBroadcast has been gathering pace for a little while now and is getting to be quite a crowd. It was only a few weeks ago, though, that we went for our inaugural ride together.&lt;/p&gt;
&lt;p&gt;After some negotiation on the start time, and on what was the hottest day of the year so far, we met at Richmond Park&apos;s Kingston Gate at the sprightly hour of 9 o&apos;clock, at the start of a route which took in all the Surrey hills bits of the RideLondon course. Good training for August!&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;Having quite a few of us on out on the road together had presented us with a bit of a challenge: systems support. I happened to be on call that weekend and while there was only a small chance of something going awry with a component in a way that didn&apos;t self-heal, there was a chance nonetheless. Normally, I&apos;d ask someone else to cover the hours spent wheeling around the countryside, but all candidates for said cover were going to be with me, or otherwise engaged. So I&apos;d need to support from the bike.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3&gt;problem #1: the computer&lt;/h3&gt;
&lt;p&gt;Last year when &lt;a href=&quot;https://tomm.org/tags/#london-paris-ref&quot;&gt;I rode from London to Paris&lt;/a&gt;, I found a &lt;a href=&quot;http://www.amazon.co.uk/Ultrathin-Wireless-Bluetooth-Keyboard-Aluminum-Black/dp/B00BKW2410&quot;&gt;Bluetooth keyboard&lt;/a&gt; and my Nexus 4 worked great together to let me write blog posts on the road. That was perfect with a large rucksack that could fit a large, light, keyboard, but no good for putting in the back pocket of a jersey. The solution was easy: a &lt;a href=&quot;http://www.amazon.co.uk/Perixx-PERIBOARD-805-Bluetooth-Foldable-Keyboard/dp/B0083JE5Q0&quot;&gt;folding Bluetooth keyboard&lt;/a&gt;. With a bit of foresight and a next-day delivery it arrived in good time for the ride.&lt;/p&gt;
&lt;h3&gt;problem #2: the vpn&lt;/h3&gt;
&lt;p&gt;We used an L2TP over IPSec VPN which, due to a &lt;a href=&quot;https://code.google.com/p/android/issues/detail?id=23124&quot;&gt;long-standing bug&lt;/a&gt;, isn&apos;t supported on stock Android builds. I was all set to apply a workaround but at midnight the night before when I came to do it, I only then realised that rooting my phone would wipe the contents. Not the sort of thing I wanted to embark on at that hour, especially as all my two-factor authentication tokens&amp;mdash;also essential for support&amp;mdash;live on the self same phone. I also didn&apos;t much fancy changing the server components at midnight. Now, we&apos;d looked a little at &lt;a href=&quot;http://en.wikipedia.org/wiki/OpenVPN&quot;&gt;OpenVPN&lt;/a&gt; in the past but prefered to stick with something supported natively by operating systems. However, it already being far too late on a Saturday night, I decided to give the &lt;a href=&quot;https://openvpn.net/index.php/access-server/download-openvpn-as-vm.html&quot;&gt;OpenVPN AWS appliance&lt;/a&gt; a whirl.&lt;/p&gt;
&lt;p&gt;It was a breeze to &lt;a href=&quot;https://docs.openvpn.net/how-to-tutorialsguides/virtual-platforms/amazon-ec2-appliance-ami-quick-start-guide/&quot;&gt;set up&lt;/a&gt; and within 30 minutes I was all set up with VPN and terminal access. With both of these problems overcome, only the hills themselves remained to be conquered.&lt;/p&gt;
&lt;h3&gt;problems solved!&lt;/h3&gt;
&lt;p&gt;Setting off the next day, I knew that if any calls came through from my dear friend, &lt;a href=&quot;http://www.pagerduty.com/&quot;&gt;PagerDuty&lt;/a&gt;, I&apos;d be all set. None did, thankfully, so we were able to enjoy the day without PagerDuty&apos;s dulcet tones interrupting. Rolling through the hills, we took in the wonderful views across the Downs, finishing the day with a climb of Box Hill before heading to the great &lt;a href=&quot;http://www.girocycles.com/&quot;&gt;G!RO cafe&lt;/a&gt; to reward ourselves with coffee and cake.&lt;/p&gt;
&lt;p&gt;All in all, a successful day. We&apos;ve now even switched to the OpenVPN appliance for all our VPN needs. It&apos;s more stable (thanks, mainly I think, to its ability to use either TCP or UDP), requires less administration, and works everywhere, even if you do need to install a client for it to do so. &lt;/p&gt;
&lt;p&gt;Supporting systems 24/7 can be a burden on a team, but we try to keep that to a minimum by making sure the most appropriate device can be used for wherever you are and whatever you&apos;re up to. If you like the sound of this flexibility over a work-prescribed brick of a laptop when you&apos;re on support, why not check out the MetaBroadcast &lt;a href=&quot;http://metabroadcast.com/jobs/&quot;&gt;jobs page&lt;/a&gt;? Or if you fancy joining us on one our weekend jaunts to the countryside, then &lt;a href=&quot;https://twitter.com/intent/tweet?text=@tfm&quot;&gt;drop me a line&lt;/a&gt;!&lt;/p&gt;


&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/support-anywhere</link>
                <guid>https://tomm.org/tech/support-anywhere</guid>
                <pubDate>2014-06-30T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Hive or: how I learned to stop worrying and love SQL again</title>
                <description>
&lt;p&gt;Today I was going to write about the inaugural Team &lt;a href=&quot;http://metabroadcast.com/&quot;&gt;MetaBroadcast&lt;/a&gt; ride we recently went on. However, events have overtaken me, and that&apos;ll have to wait for another day. Instead I&apos;m going to write about my new-found love: &lt;a href=&quot;http://hive.apache.org/&quot;&gt;Hive&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;At work we&apos;re analysing some largish datasets at the moment, and it&apos;s fallen to me to get a feel for them with some ad-hoc queries. We&apos;ve previously done this with some &lt;a href=&quot;http://pig.apache.org/&quot;&gt;Pig&lt;/a&gt; scripts but as someone who&apos;s written more lines of SQL in their lifetime than is good for anyone&apos;s sanity (I once even dreamt SQL), I was struggling to adjust to it and constantly thinking &quot;this&apos;d be a cinch in SQL&quot;.&lt;/p&gt;
&lt;p&gt;So, after a bit of a battle trying to get Pig to do a histogram, I conceded defeat and fired up a Hive cluster.&lt;/p&gt;
&lt;p&gt;We&apos;re using AWS&apos;s &lt;a href=&quot;http://aws.amazon.com/elasticmapreduce/&quot;&gt;EMR&lt;/a&gt;, so it was pretty straightforward. After installing the &lt;a href=&quot;https://aws.amazon.com/developertools/Elastic-MapReduce/2264&quot;&gt;command-line tools&lt;/a&gt; and &lt;a href=&quot;http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-cli-install.html&quot;&gt;configuring them&lt;/a&gt; (yes, another set of AWS command-line tools yields yet another place to put your credentials), you can start a cluster with just:-&lt;/p&gt;
&lt;pre&gt;./elastic-mapreduce \
       --create \
       --alive \
       --name &quot;My Hive cluster&quot; \ 
       --num-instances 3 \
       --instance-type m3.xlarge \
       --hive-interactive&lt;/pre&gt;
&lt;p&gt;Wait a bit and, BAM, you&apos;ve got yourself a cluster of one master node and two core nodes to do with as you please. This brings up an interactive cluster: one that will live until you kill it, the alternative being batch cluster to execute a specific task or tasks. I opted for an interactive one as I&apos;d got a bunch of ad-hoc queries to run and it saves repeatedly spinning up and down instances.&lt;/p&gt;
&lt;p&gt;That&apos;s all well and good but where next? We need to get ourselves some data. Hive natively supports files from S3, which is quite useful. After logging on to the master node, and firing up &lt;code&gt;hive&lt;/code&gt;, a table can be defined thus, which uses S3 files as a source:-
&lt;pre&gt;CREATE EXTERNAL TABLE actions (
  user_name STRING, 
  action_time STRING, 
  description STRING, 
  id STRING
) 
ROW FORMAT DELIMITED FIELDS TERMINATED BY &apos;,&apos; 
                     LINES TERMINATED BY &apos;\n&apos; 
LOCATION &apos;s3://our-bucket/data/&apos;;
&lt;/pre&gt;
&lt;p&gt;It&apos;s important to note here that the table is backed by S3 data, rather than populated with S3 data. This has performance implications because every time you access it, there&apos;ll be a hop to S3. If you can&apos;t cope with that then you could always read the file to your local HDFS filesystem and import into your table from there using a &lt;code&gt;LOAD&lt;/code&gt; statement.&lt;/p&gt;
&lt;p&gt;Now to write some queries! With a browser tab open at the &lt;a href=&quot;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select&quot;&gt;Hive language manual&lt;/a&gt; I was all set. Within minutes I was like a pig in proverbial; &lt;code&gt;HAVING&lt;/code&gt; queries, subqueries... the list goes on. Even better, with EMR and spot instance, when a tricky query came up I was able to throw some cheap spot instances at the problem to make things happen faster:-
&lt;pre&gt;
./elastic-mapreduce \
       --jobflow my-jobflow-id \
       --add-instance-group task \
       --instance-type m3.xlarge \
       --instance-count 2 \
       --bid-price 0.2
&lt;/pre&gt;
&lt;p&gt;
The culmination of my queries was some subquery fun along the lines of:-&lt;/p&gt;
&lt;pre&gt;
 SELECT COUNT(actions.id), actions.user_name FROM actions
   JOIN titles on (actions.id = titles.id)
   JOIN 
         (  SELECT user_name FROM actions
              JOIN titles ON (actions.id = titles.id)
             WHERE name = &quot;The X Factor&quot;
          GROUP BY user_name
            HAVING COUNT(id) &amp;gt; 10
         ) a ON (actions.user_name = a.user_name)
   WHERE name != &quot;Strictly Come Dancing&quot;
GROUP BY actions.user_name
  HAVING COUNT(id) &amp;gt; 10
&lt;/pre&gt;
&lt;p&gt;Things were made more interesting by the input file format and Hive&apos;s lack of support for standard things like ISO-8601 datetimes, so I found myself writing &lt;a href=&quot;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF&quot;&gt;User-Defined Functions&lt;/a&gt; to manipulate input strings. All pretty straightforward, mind.&lt;/p&gt;
&lt;p&gt;I&apos;m very pleased I cut my losses with Pig and switched to Hive. I&apos;m sure there are cases where it may be better, but for the queries I&apos;ve been doing and given I&apos;m already well-versed in SQL, Hive was perfect for the job. I&apos;d love to hear your experiences with either of them so why not come talk to me about it over a pint at our next MetaBeerTalks a week today? We&apos;ll be upstairs at &lt;a href=&quot;http://www.beerintheevening.com/pubs/s/43/4397/Plough/Bloomsbury&quot;&gt;The Plough&lt;/a&gt; in Bloomsbury from 6pm. See you there?&lt;/p&gt; 


&lt;/p&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/hive-or-how-i-learned-to-stop-worrying-and-love-sql-again</link>
                <guid>https://tomm.org/tech/hive-or-how-i-learned-to-stop-worrying-and-love-sql-again</guid>
                <pubDate>2014-06-04T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Turning off the monitoring</title>
                <description>
&lt;p&gt;I love getting out on my bike at the weekend to enjoy what the countryside of Surrey has to offer. Not least because I&apos;m lucky enough to have a place in the &lt;a href=&quot;http://www.prudentialridelondon.co.uk/&quot;&gt;RideLondon&lt;/a&gt; sportive in August, so getting some miles in will help that be less painful. Tracking rides and progress is quite useful so, like many others, &lt;a href=&quot;http://www.strava.com/athletes/1022175&quot;&gt;I&lt;/a&gt; use &lt;a href=&quot;http://www.strava.com&quot;&gt;Strava&lt;/a&gt;. It&apos;s great if you&apos;re cycling alone but want to compare yourself to others: segments let you see how you&apos;re doing, and (hopefully) you can see your progression up the leaderboard.&lt;/p&gt;
&lt;p&gt;As I&apos;m going along I have all the stats in front of me on my Garmin GPS: instantaneous and average speed, cadence and heart rate, then on my return home I get &lt;a href=&quot;http://www.strava.com/activities/142613463/analysis&quot;&gt;pretty graphs&lt;/a&gt; to look at as soon as I upload the ride.&lt;/p&gt;
&lt;p&gt;I was out for a ride with a friend a couple of weeks back when we decided that the next ride we do will involve no such tracking. It&apos;s easy to get obsessed with stats: making sure you get in an whole segment, getting annoyed if you stop short of a segment end, if your GPS fails you on that best lap ever of Richmond Park, etc. Occasionally, it&apos;s good to just go out and enjoy the ride, oblivious to all those metrics. Scenes like this are worth it in themselves:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farm1.staticflickr.com/72/164896001_e8f7ef2540_o.jpg&quot; width=&quot;668&quot; height=&quot;501&quot; alt=&quot;The view from Box Hill&quot; align=&quot;middle&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I&apos;m looking forward to that next ride with him with all the gadgets left at home. Why am I telling you this? Well, I then thought: &quot;I wonder where else I can apply this?&quot;, and decided that I should think about the same at &lt;a href=&quot;http://metabroadcast.com&quot;&gt;work&lt;/a&gt;, switching off all metrics for a while and see how it felt. &lt;/p&gt;
&lt;p&gt;Just kidding. We live and breathe metrics for our APIs, and the last thing we&apos;d do is go without them. With the help of &lt;a href=&quot;https://metabroadcast.com/blog/turning-metrics-into-eye-candy&quot;&gt;Tasseo&lt;/a&gt; we have a dashboard where we can see the live response times, and every week we review the week&apos;s performance using &lt;a href=&quot;http://graphite.wikidot.com/&quot;&gt;Graphite&lt;/a&gt; graphs.
&lt;p&gt;In one of our recent weekly reviews, we noticed an upward slope in the API response times: nothing to be too concerned about, but if it continued at that rate we&apos;d have a problem in a while.&lt;/p&gt;
&lt;p&gt;This is completely expected with any complex system, and the trick is catching it early and acting on it. We swung into action adding additional metrics at key points to get to the bottom of the problem. After a few iterations of fixes, response times are back down to where we want them to be.&lt;/p&gt;
&lt;p&gt;So, no, we&apos;ll not be turning off our monitoring any time soon at work, but I am looking forward to doing so on the odd ride!&lt;/p&gt;


&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/turning-off-the-monitoring</link>
                <guid>https://tomm.org/tech/turning-off-the-monitoring</guid>
                <pubDate>2014-05-20T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>When Unauthorized is forbidden</title>
                <description>
&lt;p&gt;TL;DR: keep a copy of the HTTP spec nearby at all times.&lt;/p&gt;
&lt;p&gt;We&apos;ve been doing a lot of work recently on a shiny new &lt;a href=&quot;http://metabroadcast.com/blog/create-and-manage-your-atlas-api-key&quot;&gt;self-service interface&lt;/a&gt; for getting your hands on an &lt;a href=&quot;http://atlas.metabroadcast.com&quot;&gt;Atlas&lt;/a&gt; API key. As part of this, we&apos;ve created new endpoints in Atlas 4.0 for performing administrative functions, such as creating and configuring API keys, which are used by an &lt;a href=&quot;http://angularjs.org/&quot;&gt;AngularJS&lt;/a&gt; front-end. One particularly gnarly thing came up regarding authorisation, and IE10, which is worthy of a mention.&lt;/p&gt;
&lt;h3&gt;Intercepting the unauthorized&lt;/h3&gt;
&lt;p&gt;You&apos;re able to authenticate using &lt;a href=&quot;https://github.com/&quot;&gt;GitHub&lt;/a&gt;, &lt;a href=&quot;https://www.google.com&quot;&gt;Google&lt;/a&gt; or &lt;a href=&quot;https://twitter.com&quot;&gt;Twitter&lt;/a&gt;, and the OAuth tokens are passed through to the API as URI parameters. If the credentials were invalid or not present it responded with an HTTP code of 401, unauthorized, which seemed reasonable. On receiving a 401 response, an interceptor in the front-end then redirected to a login page. All was fine until we did some testing on IE10, where it refused point blank to redirect to the login page.&lt;/p&gt;
&lt;p&gt;Debugging in the browser revealed that the 401 response from the server was actually being rewritten as a 404. Weird. A little head-scratching ensued but, after a quick read of the HTTP spec, I had a hunch. It &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html&quot;&gt;states&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8)...&lt;/blockquote&gt;
&lt;p&gt;Ah, &lt;em&gt;MUST&lt;/em&gt; include a WWW-Authenticate header. Given this is not HTTP authentication, we clearly weren&apos;t doing that. We switched the response to a 400 to see what would happen and, sure enough, it wasn&apos;t rewritten!&lt;/p&gt;
&lt;h3&gt;Bad request&lt;/h3&gt;
&lt;p&gt;As we were violating the spec with our 401 response, browser behaviour is obviously undefined so it&apos;s fair enough that IE rewrote the 401 as a 404. As the 400 isn&apos;t as descriptive, we&apos;ve been careful to include error information in the body. If credentials are omitted you&apos;ll get:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;{
    &quot;message&quot;: &quot;Credentials are required&quot;,
    &quot;error_code&quot;: &quot;NOT_AUTHENTICATED&quot;,
    &quot;error_id&quot;: &quot;bdaecd9f-25ff-4301-a5e9-af3060c8e075&quot;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you&apos;d like to get your mitts on a wealth of video and audio metadata, why not give the new, self-service, &lt;a href=&quot;http://atlas.metabroadcast.com/admin&quot;&gt;Atlas admin website&lt;/a&gt; a whirl and get yourself an API key? It even works in IE10 now.&lt;/p&gt;

&lt;p&gt;&lt;sub&gt;This originally appeared on &lt;a href=&quot;http://metabroadcast.com&quot;&gt;our company&lt;/a&gt; &lt;a href=&quot;http://metabroadcast.com/blog&quot;&gt;blog&lt;/a&gt;.&lt;/sub&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/when-unauthorized-is-forbidden</link>
                <guid>https://tomm.org/tech/when-unauthorized-is-forbidden</guid>
                <pubDate>2014-04-13T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Keeping secrets in Puppet</title>
                <description>
&lt;p&gt;Security is always about making trade offs, and credential storage is one such case where you need to juggle usability against security. Take our server configurations &lt;a href=&quot;http://metabroadcast.com/&quot;&gt;at work&lt;/a&gt;, for example. So we can sleep at night, they&apos;re all handled by &lt;a href=&quot;http://puppetlabs.com/&quot;&gt;Puppet&lt;/a&gt;. That left us with a dilemma: if everything a server needs to start up is in Puppet, that also means it needs to know about secret stuff.&lt;/p&gt;
&lt;h3&gt;all our eggs in one basket&lt;/h3&gt;
&lt;p&gt;Storing credentials in our Puppet git repository is great in the event of a host dying at 3am, as it can be seamlessly replaced without having to scramble around trying to find  details. On the downside, there&apos;s then a single place that houses all our secrets, ripe for the picking from wherever the git repository may be.&lt;/p&gt;
&lt;p&gt;We used to run Puppet in a decentralised way, without Puppet &lt;a href=&quot;http://docs.puppetlabs.com/learning/agent_master_basic.html&quot;&gt;masters&lt;/a&gt;, but as &lt;a href=&quot;http://metabroadcast.com/team#adam&quot;&gt;Adam&lt;/a&gt; mentioned, we moved to the agent/server model for &lt;a href=&quot;http://metabroadcast.com/blog/puppetmaster-or-not-whatever&quot;&gt;a few reasons&lt;/a&gt;. Thankfully, this also gave us a solution we&apos;re happy with for storing secrets in our puppet configuration in the form of &lt;a href=&quot;https://github.com/crayfishx/hiera-gpg&quot;&gt;hiera-gpg&lt;/a&gt;. As the name might suggest it combines the power of &lt;a href=&quot;http://docs.puppetlabs.com/hiera/1/&quot;&gt;hiera&lt;/a&gt; and the encryption of &lt;a href=&quot;http://www.gnupg.org/&quot;&gt;GPG&lt;/a&gt; to allow secret and not secret configuration to be combined when compiling a host&apos;s configuration. This wouldn&apos;t have worked in the decentralised world, as all hosts would have needed decryption keys and hence had access to all secrets. With puppet masters, however, decryption happens on the master and only the secrets a client needs are given to it.&lt;/p&gt;
&lt;h3&gt;HOWTO&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://www.craigdunn.org/2011/10/secret-variables-in-puppet-with-hiera-and-gpg/&quot;&gt;This tutorial&lt;/a&gt; guides you through the process of configuring the GPG keys and hiera. As I said, security is all about trade offs of usability, and we&apos;ve tried to make it a little more user-friendly with the addition of a couple of shell scripts to help out when dealing with encrypted files.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/YAML&quot;&gt;YAML&lt;/a&gt; files are encrypted with a number of public keys: those of some engineers as well as those used by the puppet master hosts. The most used script is one to edit encrypted YAML files. Your editor of choice will be invoked for you to make changes, the file validated and re-encrypted.&lt;/p&gt;
&lt;p&gt;We have another that will re-encrypt all files: this is used when we rotate or change public keys. Both are in a private repository that I can&apos;t make public, but I&apos;ve put them &lt;a href=&quot;https://gist.github.com/tfm/9208351&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://gist.github.com/tfm/9208368&quot;&gt;here&lt;/a&gt; if you&apos;re interested in using them. There are a few tweaks I&apos;d like to make, such as trapping exits to enforce the tidy-up of plaintext files if they exist, but you&apos;re welcome to use them as a starting point.&lt;/p&gt;
&lt;h3&gt;what next?&lt;/h3&gt;
&lt;p&gt;This solution is great if you&apos;re encrypting short string values, but we&apos;d also like to be able to encrypt entire files and use the same on-the-fly decryption. I may well be finding myself getting my hands dirty and writing my first ruby gem soon... unless you&apos;ve already found a way of doing it. In which case, do &lt;a href=&quot;https://twitter.com/intent/tweet?text=@tfm&quot;&gt;let me know&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;sub&gt;This originally appeared on &lt;a href=&quot;http://metabroadcast.com&quot;&gt;our company&lt;/a&gt; &lt;a href=&quot;http://metabroadcast.com/blog&quot;&gt;blog&lt;/a&gt;.&lt;/sub&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/keeping-secrets-in-puppet</link>
                <guid>https://tomm.org/tech/keeping-secrets-in-puppet</guid>
                <pubDate>2014-02-27T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>ABCs of usable APIs</title>
                <description>&lt;p&gt;We spend a lot of time writing APIs at &lt;a href=&quot;http://metabroadcast.com/&quot;&gt;work&lt;/a&gt;: not only our external ones in the form of &lt;a href=&quot;http://atlas.metabroadcast.com/&quot;&gt;Atlas&lt;/a&gt; (the video and audio index) and &lt;a href=&quot;https://voila.metabroadcast.com/&quot;&gt;Voila&lt;/a&gt; (our media product engine) but also the many internal ones which provide data to them and our other products. We therefore also spend a lot of time trying to make our APIs as pleasant to use as we can. At last October&apos;s MetaBeerTalks, I talked about how we do this. As the evening wasn&apos;t recorded, and &lt;a href=&quot;https://speakerdeck.com/metabroadcast/the-abcs-of-metabroadcast-apis&quot;&gt;the slides&lt;/a&gt; I used were less of a write-up and more a memory jog as I talked, I decided a blog post was in order to sum up what I said.&lt;/p&gt;
&lt;h3&gt;a: all the data&lt;/h3&gt;
&lt;p&gt;We aim to provide all data required for common use cases in a single API call. This makes life easier for clients of our APIs for a number of reasons:
&lt;ol&gt;&lt;li&gt;Minimising HTTP requests: browsers typically have a limit on the number of concurrent requests to a single host.&lt;/li&gt;
&lt;li&gt;Overhead per request: there&apos;s a cost to each HTTP request, and this can be especially noticable on devices which are resource constrained or are at the end of a poor connection. HTTP keep-alive certainly helps, but so too does keeping down the number of requests.&lt;/li&gt;
&lt;li&gt;Consistent responses: clients don&apos;t need to worry about handling data changing between calls - there&apos;s only one, so it&apos;s guaranteed to be consistent.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here&apos;s a snippet of an output from Voila for a well-known UK soap opera:&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/tfm/8646804.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;You&apos;ll see that a request for the &lt;a href=&quot;http://www.bbc.co.uk/programmes/b006m86d&quot;&gt;EastEnders&lt;/a&gt; brand returns not only the brand-level data you&apos;d expect, such as a description and an image, but also information on upcoming broadcasts, under the &lt;code&gt;upcoming_items_detail&lt;/code&gt; key. This makes it easy to build a brand page with all the information you&apos;d commonly put on it: upcoming episodes, links to episodes on-demand, all through a single call. You&apos;ll even get channel logos of various forms alongside each broadcast.&lt;/p&gt;
&lt;h3&gt;b: brevity&lt;/h3&gt;
&lt;h4&gt;annotations&lt;/h4&gt;
&lt;p&gt;I value brevity: why say in 100 words what you can say in 10? The same is important in our APIs. While that may sound at odds with what I&apos;ve just said about providing all the data in a single call, we use &lt;em&gt;annotations&lt;/em&gt; to let clients decide what data they need, thus reducing both the amount of data transferred and processing cost. Let&apos;s look again at what Voila can tell us about EastEnders. Firstly, a request for the brand without any annotations (&lt;code&gt;https://voila.metabroadcast.com/1.0/content?id=cf2&lt;/code&gt;&lt;sup&gt;1&lt;/sup&gt;):&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/tfm/8646983.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;Not really that much use. But if we add &lt;code&gt;&amp;amp;annotations=description&lt;/code&gt; we get a little more data back:&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/tfm/8647087.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;And so on: &lt;code&gt;upcoming_subitems_detail&lt;/code&gt; will return the episodes soon to be broadcast that you saw above, &lt;code&gt;available_subitems_detail&lt;/code&gt; renders episodes available on-demand.&lt;/p&gt;
&lt;h4&gt;equivalence&lt;/h4&gt;
&lt;p&gt;A key feature of Atlas is equivalence: the process by which we match data across the many different sources we ingest data from. Here&apos;s a portion of an equivalence graph for the EastEnders brand, &lt;code&gt;cf2&lt;/code&gt; being Press Association&apos;s record for EastEnders and &lt;code&gt;dms&lt;/code&gt; the BBC&apos;s:&lt;/p&gt;
&lt;img src=&quot;https://farm4.staticflickr.com/3715/9661898069_08a55278f5.jpg&quot; width=&quot;330&quot; height=&quot;320&quot; alt=&quot;Graph representing an equivalence set of content in Atlas&quot; /&gt;
&lt;p&gt;Once all the hard work is done matching records together, we provide a consolidated view of the data. Instead of returning multiple records for EastEnders, a single, merged, record is output with on-demands sourced from the BBC, copy and images from PA. All of this is managed through API key configuration that lets users specify merge rules.&lt;/p&gt;
&lt;h4&gt;personalisation&lt;/h4&gt;
&lt;p&gt;It&apos;s not much use telling someone in Scotland about their favourite show being aired tonight on BBC One if it&apos;s not on BBC One Scotland until tomorrow. Having to implement a client-side filter based on someone&apos;s region means that a superset of data needs to be returned to a client then filtered using a swathe of reference data about platforms and regions. Instead of this hideousness, we do all the heavy lifting: the &lt;code&gt;region&lt;/code&gt; parameter in Voila will ensure that users see only the broadcasts relevant to them. The less code there is between a front-end website and our APIs the better.&lt;/p&gt;
&lt;h3&gt;c: consistency&lt;/h3&gt;
&lt;p&gt;All endpoints across an API should behave in a predictable, consistent way. In Voila, a user&apos;s actions can just as easily be returned on the &lt;code&gt;content&lt;/code&gt; endpoint as the &lt;code&gt;schedule&lt;/code&gt; endpoint, so building a personalised schedule is a cynch. Here&apos;s EastEnders from the &lt;code&gt;content&lt;/code&gt; endpoint (&lt;code&gt;https://voila.metabroadcast.com/1.0/content?id=cf2&amp;amp;annotations=subscriptions,my\_actions&lt;/code&gt;):&lt;/p&gt; 
&lt;script src=&quot;https://gist.github.com/tfm/8647728.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;And from the &lt;code&gt;schedule&lt;/code&gt; endpoint (&lt;code&gt;https://voila.metabroadcast.com/1.0/schedule/bbcone-london?from=2014-01-27T20:00:00Z&amp;amp;to=2014-01-27T20:30:00Z&amp;amp;annotations=subscriptions,my\_actions,broadcasts,description,extended_description&lt;/code&gt;)

&lt;script src=&quot;https://gist.github.com/tfm/8647805.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;Annotations will change a bit in the Atlas 4.0 API so their names reflect the keys they control; &lt;code&gt;people&lt;/code&gt; will become &lt;code&gt;content.people&lt;/code&gt;, for example.&lt;/p&gt;
&lt;p&gt;There is a slew of standard features in all of our APIs: &lt;a href=&quot;http://en.wikipedia.org/wiki/JSONP&quot;&gt;JSONP&lt;/a&gt;, pagination parameters, annotations, to name a few. We&apos;re building a set of shared &lt;a href=&quot;http://frisbyjs.com/&quot;&gt;Frisby&lt;/a&gt; tests to enforce consistency. We&apos;ve long talked about adding a meta-API, and having recently had a wonderful experience writing an auto-generating &lt;a href=&quot;https://github.com/mbst/glycerin&quot;&gt;Java client for Nitro&lt;/a&gt;, a BBC API, we&apos;re even keener to add it to Atlas 4.0 in the near future. This will bring much-needed consistency to a shiny new auto-generated Java Atlas client!&lt;/p&gt;
&lt;h3&gt;s: speed (and reliability)&lt;/h3&gt;
&lt;p&gt;We pity slow clients and want to do everything we can to help them out. &lt;a href=&quot;http://metabroadcast.com/blog/who-s-faster-json-or-jsonp&quot;&gt;Some profiling&lt;/a&gt; of our TV listings widget showed that a &lt;em&gt;lot&lt;/em&gt; of time was being spent parsing JSONP. Adding &lt;a href=&quot;http://en.wikipedia.org/wiki/Cross-origin_resource_sharing&quot;&gt;CORS&lt;/a&gt; support let us use JSON instead, which yielded a 2.7x improvement in speed. CORS is now standard for all our APIs.&lt;/p&gt;
&lt;p&gt;Server-side speed is also important, of course. The majority of Voila endpoints return personalised responses in under 50ms in normal circumstances. Combined with reliability&amp;mdash;achieved through infrastructure that automatically scales based on demand, and the likes of &lt;a href=&quot;http://metabroadcast.com/blog/software-engineers-do-circuit-breakers-too&quot;&gt;circuit breakers&lt;/a&gt; to fail gracefully if dependent systems go under&amp;mdash;there&apos;s no need to build caches between our APIs and end users.&lt;/p&gt;
&lt;h3&gt;save the date&lt;/h3&gt;
&lt;p&gt;If you didn&apos;t make it to the MetaBeerTalks where I waffled on about this, you missed my terrible slide transitions (made tolerable by having a bar at hand to numb the pain). All is not lost, though. How about coming along next month on Wednesday 12th February? We&apos;ll announce more details about who&apos;ll be talking and the venue closer to the time.&lt;/p&gt;
&lt;p&gt;&lt;small&gt;&lt;sup&gt;1&lt;/sup&gt; Unfortunately I can&apos;t link directly to Voila as it&apos;ll only work if you&apos;re in possession of a valid API key.&lt;/small&gt;&lt;/p&gt;
&lt;/p&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/abcs-of-usable-apis</link>
                <guid>https://tomm.org/tech/abcs-of-usable-apis</guid>
                <pubDate>2014-01-28T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Template vs decorator</title>
                <description>
&lt;p&gt;We recently had a discussion in the office on when the &lt;a href=&quot;http://en.wikipedia.org/wiki/Decorator_pattern&quot;&gt;decorator pattern&lt;/a&gt; should be used, and when the &lt;a href=&quot;http://en.wikipedia.org/wiki/Template_pattern&quot;&gt;template pattern&lt;/a&gt; may be better. We came to the following conclusion:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;If the system’s correct behaviour&lt;sup&gt;1&lt;/sup&gt; relies on decorators being used in a specific configuration, use the template pattern to enforce and document it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let me explain the rationale behind this. It’s probably easier with the help of an example; we’ll use one that’s influenced by, but a simplified version of, something in the &lt;a href=&quot;http://atlas.metabroadcast.com/&quot;&gt;Atlas&lt;/a&gt; 3.0 codebase. Names have been changed, not to protect the guilty, but for simplicity.&lt;/p&gt;

&lt;p&gt;We’re going to look at something that is responsible for saving things into the Atlas database, a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ContentWriter&lt;/code&gt;. Let’s start with a UML diagram (the only one, I promise):&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://farm3.staticflickr.com/2877/11945156024_e18f7638fa_b.jpg&quot; alt=&quot;ContentWriter interface and implementations&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Instantiation of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ContentWriter&lt;/code&gt; looks like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;nd&quot;&gt;@Bean&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ContentWriter&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;contentWriter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;MessageProducingContentWriter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;AuditFieldSettingContentWriter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;MongoContentWriter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mongo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
              &lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;We’ll now look at how the same code looks using the template pattern. Here’s the template class, an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AbstractContentWriter&lt;/code&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AbstractContentWriter&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ContentWriter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;WriteResult&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Content&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        
        &lt;span class=&quot;n&quot;&gt;auditFieldUpdater&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;updateOnWrite&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;messagePublisher&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;contentChange&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;doWrite&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;WriteResult&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;doWrite&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Content&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    
    &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;
    
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;A concrete implementation in the form of a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MongoContentWriter&lt;/code&gt; or a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CassandraContentWriter&lt;/code&gt; would then be written, but I’ll omit them for brevity.&lt;/p&gt;

&lt;p&gt;There are a number of benefits to the template approach. Firstly, it’s obvious the order in which things must happen; it’s not hidden in some configuration class somewhere (or worse, XML), but plain for everyone to see in the template class. Secondly, when there are multiple concrete implementations, or even instantiations, we’re sure that each of them is constructed in a consistent manner, and you’ll never forget to wire in a crucial piece of functionality when you’re in a rush.&lt;/p&gt;

&lt;p&gt;Now you could use decorators and enforce the correct configuration through the judicious use of package visibility on constructors along with some factory methods, but we felt that the template pattern more strongly and clearly expresses the order in which things must be done.&lt;/p&gt;

&lt;p&gt;The decorator pattern does still have its place. It’s great where you’ve got optional behaviours you’d like to add to an implementation, such as a caching wrapper. When used appropriately, it neatly separates concerns, making testing easier. However, the moment you start decorating classes with functionality that’s required for the system to operate as intended, it’s time to think again.&lt;/p&gt;

&lt;p&gt;In hindsight the above conclusion may sound a little obvious, but I’m pleased we were able to distill our feelings into a rule which can now be applied to similar problems in the future. These things are quite subjective, so if you have a different view, we’d love to &lt;a href=&quot;https://twitter.com/intent/tweet?text=@MetaBroadcast&quot;&gt;hear&lt;/a&gt; what you think.&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;sup&gt;1&lt;/sup&gt; That’s the same correctness as in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Liskov_substitution_principle&quot;&gt;LSP&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/template-vs-decorator</link>
                <guid>https://tomm.org/tech/template-vs-decorator</guid>
                <pubDate>2014-01-14T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Tuesday Terminal Tip: add some colour to your prompt</title>
                <description>
&lt;p&gt;It’s the little things that make all the difference. I often find myself with a few terminal windows open, jumping between hosts, getting rather lost as to where I am. Accidentally running things in production instead of a development environment makes me unhappy, so I wanted an easy, in-your-face-but-not-too-much way of seeing what environment I was in. We actually did this ages ago, but it’s a little tricky to get right so thought it still worth a quick write-up.&lt;/p&gt;

&lt;h3 id=&quot;painting-the-prompt-red&quot;&gt;painting the prompt red&lt;/h3&gt;

&lt;p&gt;I’ve seen people who have coloured the entire terminal background according to the environment they were in, but that fails the “not-too-much” part of the requirement. Instead I went for the more subtle option of colouring the prompt:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/metabroadcast/11188385536/&quot; title=&quot;Red for production, yellow for stage, green for dev&quot;&gt;&lt;img src=&quot;https://farm4.staticflickr.com/3713/11188385536_0cabc94fff_o.png&quot; alt=&quot;prompt-colours&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my face, but not &lt;em&gt;too&lt;/em&gt; in my face.&lt;/p&gt;

&lt;p&gt;It’s made problematic because you need to escape the colour codes. If you don’t, you get some weird behaviour when the line wraps then you delete as the terminal gets confused about line length. I can’t remember whose advice I followed at the time, so I can’t credit them, but I did get there with the help of others to arrive at something like this in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/bashrc&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;I’ll spare you the complexity of how we incorporated this into our &lt;a href=&quot;http://puppetlabs.com/&quot;&gt;Puppet&lt;/a&gt; set-up, but let’s just assume you have a file &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/env&lt;/code&gt; simply containing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;prod&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;stage&lt;/code&gt;, or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dev&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you’ve got any little tips like this that make your life easier, do &lt;a href=&quot;https://twitter.com/intent/tweet?text=@tfm&quot;&gt;let me know&lt;/a&gt;.&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/tuesday-terminal-tip-colour-prompt</link>
                <guid>https://tomm.org/tech/tuesday-terminal-tip-colour-prompt</guid>
                <pubDate>2013-12-03T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Profiling a JVM in EC2 with VisualVM</title>
                <description>
&lt;p&gt;Every so often I find myself needing to connect &lt;a href=&quot;http://visualvm.java.net/&quot;&gt;VisualVM&lt;/a&gt;, a JVM profiling and debugging tool, to a JVM running remotely in &lt;a href=&quot;http://aws.amazon.com/ec2/&quot;&gt;EC2&lt;/a&gt;. Despite a few attempts to get it working using a SOCKS proxy following one of the &lt;a href=&quot;https://www.google.co.uk/search?q=socks+proxy+visualvm&quot;&gt;many&lt;/a&gt; guides available, I’ve never managed to crack it and always resorted to temporarily opening all ports from within our VPN. It’s generally quite a frustrating process, so I decided to spend a few minutes figuring it out once and for all. After all, when you’re knee-deep working out what’s going awry with a production process, the last thing you want to have to do is fiddle around with ports and JVM args. Thankfully, that paid off and we’ve now distilled it into an option on our JVM startup scripts to do the business.&lt;/p&gt;

&lt;h3 id=&quot;guess-that-port&quot;&gt;guess that port&lt;/h3&gt;

&lt;p&gt;VisualVM uses &lt;a href=&quot;http://en.wikipedia.org/wiki/Java_remote_method_invocation&quot;&gt;RMI&lt;/a&gt; to connect to the remote JVM, which has some challenges if trying to connect through a firewall. If it’s been as long for you as it has for me since last using RMI, allow me to very briefly recap on how ports are used. The remote JVM has things running on two ports: one for the RMI registry, from where RMI objects are discovered, and one for actually connecting to said objects. The latter generally runs on an arbitrary high port number, whose value clients get told by the registry.&lt;/p&gt;

&lt;p&gt;The RMI handshake goes something like this:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Client to RMI registry: “I’d like an object of type x please”&lt;/li&gt;
  &lt;li&gt;RMI registry: “Sure, here. You’ll want to communicate with it at hostname x and port n”&lt;/li&gt;
  &lt;li&gt;Client [to host x on port n]: “Hello?”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now we could, of course, continue doing what I’ve resorted to in the past and open all ports on the server. This has obvious security concerns—somewhat mitigated by restricting to our VPN in our case—but is also a massive inconvenience in having to both do it and, more importantly, remembering to undo it when we’re finished. Much better to use SSH port forwarding if we could.&lt;/p&gt;

&lt;p&gt;To do this, we need to forward both the registry and object ports to the remote host. That was a problem until relatively recently, since the latter port could not be fixed. However, recent Java 7 versions allow you to &lt;a href=&quot;http://hirt.se/blog/?p=289&quot;&gt;fix that port&lt;/a&gt; through a JVM arg, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;com.sun.management.rmi.port&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That sorted, the next problem is the hostname. Remember, this needs to be the hostname that the &lt;em&gt;client&lt;/em&gt; uses to connect to the server. If we’re to tunnel this over SSH it’s therefore the local network interface. Another JVM arg to the rescue, this time &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;java.rmi.server.hostname&lt;/code&gt;. Setting that to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;127.0.0.1&lt;/code&gt; does the trick.&lt;/p&gt;

&lt;h3 id=&quot;flying-the-flags&quot;&gt;flying the flags&lt;/h3&gt;

&lt;p&gt;After all that, all we need to do is add the following flags to the JVM command-line on the remote server we want to debug:&lt;/p&gt;

&lt;p&gt;and create an SSH tunnel from our local machine to the server:&lt;/p&gt;

&lt;p&gt;Et voila! We can add a new local JMX connection on the port we’re forwarding to the server by adding a new local JMX connection to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;localhost:7091&lt;/code&gt; :&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://farm4.staticflickr.com/3829/10941404846_92e99f0b0f_o.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As I said, we’ve wrapped this all up as a command-line argument to our JVM startup script which now looks something like:&lt;/p&gt;

&lt;p&gt;If you’ve had more luck with SOCKS proxies than me, I would love to &lt;a href=&quot;https://twitter.com/intent/tweet?text=@tfm&quot;&gt;hear&lt;/a&gt; how you cracked it as I tried again while writing this post, still with no joy!&lt;/p&gt;
</description>
                <link>https://tomm.org/tech/remote-profiling-visualvm</link>
                <guid>https://tomm.org/tech/remote-profiling-visualvm</guid>
                <pubDate>2013-11-19T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Mutant Mongo: A lesson in immutability</title>
                <description>
&lt;p&gt;As anyone who’s read &lt;a href=&quot;https://twitter.com/joshbloch&quot;&gt;Joshua Bloch’s&lt;/a&gt; Effective Java will know, immutable classes are generally considered to be a good thing. It’s easy to read such arguments and agree, but it’s always useful to see real world examples to back it up. And, as you may have already guessed, we recently came across such a case.&lt;/p&gt;

&lt;h2 id=&quot;background&quot;&gt;Background&lt;/h2&gt;

&lt;p&gt;At work we use &lt;a href=&quot;http://www.mongodb.org/&quot;&gt;MongoDB&lt;/a&gt; for most datasets held in &lt;a href=&quot;http://atlas.metabroadcast.com&quot;&gt;Atlas&lt;/a&gt; at the moment, and for resilience and scalability we have a &lt;a href=&quot;http://docs.mongodb.org/manual/core/replication-introduction/&quot;&gt;replica set&lt;/a&gt; in place.&lt;/p&gt;

&lt;p&gt;Application servers that handle reads from the API use a secondary database, while writes happen on a primary database. Adding &lt;a href=&quot;http://metabroadcast.com/blog/atlas-goes-postal&quot;&gt;POST&lt;/a&gt; functionality to the API complicated matters a little as API write operations need to be performed against the primary. It’s not just the write operation itself, but associated reads for the likes of &lt;a href=&quot;http://metabroadcast.com/blog/matches-made-in-heaven&quot;&gt;equivalence&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;how-may-i-direct-your-query&quot;&gt;how may i direct your query?&lt;/h2&gt;

&lt;p&gt;The standard &lt;a href=&quot;http://docs.mongodb.org/ecosystem/drivers/java/&quot;&gt;Mongo Java driver&lt;/a&gt;, which we use, allows you to specify a &lt;a href=&quot;http://api.mongodb.org/java/current/com/mongodb/ReadPreference.html&quot;&gt;&lt;code&gt;ReadPreference&lt;/code&gt;&lt;/a&gt; at various levels: &lt;a href=&quot;http://api.mongodb.org/java/current/com/mongodb/Mongo.html#setReadPreference(com.mongodb.ReadPreference)&quot;&gt;connection&lt;/a&gt;, &lt;a href=&quot;http://api.mongodb.org/java/current/com/mongodb/DB.html#setReadPreference(com.mongodb.ReadPreference)&quot;&gt;database&lt;/a&gt;, &lt;a href=&quot;http://api.mongodb.org/java/current/com/mongodb/DBCollection.html#setReadPreference(com.mongodb.ReadPreference)&quot;&gt;collection&lt;/a&gt; and, finally, &lt;a href=&quot;http://api.mongodb.org/java/current/com/mongodb/DBCollection.html#findOne(com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.ReadPreference)&quot;&gt;query&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In the case of POSTs we wanted to control the behaviour at the &lt;code&gt;DBCollection&lt;/code&gt; level, which would allow us to overwrite the default of reading from a secondary in particular cases. Our code went something along the lines of this:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/tfm/7081060.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;All well and good. Or so we thought. I was using &lt;a href=&quot;http://docs.mongodb.org/v2.2/reference/mongotop/&quot;&gt;mongotop&lt;/a&gt; to look into something unrelated and noticed a large number of reads on that there &lt;code&gt;lookup&lt;/code&gt; collection hitting the primary database. On closer inspection, running &lt;code&gt;mongotop&lt;/code&gt; on a secondary revealed &lt;em&gt;no&lt;/em&gt; reads from &lt;code&gt;lookup&lt;/code&gt;. Curious.&lt;/p&gt;

&lt;p&gt;The documentation for &lt;code&gt;setReadPreference&lt;/code&gt; on &lt;code&gt;DBCollection&lt;/code&gt; states that it&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Sets the read preference for this collection.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now we read that as setting the read preference for &lt;em&gt;this instance of DBCollection&lt;/em&gt;, and because we were getting the collection fresh from a &lt;code&gt;DB&lt;/code&gt; instance, we thought it would only affect this instance of &lt;code&gt;DBCollection&lt;/code&gt; and therefore use of the &lt;code&gt;lookup&lt;/code&gt; collection.&lt;/p&gt;

&lt;p&gt;That’s correct, but with a massive caveat. After a little digging, it turns that said instance is shared. In &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/blob/master/src/main/com/mongodb/DBApiLayer.java&quot;&gt;&lt;code&gt;DBApiLayer&lt;/code&gt;&lt;/a&gt; we have:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/tfm/7097110.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;Ah! A cache of &lt;code&gt;DBCollection&lt;/code&gt; objects. Re-reading the Javadoc for &lt;code&gt;setReadPreference&lt;/code&gt; and, knowing this code, I now interpret it somewhat differently.&lt;/p&gt;

&lt;p&gt;The fix was easy: we’ve pushed the setting of read preference all the way down to the query level. It does break encapsulation a little; the &lt;code&gt;MongoEquivalenceStore&lt;/code&gt; class now needs to know all about which database it’s reading from, something that was previously hidden from it.&lt;/p&gt;

&lt;h2 id=&quot;no-change-please&quot;&gt;No change, please&lt;/h2&gt;

&lt;p&gt;The documentation could be updated to reflect this object pooling, but that should really be a hidden implementation detail. The real fix would be to make instances of &lt;code&gt;DBCollection&lt;/code&gt; immutable. I then wouldn’t be &lt;a href=&quot;http://en.wikipedia.org/wiki/Principle_of_least_astonishment&quot;&gt;surprised&lt;/a&gt; by the behaviour of &lt;code&gt;DBCollection&lt;/code&gt;, as it wouldn’t change after instantiation. Separately, I don’t see why a pool of &lt;code&gt;DBCollection&lt;/code&gt; objects—and &lt;code&gt;DB&lt;/code&gt; objects in the &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/blob/master/src/main/com/mongodb/Mongo.java#L360&quot;&gt;&lt;code&gt;Mongo&lt;/code&gt;&lt;/a&gt; class for that matter—is needed in the first place as it doesn’t look like it’s expensive to create a new instance of a &lt;code&gt;DBCollection&lt;/code&gt;, but that’s a side point&lt;sup&gt;1&lt;/sup&gt;.&lt;/p&gt;

&lt;p&gt;We’d love to produce a patch to the Mongo Java library to fix this. However, a change would clearly not be backwardly-compatible and others may be relying on the behaviour. We’ll be talking to the mongo folks about how things could be improved without breaking things.&lt;/p&gt;

&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;sub&gt; Unfortunately the history of the &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/&quot;&gt;driver source&lt;/a&gt; doesn’t go back far enough to see if there are any clues as to why.&lt;/sub&gt;&lt;/p&gt;

</description>
                <link>https://tomm.org/tech/mutant-objects</link>
                <guid>https://tomm.org/tech/mutant-objects</guid>
                <pubDate>2013-10-31T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>London to Paris on two wheels</title>
                <description>
&lt;p&gt;I rode from London to Paris. See &lt;a href=&quot;/index/by-topic/#london-paris-ref&quot;&gt;my posts about it&lt;/a&gt;.&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/london-to-paris</link>
                <guid>https://tomm.org/outdoors/london-to-paris</guid>
                <pubDate>2013-05-29T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Beauvais to Paris</title>
                <description>
&lt;p&gt;I think it’s fair to say that the third and final day of cycling wasn’t as smooth as it could’ve been. After a good night’s rest we set off at about 8.30 with surprisingly few aches. A pleasant trip through the suburbs brought us to the road we’d be following for the next 20 miles or so. So far, so good. Except for said road. Whilst not quite an Autoroute, it was a 70 km/h dual carriageway laden with trucks en route to Paris and beyond: quite a contrast to the winding country lanes of the day before. Perhaps Monday mornings are particularly bad on this road, or that’s just normal. Either way, it wasn’t for us. I’m still quite surprised that it’s a standard route cyclists take, according to both Internet sources, and the troupe of cyclist we saw heading on to it when we’d already decided to abort.&lt;/p&gt;

&lt;p&gt;After some (much) deliberation — the lack of muscle ache was being quickly replaced by earache — and searching for alternative routes, I managed to find one that looked much more pleasant. Next problem: the route would be quite tricky to follow without being on the GPS as it was country road after country road. Sat right next to a hypermarket, I had a vague hope they’d have the right cable or adapter to connect my phone to the GPS. Only slight, mind: micro to mini USB cables aren’t the hottest selling things. Sure enough, they didn’t have one, but the wonderful people back at the hotel, 20 minutes away by bike, were happy enough for me to download the map on their computer. Phew! So, at just after 11, we finally set off. A couple of hours late, and a route that was 60 miles instead of the planned 45, it was going to be a long day. The route turned out to be exactly what we were after, though (save for the longer distance): small country lanes cutting through the beautiful countryside again. There were a couple of less-than-ideal bits: a spot of stair climbing when we couldn’t be bothered to continue to try to work out a small town’s one-way system, and some tracks through a forest where I prayed not to get a puncture or worse.&lt;/p&gt;

&lt;p&gt;We took a steady, if not record setting, pace and as the gaps between villages started getting smaller, before we knew it we had sight of the Eiffel Tower. After an off-route detour to avoid another forest, the GPS got in a hump with me and refused to continue to navigate us to our destination. Worse still, it starting lying about how far it was to go! At about 6.30pm we joined a track along the Seine: the end was in sight! Moments later, a close encounter with a startled, galloping police horse could’ve ended badly, but passed without incident.&lt;/p&gt;

&lt;p&gt;Navigating the streets of Paris in rush hour on a bike-mounted GPS is certainly not for the faint hearted. The river road quickly became too busy, so we headed inland to make our way to our destination. If you thought Hyde Park Corner or Elephant and Castle are busy roundabouts, try L’Arc de Triomphe at 7 in the evening. The approach was a cobbled street: a welcome treat after 55 miles in the saddle. On a closer inspection of the map as we rattled our way towards it, it became clear we needed to go straight across. Easier said than done. There were about 6 lanes of traffic, no road markings, and the occasional policeman directing traffic, seemingly randomly. “Fine, we’ll just trundle around the outside,” I thought. Oh no. It was all going well until the second junction when a stream of 3 lanes of cars was coming off at it. Walking it was, then. Back in the saddles at the other side, another cobbled street down the hill, and as the bottom approached our destination came into view, looming large over us just across the bridge. At that point, disaster struck. Nah, not really. We made it! 216 miles after the pigeon encounter at Parliament Square and here we were.&lt;/p&gt;

&lt;p&gt;A few obligitory photos later it was time to go find the hotel for a wash followed by much food and beer. &lt;em&gt;I&lt;/em&gt; was fine riding to the hotel but &lt;em&gt;someone&lt;/em&gt; didn’t want to go back on the busy streets, so we needed to find another mode of transport. Neither buses or the metro allow bikes on them, so taxi it was. After 5 minutes waiting for a big one to pass by, none did, so we had no choice but to hop on the bikes and ride back. Just as we were crossing the Seinne, I spotted a couple of tuk-tuks. Pulling over, I eyed up the “boot” of one of them and decided it might just be possible to fit a couple of bikes in. Front wheels off, and sure enough we got them in. Well, one was in the passenger seat with me, but hey. Unfortunately photos are on the camera I can’t upload yet but I will definitely be posting the photographic evidence that it’s possible to fit 2 bikes and 2 passengers in the back of a tuk tuk.&lt;/p&gt;

&lt;p&gt;Dinner and beer followed shortly thereafter before hitting the hay for one of the best night’s sleep I’ve had in a long time! Today, we’ll be doing a cycling tour of the city. Or not. A little sightseeing, perhaps, after lounging by the hotel pool before catching the Eurostar back to London this afternoon (no, we’re not riding back).&lt;/p&gt;

&lt;p&gt;Photos and routes will be appearing here shortly after I get back to London… In the meantime, here’s the route I uploaded in advance that we were going to take on our final day until we found the much more pleasant one (sorry, the map is anchored in the wrong place, and Google maps won’t give me the right embed code from my phone, but scroll SE to Beauvais and you’ll find the starting point):&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;350&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; src=&quot;https://maps.google.co.uk/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=http:%2F%2Ftomm.org%2Fmaps%2Flondontoparis%2Fday3.kml&amp;amp;aq=&amp;amp;sll=49.67757,1.5833&amp;amp;sspn=0.564284,1.182404&amp;amp;ie=UTF8&amp;amp;ll=49.677404,1.583405&amp;amp;spn=0.56947,0.28215&amp;amp;t=m&amp;amp;output=embed&quot;&gt; &lt;/iframe&gt;
&lt;p&gt;&lt;br /&gt;&lt;small&gt;&lt;a href=&quot;https://maps.google.co.uk/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=http:%2F%2Ftomm.org%2Fmaps%2Flondontoparis%2Fday3.kml&amp;amp;aq=&amp;amp;sll=49.67757,1.5833&amp;amp;sspn=0.564284,1.182404&amp;amp;ie=UTF8&amp;amp;ll=49.677404,1.583405&amp;amp;spn=0.56947,0.28215&amp;amp;t=m&quot; style=&quot;color:#0000FF;text-align:left&quot;&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;Previous post: &lt;a href=&quot;/outdoors/dieppe-to-beauvais&quot;&gt;Dieppe to Beauvais&lt;/a&gt;&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/beauvais-to-paris</link>
                <guid>https://tomm.org/outdoors/beauvais-to-paris</guid>
                <pubDate>2013-05-28T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Dieppe to Beauvais</title>
                <description>
&lt;p&gt;With the ferry leaving at 11pm and arriving at 4am local time in Dieppe, we hoped for a little sleep. And we were right, we got a &lt;em&gt;little&lt;/em&gt; sleep: about two-and-a-half hours to be precise, thanks to the combined efforts of the shouting French people in the cabin next door, and the staff eager to wake everyone up nearly an hour before we disembarked. Still, better than nothing. I’ve ranted before about phones whose timezones that change automatically, and never has it been more confusing than last night. It turns out that, according to my phone at least, the English Channel is in GMT, not BST. Mightily confusing when you get woken up at what’s actually 3am, coming into dock in French time, only for your phone to tell you it’s 1am.&lt;/p&gt;

&lt;p&gt;On the ferry, someone told us about a different route to Beauvais, which is part of a network of quiet roads that join London and Paris: &lt;a href=&quot;http://avenuevertelondonparis.co.uk/&quot;&gt;Avenue Verte&lt;/a&gt;. That sounded much better than the busier roads we had planned, especially since the first third or so is a dedicated path which used to be a disused railway line. So, with the pre-programmed GPS route now useless, we sleepily rolled off the ferry just after 4 in search of an illusive sign denoting the start of Avenue Verte. Only coming to France occasionally, their “interesting” approach to road signs gets me every time for the first hour or two, as I merrily kept going right at a sign that pointed right, but meant “go straight on”. Clearly. Not to mention the fact that they find the most ingenious places to hide said signs. Fortunately, the group who told us about the route were having similar problems, but we tagged along with them for a bit and eventually got on the right route.&lt;/p&gt;

&lt;p&gt;If you’ve ever sat in a lecture or meeting and had that nodding head thing where you can’t keep your eyes open, you’ll know how we felt this morning. Not pleasant when you’re trying to power a bicycle. We wanted to stop off for breakfast as soon as places opened but quickly realised a fatal flaw in our plan: it was Sunday. France is closed on a Sunday. Ah, except boulangeries of course! I mean, how could one possibly go without fresh bread for a day! At around 6.30, we approached a small village which was a likely candidate for having a boulangerie, and literally followed our noses to it. We were absolutely freezing by now, so ate our croissants and pain aux chocolats very slowly to try to warm up a bit.&lt;/p&gt;

&lt;p&gt;By about 9 o’clock we were beginning to flag again, but thankfully a cafe was just opening its doors so we popped in to fuel up on caffeine. Some locals at the back were already tucking into beers, but tempting as it was, we decided to pass.&lt;/p&gt;

&lt;p&gt;The caffeine did the trick, giving us the boost we needed to press on to Beauvais. As we meandered through the beautiful countryside, it finally began to warm up and I was able to shed 3 layers. The poor GPS didn’t know whether it was coming or going, but eventually decided that we’d be getting to Beauvais at around 1.30pm. Perfect, just in time for a nap then some lunch. If only it had been so simple. The hidden road signs decided to intervene in this plan. I’d found a bit of energy in reserve and was pelting it around the lanes just outside Beauvais, and had lost sight of Emm. I came to a stop at the top of a hill, and waited. And waited. And waited. After 10 minutes I decided something must be up. My phone decided it didn’t like rooaming for some reason, so not being able to call I started retracing the route. No sign of her. “OK, I’ll go a bit further back,” I thought, assuming she was being &lt;em&gt;really&lt;/em&gt; slow. Still no sign. I flagged down a passing car asking if they’d seen her. “Non”, came the reply. Hmm. Afer a further 10 minutes I decided she must have gone on ahead, so I’d just go to the hotel, only about 3 miles away, and meet her there. As I approached a roundabout I spotted something I’d not seen before. A discreet sign showing the route went across the roundabout I’d previously taken a left at. Shit. I raced all the way to the hotel, only to pull up at exactly the same moment as Emm, about an hour late.&lt;/p&gt;

&lt;p&gt;What a day. We did about 75 miles today I think, not pleasant after such little sleep. I’ve had a tactical snooze, and now it’s time for a bite to eat before an early night ahead of the final day to Paris tomorrow. This is the route we were going to take today; I’ll change it to the one we actually took when I get back to London…&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;350&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; src=&quot;https://maps.google.co.uk/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=http:%2F%2Ftomm.org%2Fmaps%2Flondontoparis%2Fday2.kml&amp;amp;aq=&amp;amp;sll=51.149228,-0.062732&amp;amp;sspn=1.09402,2.364807&amp;amp;ie=UTF8&amp;amp;t=m&amp;amp;ll=49.67757,1.5833&amp;amp;spn=0.50048,1.01304&amp;amp;output=embed&quot;&gt; &lt;/iframe&gt;
&lt;p&gt;&lt;br /&gt;&lt;small&gt;&lt;a href=&quot;https://maps.google.co.uk/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=http:%2F%2Ftomm.org%2Fmaps%2Flondontoparis%2Fday2.kml&amp;amp;aq=&amp;amp;sll=51.149228,-0.062732&amp;amp;sspn=1.09402,2.364807&amp;amp;ie=UTF8&amp;amp;t=m&amp;amp;ll=49.67757,1.5833&amp;amp;spn=0.50048,1.01304&quot; style=&quot;color:#0000FF;text-align:left&quot;&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;

</description>
                <link>https://tomm.org/outdoors/dieppe-to-beauvais</link>
                <guid>https://tomm.org/outdoors/dieppe-to-beauvais</guid>
                <pubDate>2013-05-26T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>London to Newhaven</title>
                <description>
&lt;p&gt;As the midday bells rung out across Parliament Square, with the sun beating down, we began our journey. Actually, only one of those statements is true and, surprisingly given the recent weather, it was the latter of them. As the midday bells rang out across Parliament Square I was sat on the corner of Whitehall waiting for my sister. As I was to find out later, that would become the theme of the day… She arrived a couple of minutes after 12, so only a few minutes late getting going. Oh, apart from the loo trip. We finally made off at ten past twelve.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/bigben.jpg&quot; width=&quot;500&quot; /&gt;&lt;/p&gt;

&lt;p&gt;All was going well for the first… 3 feet. We pulled up at a red light only to encounter Emm’s arch-enemy in the flesh: a pigeon. As it strolled across the pedestrian crossing in front of us, it looked for a moment like we may have to hold up all the traffic behind us by waiting for it to finish its journey across. Thankfully, it made it just as the lights turned green and we continued on our way. Moments later, another catastrophe. Another bird. This time, however, it appeared from my fist and was directed towards the Chelsea tractor that decided that after giving me a few inches space as it passed me, it would then cut me up deliberately. Oh London drivers. I couldn’t wait for the country lanes.&lt;/p&gt;

&lt;p&gt;Most of the rest of the journey was a lot less eventful, thankfully. We weaved our way through the roads of South London, following the pretty standard London to Brighton route, courtesy of Dan, whose route I programmed into the GPS (thanks for the detours, by the way). The villages of Sussex with their quintescentially English names were a delight, although Turners Hill was pretty daunting when it started appearing on signposts in the direction we were heading. You don’t name your village after a hill unless it’s a hill to be proud of. Not what we needed. Luckily, Turners Mound would’ve suited it better.&lt;/p&gt;

&lt;p&gt;I’m sure the approach to the South Downs is a wonderful thing when in a car. However, approaching them under your own steam knowing you’ve got to get over them to get to your destination somewhat ruins the spectacular views. As we approached, it looked like the road might actually go around them, phew! Alas it was all a trick; we had to go over them after all. Ouch. That was one tough climb, made worse by the numerous false summits. I had a nice long break at the top though, waiting for slowcoach. It was mainly downhill from there all the way to the seafront, then across to Newhaven.&lt;/p&gt;

&lt;p&gt;We’re now sat in a pub having devoured some dinner, waiting to go board the ferry, which sails at 11. A couple of hours kip before being thrown off at 4am, then it’s off to Beauvais!&lt;/p&gt;

&lt;p&gt;I can’t actually upload the route we took today, but here the route we programmed into the GPS and pretty much followed apart from a few “detours”:&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;350&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; src=&quot;https://maps.google.co.uk/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=http:%2F%2Ftomm.org%2Fmaps%2Flondontoparis%2Fday1.kml&amp;amp;aq=&amp;amp;sll=51.48931,-0.08819&amp;amp;sspn=0.542984,1.182404&amp;amp;ie=UTF8&amp;amp;t=m&amp;amp;ll=51.149228,-0.062732&amp;amp;spn=0.722997,0.224325&amp;amp;output=embed&quot;&gt; &lt;/iframe&gt;
&lt;p&gt;&lt;br /&gt;&lt;small&gt;&lt;a href=&quot;https://maps.google.co.uk/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=http:%2F%2Ftomm.org%2Fmaps%2Flondontoparis%2Fday1.kml&amp;amp;aq=&amp;amp;sll=51.48931,-0.08819&amp;amp;sspn=0.542984,1.182404&amp;amp;ie=UTF8&amp;amp;t=m&amp;amp;ll=51.149228,-0.062732&amp;amp;spn=0.722997,0.224325&quot; style=&quot;color:#0000FF;text-align:left&quot;&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;

</description>
                <link>https://tomm.org/outdoors/london-to-newhaven</link>
                <guid>https://tomm.org/outdoors/london-to-newhaven</guid>
                <pubDate>2013-05-25T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>From London to London to Paris</title>
                <description>
&lt;p&gt;It feels a bit like deja vu, all over again. Just over a year ago I had to pull out of the London Marathon, again, and had high hopes for doing it this year, having had a year of recovery. &lt;em&gt;Again&lt;/em&gt;, things didn’t go according to plan and that niggle in my foot turned out to be more serious than the word niggle gives it credit for. I’m &lt;em&gt;still&lt;/em&gt; trying to fix that and, thankfully, (or perhaps not) I was able to defer my marathon place once more.&lt;/p&gt;

&lt;p&gt;Eager for something to do in the meantime, and still a little disappointed I couldn’t do that London to Paris relay run, I’ve stupidly agreed to swap the running shoes for two wheels and pedal from London to Paris this weekend. With a few weekend training rides in the Surrey countryside under my belt, I’m hoping I’m in OK shape for it — it’s only 170 miles, after all — but that’ll become abundantly clear over the next three days.&lt;/p&gt;

&lt;p&gt;We’re going to be taking a &lt;a href=&quot;http://london2paris.co.uk/routes/3-day-cycle-routes/#newhavendieppe&quot;&gt;route via Newhaven&lt;/a&gt;, over to Dieppe by ferry (didn’t fancy that swim), then on to Paris via Beauvais. The weather forecast over the last week and hailstorms last Thursday didn’t give me much hope of decent weather, but as we’ve approached the day the forecast has got better and better and it’s now looking like we’ll be having sunshine all the way!&lt;/p&gt;

&lt;p&gt;My bag is packed, the GPS programmed, and all that’s left now is a nice long bath before the off at lunchtime today from Big Ben. I’m hoping to post updates each day here from my phone, technology and engergy permitting, so stay tuned.&lt;/p&gt;
</description>
                <link>https://tomm.org/outdoors/from-london-to-london-to-paris</link>
                <guid>https://tomm.org/outdoors/from-london-to-london-to-paris</guid>
                <pubDate>2013-05-25T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Delayed again</title>
                <description>
&lt;p&gt;Back in January I was on schedule for April 22nd, thriving from 12-mile runs on beautiful winter mornings. I was then thwarted by a bad chest infection and cold, from which I’m still not fully recovered.&lt;/p&gt;

&lt;p&gt;This week was decision week. I did a short run to test out my chest and the small niggle in my left foot. The decision was, unfortunately, easy to make. Today I called the charity I was running for and pulled out of this year’s London Marathon.&lt;/p&gt;

&lt;p&gt;Thankfully all is not lost: the lovely people at the MS Society have let me defer my place. So, whilst I am incredibly disappointed I’ve not made it to the starting line for the second time, I’m already looking forward to next year.&lt;/p&gt;

&lt;p&gt;I’ve now got a fantastic opportunity to make it third time lucky. With the additional confidence stemming from how well my training was going this year, I’m going to give it everything I’ve got next year. I’ve really settled in to minimalist running, to the point that heel-strike running feels really weird.&lt;/p&gt;

&lt;p&gt;Unlike last year I’m going to try to keep up the running throughout the year and include a smattering of half marathons. There’s even talk of a relay run from London to Paris, but more on that another time. I’ll just be sure to steer clear of the germ-ridden tube from December until April to avoid another winter bug!&lt;/p&gt;
</description>
                <link>https://tomm.org/misc/delayed-again</link>
                <guid>https://tomm.org/misc/delayed-again</guid>
                <pubDate>2012-03-15T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>6 weeks to go</title>
                <description>
&lt;p&gt;Last month I was quite upbeat. My mood has changed somewhat since then. I spent a large part of last month wrapped up in bed trying to shake that chest infection, and haven’t even run for a bus since my last post.&lt;/p&gt;

&lt;p&gt;With only 6 weeks to go, I’m very nearly at that final decision moment: am I able to get enough training in to be able to get from the start line to the finish line, regardless of how long it takes me, or do I call it all off again? The coming days will be crucial. If my cough makes enough of an improvement soon I’ll test out the legs and see what they can do. If not, it’s all over for another year.&lt;/p&gt;
</description>
                <link>https://tomm.org/misc/6-weeks-to-go</link>
                <guid>https://tomm.org/misc/6-weeks-to-go</guid>
                <pubDate>2012-03-08T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>One month in</title>
                <description>
&lt;p&gt;It’s fair to say it has been a mixed month. I’m very pleased with my progress but it’s gone anything but to plan.&lt;/p&gt;

&lt;p&gt;It all started off great. In my first week I ran exactly 26.2 miles, a good omen I thought! My first long Sunday run was truly exhilarating. As I pushed through the 6 mile mark I had a moment of realisation that I may actually make the start line this year.&lt;/p&gt;

&lt;p&gt;Another good week then a chest infection struck. Very little running for two whole weeks. It’s so frustrating seeing what I &lt;i&gt;should&lt;/i&gt; be running every day on my training calendar and not being able to. However, I learnt to be patient during my recovery last year, so just took the opportunity to get a good lot of rest.&lt;/p&gt;

&lt;p&gt;Chest infection beaten and back to the training! I’m spoilt for choice for routes in south London, which is great on my long Sunday runs. Mixing and matching different parks keeps things varied and interesting. So far I’ve managed to tick off Battersea Park, Clapham, Wandsworth and Tooting commons (not all in one run… yet).&lt;/p&gt;

&lt;p&gt;The Monday after a 12-mile Sunday two weeks ago and my left foot started giving me gyp. A few shorter mid-week runs went ok, but it finally gave in later that week half way through a run, which saw me finishing off on a Boris bike instead of on foot. Oh, and to top it all off I now have a nasty cold.&lt;/p&gt;

&lt;p&gt;This may all sound overly negative but I’m actually in very good spirits. It’s always going to be tough ramping up the training. A few hiccups along the way are all part of it and it’s really important to stay focussed and upbeat, especially in the first month. After all, there’s still over 2 months to go. I’m incredibly pleased that I’ve managed to rack up 30 miles underfoot in one week; this time last year I couldn’t manage a minute’s running before having to call it a day.&lt;/p&gt;

&lt;p&gt;The foot feels like it’s on the mend, so a little more rest and some cycling in the meantime when I’ve shaken this cold should see me back on track.&lt;/p&gt;
</description>
                <link>https://tomm.org/misc/one-month-in</link>
                <guid>https://tomm.org/misc/one-month-in</guid>
                <pubDate>2012-02-11T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>And so it begins (again)</title>
                <description>
&lt;p&gt;It all started back in the middle of 2010. Having run the Great North Run many years earlier, I’d decided it was about time I ran a marathon. Too late for a ballot place for the 2011 London Marathon, I selected a few charities I’d like to raise money for and submitted their application forms.&lt;/p&gt;

&lt;p&gt;By November I’d received rejection letters from all of them. Disappointed, but secretly slightly relieved, I consoled myself in the knowledge that I’d apply through the ballot for the 2012 race.&lt;/p&gt;

&lt;p&gt;A month later, I was sat eating the last of many Christmas lunches with friends, when a call came through from a number I didn’t recognise. It was the MS Society.&lt;/p&gt;

&lt;p&gt;“Great news, we’ve had someone drop out and you’re top of the reserve list. Do you still want to run for us?” Without giving it a second thought I replied “Of course!”.&lt;/p&gt;

&lt;p&gt;That very large pudding I’d just started tucking into stopped going down so well as I realised I was already months behind where I should be in my training. However, the MS Society was who I really wanted to run for, so I was delighted at the news.&lt;/p&gt;

&lt;p&gt;Fast forward to March and with a heavy heart I had to pull out due to injury. Thankfully, I managed to defer my place for a year. A year in which I spent a long time resting (very frustrating), then slowing ramping up the running again. That very slow ramp-up gave me the opportunity to switch to barefoot running, too, which I’ve now completely converted to.&lt;/p&gt;

&lt;p&gt;Today was the first proper run of my 2012 London Marathon training. It was great! There’s still a bit of a twinge in my leg, which I’m keeping a close eye on, but I’m feeling a lot more confident than this time last year.&lt;/p&gt;

&lt;p&gt;And now for the ask… As I said earlier, I was so pleased when I got the place through the MS Society. A close friend of mine was diagnosed with MS a few years back, so it really is a privilege to be able to fundraise for them to help in the quest to find a cure for this debilitating, and poorly understood, disease.&lt;/p&gt;

&lt;p&gt;Any amount, large or small, would be gratefully received over on &lt;a href=&quot;http://uk.virginmoneygiving.com/tm&quot;&gt;my sponsorship page&lt;/a&gt; to get me towards my target of £2000!&lt;/p&gt;
</description>
                <link>https://tomm.org/misc/and-so-it-begins-again</link>
                <guid>https://tomm.org/misc/and-so-it-begins-again</guid>
                <pubDate>2012-01-08T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>DPRK September 2009</title>
                <description>
&lt;p&gt;After a little umming and arring when Nick asked me, I decided it was an opportunity I couldn’t possibly miss, so last Saturday we boarded an ageing &lt;a href=&quot;http://www.korea-dpr.com//Air%20Koryo/il62m.htm&quot;&gt;Ilyushin IL-62M&lt;/a&gt; bound for Pyongjang on &lt;a href=&quot;http://www.koreakonsult.com/index_eng.html&quot;&gt;Korea Konsult&lt;/a&gt;’s &lt;a href=&quot;http://www.koreakonsult.com/program_sep%202009%20short_eng.html&quot;&gt;5-day National day short tour&lt;/a&gt;.&lt;/p&gt;
&lt;style type=&quot;text/css&quot;&gt;
#flickr_badge_source_txt {padding:0; font: 11px Arial, Helvetica, Sans serif; color:#666666;}
#flickr_badge_icon {display:block !important; margin:0 !important; border: 1px solid rgb(0, 0, 0) !important;}
#flickr_icon_td {padding:0 5px 0 0 !important;}
.flickr_badge_image {text-align:center !important;}
.flickr_badge_image img {border: 1px solid black !important;}
#flickr_www {display:block; padding:0 10px 0 10px !important; font: 11px Arial, Helvetica, Sans serif !important; color:#3993ff !important;}
#flickr_badge_uber_wrapper a:hover,
#flickr_badge_uber_wrapper a:link,
#flickr_badge_uber_wrapper a:active,
#flickr_badge_uber_wrapper a:visited {text-decoration:none !important; background:inherit !important;color:#3993ff;}
#flickr_badge_wrapper {background-color:#ffffff;border: solid 1px #000000}
#flickr_badge_source {padding:0 !important; font: 11px Arial, Helvetica, Sans serif !important; color:#666666 !important;}
&lt;/style&gt;

&lt;table id=&quot;flickr_badge_uber_wrapper&quot; cellpadding=&quot;0&quot; cellspacing=&quot;10&quot; border=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://www.flickr.com&quot; id=&quot;flickr_www&quot;&gt;www.&lt;strong style=&quot;color:#3993ff&quot;&gt;flick&lt;span style=&quot;color:#ff1c92&quot;&gt;r&lt;/span&gt;&lt;/strong&gt;.com&lt;/a&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;10&quot; border=&quot;0&quot; id=&quot;flickr_badge_wrapper&quot;&gt;
&lt;tr&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.flickr.com/badge_code_v2.gne?count=5&amp;amp;display=random&amp;amp;size=t&amp;amp;layout=h&amp;amp;source=user_set&amp;amp;user=58920788%40N03&amp;amp;set=72157625813769873&amp;amp;context=in%2Fset-72157625813769873%2F&quot;&gt;&lt;/script&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</description>
                <link>https://tomm.org/misc/dprk-september-2009</link>
                <guid>https://tomm.org/misc/dprk-september-2009</guid>
                <pubDate>2009-09-13T00:00:00+00:00</pubDate>
        </item>

        <item>
                <title>Two factor auth gets personal</title>
                <description>
&lt;p&gt;I’ve been sounding off against banks’ use of two factor authentication (2fa) for a while now, as anyone whom I’ve bored with it will attest. Until now &lt;a href=&quot;http://www.smile.co.uk/&quot;&gt;my bank&lt;/a&gt; hasn’t jumped on the bandwagon. Their anti-phishing methods have thus far been as sophisticated as a drop-down to select your PIN to avoid keyloggers. However, they recently sent me an email alerting me to a change in their terms and conditions, adding &lt;cite&gt;card reader&lt;/cite&gt; in a bunch of ominous places. For example:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Condition 11.3 For some internet and telephone banking instructions you may be asked to use your card and a Card Reader. If you do not use your card and Card Reader we will not be able to carry out your instructions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This makes me think that a brown jiffy bag with a bulky piece of plastic will be landing on my doormat in the near future, and now I’m personally affected by this stupidity. They’re doing this in the face of obvious security flaws. Over two years ago MITM attacks against 2fa were in the wild and &lt;a href=&quot;http://blog.washingtonpost.com/securityfix/2006/07/citibank_phish_spoofs_2factor_1.html&quot;&gt;reported&lt;/a&gt; in the mainstream media. Sure, they limit the window of opportunity to the time period in which a token is valid, but who cares. There’s still a window of opportunity there and it’s not like it’s difficult to proxy a couple of requests in a timely fashion. Two years on and I imagine the attack is part of any reputable phisher’s toolbox by now.&lt;/p&gt;

&lt;p&gt;Therefore it seems it’s just a big waste of money, a load of inconvenience to me and no doubt the card readers contain a load of unrecyclable plastic. Whilst banks are struggling to survive and paying me a pittance on my savings, they are throwing money away on ineffective solutions. I’m now likely going to be expected to carry this thing around with me if I want to carry out certain transactions with my bank. The updated terms even talked about needing it when I call them up! So much for online banking allowing me to control my finances from anywhere. Now I can only do it if I’ve weighed my pockets down with one of these silly devices.&lt;/p&gt;

&lt;p&gt;A much better solution is one employed by &lt;a href=&quot;http://www.citibank.com/&quot;&gt;some&lt;/a&gt; &lt;a href=&quot;http://www.chase.com/&quot;&gt;US banks&lt;/a&gt; I’ve been a customer of: two channel authentication. If I log on from a computer they don’t recognise or attempt to send some money to someone I’ve not before, the extra step kicks in. They send me an authorisation code over a pre-arranged channel, either email or SMS. When I receive that code I enter it back into the website. There is a small problem with their implementation, but it’s easily overcome (just include transaction details in the text message).&lt;/p&gt;

&lt;p&gt;If these changes to the terms and conditions are indeed a precursor to Smile implementing 2fa then I need to start looking around for a new pl
ace for my money. However, they’re the only UK bank offering a current account with an ethical policy so it looks like I need to decide which 
is more important to me.&lt;/p&gt;

</description>
                <link>https://tomm.org/tech/two-factor-auth-gets-personal</link>
                <guid>https://tomm.org/tech/two-factor-auth-gets-personal</guid>
                <pubDate>2009-02-03T00:00:00+00:00</pubDate>
        </item>


</channel>
</rss>
