Wishing you a happy and superstition free 2013

I lived for many years in a house numbered 13 and as that was in Northern Ireland any claim that it was not unlucky is of limited power, but it was no more or less unlucky than any of the other houses on the street.

Now that we are on the edge of 2013 (in this timezone anyway – I know some of the readers here may have already “crossed over”), I am surprised we have not heard more about the number 13 and the ill luck it is supposed to bring us all. But then, after a surprising number of grown adults were left looking foolish over the supposed Mayan prediction of the end of the world in 2012, maybe there is limited interest in this, even amongst the factories of idiocy that form parts of the daily press.

So, fear not the 13 – chances are you have already lived through a whole year of thirteendom when you were growing up, and you survived that.

Happy new year.

Limits of (blog) growth

How many daily visitors can a haphazardly written blog on computer science hope to get? The answer seems to be about 100 (see graph).

Blog daily visitors

I used a cubic spline and a logarithmic scale to plot this to diminish the impact of the two really big stories – a post on P=NP in early 2011 and on 11-Venns in August 2012, and the picture seems clear enough – significant growth in underlying visitors ended about a year ago and we are heading asymptotically for somewhere just over 100.

Seeing lunar craters with the naked eye

Just searching through files on my laptop and I came across this picture again:

Moon, Spring 2012
The prominence of the crater right on the terminator – I am a bit rusty at this these days but I’d guess Maginus, with Clavius below – is such that I’d suggest that humans with good eyesight must be able to see craters – it looks to be about half the size of the Mare Crisium, which even those with dismal eyesight (such as me) can see without difficulty.

But that again raises some questions:

  • Why did nobody report the existence of craters before the invention of the telescope?
  • Why did religious zealots suggest that astronomical bodies were smooth and perfect? (After all the Earth is neither and we can all see the Moon is blotchy)
  • Why did no one even seek to map the Moon before telescopes were invented?

Infrared astronomy on the cheap?

When I was an undergraduate infrared astronomy was a relatively new area of study and was generating much excitement and seeing this project on Kickstarter I wonder if there could be some amateur action available – www.kickstarter.com/projects/andyrawson/ir-blue-thermal-imaging-smartphone-accessory.

Any views, anyone?

Surge in spam

Threshold (Photo credit: gwire)

Has anyone else noticed a large uplift in the volume of spam they are getting in recent days?

In general the last couple of years has, for me at least, seen spam fall. Perhaps that is because tools like Spamassassin are better than ever or, more likely, because law enforcement agencies have started to take this plague seriously and have closed down more than a few botnets.

But the recent surge seems to have taken it back to the levels seen in the bad days of the opening years of the century.

Feeling very daunted

Distributed and parallel systems
Distributed and parallel systems (Photo credit: Wikipedia)

One of my Christmas tasks is to have some serious thoughts about, and maybe make some progress with my “invention” or “experiment” for my PhD. It is not easy.

Currently I am thinking about what I could do about a parallel file system. There are several problems with this, not least of which is what distributed system could I test a distributed file system with? I have now taken delivery of three 250GB USB disks so I have that part of a RAID 0 array, which seems the most obvious place to start. But I do not have a distributed system with three I/O nodes.

(Well I do have three Raspberry Pi boxes on which I can run Plan 9, which is a distributed operating system, but I am not entirely convinced any more this is a practical option.)

Then there is a question of originality – because twenty years ago an experimental file system, Vesta, was built that seems to, more or less, do what I want. I am not sure Vesta is being used anywhere any more, but I do not just want to go around re-implementing it. Now, I am sure when I actually start writing code, if that happens, it will move away from Vesta (especially as I have no Vesta code and I am not aware it is available in any case) and towards something else, but right now it just feels like I am walking down a well trodden road.

Universal Credit: heading for a pile up?

If the UK government’s Universal Credit project fails it won’t be an ordinary car crash, but a motorway pile up – battering the poor as lazy and feckless has become something of a political sport in Britain in recent months, but failing to pay people the money they need to live will likely change the terms of the debate overnight –  starving children are no advertisement for welfare reform.

The government and its advisers have always said, though, that Universal Credit will be delivered on time and to budget. As the world’s biggest “agile” software development project it would be a remarkable feat – though after two years of work we are entitled to ask where the incremental prototypes are if this really is agile.

