Tuesday, July 6, 2010

Dozenal glyphs - a modest proposal

A proposal that shows up every so often is to use dozenal arithmetic. The idea is simple, in base 12 more fractions work out very conveniently. You can easily divide things 3 and 4 ways. This is frequently convenient, and is why we often sell things in dozens. It is also why the much maligned Imperial system sneaks factors of 3 (3 tsp in a tbsp) and 12 (inches in a foot) in various places. And there are numerous minor benefits, such as the fact that the multiplication table becomes significantly simpler and therefore easier to learn.

When the French created the metric system, they based it on factors of 10 everywhere. They even went so far as to try to measure angles in gradians (a quarter circle had 100), and to use decimal time. The world as a whole rejected decimal angles and times, but has adopted decimal metric everywhere else. Which is very convenient for scientists, but is hard to divide into thirds and somewhat inconvenient for quarters. Furthermore the persistence of both systems results in occasional annoyances like the fact that in daily life we usually prefer to measure speed in km/h, but for energy and power calculations the units only work out properly if you measure in m/s. Resulting in an annoying factor of 3.6 that shows up converting between them.

The other day I read An Argument for Dozenalism that made many of these arguments. Nothing new. However it made the interesting point that ideally a dozenal arithmetic would have its own set of glyphs. It suggested that 0 and 1 could be kept, but everything else should be changed. In my opinion that argument is correct, it is very confusing if 21 sometimes is 5*5 and sometimes 3*7, which makes a mixed dozenal and decimal world harder than it needs to be. But this raises the interesting question of what a logical dozenal set of glyphs might look like.

I've amused myself with thinking about this, and I have a proposal for a set of glyphs that are (mostly) unused, easy to learn, quick to draw, and are much more logical than existing ones. All have a vertical line in the middle. At the top there is a choice of a hook starting on the left, a straight end, or a hook starting on the right. At the bottom there is a choice of a hook ending on the left, straight down, on the right, or bending right to cut across the vertical line. This gives 12 possibilities. By incrementing the bottom first, and the top when you get a carry, you get a sort of a 3,4 base. Which means that a glance at the glyph tells you immediately its sign mod 4. A glance at the top tells you whether it falls in the range 0-3, 4-7 or 8-11.

