Blog

Team Iron Chef

Iron Chef America... Fuck Yeah!

Iron Chef America… Fuck Yeah!

I know a short blog post is highly uncharacteristic, but it’s especially relevant as I’ve just been talking about Twitter…

Is it just me, or does the new cover of Iron Chef America for Wii remind anyone else of Team America?

Just me then…

Twitter – Conversation in the Machine

It’s another of those life-changing technologies which will not only improve the way you interact your fellow humans across the planet, but also shape and change the web as we know it for a brighter future beyond our current limited borders.

No it’s not.

It’s a micro-blogging tool which performs about the same function as your Facebook status, with a bit more history and more conversation potential than real speaking. It also falls into the category of “shiny web things” that the magpie’s of the Internet world run bounding towards with wings flapping, declaring their undying allegiance and overwhelming excitement about the grand new era of technology, society and communication.

I am said magpie. I just haven’t had much use for it, so whilst most people are bounding towards Pownce with their wings wide open, I’m still trying to find an excuse.

My Twitter feed is decidedly empty, having originally opened it as a way only of updating my Facebook status before I realised that was syndication for the sake of it (See integrations with BrightKite, Loopt, and Flickr integration for reference). But I do get a kick out of things like the Tower Bridge Tweets. The wonderful thing about this Web 2.0 stuff is that you don’t have to use any of it for what it was intended for (which is usually so vague and fluffy, it only really starts to take shape after the rules have been broken).

So I grabbed a copy of the Net::Twitter module for Perl and before you know it, my script that monitors if the Wifi connection on the Blakepics server had gone down was happily tweeting away with only three more lines of (my) code.

use Net::Twitter;
my $twit = Net::Twitter->new(username=>"username", password=>"password", source => "DowntimeMonitor" );
$twit->update("Internet connection ".($state ? "is now up" : "has been restarted"));

Best of Borough Awards – The Beachcombers

I don’t usually get into shameless plugging like this, because this blog’s all about integrity and the pursuit of some higher truth through professional styled journalism in a common-man’s world. But many of you problem know of the infamous Chris Croucher and Mark Beynon already, and if you don’t – quite possibly deserve to learn those names now while you can still say “oh yeah, I remember when they did…”

So I’m helping you, really. And in return, you can go ahead and watch their excellent short film ‘The Beachcombers’, which has been nominated into the top 6 of the Best of Borough Awards 2008.

And if you don’t like these sort of things, just vote for it anyway and go join the Facebook group. Like I said, shameless 😉

Mostar – The Old Bridge

The first of my catch-up posts written way back, but just now ready for public consumption (I have a stringent post approval process, as I’m sure you can tell). At least I can add pictures 😉


The (New) Old Bridge

I’m now in Mostar, one of the front lines in the Bosnian/Serbian war of the 90s, and one of the worst hit architecturally.

It was attacked by Serbian and Montenegrin forces in 1992 with an onslaught of heavy bombardment lasting 6 months. In May 1993 (just over 15 years ago, remember) – Bosnian Croat forces within the city attacked the Muslims living there. They were taken from their homes, moved to detention camps, dividing the once united city into two distinct halves.

There is a strong emphasis in Bosnia to never forget, through leaving some destroyed buildings as a monument, to simple plaques alongside rebuilt areas. “Forgive, yes … But never forget” says Bata. It seems a healthy way to be, but undoubtedly a lot easier said than done.

Don't Forget '93

The Old Bridge in Mostar once stood for 500 years, and was visited by people from all over the world throughout its lifetime. It’s the symbol of Mostar, and regular diving traditionally takes place from the highest 21m point into the freezing river below. Everything seems to be built around that single central point which draws the focus of the town.

