links for 2007-03-09

RIAA Math

01. Amount the RIAA asks for per song in damages when they file suit in the US = $750
source

02. Price of song on iTunes = $1
source

03. (01 / 02) Number of lost sales they implicitly claim you caused by downloading rather than buying that song (although note, they’re claiming more than that, since they can’t sue for damages sustained by Apple) = 750 lost sales

04. Number of times Nellys “Over and Over” was downloaded in the US (to Jan 2005) = 5,827,833
source (using figures from bigchampagne.com)

05. Number of simultaneous P2P users worldwide = 9,670,552
source

06. Number of US simultaneous P2P users = 6,980,000
source

07. (06 / 05) Proportion of P2P file sharing done in the US = 72%

08. (04 / 07) Probable number of times “Over and Over” was downloaded worldwide = 8,094,212

09. (08 * 03) Number of lost sales for “Over and Over” by the RIAA reckoning of 750 per song = 6,070,659,000

10. Population of the world = 6,525,170,264
source

11. (1 – (10-09) / 10) Proportion of the world who didn’t buy “Over and Over” but would have if there had been no file sharing = 93%

That’s right, 93% of the entire population of the earth, (man, woman, child and baby), wanted to pay money for “Over and Over”, and would have too, if it weren’t for those pesky file sharers. Presumably the remaining 7% were people who actually did buy “Over and Over”.

Domino Computation

I try to explain this so that someone with no technical background can understand it, but I go pretty quick in an effort not to bore those who already know this stuff. I hope I found the right balance for you, if not, jump to the pictures and videos. This describes how I worked out how to make a computer (well, calculator) with dominos. If such a thing doesn’t interest you, you better not read any further.

Introduction

I’ve been interested in primitive and alternative computation since I learnt that computers were made of pretty much nothing but switches. 10 years ago, I was thinking of pneumatic computers, when I first met roo we had a discussion about computers made of wood and elastic bands or cockroaches, and chatting to woodly got me thinking about computers made of dominos.

Theory

To really make a complete computer, I’d need a NOT gate, which sadly is pretty complicated with dominos – I figure you’d need a clock and a mechanism to stand dominoes back up again – I’m imagining a piece of string tied to the pendulum of a grandfather clock, something like that anyway…

Luckily though, you can make some useful computation circuits without the NOT gate. To make things as simple as possible, we restrict ourselves to binary numbers (poor old Babbage, doing everything in base 10). Binary numbers are just another way of writing numbers, any whole number can be easily represented as a binary number – it works just like decimal, except that the individual places never go above 1, and each position doubles the value of the digit instead of increasing by 10 times. 101 in decimal is a hundred and one (1×100 + 0x10 + 1×1), whereas 101 in binary is five (1×4 + 0x2 + 1×1). Adding two numbers together is the same as in base 10 as well, except instead of carying 10, we have to carry 2.

Here’s the longhand calculation for the decimal sum 574 + 927 = 1501

4 + 7               = 1 (carry 1)
7 + 2 + 1 (carried) = 0 (carry 1)
5 + 9 + 1 (carried) = 5 (carry 1)
0 + 0 + 1 (carried) = 1

And now the longhand for the binary sum 101 + 11 = 1000 (in decimal, that would be 5 + 3 = 8)

1 + 1               = 0 (carry 1)
0 + 1 + 1 (carried) = 0 (carry 1)
1 + 0 + 1 (carried) = 0 (carry 1)
0 + 0 + 1 (carried) = 1

You can see that in binary you’d need loads more digits to represent the same number, but that it simplifies things because you only ever have to deal with 0 and 1 (if only the Nintendo Brain Training game only gave me sums with 0 and 1 in them). Looking at the steps we took, you can see that in order to add two numbers together of any size (in decimal or binary), you need to do many steps of adding together 3 numbers of only one digit. We take a digit from one, a digit from the other, and the carry from the previous calculation, and produce a digit for the answer, and the carry for the next step.

When working with binary there are relatively few possibilities so it can be nice to see these things in a table. On the left are all the possible inputs, and on the right are the outputs we want. This is called a truth table, and this is the truth table for what’s known as a Full Adder.

a b c
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
sum carry
0 0
1 0
1 0
0 1
1 0
0 1
0 1
1 1

