Exponential Origami

Raju Varghese (via Sploid) claims that if you fold a piece of paper 103 times, the thickness of your paper will be larger than the diameter of the observable universe: 93 billion light years. The explanation is simple enough – every time you fold a piece of paper you double its thickness and when you start doubling things they get very large very quickly – but I couldn’t leave this without checking the numbers for myself.

Of course, I couldn’t resist checking this for myself and pulled out a calculator. I soon found that the mental juggling needed to get from fractions of millimetres to kilometres was too much for my little brain and converting between millimetres and light years was going to be impossible.

So I wrote a script. The code is pretty simple, as you can see below, although I did have a four fold discrepancy when I first ran it (I came up with 107 folds needed, rather than 103). It turned out that my initial thickness of the paper was out by a factor of 10. Once I fixed this, everything matched.

#!/usr/bin/env python
""" Foldpaper
    Calculates the thickness of a piece of paper after n folds """

thickness = 0.1
folds = 0
meter = 1000
kilometer = 1000000
lightyear = 1000000 * 9000000000000
size_of_universe_in_mm = 93000000000 * lightyear

while thickness < size_of_universe_in_mm:
    thickness *= 2
    folds += 1
    if int(thickness / lightyear) > 1:
        print(folds, int(thickness/lightyear), 'light years')
    elif int(thickness / kilometer) > 1:
        print(folds, int(thickness/kilometer), 'kilometers')
    elif int(thickness / meter) > 1:
        print(folds, int(thickness/meter), 'meters')
    else:
        print(folds, thickness, 'mm')

And then, with a slight edit, I dumped the results into a table so that I could add a few comparative distances.

Folds Height Notes
15 3 metres Taller than the average human
22 419 metres Taller than The Shard in London
27 13 kilometres We’re now standing higher than Mount Everest
42 439804 kilometres Now we’ve just passed the Moon
51 225179981 kilometres And the Sun
56 7205759403 kilometres And finally we reach Pluto
69 6 light years With a single fold, we have shot past Alpha Centuri
83 107460 light years And now the thickness of our piece of paper is larger than the Milky Way
88 3438722 light years And in a few short folds, we pass Andromeda
103 112680053353 light years And with that final fold, we have exceeded the size of the Universe

Exponentiation is awesome.

flattr this!

Digital nostalgia: Gauntlet

Gauntlet

I am not a gamer, certainly not in the modern sense of the word, but I have played plenty of tabletop RPGs and have spent a not insignificant percentage of the 1980s in various amusement arcades. Consequently, a recent article in The Register looking back at Gauntlet had my nostalgia circuits all fired up before I’d even reached the end of the headline.

Gauntlet was a massive game, one that allowed up to four adventurers (a warrior, a valkyrie, a wizard and an elf) to explore a never-ending dungeon, kill monsters and collect treasure. The game had several nice touches, one of which was that people could join in at any time. So one person could start playing and others could join in, play until they had fed the machine enough coins and then drop out in favour of the next player.

It was also the case that each of the four characters had different strengths and weaknesses. The wizard was physically weak (and easily hurt) but very effective with the potions that he picked up, the elf was nimble and annoying and the valkyrie was a good all-rounder. My preferred character, however, was the warrior who was tough enough to trudge through level after level, blasting everything in his path.

Indeed, I became good enough with this character that I could play the game endlessly. I would literally walk into an arcade in the early afternoon and keep going – on the strength of a single coin – until the management turned off the machines.

That’s not to say that Gauntlet was easy – it wasn’t. But it was one of the very few games that hit the sweet spot of being challenging enough for me to want to keep going without becoming frustratingly impossible.

Part of this, I think, is one of the elements that The Register touched on – namely the non-linear game play. You entered a dungeon level and had to keep going until you reached the exit to the next dungeon but, within those constraints, you were pretty much free to go where you wanted. The problem-solving part of the game, therefore, really was a case of figuring out how to get stay alive long enough to find the exit, which was a refreshing change from the usual challenge of figuring out
what sequence of steps the game designer wanted you to follow.

Gauntlet was a fun and well designed arcade game and a fixture of many of my teenage years. Apparently, a PC version is slated for release later this year, but it won’t be the same.

flattr this!

Born in Belgium

flattr this!

On trust and deference

On the subject of the seemingly endless series of scandals, Andrew Rawnsley observes:

What is often called the decline of trust is really an evaporation of deference. Where once there was a reflexive respect for authority and a willingness to give it the benefit of the doubt, there is now a default to distrust.

While we do need to be wary of descending into cynicism, the evaporation of deference is undoubtedly a good thing.

flattr this!

Better out than in

Fart smells have health benefits (via Sploid)

When cells become stressed by disease they try to draw in enzymes to generate their own minute quantities of hydrogen sulfide.

The chemical helps to preserve mitochondria, which drive energy production in blood vessel cells and regulate inflammation, and without it the cell can switch off and die.