Once it was gone, everything the bridge had stood for in the city went with it. Christians, Muslims and Jews became divided. After the war, it was replaced with a wooden bridge before being rebuilt to be identical to the old bridge and reopened in 2004. This meant using stone from the same quarry, as well as using the old methods with no modern technology. It’s said that the original Turkish architect fled to the nearby Dervish monastery after it was completed the first time, through fear that it would collapse once the scaffolding was removed. I like to think the same tradition was held to this time around, and if you stay real quiet, and watch very closely – you can still find that man hiding out amongst the pigeons in the caves below.

West Balkans Photo Story

As you probably worked out from the last post, I’ve been on holiday again. So, as is tradition – here’s the usual photo story. The pictures come from various West Balkanite countries; Bosnia, Montenegro, Albania and Macedonia. Facebook users will probably need to click through to the original article link to see the video.

The rest of the photos, including the ones in the video above will be on Blakepics shortly (as soon as I’ve got my server running again). Likewise, a full quality version of the video will be here. The music, “Let me be myself” by 3 Doors Down.

Incidentally, more blog posts from the trip are also on the way. Some are drafts, some are notes, some probably don’t exist yet – but they’ll be spreading across the site like mould on bread very shortly.

Sarajevo – don’t mention the war

Sarajevo is not one of the worlds most beautiful cities. It is a far cry from the coastal towns along the Adriatic, but it is one of the only places in the world that you would find the nearby Holiday Inn to be one of the local tourist attractions.

It was once known as the world’s Jerusalem, there the worlds three main religions sent their prayers upwards in harmony. It’s since seen its fair share of trouble though, and they may have been a little premature. From 1992-1997, Sarajevo suffered a siege which saw over 10,000 civilians killed, and left the city without food, or water as well as constant fear of attack from Serbian troops in the surrounding hills. What makes this especially thought provoking is that the war happpened in perfectly memorable times, for me. And whilst I was sitting at home watching the news of terrors in far away lands, other men and women my age were fighting for their lives and survival. 2,000 children were killed during the siege, enough to fill two of the schools that I was attending at the time. Everybody has a war just like that, this is mine, and I suspect many of yours..

On the few occassions the “don’t mention the war mantra falls apart, I have still had to do a double-take when people talk of it not as, “they travelled through here”, or even “we travelled through here”, but “I travelled through here”.

Anyway, as they say in Bosnia, “enough about the war already”, and amen.

The weather is stunning, the sun is beating down on my pasty white arms, and I think I’m building up a pretty good t-shirt tan, all in all. The people are amongst the most friendly, and welcoming you’ll find anywhere in the world. With a growing tourism industry, I get to take advantage of the fact that not everybody hates tourists, yet. A sad fact that has been in existence in London for some 700 years.

I realise from the lack of Rough Guides, and that the BA direct route only opened up last year, that this is not yet on this years hot list. Whilst the guide books suggestion of watching the locals chess game might not be everyones cup of tea. But I challenge you not to tense up and get sucked in by the enthusiasm of 20 people screaming at said player not to make the move that will end his fight.
We’ve also got more mosques than you can shake a stick at (120 in Old Town), a beautiful rich green valley to explore (not off the beaten track though, mine clearance is still underway), graffiti from Space Invader (well I saw one, anyway), Red Bull flavoured ice cream, churches, great food, cheap food, great cheap food, and a whole lot of bars that aren’t yet filled with the typical British Male Tour Gangs. You know who you are.

Last but not least, not one single fat person. Except the tourists. And the ones I haven’t seen.

Why would you not want to come here?

So with that, I’m leaving tomorrow for Mostar. I have a vague plan of where I am heading now. At least before the sun sets, the idea is Mostar, into Montenegro, Kotor, Bar, through Albania to Lake Ohrid in Macedonia, before heading back north to Skopje and my eventual flight home. Public transport permitting, of course. I might even stop off in Dubrovnik again, if the buses demand it.

Doctor Whippy – Ice cream for the depressed

This has to be a win-win situation. Courtesy of The London Daily Photo Blog, an inventor called Demitrios Kargotis combined with the almighty power of the Royal college of art has come up with a machine that analyses your voice, and dispenses appropriate amounts of ice cream based on your mood.