But signs are growing that the project is in trouble. Political squabbling between ministers is barely concealed (and it is between Conservative ministers – not even across party lines inside the coalition) and now a significant part of the project has seen roll out delayed.

Now, it may well be that this delay is indeed a sensible thing to do – and a sign that the government are serious about testing things before pressing on, but my sense is that the whole thing is in danger of collapse. It’s just too big, too quick and being done on the cheap using an untested (at this scale) method that has been bought into as a political silver bullet rather than because there has been a considered discussion of the options.

Raspberry Pi as an ethernet to wifi bridge

So, here’s my account of how to set up your Raspberry Pi box as an ethernet bridge.

English: Extract from Raspberry Pi board at Tr...
English: Extract from Raspberry Pi board at TransferSummit 2011 (Photo credit: Wikipedia)

First of all, for those wondering: what is a bridged connection? Essentially this is a “see through” way of extending your network – in a bridge software decides which packets get fowarded on to the next segment of the network. So for a wired to wireless bridge you can imagine it as an extension of the wired network into the wifi-fi space. This is different from just being a router as we don’t need to, for instance, set up a new DHCP server or fix the routing table elsewhere in the network to ensure packets for the wireless connection are sent to your router and so on.

I was already using my Raspberry Pi box as Squid proxy server and I could have gone an extra step of making that “transparent” (ie forcing users to use that via the bridged connection) but that was a level of control too far! But it’s an option. To be honest the RasPi’s (this is a first series version, with less memory) performance as a Squid server seems to tend towards the mediocre, so while I think using a proxy is worth it for limiting the stress on a network like mine (we can have up to 10 devices at once with PCs and phones these days), it’s not fundamental.

Before you begin: The assumption here is that you have an ethernet connection already running and a wireless card (USB device) that supports “promiscuous” mode, meaning it can read packets that were not originally destined for it. I think most modern cards  do that, but I am no expert. The assumption here is that you are running Raspian. If you have another distro adjust the suggestions appropriately.

First step:

sudo apt-get install aptitudeaptitude is just better than apt-get.
sudo aptitude install hostapd bridge-utils – you need these to get the wireless card and the bridge running

Then ensure that IP forwarding is on by editing /etc/sysctl.conf and removing the # from before the line that reads net.ipv4.ip_forward=1.

Second step:

Edit (i.e., create) /etc/hostapd/hostapd.conf – insert your SSID and probably don’t use WEP, which is close to useless…


Third step:

Edit your /etc/network/interfaces file … here is mine:

auto lo
iface lo inet loopback
iface eth0 inet static

auto br0
iface br0 inet dhcp
    pre-up ip link set eth0 down
    pre-up ip link set wlan0 down
    pre-up brctl addbr br0
    pre-up brctl addif br0 eth0 wlan0
    pre-up ip addr flush dev eth0
    pre-up ip addr flush dev wlan0
    post-down ip link set eth0 down
    post-down ip link set wlan0 down
    post-down ip link set br0 down
    post-down brctl delif br0 eth0 wlan0
    post-down brctl delbr br0

(I had to force my eth0 to IP address because of the behaviour of my DHCP server on the commodity router, you may not need to do that, but it is essential that neither your eth0 nor your wlan0 acquire an IP address.)

Fourth step:
Edit your /etc/rc.local file to ensure that the hostapd service is restarted after the bridge comes up. (For DHCP server reasons I also had to ensure my bridge was assigned an IP address – not sure you will need to do that, but it’s probably harmless)

# Setup bridge
dhclient br0
/etc/init.d/hostapd restart

Fifth step:
Restart your box sudo shutdown -r now and if it doesn’t work, don’t blame me, blame the guy who gave me the answer here – http://superuser.com/questions/520172/wired-to-wireless-bridge-in-linux

But hopefully it will work…

Took me a week, but I did it

Finally managed to use my Raspberry Pi to host a bridged wireless connection, so extending my wireless network to cover all the house (not that it’s that big, but the signal from the router seems to work well in only one axis).

Will post a fuller description in due course, in case someone else wants to use their RasPi in a similar way.