Fellow researcher Dr. Mark Wood added: “Although hydrogen sulfide is well known as a pungent, foul-smelling gas in rotten eggs and flatulence, it is naturally produced in the body and could in fact be a healthcare hero with significant implications for future therapies for a variety of diseases.”

That’s my excuse but if you want an alternative view, Dean Burnett speculates on what would happen if a mainstream science report was actually true.

flattr this!

The CompuServe of Things

Phil Windley’s The CompuServe of Things is well worth a read.

On the Net today we face a choice between freedom and captivity, independence and dependence. How we build the Internet of Things has far-reaching consequences for the humans who will use—or be used by—it. Will we push forward, connecting things using forests of silos that are reminiscent the online services of the 1980’s, or will we learn the lessons of the Internet and build a true Internet of Things?

While I know that there are people building open and decentralised tools and protocols, we are rushing headlong into a new feudalism in which people decide which supplier to lock themselve into and then lock themselves in. We are moving, worryingly rapidly, towards a situation in which only a few geeks and nerds enjoy any sort of digital freedom at all.

The vast majority of people are far too willing to accept that all they need to do is decide whether they want Apple of Google to completely control their environment.

(Via BoingBoing)

flattr this!

Doudou Linux

Back in December, I acquired an old, old laptop with the intention of letting the twins use it. My eldest already has access to a laptop, which is running openSUSE and configured so that he is able to use it without (usually) needing any help from me. For the twins, though, I thought it would be worth giving Doudou Linux a try.

I have been very impressed indeed.

Doudou Linux is a Debian based-distribution aimed at 2 to 12 year olds. It achieves this by way of a heavily customised LXDE desktop which is very easy for a four-year-old to navigate. The terminal, and some of the settings, are tucked away somewhat – to the extent that I had to go to the online documentation in order to find them – but this makes sense in the context of a distribution aimed at young children. You really do not want a typical pre-schooler to find their way into any of the
settings, ever.

We have been using the live CD version for the past six months, but this weekend I finally found the time to actually install it. The installer is graphical, intuitive and familiar to anyone who has ever installed a Debian based distribution. The only quirk is that there is no icon – we’re back to keeping dangerous options away from little hands again – and you have to find the terminal in order to launch the installer.

The install itself is quick and painless and the laptop really is flying now. This is a very undemanding distro in terms of resource requirements:

To make DoudouLinux run, a PC or Macintosh computer with 256 MB of memory and an 800 MHz processor inside is required.

I have also been pleasantly surprised at the width of the software selection. The Childsplay and Gcompris suites are both included, as is Tux Paint. What has proved popular with the twins is Pysycache, which mainly aims to teach mouse control but comes with a collection of digital jigsaws that are surprisingly entertaining.

Also popular in our household is Raincat, a puzzle game in which you have to keep a cat dry as it travels from start to finish. The controls on this one can be a bit unforgiving and I have found that it works best if I sit with the twins, talk about how to solve the puzzle, and then handle the actions for them.

There are many more games and applications included and one of the many nice touches is that Doudou Linux groups these into age-appropriate categories (an initial menu, Mini Doudou Linux and Whole Doudou Linux) which means that the children can explore what’s available without being overwhelmed by inappropriate choices.

Overall, Doudou is a really well thought out, very nicely designed distribution that does look like it will grow with its target users. I can see us keeping this distro around for many years to come.

flattr this!

Startup developers and rockstar coders

When you meet a fellow coder This panel is lifted from a slightly longer Commit Strip cartoon but it sums up, beautifully, the reality of start-up culture and why the emphasis on small “disruprive” companies is so misplaced.

The point to bear in mind when discussing start-ups is that these are companies, operating in low-risk environments, randomly chucking stuff at the wall to see what sticks.

If you want to develop yet another social media silo, feel free to found another start-up and good luck to you. If you want to write software that people are going to depend upon, you need to do it properly.

For an example of what I mean, go read Charlie Stross’s take on the Mt. Gox collapse.

flattr this!

Cue Monty Python

The Freethinker has picked up a report about barmy bishop, Alexander Shumsky who has called the World Cup a homosexual abomination because (apparently) the players wear gay shoes.

He said: “Wearing pink or blue shoes, [the players] might as well wear women’s panties or a bra.

And they should sing as well. They should sing…

I’m a footballer and I’m OK
I sleep all night and I work all day

He’s a footballer and he’s OK
He sleeps all night and works all day

I cut down trees, I eat my lunch
I go to the lavatory
On Wednesdays I go shopping
And have buttered scones for tea

He cuts down trees, eats his lunch
He goes to the lavatory
On Wednesdays he goes shopping
And has buttered scones for tea

He’s a footballer and he’s OK
He sleeps all night and works all day

I cut down trees, I skip and jump
I like to press wild flowers
I put on women’s clothing
And hang around in bars

He cuts down trees, he skips and jumps
He likes to press wild flowers
He puts on women’s clothing
And hangs around in bars…?

He’s a footballer and he’s OK
He sleeps all night and works all day

With apologies to Monty Python. Original lyrics lifted from Rapgenius.com (you didn’t think I’d type all of that by hand, did you?)

flattr this!