Unhappy people get more ice cream, presumably (or rather, obviously) making them happier.

http://londondailyphoto.blogspot.com/2008/05/doctor-whippy.html

You could have seen this in action at the Icon Experiment. But since it’s now closed, you can’t. I don’t know about you, but that makes me think I’d be getting a huge scoop of ice cream right now.

Upgrading Fedora 8 to Fedora 9

It’s time for another Fedora upgrade. Whilst the installations aren’t necessarily getting any better – fixing them is becoming a bit faster, because the problems are pretty similar every time and these notes I’m keeping are helping.

  1. System won”t boot. Met with a grub> prompt, and no menu
    • Boot the system from the DVD again, and select “rescue an install system”.
    • ‘chroot /mnt/sysimage/’
    • “nano /boot/grub/grub.conf”
    • Change this line, “root (hd2,0)” to root “(hd0,0)”. (I’m not sure why Grub seems incapable of finding the right hard drive to boot from each time… It doesn’t change.)
    • Uncomment the line at the top #boot
  2. Cyrus imapd won”t start. Complaining of libcrypto.so.6 library missing.
    • Upgrade Cyrus – “yum upgrade -y cyrus”
    • Restart the service – ‘service cyrus-imapd restart’
  3. Rss2imap no longer posts the messages into Cyrus IMAPD
    • Difficult to place the blame on this one. One turning on Rss2imap debug mode, I see i@m getting the error ‘Message contains bare newlines’, and although Rss2imap has posted the message. It’s been discarded by Cyrus. This is actually proper RFC behaviour for Cyrus – as message’s shouldn’t contain the broken ‘\n’ character, but rather ‘\r\n’. At the same time, I also think, ‘so what?’. Either way, the Cyrus behaviour has changed, or Mail::IMAPClient modules have.
    • So the fix… Edit Rss2imap\RSS2IMAPLIB\Rss2imap.pm, and add the bold text.
       my $message = ($headers . $body);
      $message =~ s/\n/\r\n/g;
      utf8::encode ( $message );

      and
       my $folder = $this->get_real_folder_name ($this->{'last-modified-folder'});
      $body =~ s/\n/\r\n/g;
      $this->{imap}->append_string ($folder, $body);

      You’ll notice we’ve replaced all the \n line endings with the more correct \r\n. Let’s just hope we don’t have to undo that later when the problem gets resolved elsewhere 😉

Remarkably, this was the first time the wireless card started up immediately after the upgrade, perhaps things are improving after all 😉

Linux server as a wireless bridge

Since learning the XBox 360 doesn’t come with a wifi adapter, and that buying such a thing would add another 60 pounds to the cost of the console… I’ve been thinking of different ways to get an Internet connection from my high-speed wired network in the living room out to the router way out in the spare room. For many reasons, it’s just not practical for me to wire the whole flat.

Most of the solutions I came up with involved things like ‘spending money’, which I’m slightly adverse to do if I can do it with the existing kit, so these are the really basic steps to turn the existing linux box (with both wireless and wired cards) into a useful bridge. As usual, don’t be fooled into thinking this guide is here for anyone else, as much as it’s here for me when I need to rebuild the machine and I’ve forgotten it all. But feel free to leave a comment about how much warmer and fuzzier I’ve made your life through your use of these “instructions”.

The current configuration

Fedora 8 installation
Wireless Ethernet (ath0) card is connected as 192.168.0.8
Wired Ethernet (eth1) card is connected as 192.168.1.8
Named/bind/DNS server already configured and set-up to accept requests on 192.168.1.8
The Xbox will be wired, on 192.168.1.20

Setting up Fedora

Setup the forwarding rules

