Saturday, December 27, 2008

True Story

'Twas the night before Christmas,
The dread of each elf.
It was that afternoon
That I rickrolled myself.

The streets were all covered
With blankets of white.
I was trav'ling to be
With my family that night.

As I crossed o'er the bridge,
Swiftly stepping along,
Had my earbuds plugged in
And my phone playing songs.

I was making my way
From one bus to the next,
But at once the song stopped -
And I stood there perplexed.

I searched for an answer,
My eyes open wide.
Had my buds come unplugged?
Or the battery died?

It lasted a second,
Then music returned,
But I knew right away
I'd been horribly burned.

For the chords wafting up
From my phone to my head
Were no more Harvey Danger
But Rick Astley instead!

As I wondered how anyone
Could do this to me,
I suddenly had
An epiphany.

For only last night
I'd been working alone,
Adding a brand new
Ringtone to my phone.

So it turned out that
Astleyan iconoclast
Was nobody else than
Myself from the past.

I laughed and I danced
Through the fluffy white rain,
And the passers-by probably
Thought me insane.

Thursday, December 4, 2008

Why People Underestimate Time

I believe the following post will be useful to people.

So, I played Wits and Wagers recently. This is a trivia game where you're trying to guess the approximate values of somewhat obscure numbers, such as the percentage of solved identity theft cases where the victim knew the perpetrator personally. Everyone writes down their guess, and then everyone bets on who they think is right.

Frequently, no one has any idea what the answer is. If it's a percentage, like the above question, you're going to guess some value between 0 and 100, which isn't too wide a range. But many questions have a much wider possible range of answers. For example, in that game there was one about the gravity on the surface of Jupiter in terms of Earth gravities. Maybe you remember that Jupiter's volume is about 1000 Earths, but forget that gravity is significantly reduced by the larger radius and lower density, so you answer 1000. Well, the actual answer is about 2.5. Your answer of 1000 was off by forty thousand percent! This kind of disconnect is very common when no one has a clue, so usually you're just hoping your guess is in the right order of magnitude. Sometimes, being 10 times too high or too low is still the closest answer.

So let's look at an example of how you'd choose which number to guess. I just made up this question: How many species of arachnids are known (and thought to still exist)?

Well, I certainly wouldn't expect the answer to be below the thousands. And I'm also pretty confident it's not more than in the millions. If I average these two outer boundaries, I get... something like 505,000 / 2 - which is still in the millions. All right, that's kind of stupid. By averaging like that, I'm implicitly assuming that the number is a thousand times as likely to be in the millions than in the thousands, just because there are a thousand times as many whole numbers in the millions! In reality, I think it's about equally likely that the number is in the thousands or in the millions, and I also think it's about equally likely (and more likely) that the number is in the tens of thousands or hundreds of thousands. So it's much better to do a geometric mean.

Instead of calculating (a + b) * (1/2), which is the arithmetic mean, I calculate (a * b) ^ (1/2), which is the geometric mean. That means that the resulting number is right in between a and b multiplicatively: the ratio between a and this number is the same as the ratio between this number and b. In this specific example, a is "thousands" and b is "millions". In fact, I'm going to say that "thousands" is the geometric mean of 1,000 and 10,000, or about 3,200. Similarly, "millions" would be about 3,200,000. Now, the geometric mean of those is 100,000. That seems like a good, middle-of-the-road guess. It actually feels a little high to me, but I also think I have a tendency to underestimate these kinds of things. So I'll see what the answer is now...

Wikipedia says:
It is estimated that a total of 98,000 arachnid species have been described, and that there may be up to 600,000 in total, including undescribed species.
All right! So I was pretty close. Actually, that's insanely close (we're looking at the 98,000 number for this question) - I got pretty lucky.

