Thursday, 14 March 2013

Algorhyme - poetic network protocols from 1985

Researching data centre networking at the moment, and reading up on the origins of the spanning tree protocol. It was proposed in an ACM SIGCOMM paper in 1985 by Radia Perlman, and the abstract went as follows:

I think that I shall never see
A graph more lovely than a tree. 
A tree whose crucial property
Is loop-free connectivity. 
A tree which must be sure to span
So packets can reach every LAN. 
First the Root must be selected,
By ID it is elected. 
Least cost paths from Root are traced.
In the tree these paths are placed. 
A mesh is made by folks like me
Then bridges find a spanning tree.

If more papers went like this I'd probably get through them faster.

Thursday, 24 January 2013

Home networking explained

There is a mysterious wireless dead spot in our home network that just happens to be in the same space as the bed where I sit, so I've been looking into ways to improve this state of affairs. This three part tutorial on CNet seems pretty good, so I thought I'd share it here for posterity:

Part1 introduces the basics of home networking, explaining terms like 'router' and 'access point' and covers the types of wireless available, and the relatively new method of networking through your power socket.

Part 2 goes into more detail on wireless - how to set up a network with good security and how to extend your network's range.

Part 3 gets hardcore, with instructions on how to make your own Ethernet cable and wall sockets. Now that would be fine to try some day.

If you're looking for network tips, I hope these help!

Thursday, 23 August 2012

Did Han know what a parsec was?

If you've seen the original Star Wars you may recall the (in)famous line where Han Solo boasts about the speed of the Millenium Falcon:
Han Solo: Han Solo. I'm captain of the Millennium Falcon. Chewie here tells me you're lookin' for passage to the Alderaan system? 
Obi-Wan: Yes indeed, if it's a fast ship. 
Han Solo: Fast ship? You've never heard of the Millennium Falcon? 
Obi-Wan: Should I have? 
Han Solo: It's the ship that made the Kessel Run in less than twelve parsecs. I've outrun Imperial starships. Not the local bulk cruisers mind you, I'm talking about the big Corellian ships now. She's fast enough for you old man.
Now, it doesn't take much of a physicist to tell you that a parsec is a measurement not of time, but of distance. A light year is a distance measured as the distance light can travel in one year. A parsec is approximately 3.26 light years (that's around 19 trillion miles). So is Han being dense?

Well, the Star Wars Expanded Universe writers concluded not, and developed an explanation where the Kessel Run is a smuggler's route from the mining planet of Kessel that skirts a cluster of black holes called the Maw. The faster the ship, the closer you can skirt to the Maw, and therefore the shorter the distance, hence parsecs. This explanation quickly became canonical and until recently I assumed it was correct.

Until I read Darths & Droids a few days ago. If you haven't seen it, it's an excellent webcomic that imagines a world where Star Wars exists as nothing more than a D&D-style game master's imagination, and the events of the movies are reinterpreted as the actions of a group of role-playing friends. According to the annotation on this one, in the original script, Obi-Wan was supposed to treat Han's claim with derision, as it showed he didn't know what he was talking about.
It really was just a heap of junk after all. Who knew? Source.
Apparently a minor change, but when you think about it, it makes a big difference to the character. He's always portrayed as a slightly reckless but fundamentally competent character, whilst the Falcon was not much to look at but was genuinely fast. Yet in the original script, Han started out as a bit of an idiot (although he's clearly supposed to have matured by the Empire Strikes Back), and perhaps the Falcon was really no more than a heap of junk without even speed as a redeeming feature.

Crazy stuff. I'm not going to lie, my world was temporarily rocked. It rather changes the interpretation put on it by just about every content creator since, simply because Alec Guinness didn't portray quite enough derision.

Is hope good or bad?

Recently I've watched both The Shawshank Redemption (for the first time) and The Hunger Games (again). They are, of course, two completely different films - the former is about Andy Dufresne who is sentenced, wrongly, to life imprisonment and his experiences inside and, ultimately his desire to be free; the latter about a society in which rural districts are kept in poverty by the ruling Capitol who use an annual televised death match contested by young 'tributes' from each district as a tool to punish the districts for their past rebellion and keep them in line.

However, watching them so close together, I was struck by one theme in particular that they have in common - hope.