So instead of the current system of 10 random symbols to memorize, you get two simple rules. While at first it seems bizarre, it grows on you quickly. And it gives you a very quick way to tell whether a given number is written in decimal or dozenal. To get a sense what it looks like, take a look at the 12 times table (my apologies for the handwriting - my none too good penmanship gets worse when I'm using a mouse pad to draw with):



Note in particular how regular the patterns are for 2, 3, 4, and 6. Doesn't this look easier to memorize than the decimal times table? As an exercise try writing out your favorite sequences. Whether you're writing out squares, powers of 2, or primes you'll see that more patterns leap out at you in dozenal, making them easier to learn.

So there is my humble contribution to a dozenal future.

(In other news, I now have a patent to my name, though in fact it is owned by a previous employer. By the standards of the patent system, it is not a particularly bad patent. But if I had my druthers, it would have never been filed. Ah well.)

Wednesday, June 9, 2010

The stock market thinks Microsoft has just under 4 years left

(I posted this basic analysis at http://news.ycombinator.com/item?id=1417156, which was a discussion of this Newsweek article, and then decided that it was interesting enough to call out for additional attention.)

Those of us who pay attention to finance know that the market tends to be more accurate than any individual person. So sometimes it is worth analyzing what the market is saying about different companies.

If you look at the stock market, it clearly saying that Microsoft's future doesn't look as bright as Google's or Apple's. That's why Microsoft is worth a P/E of about 13, while Google is worth one of 22 and Apple is worth one of 21.

The market projection gets substantially more stark when you subtract current book value to find how much the market values future revenue. (Book value is what all of the company assets would be worth if it was broken up and sold today. For Microsoft this is largely made up of their cash reserve.) Microsoft's market cap is 221 B, their book value is 46 B, and therefore 175 B of their market cap is projected future earnings. Their current profit is 46.28 B/year, and that works out to the market valuing them at their current earnings stream projected over a bit under 4 years.

For Google the equivalent exercise says a market cap of 154 B, and book value of 38 B so 116 B of market cap is projected future earnings. Their current profit is 14.81 B/year, which translates into the market valuing them at their current earnings stream projected over a bit over a decade. (10.4 years.)

For Apple the equivalent exercise says a market cap of 225 B, a book value of 39.4 B for 185.6 B of market cap due to projected future earnings. Their current profit is 17.22 B/year, which translates into their current earnings stream projected over a decade. (10.8 years.)

So the projection that Microsoft is walking over a cliff in a few years while both Google and Apple have a decent future. The market is perfectly aware that a lot changes in 10 years, and so they heavily discount any projections out that far. But the market is more likely to be correct for near events.

Now admittedly I've never liked Microsoft. But this isn't just claimed by some random haters on the Internet. This is the consensus of the stock market, which is based on a lot of informed people putting their money where their mouths are. This is worth thinking about.

(I took all figures for this from http://finance.yahoo.com/q/ks?s=msft, http://finance.yahoo.com/q/ks?s=goog and http://finance.yahoo.com/q/ks?s=aapl. I got book value by multiplying book value / share times shares outstanding.)

Sunday, May 16, 2010

Le Châtelier's principle: not just for chemists

I seem to be updating my blog once a month or so. I don't intend to do that, I'm just busy. This particular entry is one I've been meaning to write for months, but just haven't gotten around to.

But before I get to it, a brief digression. My sister would like to get into a poker tournament that she needs to be voted in to. If you could take a moment and vote for Jennifer Tilly, it would be most appreciated. Thank you.

Now on to the main subject. One of my favorite principles of chemistry is Le Châtelier's principle. It has several forms, but the most general (though admittedly not perfectly accurate) is Any change in status quo prompts an opposing reaction in the responding system.

What does this mean? Well let's take a simple example. Suppose we have air in a chamber, and apply pressure to compress the chamber. From Le Châtelier's principle we expect it to push back harder. In fact it does. From the ideal gas law, applied in a simplistic way, once the volume is cut in half the pressure will double, and it will indeed be pushing back harder.

However this understates the true effect. It turns out that the act of compressing the chamber heats up the gas, increasing the temperature, and this causes it to push back even harder than it would have otherwise. This rise in temperature when you compress is called adiabatic heating. The corresponding decrease in temperature when you decompress a gas is used inside of your refrigerator or AC system to move heat from a cool place to a warmer one. Similarly when warm air rises the pressure drops, which causes it to cool down. This is why air on mountain tops is colder than air at sea level. (The drop is about 10C per km of height.)

Anyways, the fine details notwithstanding, what we find is that when you push harder on this simple system, it winds up pushing back harder. And you eventually find yourself at another equilibrium. Furthermore what works for simple systems, works for many more complicated systems.

The big question that I had as a kid in chemistry class was why. Why does this always work out? I never got a good answer from my teacher, and my dissatisfaction with "it works because it always works" answers was one of the reasons why I chose to go on in math instead.

Interestingly, many years later in an advanced math course I learned the trivially simple answer. Which requires essentially no math to understand!

Here is that answer.

A system is at equilibrium when all forces on it are balanced, and it can rest in that state indefinitely. For instance take a pencil and lay it flat on a table. It is at equilibrium there. There is also another equilibrium where it is balanced on its tip, but it is very hard to put it in that equilibrium.

Now not all equilibria are created equal. A stable equilibrium is one where any perturbation of the system will cause it to head back towards that equilibrium. An unstable equilibrium is one in which some perturbation exists that causes it to head away from that equilibrium. In the example of the pencil, laying flat on its side is a stable equilibrium, while balancing on its tip is unstable. The key fact to remember about unstable equilibria is that they have a tendency to not stick around. No real system is perfectly balanced, and the imperfection will grow over time until equilibrium disappears on its own. This is is why we run into lots of pencils lying on their sides, and none balanced on their tips.

Now what does this have to do with Le Châtelier's principle? Well if we run across a system that has settled down to the point that it has a status quo we can notice, that system is extremely likely to be at some sort of equilibrium. Based on the point I made above, we can be pretty sure that it is a stable equilibrium. But Le Châtelier's principle is just a description of what it means to be at a stable equilibrium, so Le Châtelier's principle must be true of our system!

Now I should note that there is a world of difference between a local equilibrium and a global one. The pencil that is flat on the table, would be at an equal equilibrium on a different side, as a small push demonstrates. And at a better equilibrium flat on the floor, as a strong enough push will demonstrate. A mixture of hydrogen and oxygen that is heated at little bit will heat up, which increases the pressure, which causes the container it is in to expand, which cools it down, in accord with Le Châtelier's principle. But heat the same mixture enough and a chemical reaction will begin that results in it becoming hotter still, rather than cooler. (These examples are why the overly general formulation I quoted at the top is not perfectly accurate.)

It is clear that this is a very general argument, and makes it clear that the principle has nothing really to do with chemistry per se. In fact it applies to any sort of equilibrium. In chemistry or not. On the whole I find the examples outside of chemistry to be more interesting.

A case in point appears in the classic economics paper Cars, Cholera, and Cows: The Management of Risk and Uncertainty. One of the key themes is that our risk-taking behavior as a society winds up in an equilibrium. If it is at an equilibrium, then we should expect that any change which reduces risk will cause a some sort of compensatory increase in risk. Which will undo some of the positive benefits of the change. An example from that paper is that seat belt laws increase seat belt usage. But people using seat belts feel safer, and therefore drive more aggressively, resulting in more accidents. The net result? It appears that drivers are safer, pedestrians are less safe, and benefits to society are less clear than a naive analysis would predict.

Over time I've learned that equilibria are extremely common, and therefore the "unexpected consequence" is more often something to try to anticipate than something to be surprised at. For instance when a faster variation of cheetahs is bred by evolution, it creates pressure for antelope to become some combination of faster, better at spotting predators, and willing to bolt when predators are farther away. The net result is that the more effective predators wind up about equal versus their prey. (Look up the Red Queen Hypothesis for more on this.)

But how do you anticipate the unexpected? Well there are several ways.

  1. If you know that it is common to find some sort of push-back, you know to be on the lookout for it, which will make it easier to spot. For instance suppose that you start injecting a stable compound in at a constant rate. Eventually it has to break down at the same rate, the only question is where. It was not until Sherry Rowland and Mario Molina applied this line of reasoning to CFCs that it was realized that one of the most innocuous and inert chemicals discovered by man was destroying the ozone layer.

  2. There will be a set of related push-back phenomena associated with any stable equilibrium that you can find. However equilibria are very common. So look for potential equilibria, then actively ask how they are maintained. If you find them, you frequently learn something useful. For instance suppose there is an equilibrium level of major disasters in given area of human endeavor. By what means is this level maintained? I submit that it is maintained by memories of previous disaster, and desire to not experience that again. Which means that once memory fails and people become less careful, corners will be cut until disaster happens again. However memory fails on a time scale set by human lives, which tells me that an equilibrium rate for major disasters of any particular kind is never going to be more than a small number of human generations, no matter what the engineers promise us. For example it took just over 60 years to lose the regulations that were put in place to prevent another credit crisis like the one that started the Great Depression (and about 10 more years after that to experience a credit crisis - note that before the Depression credit crises arrived on average about once every 10 years), nuclear options are now getting a boost from the fact that memories of Three Mile Island are now fading, and I am willing to bet serious money that the surprisingly good record of safety devices for offshore drilling helped result in dangerous shortcuts that were key to causing the recent BP disaster.

  3. Certain equilibria and their corresponding compensation mechanisms come up very frequently to explain otherwise puzzling events. My favorite example is that people like to maintain a positive self-impression. The result is that anything that challenges our good opinion of ourselves causes serious cognitive dissonance. People do the most amazing things to avoid this cognitive dissonance. For some of the negative results on people's ability to learn, see What you refuse to see, is your worst trap.


So, even if you're not a chemist, if you squint at the world in the right way you can see Le Châtelier's principle popping up in the most unexpected and interesting places.

Sunday, April 18, 2010

Random grab bag

I can't believe that it has been nearly a month since my last post.

If you've been following me on buzz you'll know that I've been doing a joke a day. I started Feb 18, so now I've gone for 2 months, with a new joke each day, without once having to look one up. I'm surprised by this. Today's joke had a musical component that needed to be heard, so it is on youtube.

Stories like this make me sad. Nothing will compensate that man's loss or replace what was stolen, but the county deserves to lose that case.

Moving on, on Hacker News a while ago I tried to explain why quantum mechanics and the general theory of relativity conflict with each other. That may be of interest. I sent that link to a well-respected researcher, John Baez, and he thought the explanation was reasonable in so far as it went. Then he recommended the far more detailed explanation at http://arxiv.org/abs/gr-qc/9310031. (Look for the Download box at the upper right.) Having read it, that explanation is far longer, but gives much more depth than mine. Be warned that my reaction was, "Now that I've read it I feel less educated on the subject than before. Not because I didn't learn anything, but because I was reminded of how much physics I never learned... I was reassured to learn that C.J. Isham has that effect on many physicists as well.

What else did I mean to talk about and didn't? Oh right. I read The Back of the Napkin: Solving Problems and Selling Ideas with Pictures. On the whole it was a very good book, but it had a spectacularly poorly chosen example at the end. The example was a hypothetical firm selling accounting software named SAX Inc. Despite being the market leader its revenue was not growing as the market expanded, and some low end open source platforms were growing rapidly. Economic projections showed that it was poised to lose huge amounts of market share to these new competitors in the near future, and the question is what it should do.

Now if you're ever in a situation that looks vaguely like this, I've got a recommend. Reach for The Innovator's Solution, read it, understand it, get every executive in your company to understand it, and follow its advice as best you can. Because you're on the wrong side of an disruptive innovation, so you want to see what has been tried in that situation, what worked and not (mostly not), and need to understand the organizational reasons for that.

If you don't know what a disruptive innovation is, that is the scenario where an established market with established companies has competition from a new kind of product which is not good enough for the market, but which will become so with projected technological improvement. In this situation what happens is that over time technology improves, the ecosystem of companies that grew up with the (initially) crappy technology take over, and the established companies see their market implode. For a fuller explanation and lots of examples, read The Innovator's Dilemma. That gives the theory, and then the follow-up, The Innovator's Solution, gives a lot more detail on why companies repeatedly make the same bad choices.

Suffice it to say that The Back of the Napkin comes up with a solution, and it is a solution that I guarantee will fail. And as part of the reasoning they manage to come up with a software development project that is much more ambitious than anything that the company has tried before, and gave some suspiciously precise estimates of how much time and money it will take. If you don't know what is wrong with that, go read Software Estimation by Steve McConnell. (If you are responsible for anything to do with scheduling software development, I highly recommend that book on general principle. Steve McConnell's books on software development range from good to classic, and that is on the higher end of the scale.)

None of this is to say that The Back of the Napkin is a bad book. It is not. Indeed if it were then I'd be less pained by the bad example. But it had the opportunity to explain a bunch of very important things to an audience that normally doesn't hear those things, and didn't. Not only did it fail to explain them, it proceeded to actively misinform.

On a happier note I've also read Accelerando by Charles Strauss. I have to say, without hesitation, that it is the strangest book I've read. Let me give an example. Near the beginning some lobsters that got uploaded managed to escape over the Internet, take over a computer network, and turned themselves sentient. They ask the protagonist for help in getting away from human civilization because they don't want to be near us when technology goes critical. He succeeds. Then the book gets weird.

Don't get me wrong. It is a very good book, and I enjoyed it very much. But the whole point of the book is that technology is accelerating, and the result will be continuous future shock. The first few iterations you are lead into trying to understand how the future rapidly got more bizarre. In later iterations you're just following the personal story of humans with unbelievable technology trying to survive in a world where they are obsolete and unequipped to understand the universe around them.

Saturday, March 20, 2010

Touching Women

Today I want to share two useful tidbits about touch and women that I think should be better known, but aren't because people get embarrassed to talk about this stuff.

The first is a pressure point to help menstrual cramps. Everyone knows about pinching next to the thumb to help with headaches. It doesn't take the pain away, but it dulls it and makes it more bearable. There is a spot that does about the same thing with menstrual cramps.

It is located just above your foot, between your tendon and your ankle. To get it properly you want to use a "fat pinch". You get this by folding your index finger over, putting that on one side of the ankle, and pinching with the thumb on the other. So you get a pinch spread out over the soft flesh between the bone and Achilles tendon. I've offered this advice to multiple women who suffer menstrual cramps. None have ever heard it before, but it has invariably helped.


The other is more *ahem* intimate. This would be a good time to stop reading if that bothers you.

There are various parts of your body where you have a lot of exposed nerves. A light brushing motion over them will set up a tingling/itching sensation. A good place to experience this is the palm of your hand. Gently stroke towards the wrist, then pay attention to how your hand feels. Yes, that. And thinking about it brings it back.

This happens anywhere where nerves get exposed. One place where that reliably happens is the inside of any joint. For instance the inside of your elbow. (Not as much is exposed there as the palm of the hand, but it is still exposed.)

The larger the joint, the more nerves, the more this effect exists. The largest joint, of course, is the hip. And the corresponding sensitive area is the crease between leg and crotch on each side. This works on both genders. But for various reasons is more interesting for women...

Enjoy. ;-)

Wednesday, March 17, 2010

Address emotions in your forms

I learned quite a few things at SXSW. Many are interesting but potentially useless, such as how unexpectedly interesting the reviews for Tuscan Whole Milk, 1 Gallon, 128 fl oz are.

However the one that I found most fascinating, and is relevant to a lot of people, was from the panel that I was on. Kevin Hale, the CEO of Wufoo gave an example from their support form. In the process of trying to fill out a ticket you have the option of reporting your emotional state. Which can be anything from "Excited" to "Angry". This seems to be a very odd thing to do.

They did this to see whether they could get some useful tracking data which could be used to more directly address their corporate goal of making users happy. They found they could. But, very interestingly, they had an unexpected benefit. People who were asked their emotional state proceeded to calm down, write less emotional tickets, and then the support calls went more smoothly. Asking about emotional state, which has absolutely no functional impact on the operation of the website, is a social lubricant of immense value in customer support.

Does your website ask about people's emotional state? Should it? In what other ways do we address the technical interaction and forget about the emotions of the humans involved, to the detriment of everyone?

Serendipity at SXSW

This year I had the great fortune to be asked to be on a panel at SXSW. It was amazingly fun. However there was only one person I had ever met in person at the conference this year. So I was swimming in a sea of strangers.

But apparently there were a lot of people that I was tangentially connected to in some way.

I was commenting to one of my co-panelists, Victoria Ransom that a previous co-worker of mine looked somewhat similar to her, had a similar accent, and also had a Harvard MBA. Victoria correctly guessed the person I was talking about and had known her for longer than I had.

I was at the Google booth, relating an anecdote about a PDF that I had had trouble reading on a website, when I realized that the person from Australia who had uploaded said PDF was standing right there.

Another person had worked with the identical twin brother of Ian Siegel. Ian has been my boss for most of the last 7 years. (At 2 different companies.)

One of the last people I met was a fellow Google employee whose brother in law was Mark-Jason Dominus. I've known Mark through the Perl community for about a decade.

And these are just the people that I met and talked with long enough to find out how I was connected to them.

Other useful takeaways? Dan Roam is worth reading. Emergen-C before bed helps prevent hangovers. Kick-Ass is hilarious, you should catch it when it comes out next month. And if you're in the USA then Hubble 3D is coming to an IMAX near you this Friday. You want to see it. I'll be taking my kids.

And advice for anyone going to SXSW next year? Talk to everyone. If you're standing in line for a movie, talk to the random stranger behind you. Everyone is there to meet people. Most of the people there are interesting. You never know. Talking to the stranger behind you in line might lead to meeting an astronaut. (Yes, this happened to me.)