Jam Tomorrow

If I were to write a Java-based blogging tool that allowed you to post to Movable Type weblogs, I’d call it JaMTomorrow.

Gettit?

Fortunately I have better things to do with my time.

I suppose this is the right occasion to mention how excited I am about the thought of Movable Type Pro, which Ben and Mena Trott say is coming some time in the summer. Here are some of the features I can’t wait to get my hands on:

  • Custom entry fields
  • Integrated spellchecker
  • Category hierarchy
  • Workflow

The custom entry fields and category hierarchy in particular are going to be invaluable for the Bob Shaw site I’m planning. Workflow could be useful, but it depends what they mean by it.

Pricing is going to be another interesting question. Mena recently talked a bit about the cost of the NetNewsWire RSS aggregator:

“Pricing software — especially software that has previously been free — is a pretty taxing task for the independent developer. It’s an incredibly difficult game where you have to put your personal feelings aside and consider what people will be willing to pay.”

Movable Type is free for personal use, but it has a suggested donation price. If you donate more than $20, you get a license key which makes your blog show up on the Movable Type home page whenever you write a new entry. If you donate $45 or more, you become entitled to support over IM. A Movable Type commercial license, however, costs a flat $150.

Movable Type’s policy has always been that when they eventually release a fully paid-for edition (MT Pro), they will subtract the cost of any donations you’ve made from price. I’m starting to wonder now how much MT Pro is going to weigh in at.

I’m guessing it’s going to be around $145.

I think that while the Pro features are just plain lovely all round, they are going to appeal most to the people who already love and use the software. If you fall in that category, then you’ve probably already made a donation. And if you’ve laid out the $45 (we have), then upgrading to Pro would be a nice, round $100.

Would I pay that? In an instant. Movable Type is one of my all-time favourite pieces of software. It’s a sheer joy to work with.

Protest March

Well, we did actually make it along to the anti-war demonstration in Glasgow on Saturday. Unfortunately, we didn’t quite get all the way to the rally.

We left Edinburgh quite late (something to do with Alex scribbling on the furniture), and got caught in traffic heading into the Glasgow. In a fit of imagination, we decided to cut off the motorway early and come up on the South side of the Clyde. We figured that we’d get parked somewhere near the Science Centre, and then cross one of the bridges to get to the SECC, which is where the rally was taking place.

Alex being intimidated by a police dog.Plenty of parking at the SECC, but no luck crossing the bridges. The police had them blocked off at both ends. The two options we then had were a) to walk a couple of miles to the next bridge along, and then have another couple of miles to walk back to a point only a couple of hundred yards from where we’d set off, or b) take the car into the centre of Glasgow and try to find a parking space (along with the fifty thousand or so other folk…).

Alex being intimidated by a police dog.It was about 14:45 by that point, and the rally was in full swing. It was a lovely day for a walk, but we were both feeling a little intimidated by the crowd on the other bank, and the waves of cheering and megaphone rhetoric that drifted towards us. So we chose option (c), and drove to Stirling instead, where we wandered around a bit, and let Alex play on a spider-shaped slide in one of the shopping arcades.

Are we wimps of travelling all the way to Glasgow, and then not making the effort to go the last few miles? Maybe, but it doesn’t feel that way to me. Abi has been to political demonstrations before, but this was my first. I think we just need some more practice.

Permanent Marker

It was Abi’s birthday today. I was making breakfast in the kitchen, and Alex was playing quietly in the living room. I had left him sitting at my desk, playing with my wallet. (He usually takes all the coins from the coin pouch and arranges them all over my keyboard.)

I was just putting a pat of butter in the bottom of a pan for the scrambled eggs, when Alex wanders through to see me. He had an uncapped purple marker pen in his right hand (the one we use to write on CDs), and was holding the palm of his left hand out to me.

“Mess!” he said. “Mess!”

I took a closer look at his hand, and saw that it had a few lines on it. “Oh yes,” I said, taking away the pen. I was relieved to see that he hadn’t drawn all the way up his sleeve. “Mess. Let’s clean it up, shall we?” Then he took me by the hand, and led me through to the living room, where he showed me the sofa.

“Mess!” he repeated, pointing at the swirly patterns he’d drawn in the centre of each sofa cushion. “Mess!”

I didn’t get angry. I was too surprised and bemused to be angry. But I do think I must have said something like, “Oh Alex, that’s a really bad mess!” in a fairly stern voice, because Alex then turned around and wrapped his arms around my legs and started sobbing miserably. He knew he’d done something wrong. I picked him up and tried to reassure him that it was all okay, while at the same time wondering how to get the stains out–and how to break the news to Abi.

Fortunately, the ink in the pen turned out to be water-soluble, and a cycle through through the washing machine has got them clean again. But I now think that it is in every toddler’s destiny at some point to take a permanent marker pen to some piece of household furniture.