It comes out very strongly towards the end of The Shawshank Redemption in a conversation between Andy (Tim Robbins) and Red (Morgan Freeman):

Andy Dufresne: That's the beauty of music. They can't get that from you... Haven't you ever felt that way about music? 
Red: I played a mean harmonica as a younger man. Lost interest in it though. Didn't make much sense in here. 
Andy Dufresne: Here's where it makes the most sense. You need it so you don't forget. 
Red: Forget? 
Andy Dufresne: Forget that... there are places in this world that aren't made out of stone. That there's something inside... that they can't get to, that they can't touch. That's yours. 
Red: What're you talking about? 
Andy Dufresne: Hope.
 Andy recognises the power of hope, but Red also points out the danger of hope in a later conversation, when Andy's hopes of acquittal have been crushed:
Red: Let me tell you something my friend. Hope is a dangerous thing. Hope can drive a man insane. 
A similar sentiment is expressed by President Snow to the Head Gamemaker Seneca Crane, as events in this year's games are starting to provoke unrest in the outlying districts:
President Snow: Hope, it is the only thing stronger than fear. A little hope is effective, a lot of hope is dangerous. A spark is fine, as long as it's contained. 
Seneca Crane: [confused] So... 
President Snow: So, contain it! 
President Snow & Seneca Crane. Good facial hair, but it won't end well. Source.
All three men understand that the hope of a better future is a powerful thing to have inside of you. Andy sees it as a force that can make you strong against all opposition. Red, on the other hand, recognises the danger of uncertain hope - hope that does not come to fruition will ultimately crush you into a depression worse than anything experienced by those who just accept that their life isn't going to get any better. Snow identifies the power of that hope as a tool that can keep people in line - it is more powerful than fear, because it comes from within rather than being imposed from outside. But what is the nature of the hope that these men talk about? The final lines of The Shawshank Redemption are quite telling:
Red: [narrating] I find I'm so excited, I can barely sit still or hold a thought in my head. I think it's the excitement only a free man can feel, a free man at the start of a long journey whose conclusion is uncertain. I hope I can make it across the border. I hope to see my friend and shake his hand. I hope the Pacific is as blue as it has been in my dreams. I hope.
Morgan Freeman, Tim Robbins fom Shawshank Sedemption
Red & Andy meet for the first time. Source.
It is an uncertain hope, a wish that things will turn out the way they want. In the end, Andy uses his hope as a drive to escape, fleecing the crooked warden in the process. His hope is fulfilled, but what if he had been caught at the end? What if he hadn't got away? I imagine the depression would have driven him to suicidal despair.

The apostle Paul recognises the futility of false hope:
32 If I fought wild beasts in Ephesus with no more than human hopes, what have I gained? If the dead are not raised,
“Let us eat and drink,
    for tomorrow we die.”
  - 1 Corinthians 15:32 (NIV) 
An uncertain hope is a dangerous thing, it can turn on you, destroy you. But that's not the kind of hope that Paul talks about:
Therefore, since we have been justified through faith, we have peace with God through our Lord Jesus Christ, through whom we have gained access by faith into this grace in which we now stand. And we boast in the hope of the glory of God. Not only so, but we also glory in our sufferings, because we know that suffering produces perseverance; perseverance, character; and character, hope. And hope does not put us to shame, because God’s love has been poured out into our hearts through the Holy Spirit, who has been given to us. - Romans 5:1-5 (NIV) 
 The Christian does not have a vague, wishful hope of Heaven and future glory. No, the Christian's hope is sure and certain. We do not put our hope and trust in the things of this world to satisfy us, but rather, looking forward we know that God will resurrect the dead and give us new, imperishable bodies and bring us to Heaven. Why? Because Jesus has already accomplished the victory - the result is certain!

Conclusion? We have a hope inside us that is not weak, to control us, our vulnerable, to crush us, but it is strong and guaranteed - that is the Bible's definition of hope. It's not an indefinite 'I hope it doesn't rain today', it's a certain 'I know that I will be in Heaven forever'. This hope is why Paul can say:
16 Therefore we do not lose heart. Though outwardly we are wasting away, yet inwardly we are being renewed day by day. 17 For our light and momentary troubles are achieving for us an eternal glory that far outweighs them all. 18 So we fix our eyes not on what is seen, but on what is unseen, since what is seen is temporary, but what is unseen is eternal. - 2 Corinthians 4:16-18 (NIV)
When all is said and done, whatever people may say, whatever may happen, however we may fail, we are secure in Christ, and He will surely bring us to glory. So take courage, and pray that God will help us to fully comprehend the implications of this.