#Outgoing requests
iptables -t nat -A POSTROUTING -s 192.168.1.8/24 -o ath0 -j MASQUERADE
iptables -A FORWARD -s 192.168.1.0/24 -o ath0 -j ACCEPT
iptables -A FORWARD -d 192.168.1.0/24 -m state --state ESTABLISHED,RELATED -i eth1 -j ACCEPT
#Incoming requests (port forwarding)
iptables -t nat -A PREROUTING -p tcp -i ath0 -d 192.168.0.8 --dport 88 -j DNAT --to 192.168.1.20:88
iptables -t nat -A PREROUTING -p tcp -i ath0 -d 192.168.0.8 --dport 3074 -j DNAT --to 192.168.1.20:3074

Save your rules so they’re applied on start-up
sudo iptables-save > /etc/sysconfig/iptables

Enable ipv4 port forwarding
nano /etc/sysctl.conf
Change this line
net.ipv4.ip_forward = 0
to
net.ipv4.ip_forward = 1

The client machine / Xbox 360

Now on your client machine (note this will only have a wired connection).
IP Address: 192.168.1.20
Subnet mask: 255.255.255.0
Default Gateway: 192.168.1.8
DNS Server: 192.168.1.8

You’re going to need a DHCP server so that these settings are automatically assigned to the XBox 360. If don’t have one for your subnet already, you can set it up through dhcpd. You’ll probably want to do something about

Edit /etc/dhcpd.conf

ddns-update-style interim;
# HardWired
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.8;
option domain-name-servers 192.168.1.8;
authoritative;
range 192.168.1.10 192.168.1.20;
}
# Assign a static IP
host xbox {
hardware ethernet 00:45:40:10:FE:12;
fixed-address 192.168.1.20;
}

Then restart dhcpd
/etc/rc.d/init.d/dhcpd restart

Router

Remember those ports we forwarded on the server? You’ll also need to add port forwarding to your router, to forward the same ports (88, 3074) to the Fedora machine on 192.168.0.8.

And that’s really it. You should now be able to connect to the Internet without any troubles.

Why don’t you try the homepage? Idiot.

I recently read “The Inmates are Running the Asylum” by the father of VB, Alan Cooper. He spends quite a while arguing the case against obnoxious interfaces that make life difficult for your users. Quite right too. I highly recommend the read if you’re involved in any kind of user interface. Actually, I highly recommend it anyway – empower yourself with the knowledge that things don’t have to be this way.

Anyway, my small part towards eliminating frustration and annoyance was to try and create the perfect 404 page. And I know what you’re going to say… If you desire perfection, why would anyone ever even see your 404 page. Well you’re quite right, but it doesn’t hurt to be defensive about these sort of things. Accidents happen and believe it or not, not all of them are entirely my fault. Sometimes.

I’m not going to link to it here, because my 404 page automatically emails me whenever there’s a broken internal link. Frankly I could do without the hassle. That’s step one, and here are some more.

  • Tell the user what’s wrong. If they’ve come from another site (do this by checking the referrer URL), let them know which site, and that the link was broken at that end. If they haven’t – chances are it’s a bookmark / favourite. Tell the user that. The term ‘404’ is not helpful – telling the user what happened, is.
  • Recent Posts. It’s a blog. If you’re here, you’re most likely reading one of the latest five posts. If you’re applying this to your own non-blog site, list your most changed popular pages.
  • Search. If you’re looking for something and I’ve already failed to find it, searching seems more appropriate than to keep doing what you’re doing.
  • Possible matches. You’ve got a URL – use it. So I try to guess at what the user was hoping to find based on what’s in the URL. If you’ve got some decent SEO going on, chances are this will do better than you think.
  • Other helpful links. The homepage is generally a good starting point, and well, I don’t have a site map. But if I did – this would be another good thing to include.
  • Google Cache – Google maintains a cache, so why not make some use of it and point your visitors at it to hunt for your missing URL. This might not be exactly what you want for your site, but they could find it on their own anyway so stop being difficult.
  • Tags. All my posts are tagged, and provide a nice overview of what the posts are about, so let’s include those.

Turn your 404 page into a jump-board rather than a brick wall – or your readers are just going to find something better to do.