So. That was probably a long enough intro. My point here is that if you're guessing some unknown value, the geometric mean is a pretty useful tool. It's much more realistic to think you'll be off by an order of magnitude (or some multiple or fraction of one) in either direction, than to think you'll be off by some numeric value in either direction. It's important to note that if you're fairly certain, the arithmetic mean and geometric mean are very similar! The mean of an hour and ten minutes and an hour and thirty minutes is (duh) an hour and twenty minutes. The geometric mean of those numbers is an hour and nineteen minutes and twenty-two seconds. So despite the fact that the geometric mean is frequently applicable, we get away with using the arithmetic mean because the numbers involved are so close together, and so the difference between those methods of averaging is tiny. This is something that probably hasn't occurred to most people. I don't recall ever doing a Story Problem where the answer involved using a geometric mean.

It also brings me to my point. Say I'm estimating how long a time I expect something to take. I guess three days. Now, it may be much easier, and only take one day. Or it may be harder, and take several more days. I don't really know, but I guess "three" regardless.

And, assuming I'm a decent guesser, I'd be too high about half the time, and too low about half the time, and close to right as high a proportion of the time as I could be. The weird part though is that if I'm too low, it's a big deal compared to if I'm too high. If I guess it takes twice as long as it does, I'd be off by a day and a half. But if I guess it takes half as long as it does, I'm off by three days!

Say I'm trying to calculate how long an entire project, composed of ten smaller tasks, will take. I think each task will take about one day, so I add them up and get about ten days for the entire project. This is a mistake. Even though I have an even shot of being too high or too low for each individual task, I am probably underestimating the time of the whole project. For example, let's say that my guesses were half the real value half the time, and double it half the time. That makes the total time of the project 5 * 2 days + 5 * 1/2 days = 12.5 days. It gets even worse if I can be wrong by more than a factor of two, which is quite common when estimating the time to get something done that you've never done before. If I'm off by factors of three instead, that becomes 16.67 days. Consistently off by a factor of four, and I need to raise my over/under more than double, to 20.125.

The reason for this is that geometric means are applicable, but then you're adding the results together. If the last step was to multiply all the task times together, the variance of your guess wouldn't have any effect on the final likely value. Unfortunately, it does. 

If you don't know how long something takes, it will on average take longer than you should expect it to take. This average amount it takes longer is related to the uncertainty you have about how long it will take.

Have fun!*

*It occurs to me that you should endeavor to have absolutely no clue how fun the things you're going to do are. ;)

Monday, September 8, 2008

Wednesday, August 13, 2008

A Brainteaser

Say there are a bunch of different types of things. Apple, Banana, Car, Door, etc. The different possible combinations of those things can easily be mapped to whole numbers by using binary. For example, maybe 1 means Apple and 1010 (binary) means Door and Banana. If you give me the list of different types of things (with the order of the list implying which binary digit represents each one) and a number, I can tell you exactly which set of things that number represents. "3", given the above list, maps to Banana and Apple, because 3 written in binary is 11.

OK, so that works.

Now what if you introduce the idea that there could be any number of all those things, not just 1 or 0? Like, maybe I have 12 Apples and 44,392,105 Doors. How do you map the non-negative integers to that space, 1 to 1? This is a bit trickier because Base Two works better than Base Arbitrarily-Many.

See if you can figure out a way. It's quite doable.

Friday, July 25, 2008

Worst emergency instructions ever


This was on a bus (the kind you hire that comes with a driver and miniature overhead video screens). If you can't tell, it's right underneath the window. And it's apparently important.

When I first saw it, my thought was: boy, what a poorly made sign. In an emergency, where time is of the essence, people are going to stop and try to understand it and waste seconds, possibly even minutes, determining its meaning. 

Well, it's been over a day now and I still haven't firmly decided on how to interpret it. If you believe to know what it means, please please let me know.

Oh yeah, and here's a clue: the window on the other side has a sticker that's a mirror image of this one.

Saturday, July 19, 2008

Dear People Who Yell Out Of Car Windows