Friday, 17 August 2012


I have decided to resurrect my old Tumblr account for all the small stuff that I want to share that doesn't seem to justify a full blog post. I shall not be using it to post hipsterish stuff, emo stuff or other such material. I may post quotes on photo backgrounds. If it's actually a good quote. Please don't judge me for that. Not for my sake you understand. For yours. It's not nice to judge.

And now I'm using Rob Bell short sentences. Better not put that on individual lines.

There you are.

I'm ready for Tumblr.

Short sentences.

Sense of meaning.

Because there are spaces in between.

And I don't fully articulate my thought.

Because I'm being impactful.

And cos you're in.

Whatever that means.

If this style of writing makes you feel uncomfortable, try to imagine it in the voice of Glad0s, then it will seem funny, rather than making you feel awkward because I'm trying to sound like a modern, trendy and relevant pastor or something.

Thursday, 9 August 2012

British National Pride

As I write, Team GB currently sits third in the medals table and, having passed our total haul from Beijing 2008, have our best tally in over 100 years.

All this success has produced a rather dramatic reaction in the British people that to some minds borders on being distinctly un-British. People publicly stating their national pride? Even comedians not mocking the Olympics for being rubbish? Winning stuff by being much better than anyone else? Mind you, winning anything in general is fairly un-British. We have always been a nation of plucky losers, supported for the effort, but not the success, with a handful of notable exceptions (Chris Boardman, Steve Redgrave, Ben Ainslie et al.). This got me wondering, has the spirit of the British people really changed that much? Are we about to become a nation of card-carrying, flag-allegiance-swearing jingoists?
Royal Mail stamp to celebrate Chris Hoy's Cycling Track Men's Keirin
Who didn't get a bit emotional watching Chris Hoy's power and refusal to be deprived of his sixth gold? He epitomises the new sense of Britain as winners, enjoy your special postage stamp and gold post box. Source: Daily Mail.
Britain has a reputation for being self-deprecating. The American migrant comedian Reginald D Hunter attributes it to the age of the country giving our humour a degree of 'maturity' that more recent innovations like America don't have yet. The Americans, he says, make fun of other people, the British make fun of themselves.
I think a lot of this comes on the back of the British Empire. Once upon a time we were a proud nation that owned the world, these days we realise that colonialism wasn't all sweetness and light and too much flag-waving is discouraged as the top of a slippery slope that leads to European domination and Nazi Germany Britain (the anagram you get from the title of this post and the reaction it produces is a prime illustration). There's also a sense that we aren't a nation overflowing with nationalism because, if we're honest, we can't, in all honestly, be that blindly proud of our country. We just aren't as great or impressive as we used to be, there are too many things wrong with Britain, too many things that are just a bit rubbish, too many things that other countries do much better than us these days. Like empires. And football.

In fact, I think football gives us an insight into where this sudden Olympian burst of national fervour has come from. To some extent it's always been there. You can see it in the way we flock out to watch the Jubilee celebrations, or the Royal Wedding, and we still flock out to support the English national team despite our only tournament victory coming in 1966. British people haven't totally given up on Britain - we wouldn't mind a reason to be proud of our country. We just need to have something that we can actually be proud of.
Jessica Ennis celebrates winning the heptathlon
We're even getting customised flags for our winners! That's confidence for you. Ennis had a lot of pressure as face of the games, but surpassed herself to win by a country mile. Source: Daily Mail.
And so to the Olympics. The opening ceremony was a roaring success, Twitter and Facebook exploded with proud (and surprised) Brits praising Danny Boyle's work. The Daily Mail was pilloried for criticising its inclusion of the NHS and what they considered an unrealistic protrayal of a politically-correct black father-white mother family (cue family photos of Olympics poster girl Jessica Ennis...). People were proud of the slightly nuts, very British presentation of British culture. And it was funny. Humour, in an opening ceremony, I know! And, honestly, I think we were also surprised that it wasn't embarrassingly rubbish, which only added to the pleasure (something that could be said of the whole Olympics so far, actually).

