9.99999% Guaranteed uptime. Six nines!

October 31, 2008

Understanding Traffic on the 401, pt 1.

Filed under: misc, travel, data, programming, ideas, long rambling stories — Dave @ 8:45 am

The Government of Ontario runs a fantastic service to monitor the state of traffic jams on the 401: COMPASS Freeway Traffic Management System. So the obvious question becomes, when should I drive home?

Step 1: Get some data

First I ran a cronjob on the server hosting ultrasaur.us, that basically recorded the state of the various stretches of road. It’s been running a few days now, and after 14000 readings, there seem to be the following states for a stretch of road (with counts):

  • Express and collector moving slowly (423)
  • Express and Collector moving well (7055)
  • Express and collector very slow (85)
  • Express moving slowly. Collector moving well (205)
  • Express moving slowly. Collector N/A (49)
  • Express moving slowly. Collector very slow (138)
  • Express moving well.  Collector N/A (1236)
  • Express moving well. Collector moving slowly (435)
  • Express moving well. Collector N/A (271)
  • Express moving well. Collector very slow (48)
  • Express N/A.  Collector moving well. (1241)
  • Express N/A. Collector moving slowly (129)
  • Express N/A. Collector moving well (421)
  • Express N/A. Collector very slow (43)
  • Express very slow. Collector moving slowly (45)
  • Express very slow. Collector moving well (14)
  • Express very slow. Collector N/A (75)
  • Moving slowly (122)
  • Moving well (795)
  • N/A (1198)

Notice that there are some near duplicates with double spaces after a period — I’ll convert multiple spaces into singles.

Next I needed to give all of these a value, based on my back of the envelop calculations well means 80+, slowly means 50-80 and very slow means 0 to 50.

Caveats and thoughts:

  • the values can’t be exactly calculated, so I’m not going to try,
  • one important thing that I want to do is map each status to a unique value so that I don’t lose any data. The key is that the values be in order
  • you can see that I’m biased towards the expressway

So values represent the proportional time it takes to travel over a stretch of road (ie higher is worse):

  • 100: Moving well
  • 101: Express and Collector moving well
  • 130: Express N/A. Collector moving well
  • 150: Express moving well. Collector moving slowly
  • 160: Express moving well. Collector N/A
  • 170: Express moving slowly. Collector moving well
  • 180: Express moving well. Collector very slow
  • 200: Moving slowly
  • 201: Express and collector moving slowly
  • 210: Express N/A. Collector moving slowly
  • 250: Express moving slowly. Collector N/A
  • 380: Express moving slowly. Collector very slow
  • 410: Express very slow. Collector moving well
  • 460: Express very slow. Collector moving slowly
  • 501: Express very slow. Collector N/A
  • 500: Express and collector very slow
  • 510: Express N/A. Collector very slow
  • null: N/A (I’m willing to extrapolate a guess at the other N/A’s, but not here)

So this gives me the first chance to make a graph, just over my first 14000 points, here’s the average state of the 401 Westbound over the 24 hours in a day (over a Monday-Wednesday):

Westboud 401 travel times (higher is worse)

The worst time to drive is 4-5pm, but the three hours from 3pm to 6pm seem to be the worst. That’s not much of a surprise (although it’s an hour or so sooner than I expected rush hour to start), but that evening rush hour is so much worse than morning rush hour is a bit of a shock. That 1pm is such a slow time is curious too, I wonder if that bump will go away with more data.

(Data is available to anyone who contacts me, it’ll eventually be available for download)

May 26, 2008

Guitar Poser (first pass)

Filed under: misc, toys, kinda maybe funny, ideas — Dave @ 2:43 am

Here’s something I wanted to see exist. Rather than yet another Guitar Hero clone, this is a guitar emulator… sort of.

Start it up with your USB Guitar Hero controller plugged in (as the only Joystick), and there you go: from guitar hero to guitar poser.

  • Strumming causes a note (obviously)
  • Pressing a single key gets you regular notes, A, B, D, E and G. Pressing several keys at a time gets you some chords, chosen pretty much at random from the ones available at the freesound project
  • The whammy bar controls how quickly notes fade out once you’ve unstrum
  • The volume is controlled but how vertical the neck is

Awesome Screenshot

Check out those wicked graphics! Seriously though, try it out.

The samples are huge so the ZIP is 27megs: GuitarPoser.zip.

March 16, 2008

Does democracy get diminishing returns to scale? (My thought of the day)

Filed under: ideas, thought of the day — Dave @ 8:29 pm

Theory: The more issues a government becomes involved in, the less involved voters become in choosing the government.

As a simplification, let’s imagine there’s a presidential election between James McDonald and Brock O’Malley, who each have only 2 policy ideas that they disagree on, and that you and I are voting only on which candidate will reduce spending and taxes.

James McDonald wants to eliminate earmarking in the federal budget and to extend the army’s deployment in a land war in Asia forever, since earmarks creates corruption but military service creates honour.

Brock O’Malley wants to stop the land war in Asia immediately since he feels it’s a waste of resources, but wants to spend money on medical care for the working poor since he feels that it’s our responsibility.

Even with one goal, and two candidates with only two policies each, I’m not sure which is the right one to vote for.

I think the optimal solution to reduce government spending is to elect James McDonald so he can eliminate earmarking, then throw him out next election for someone who’ll end the military engagement — earmarked pork “only” costs $29 billion each year (some of which might be useful), whereas the military engagement is costing $100 billion per year. So if James McDonald is serious and effective, his 4 extra years of war will be paid with the savings from removing pork in about 15 years, after which the country will be $100 richer per person every year.