I can tell you think that whatever you're saying is very clever. However, from outside the car it sounds like you're saying "ah-oo-eh". Seriously, I can't hear any of the consonants. If you're trying to engender confusion, you are successful.

The last three times you have tried to communicate with me, that's all I got: three syllables. I think. It may just be one syllable plus the Doppler effect. I still have no idea what you said even though, in each case, I've thought about it for a long time.

Would you mind just sticking to really loud music?

Thanks.

Thursday, June 19, 2008

Contrails

As I turned east today on my late-night walk, I saw three long contrails painted across the sky. All three of them were brighter than any I'd seen at night before. But the weird thing was their angle - they were spread high and far apart in the north and converged near the horizon at their southern end. I couldn't see where exactly because of the houses.

I walked, then ran, through dark residential blocks, searching for a good vantage point to see where they intersected. I was kind of curious why three planes would fly that way. Soon I came to a spot where I could almost see their meeting place, through a gap between two houses. There was a bright glow seeping out from behind the left house, apparently from right where the contrails joined. It was the moon.

I ran back home to grab my camera, then headed out again. This time I went farther south and east, to where the ground starts sloping downhill, so I could get a clearer view. There it was! The moon, and two of the contrails. The topmost, most-angled one had faded by now, and the other two were a lot fainter (and shorter) as well - ah well. I quickly turned on my camera - argh, the battery's almost gone! I quickly snapped two pictures, then looked around for something rest the camera on for steadiness. There wasn't anything tall enough.

I ran down the hill a block and found a great spot, but again without any kind of steadying capabilities available. I took two more pictures, but they weren't as good. As I was was doing this, standing in the middle of the street, a man in a suit emerged from the shadows, walking along the sidewalk.

"Taking pictures of the moon?"

"Yeah... and the contrails."

"I saw them. Nice night."

It was. It was actually kind of awe-inspiring. I just wish I had a decent picture of it. But maybe you can imagine what it looked like.


Monday, June 2, 2008

The Golden Compass (Movie)

Remember how, at the beginning of The Lord of the Rings, there was this narrative voiceover, and then there were happy kids frolicking in absurdly well-lit green grassy fields and playing pranks and stuff? Well, the beginning of The Golden Compass is an exact copy of that, except with a much less compelling voiceover. It then continues to copy the worst parts of the Lord of the Rings movies - the cliched script and unrealistic dialog - and combines that with a sort of sparkly-magic-plus-talking-animals vibe. Well, it did for the first 15 minutes at least. I couldn't watch more than that. Actually, I only held out that long because I wanted to see if Nicole Kidman fit her part well. She was OK. Overall the movie was really, really bad - the worst movie I have intentionally started watching.

For context, I think The Lord of the Rings books were great, the Lord of the Rings movies were excellent, the Harry Potter books were excellent, the Harry Potter movies were mediocre to good, and the Golden Compass books were excellent.

You should avoid this movie. I'm worried that if you haven't read the book, which you should, it will ruin it for you; and if you have read the book, watching the movie will make you feel extremely depressed. Like I do now. Yeah, I realize my reaction may be a bit abnormal, but you're really not missing anything by skipping this one.

Cost: 3/5 (+1 if you've read the book. Another +1 if you're me.)
Payoff: 2/5 (-1 if you've read the book. Also, -2 to your future enjoyment of the book if you haven't read it.)
(Rating explanation.)

Die die die die die!

Monday, May 26, 2008

Memento

So far I've only reviewed relatively new movies. I felt like I needed a good reason to start plowing through a bunch of old ones, because frankly, there are too many of them. But I think Memento has a good excuse. I just watched it for the first time (I usually wait until I have at least two good reasons/recommendations to watch a movie, and until recently I only had one), and it's really good.