The 23 Prisoner Problem revisited

As both Mike Booth and my wife pointed out, my solution to the 23 Prisoners Problem is flawed. It works if the warden takes one prisoner into the switch room every day, but the puzzle explicitly says that this isn’t the case:

“After today, from time to time whenever I feel so inclined, I will select one prisoner at random and escort him to the switch room.”

Damn. I’d felt so pleased with myself for figuring it out. I even sent David Weinberger a link to my solution. He posted a link to it on his blog, which means that I can’t go back and destroy all evidence of trying…. Curse the permanence of the web!

My solution tried to solve the problem by allowing the prisoners to add some extra bits of information to the problem. But the problem is phrased very carefully to ensure that no extra information beyond the state of those two switches can be inserted. The random selection of prisoners, and the random interval between them being picked, effectively destroys any attempt to pass state information in any other way.

Mike’s solution is wonderfully elegant, but I can’t help feeling that there is another way it can be done. The fact that problem emphasises the evenness of the random distribution (“But, given enough time, everyone will eventually visit the switch room as many times as everyone else.”) makes me think that there is a probabilitistic answer somewhere. Also, with there being exactly 23 prisoners, I can’t help but wonder about a connection with the Birthday Paradox.

Or maybe the number 23 is just a coincidence stemming from the Law of Small Numbers (i.e., there aren’t enough small numbers for each of them to have a unique purpose).

More pondering is required.

The 23 prisoner problem

I’ve been thinking about the 23 prisoners puzzle on David Weinberger’s blog, and I’ve come up with an answer. It’s different than the one Mike Booth found. Mike’s solution has a very nice elegance to it; mine is a brute force probability solution, which relies all numbers coming up equally often–eventually.

I don’t remember enough of my statistics to calculate the expected time for my solution to free all the prisoners, but I have a strong suspicion that it’s not nearly as long as you would think. I don’t think it’s a coincidence that there are 23 prisoners in the puzzle. This is exactly the number of people you need in a room for the probability of two of them sharing a birthday to be 50% (the “Birthday Paradox”).

Anyway, here’s the (a) solution. Look away now if you want to try the puzzle on your own.

Part 1: Properties of the two-switch system

With two binary switches, you can encode four digits: 0, 1, 2, and 3. However, because you have to change the state of one and only one of the switches, there are some states the switches cannot be in when you leave the room. For example, if the switches are set to zero (off, off), you can set them to 1 (off, on) or 2 (on, off), but you can’t set them to 3, nor can you leave them at 0.

What you can always do, however, is ensure that the switches encode an odd or an even number. No matter what state the switches were in when you entered the room, it is your choice whether they end up odd or even when you leave the room. (See diagram below.) Thus, you can leave a 1-bit message to the person who enters the room the next day.

State transitions for the switches in the 23 prisoners problem.

Part 2: Instructions for the prisoners

In your strategy session on the first day, every prisoner is given a number from 1 to 23. You also agree to keep a new kind of calendar, where every month has 23 days, also numbered from 1 to 23. (The names of the months are not important, just that after day 23, you roll back around to day 1 again.)

On all subsequent days, whenever you go into the switch room, you set the switches to “odd” if your prisoner number matches the number of the calendar day. If your number doesn’t match the calendar day, you sets the switches to “even”.

What you also have to do is “read” the 1-bit message the previous prisoner sent to you. As soon as you enter the switch room, you know two pieces of information:

  1. The number of the previous day (e.g., day 16)
  2. Whether that day’s prisoner (number 16) was in the room yesterday (if the switches were set to “odd”)

Now, all you have to do is wait, and keep track of all the days when a the correctly numbered prisoner was in the switch room the day before you. Eventually (after many months) you will have visted the switch room on all 23 days. And eventually you will reach a point where you will have marked off all the prisoner numbers on your checklist. Then you can go tell the warden to let you all go.

Will this really work?

I think so, eventually. The calculation isn’t quite the same as the Birthday Paradox, though. With birthdays, the probability of catching two on the same day increases as you get more people into the room. With the prisoner problem, even though each additional prisoner increases the chances of one of them getting an incredibly lucky streak, each additional prisoner also increases the number of “coincidence events” that are necessary for everyone to go free.

The real-world answer, of course, is that they’re all ‘gator food no matter what. Either

  • A) they wouldn’t agree on a strategy on that first day, or
  • B) someone would forget what strategy they’d agreed on, or
  • C) the solitary confinement would drive someone mad enough to fancy their chances with the alligators instead of spending another day in the box, or
  • D) the warden was just messing with their heads, and never had any intention of setting them free in the first place. He was twisted enough to come up with this scheme. Do you really think he’s going to let his evil plans be thwarted by a bunch of pesky kids?

Update: Several people have pointed out the flaw in my reasoning. I’ve written a little more about it here.