In dominos, it makes sense to represent a 1 as the dominos being knocked down, so, this table tells us that if we could create a series of dominos that had 3 input lines of dominos that resulted in two output lines, where the first was knocked down if one or all three of the input lines were knocked down, and the second was knocked down if two or more of the input lines are knocked down, then we can build a sequence of dominos to add any number together.

Actually coming up with a domino chain to do that is pretty complicated, so I simplified the problem again. Rather than adding three numbers, you can create something simpler that only adds two numbers, and chain two of them together so that it ends up adding 3 numbers. This simpler component is called a half adder, and the truth table looks like this.

a b
0 0
0 1
1 0
1 1
Sum Carry
0 0
1 0
1 0
0 1

If you can make a half adder, then you can stick two of them together to make a full adder. If we can make a half adder in dominos, this means that we could stick a bunch of them together and if we had enough of them, add any two numbers together, simply by flipping some dominos and reading out the result.


Practice


So can I make a half adder in dominos? Here’s the planning for the sum part.

Planning for the sum part of the half adder.

My sum design used two “Inhibit pass through” gates and an Or gate. The inhibit pass through gate is a domino gate I invented that only lets one of the two input lines continue. The truth table looks like this

a b
0 0
0 1
1 0
1 1
output1 output2
0 0
1 0
0 1
0 1

In domino terms, we have two lines of dominos going in, and two coming out. There’s a middle domino that twists depending on which hits it first, and so only allows one of the lines to continue. An OR gate is really easy in dominos, just have two lines merge, and the resulting line will fall when either of it’s input lines falls. With that I was able to create the sum part.

The complete SUM domino circuit.

The final part of the half adder is the carry. This only falls if both of the inputs fall, it’s also called an AND gate. I stuck a few dominos together to make a large domino that would fall if hit, but only if a blocking domino placed side on to it also fell. Here’s a close up of it being blocked by the side-on domino.

Close up of the AND gate.

Result

So, with everything together, does it work?

Domino Half Adder, Input 00, result 00
Domino Half Adder, complete

Domino Half Adder, Input 10, result 10

Domino Half Adder, Input 01, result 10

Domino Half Adder, Input 11 result 01

Yes. Given enough time and dominos I could build a domino chain to add numbers of arbitrary size.

Thanks to Sarah who helped with the filming, and Woodly who discussed the idea with me, and encouraged me to build it.

Update: Bonerici has constructed a domino computer using his own domino logic gate, an XOR constructed in quite a cunning way. I haven’t tried building one yet, but it looks good, and enables a domino computer more palatable to the purists (who were never happy with me sticking dominoes to each other).

Update: A lego half adder.

links for 2007-02-28

Your honour, this evidence contradicts the witnesses last statement.

In which I try to overcome my native abhorrence of the buzzword du jour and end up jumping on the bandwagon in my own particular way

Forgive the title, I’ve been playing Phoenix Wright.

I hung out with some of the Web2.0 crowd recently, and although there was predictable talk of broken business models, the vibe was positive, the environment was nice, the people happy, and the future was bright. It seemed like a bit of a contrast with Rob Pikes polemic that I read recently. He is specifically talking about Systems Software Research, but actually I’ve heard similar views about almost all aspects of computer science. When you consider it like that, I can believe that at least with the theory of computer science (including operating systems, databases, programming langauges), humanity made some enormous steps a few decades ago but has been making baby steps ever since.

One of the reasons people (including me) give for complaining that Web2.0 is overhyped is that it is not a “new paradigm”. People have been sharing video over networks since the clubs that sent out flipbooks in the post. They’ve been sharing public diaries over computer networks since the days of unix and .plan. The web was invented to be read/write, yet it’s only now that that is filtering down to the public. I remember the days when a blog was called a “web page”. For conversations and debate, little has improved on the flexibility and power of usenet and irc. However, the revolution is not in what is possible, it’s in who is using it. If we can truly put the Joe in Web2.Schmoe, then that is something to get excited about. The reason “social” type applications have really taken off is at least partly because these kinds of applications need a broad level of adoption to be feasible. And as more people and more things are networked, new tiers of applications will become useful, and be written.