A quick summary: the main character has a mental disorder where he can't form new memories, so he has to keep track of things by writing notes to himself. Also, he's trying to track down and get revenge on somebody. The consequences are, unsurprisingly, fascinating. Also, the order in which the story is told puts normal movies that mix things up with flashbacks to shame. It really requires you to pay attention but it works perfectly.

Maybe you've already seen this film, but if you haven't, take a look. It's unique and extremely well done.

Cost: 4/5
Payoff: 5/5
(Rating explanation.)

Wednesday, May 21, 2008

Profundity

"We are more often treacherous through weakness than through calculation."
"I am a part of all that I have met."
"Believe those who are seeking the truth. Doubt those who find it."
So, I've been idly wondering about why the most profound-sounding statements often have no real meaning. Here's why:

Learning things is fun. Specifically, that moment when you realize that you understand something is fun - or it would be if you could pin it down. In my experience, it usually takes quite a while to get from almost understanding something to fully understanding it, and a lot of that process isn't all that entertaining.

But somewhere at the beginning, when you still only almost understand it, is the moment when you realize that you are about to understand whatever it is. At that point, well, you know what's coming next, and it's pretty exciting. That's the best place to be, and that's where meaningless quotations can take you. Meaningless quotations are great because they seem like they are describing something that is fundamentally true yet was hidden from your understanding. They make you feel like you nearly understand those secret truths.

In reality, what they are expressing is either some obvious idea that you already know, or some utter nonsense. But they work because the obscurity of their messages makes them seem like new ideas. They take you to the point of near-comprehension not by leading you to the edge of new knowledge, but by dressing up an old edge as something different.