So in a simplified case where everyone does exactly what they say, we can vote effectively.

Thus all a functioning democracy requires is that neither candidate ever utter a third sentence. As soon as James McDonald declares that vaccines cause autism or Brock O’Malley declares that trading with Canada causes poverty, optimal voting may become unsolvable.

I’m not being glib, if you want to reduce the redistributive effect of government: I sincerely don’t know which party to vote for. And I only chose this issue because the share of GDP which goes to taxes is far easier to measure than other divisive issues, like the effect a particular set of policies have had against terrorism.

More issues = more variables = more difficult to make optimal choices. That’s why cell phone plans are so complicated, it’s much harder for consumers to pick the cheapest one for their needs.

As a general rule, once government gets involved in something, it never stops. This means the number of issues that candidates have opinions on about will steadily increase and any voter’s ability to make the best choice will correspondingly decrease.

Counter-intuitive conclusion: The more involved the government is in our lives, the less incentive we have to choose the government that would be best for us.

That can’t be right, can it?

January 25, 2008

Syncing Zunes would be nice

Filed under: toys, ideas — Dave @ 2:23 am

(I should probably repeat that nothing on this site reflects the thoughts of my employer in any way.)

One of the features I’ve wanted in MP3 players for the past few years was the ability to wirelessly sync what they’re playing.

Here’s the fairly common scenario:

Yuppie couples & groups of friends replace their MP3 players often and usually at the same time with similiar models, and they’ll have a lot of overlap in the songs they have. Now they want to go for a run together.

So I’d like my Zune to allow me to try to negotiate a shared playlist with the closest zune (P1)

I’d go off signal strength at the time that we started to figure out who to sync with automatically, but if you want to give me a list ok — especially if there’s no clear signal winner. But I think that putting them beside each other is more intuitive. (P3)

Syncing the play/pause/ffwd buttons would be great, but I don’t know if there are timing issues that make this hard. I would even be ok if we had to both press play simultaneously to start. (P2)

Sync with more than two Zunes. This would be a great selling point of Zunes, imagine being the only person in your running group who can’t listen in — dude join the social already. (P3… and I realize it conflicts with the other P3)

My current solution:

I got myself a $5 Belkin FM transmitter off Woot ($12 on Amazon), and plugged it in. Reception past 2 metres is pretty bad. It’s funny, my mom was excited about the FM receiver on the Zune, I thought she was silly — who needs radio?

Pros:
-Syncs automagically
-works with many people at once (sort of, the range hinders it)
-works with non-zunes (only one device needs a FM reciever)
-don’t need the same playlist

Cons:
-bad recepetion over any real distance (a shared playlist would work even over great distances, though play/pause/ffwd wouldn’t)
-extra cost/hardware/weight, another set of batteries to worry about
-receiver doesn’t get the song information
-so much less elegant
-no control over who’s listening (I don’t really care)

September 23, 2007

Startup thoughts I

Filed under: misc, programming, ideas — Dave @ 4:37 pm

For reasons I’ll never understand, people ask me for startup ideas. I work at a company that’s over 30 years old, forever in software company terms, so I have to assume it’s because I spend part of my day worrying about other people’s startups.

Making a Profit is Nice but…

The classic startup doesn’t need to be profitable really — not in the short term, at least. what you really want is profitability to scale better than linearly.

Consider coffee shops, if you build 2 coffee shops rather than one you’ll make twice as much money (roughly) and spend twice as much to get it, so your profits will be twice as much. The profit scales with the investment — yuck, you’ll never get rich that way. Even worse, you need to be profitable from the beginning to make any money too.

Linear Profit

With chains though, there’s a reason that there are 32 768 billion Starbucks. Things are cheaper in bulk, not only ingredients but advertising and design. You also get a little bonus from people being more comfortable with your brand. So in the case of chains you get something like this:

Better Linear

Certainly better. But if the first one’s not profitable, you probably won’t build 20 more.

Software makes people rich because the first copy costs a million dollars, but the next million cost a dollar and sell for the same price:

Software

So you don’t need to make a profit at the beginning to make a billion dollars in a few years.

linear4profit.png

But that’s so 1976, it’s the WEB 2.0 and since it’s not a point release we’re breaking backwards compatability with old business models.

Metcalfe’s Law states that the value of a network scales with the square of the number of participants. So let’s run these numbers; say you spend $1000 to develop something, and each user on the system gets one thousandth of a cent of value (on average) from every other user of the system. When we’re talking about tens of users, I have to add a glow to the Value line so you can tell it’s not zero.
networkprofit.png
With hundreds of users, it still isn’t making financial sense:
network100sprofit.png

But with thousands or tens of thousands of users we’re actually creating some value here:
network1000sprofit.png

It’s worth mentioning this is value we’re creating for the users, we haven’t made any money yet. It’s not hard to make something useful for other people, the hard part is getting them to give you more money for it than you spent making it. But when we get in to hundreds of thousands of users, there’s so much value being created that it becomes a lot easier to shave off enough of that value to create a profit:
network100000sprofit.png
Maybe we’ll sell ads, maybe our users will baffle me by spending $1 to send tiny pictures to each other. But most likely at this point we’d sell the company to another company that has a proven track record of making money and let them worry about it.