Most applications of the internet were invented to be subversive, moving control to the (necessarily skilled, back then but less so now) user, and away from authority figures and institutions. When the public first started to get involved and interested, it was too late, the anarchic applications and protocols had already been sidelined, legislation was steamrolling forwards, slowly but surely, and people didn’t even know the values that guided the original creations. That’s why practically nobody ever used http put (wiki was built in to HTTP 1.1). But there is a fight back. It may look like we’re building a whole new layer on top of old technology that was always designed to do what we want, but the reason for that is that we have to be where the people are. Now the people are here, we have to bring the original internet back, in all it’s anarchic, social and postmodern glory. That is what Web2.0 is.

And it’s working.

links for 2007-02-17

I am (%AMOUNT_OF_SORRYNESS%) sorry for the delay

There was an interesting article in the New Scientist recently on computer voices and how annoying they can be. The recent snow has given me occasion to be irritated by one voice in particular.

“The oh-seven four-teen train to… Milton Central is… 50 minutes late. I… am very sorry… for the delay”

Who is this I? If it was a real person apologising, even if I doubted their sincerity, I’d feel a bit happier about it. If it said ‘we’, I’d know that somewhere the company realised that annoying customers is bad, and they feel sorry that they have, but I? It even adjusts how sorry it is for the delay – for 5 minute delays, it’s only “sorry”, but for longer delays it’s “very sorry”. It’s ridiculous. It’s also insulting that someone somewhere thought we would be mollified by a synthesised sorry. The day a computer can apologise using the word I for a train being late, is the day it goes home to it’s robot wife saying

“I had a terrible day at work today. So many trains were late, those poor commuters must have been so frustrated. I love those days when everything runs smoothly, I feel like I’m really contributing. Perhaps we should move to Germany, I’ve heard there’s better job satisfaction for transport announcement computers there….”

Until that day, computers may express sorrow on behalf of others, but not for themselves. In fact it would be better if they avoided the use of the word “I” altogether.

For an apology to be meaningful, there must be an awareness of wrongdoing.

TomTom Go 710 – a review

Update: for a comparison with the Garmin Nuvi, check this review

I’ve been using the TomTom Go for about 3 months now. On the whole, I’m happy with it, it’s very useful with a minimum of fuss. However, considering this is regarded as being a good example of the breed, I’m a bit disappointed with some very obvious shortcomings.

First the gratuitous: It beeps with the loudest and most disturbing beep everytime I go near a speed camera. You can turn the function off completely, by removing the speed camera database from the device. Given that it also knows my speed (to the extent that it warns me if I ever exceed the limit), isn’t it a bit stupid that it feels the need to alert me to the fact that there is a speed camera set to go off at 40 mph as if it were a world ending catastrophy, even when it’s perfectly aware that I’m crawling along in a queue of traffic at 10mph. A much better solution would be to only alert me to the presence of a speed camera if I’m near or over the speed limit.

It’s nice that you can set that the distances be measured in yards/miles or metres/kilometers, however, I’m from that unhappy few generations in the UK that are happiest with meters for short distances and miles for long distances. Why can’t I set that? Better yet, why can’t I set the short distances in meters and say that the long distances should be in whatever the road signs are in, km in europe and miles in the UK/USA.

When it comes to trip management, I’ve seen bike computers that are more advanced. I’d like to be able to plan multiple journeys over multiple days. Relying on the “recent destinations” is ok, but it’s not good enough for a grown up system. And why the restriction to only one ‘avoid’ or ‘via’ per trip? That’s silly and can really get in the way. Sometimes it’ll tell you that it’s impossible to plan a route with the avoid or via, that it’s clearly not – it’ll do it as two separate journeys happily enough. It’s good that it gives you the options to avoid toll roads, but I’d like to know what the trade off is – I’d like it to tell me the time difference between using all roads, or only non toll ones – what I’d pay in toll, and what I’d pay otherwise in miles and fuel. Speaking of which, although there doesn’t seem to be a bluetooth standard profile for ‘car’ that would let it get at the mileage and fuel usage, there’s no reason why it couldn’t allow me to enter the fuel amounts and cost when I fill up so it could record and manage that as well.

It’d be nice to have a bunch of stats at the end of the trip. Distance travelled, average speed, rest stops, fuel stops, time, comparisons to other times you’ve made the same journey. Maybe even some graphing and mapping. The time estimates for different parts of the journey could be taken from history rather than simplistic statistics – that would even inform nicely different route options.