Then, to crown it all, we've started winning things. And not just scraping through either. Winning by noticeable distances, dominating the cycling and rowing. Winning because we're established as the best, not just as a one-off. British competitors have largely surpassed themselves, winning medals that haven't been won before, or that they weren't expected to win, or at least achieving personal bests. It's all come as rather a shock, and the whole country has been taken up with a nation-supporting enthusiasm that surpasses both the royal wedding and the Jubilee. The crowds have been deafening, even on TV. I knew people would get more excited by the Olympics once it started, but not quite this much. Total bores like Neil Morrissey have been shouted down, Britain hasn't been so united in quite some time. Andy Murray beat Roger Federer in straight sets at Wimbledon, for crying out loud.
Andy Murray Olympic gold
Even Andy Murray is officially British now. It wasn't just thrashing Roger Federer at Wimbledon or his brilliant tennis - he really wanted to win. Source: The Sun.
Sure, this national fervour won't last, although this new determination to win at the Olympics is starting to look lasting. But we will never again be the kind of country that swears allegiance to its flag, or that straight-facedly recites poems about British and Japanese opression of Singapore and our predecessors' noble struggle to throw off injustice. But then again, I think that's a good thing. It's good to have a healthy perspective on your country. But it's also healthy now and again to have something that you can really celebrate.

Today, Britain is justifiably proud.

Thursday, 2 August 2012

Britain: Brilliant but Barmy. London 2012 Opening Ceremony

So I finally found a copy of the London 2012 Opening Ceremony online and watched it. I'd seen bits on YouTube, but I must say I was impressed. I imagine if you didn't understand any of the imagery, it might not have been as impressive as the sheer scale of Beijing 2008, but to me it was considerably better.
The flame made of copper petals brought by the teams was a nice touch. Source here.
I must admit that I've found nearly all of the opening ceremonies I've seen crushingly dull. Beijng may have been visually impressive, but it was meaningless. There were colours, acrobatics, coordination and organisation, but no spirit. Danny Boyle's Isles of Wonder performance told a potted history of British culture, introducing countless pieces of pop culture imagery in a show that did a surprisingly good job of capturing the changing nature of Britain without resorting to either pessimism, cynicism or excessive nostalgia.
The Queen with James Bond (and Corgi). Source here.
Sure, it wasn't on the scale of Bejing, but it more than made up for that in character. This excellent review from Ai Weiwei, the Chinese political problem child who designed the Bird's Nest but turned down the opening ceremony gig, hits the nail on the head. The London ceremony was a genuine attempt to reflect the things held dear by real people in a real society - not just an idealized vision of a faceless nation. This is perhaps clearest in the fact that many of the cavorting medical staff were genuine, members of the construction team formed the guard of honour for the torch, and instead of a great name lighting the torch, it was seven young athletes. Oh, and no lip syncing-children either.
The industrial construction of the rings was ingenious and spectacular. Source here.
There was also a healthy injection of humour, which was exceedingly welcome. One of the things I've found hard to swallow about previous ceremonies is the stoic commitment to straight-faced seriousness, less so here. You can hardly accuse a ceremony of excessive seriousness when the highlights are the Queen 'jumping' out of a helicopter to arrive by parachute, and the most-discussed bit on Twitter was a cameo from Mr Bean and the LSO. One Guardian reviewer deplored the Mr Bean skit, and in the process showed that he completely fails to appreciate the mood of the nation.
I was left wondering what the rest of the world must think of us now. I can only wonder what those not in on the story of Mary Poppins made of a horde of flying 1920s women with umbrellas should warding off Lord Voldemort. It makes sense though, this is the country that brought Monty Python to the world. Danny Boyle created a show that was quintessentially British in all its multi-faceted meanings, who care if the world thinks we're barmy.

And the best bit? We all expected to be completely embarrassed, but we weren't. It wasn't totally rubbish at all.
England's Green and Pleasant land. Source here.
Oh, and can I just say, British Eurosport's coverage was fantastic. Barely a word of commentary with no inane waffle. Take note, BBC.