Let's take the above quotes, which I picked pretty much at random from Google, as examples:
"We are more often treacherous through weakness than through calculation."
So, this is using a subtle redefinition of "treachery" from its usual implication of intent, to make the statement that "people make a lot of mistakes" seem like a new idea.
"I am a part of all that I have met."
To paraphrase Douglas Adams, this must be some meaning of the word "am" that I was not previously aware of. It's the same deal as the last one - the meaning of words is warped a bit to make this ("people interact with stuff") seem like a new idea. By the way, I'm not blaming whoever originally said or wrote these things. It's the people who repeat those words because they seem profound who are at fault.
"Believe those who are seeking the truth. Doubt those who find it."
Let me just say that I find it amusing that this is my randomly-picked last quote. (By the way, this one is tricking your mind by making you agree with the obvious first statement, thus making the second statement seem new to you because it sounds kind of like it opposes the first one. (Not you specifically, but whoever thought it was a good idea to post this on the internet. (I don't think I will ever get tired of nested parentheses. :))))


Sunday, May 11, 2008

Curry

I like curries, so at some point I decided to try to make some myself. I pretty much failed at imitating restaurant dishes, but I did eventually home in on a curry-like dish that I think is pretty good. Here's the "recipe". I highly doubt it will be very useful to anyone (except for me, in case I forget it), but whatever.

Ingredients:
Rice

Chicken Breast

Mushrooms

Broccoli
Oil

Thai Kitchen Red Curry Paste
Thai Kitchen Coconut Milk
Fish Sauce
Soy Sauce
Lime Juice (unsweetened)
Sugar
Ginger

1. Prepare the rice however you like. I like white basmati rice. 2.5 cups is a good amount.

2. Wash and chop up the broccoli and get it ready to steam. I don't know how much broccoli to use except that it's this much. When the rice is done, steam the broccoli. I put it in a steamer insert in a pot with 1cm of water, and it takes 7 minutes to steam from the moment I turn the pot on high.

The broccoli in the picture is not yet chopped.


3. Wash and slice the mushrooms. I usually get mushrooms such as those pictured. I recommend getting more than 16 though - maybe 24.


4. Start the main pan. Fry maybe 2 tablespoons of curry paste in a bit of oil for a couple minutes. It doesn't really matter. Then dump in a can of coconut milk.

The picture shows only some of the coconut milk added. Put it all in.

Mix it up and let it simmer a bit.


5. Add a little bit of soy sauce. This is maybe one shake if the bottle has a standard small aperture. Add maybe 5 shakes of fish sauce, and a couple tablespoons of lime juice. Also, throw in a couple tablespoons of brown sugar.

This step requires you to taste it. The sauce should be spicier, sweeter, sourer and fishier than you think it should be, because the chicken and vegetables will dilute the flavor a lot.


6. Put the mushrooms in the pan. Then dice the chicken (1lb to 1.5lb), and add that too. The chicken is the only thing you're cooking in the pan that you care about not overcooking, which is why it's basically last. You want to cook it at medium heat, with the sauce right around the boiling point, for about 4 minutes. Make sure to stir it around a bit so every side gets cooked.

Also, grate a stick of ginger approximately the size of a large thumb into the sauce while the chicken is cooking. If you have some random spices such as cardamom lying around go ahead and throw them in too.


7. Add the broccoli. Serve with rice.


This dish is fairly spicy for a dish, but not for a curry. Also, it is a very friendly spiciness. I wish I knew the actual quantities of things I put in, but unfortunately the best I can do is pictures. Ah well.

Monday, May 5, 2008

Iron Man

This is the first movie I've seen in a theater in a long time. I went because I noticed multiple friends praising it in their internet statuses. I don't even remember this ever happening before.

Anyway, I didn't really have any idea what Iron Man was about except that it was an action movie, and had at least one fancy explosion in it. (I'm becoming ever more convinced that having no expectations about a movie going in is a great boon.) My intel turned out to be correct - it was an action movie, and a very good one. There was relatively little corniness and a fair amount of awesomeness. The best part by far, though, was the humor. There were a ton of hilarious lines, and Robert Downey, Jr.'s main character was amazing. (Actually, I would call the action scenes the worst part of the movie. The rest was just so good.) Overall, this was a fantastic movie, and if you have any kind of tolerance for action movies it's well worth seeing. Thanks to the people who (somewhat inadvertantly) got me to see it!

Cost: 1/5
Payoff: 4/5
(Rating explanation.)

Wednesday, April 23, 2008

How To Exchange Money With Your Alternate Selves

Do you have more money than you need? Perhaps you've been the victim of some particularly good luck. Perhaps you spend all your time working, and don't have time to spend the money. Or maybe you're dead and don't really need any of it anymore.

You might think you should give this money to friends, family, or charity... but perhaps you should consider giving it to a less fortunate version of yourself instead. How is this possible, you ask? Well, it is slightly complicated but definitely within the capabilities of current technology. Let's walk through an example. Say you've just inherited a great deal of money from your rich uncle, who flipped a coin to decide whether you or your cousin would get it. As you may know, the marginal value of wealth decreases the more you have. Do you really need $6 million? Isn't $3 million enough? It is, and this is why you may be inclined to give some of that money to the alternate you - the one who lives in the universe where your cousin won the money.

Sending money between universes is tricky. Since they are closed systems, they are subject to rules about conservation of energy and all that. So for the transfer to work, you need to find someone in the other universe who wants to send an equal amount of money in the other direction. This is often difficult, but luckily not too hard in this case: your alternate cousin has the same problem as you (too much money)! Now you just need to negotiate a deal with your alternate cousin, who is unfortunately currently in an alternate universe. Well, that's inconvenient.

The trick here is bring in an intermediary, a third party to communicate with both of you. A good choice is your past self - specifically your past self from before the coin flip. Your past self has the ability to send messages to both your present and the alternate present. Additionally, your cousin may wish to have his or her own past self represent them. All that's left at this point is to negotiate the exact terms. (Since you both know it's a 50/50 shot, this should be pretty simple, I hope.)

However, there are a couple more complicated cases worth investigating. First, what if you don't know the likelihood of various presents? Maybe you are living in a world where a certain party won some parliamentary elections, and you just know they're going to cause massive devaluation of your currency. So you want to send the money to your alternate self who is living under a different government, because it will literally be worth more to that you. Well, you immediately run into a problem, because you don't know the ratio of presents with the crappy government to presents with the good government. And to extrapolate, your negotiations with your business partner in the alternate situation are going to be based on guesses. If the pair of you end up overestimating the prevalence of the bad government, then you will end up sending out less money than you predicted, and receiving more. Meanwhile your counterpart will be losing money! So naturally, all parties involved have incentives to exaggerate their own situation's ubiquity. Often, if you (well, your past self) is the one proposing the deal, your counterpart will be suspicious that you have some inside knowledge of the ratio. There's not much you can do about this. You'll basically have to pay a premium proportional to your potential ability to have that knowledge. Think of it as an interuniversal tariff.

There's one other situation worth discussing, and that is death. Wouldn't it be useful to be able to will your money to your alternate selves? Well, there is one problem with this, and it is also related to the universe ratios. But instead of being an issue of uncertainty, it's an issue of being able to influence the outcome. Making a deal like this, where you send your money from presents where you are dead to presents where you're alive, requires someone else to be receieving money in the presents in which you're dead. This makes them want to increase the prevalence of universes which kind of suck from your perspective, due to your deceased status. Let's just say this is not a good incentive to give somebody.

I hope this quick guide gives you a basic idea of how you can organize your finances across multiple presents. And I also hope that you can think of some other interesting events you could transfer money over. The sky is really the limit here. You could even base it one something silly like the outcome of a horse race. (Yeah, I know. Good luck finding someone will take the other end of that deal!)

Have fun.

Sunday, April 20, 2008

No Country For Old Men, There Will Be Blood

I finally watched these two movies in the past two weeks.

No Country For Old Men surprised me by being an excellent movie. I had read somewhere that it was about a drug deal or something, and took place out in the country or something, and I didn't think I would like it that much.

In fact, the movie is about this this go-it-alone Texan who finds $2 million versus a genuinely scary sociopath who's trying to track him down. It's gripping, goes by quickly, and is fairly amusing in parts. One recurring feature I particularly enjoyed was how the characters kept pulling out or acquiring these interesting props, for example a set of tent poles. You keep thinking "what's he going to do with that?"

I can only recommend this movie.
Cost*: 2/5
Payoff: 5/5

There Will Be Blood, on the other hand, was a bit of a letdown. I was really looking forward to more Daniel Day-Lewis, who was awesome in Gangs of New York, but the point of this movie was somewhat lost on me. The plot in the first half was pretty cool (mesmerizing, in fact) but it didn't really go anywhere worth going. In addition, the soundtrack was downright distracting at times (it was very dissonant). Still, it has interesting subject matter (turn of the century oil prospecting and screwing over of the people who live there) and Daniel Day-Lewis, so it's not all bad. Probably worth watching if the trailer looked cool to you. I'm glad I saw it.

Cost: 4/5
Payoff: 4/5



* I was thinking it would be interesting to rate movies not only based on how "good" they are, but on how much time and effort and sanity you have to spend watching them. The ideal 1 on this scale is "completely engrossing and leaves you feeling refreshed" while a 5 means "requires endurance and leaves you feeling exhausted".

Thursday, April 17, 2008

Zombies

So, I was going to have my first blog post explain the meaning of life, but a mere day after I registered this blog, it was marked as spam. This is because it had no posts. The reason it had no posts is because the meaning of life takes a long time to explain.

So instead, I'm going to change tactics here and instead have my first post be completely pointless. Together with the above story I think that makes some sort of symbolism, possibly related to life. Or... death. Yes, today on the television I heard Hillary Clinton give a rather disturbing answer to a debate question about using former presidents as U.S. emissaries:

"...When they're all together, representing our country, that sends a strong message. And I would look for a way to use all our former presidents..." (transcript).

I just want to say that I think that would be scary but also kind of cool.