The thing has bluetooth for mobile data and handsfree calling (nice touch), but why doesn’t it let me download the gps locations of my entire last monthsworth of trips, and then let me geotag my photos with it, or show me pretty maps with my driving marked on? With mobile data, it could even mark on recent trips taken by friends, optionally with their photos, when you’re out there driving or walking. That might get a little busy I suppose, but it’s an option for adding interesting social data. Why can’t I use it with my own mapping software and my laptop should I want to? I haven’t really used it’s mobile data functionality, because I’m concerned about the cost of phone network data, but it would have been nice if it had a wifi connection, and could automatically connect over any available wifi to receive updates.

Then we come to accuracy. Generally it’s fine, but you start to notice things that are pretty jarring. There are about 15 miles of the A1 that according to it are in a field, some way to the west. It will sometimes say “keep left” when it means “turn left”, or “keep right” when actually, there’s no keeping involved, and your next action is to turn the opposite way. It’s all very well knowing which bit of the road you’re on and what you need to do next, but it’d be a massive help if it actually knew which lane(s) you needed to be in for your next manoever and warned you about that. It also has a nasty habit of warning you about the next turn just as you have another option to choose. It’s got a map there, it could easily check to make sure that you aren’t just coming up to a turning, and give you the next instruction a few seconds later so it’s not confusing. In fact, it’s better to receive any instruction when there isn’t an immediate road decision to be made. Generally the accuracy of the roads is good (barring one or two mistakes), but you’ll still need to look at the map every now and then rather than blindly trusting the voice and it’s disembodied instructions.

The map by the way does tend to be clear and well presented, and less likely to confuse than the voice. It’d be nice to have an overview map or something that gave a greater appreciation for what was coming up, but considering the screen size, that probably wouldn’t work. It has 2d and 3d views, although I generally find the top down 2d view the most useful. The touch screen interface is really nice to use.

When it comes to things other than the roads and houses on them, it’s accuracy is much much worse. They’re called Points Of Interest on the tomtom, and although it’s massively useful to have them, you should count on driving around the rough area of the symbol to find them. It took me straight to the nearest hospital in a strange place when I needed it, which was nice, but a few days ago, I was trying to get to the nearest post office depot. It took me down a tiny deadend of a side road with no turning space before proudly announcing “you have reached your destination”. Looking around, sure enough, I saw the Post Office depot, very close, just on the other side of a railway line. It took me half an hour to get to it from there, with no help from the the tomtom which was convinced that I had reached my destination and should probably turn around when possible to get back to it. I’ve had similar problems with petrol stations which are often on the opposite side of the road and a block or two away from where they’re supposed to be. Directing us to the nearest cinema we nearly ended up in the river, although it did have the rough area right, another 5 minutes of driving around nailed it. Although once you discover this problem, you can set a favourite to a specific location, it’d be nice to be able to correct the POIs on the device (assuming it is impossible to get them all right the first time). The way that if you go off what it thinks of as the road, it just draws a straight line to the nearest road, is ok most of the time, but it would be nicer if it remembered how you got there, and so took you back by the same route (and would it be too much to ask for it to update its internal map too?), instead of giving you nonsense instructions.

That same journey showed up another problem. It tried to join me onto a main road from a side road that had traffic lights set on timings to let only 2 cars through each time. The fact that I was in a huge queue meant I sat on that stretch of road for 20 minutes. It should know the timings on the traffic lights, and if it’s finding that I’m crawling, I’d like it to offer other alternatives. In fact, there are a number of decisions I can get better information for than it. If I can see that the traffic is terrible ahead, I might like to know alternative possibilities as I’m driving towards them so I can adjust the plan – perhaps alternative routes could be marked, with some indicator to show how much worse they are than the primary route.

My conclusion is that I’m really pleased to have a GPS in my car when I’m travelling, but it still feels like it’s early days. There are so many obvious improvements to the software, and data accuracy needed that it’s hard to imagine that 2006 was supposedly the year of the GPS, it’s still very immature, completely unable to learn from or store history, it’s a device that does it’s job the way it thinks it should, and although that’ll work well most of the time, it’ll be very frustrating the rest.