Archive for: March, 2009

More Stupid Graphs

Mar 30 2009 Published by under Bad Economics

Remember the post I made a couple of weeks ago, flaming the wall-street idiots for
a bad graph?
They were comparing the value of financial firms before and after the current
mess. But they way that they drew it was using circles, where the diameter of the
circle was proportional to the values, but the way it was drawn strongly suggested that
the area was the metric of comparison.

Well, an astute reader sent me another example of the same error - but it's even
worse. This one is misleading in two ways. Take a look and see if you can figure out
what the two errors are. I'll explain beneath the fold.

unem-graph.png</div

Continue Reading »

No responses yet

Friday Random 10, 3/27/2009

Mar 27 2009 Published by under Music

  1. The Flower Kings, "Retropolis By Night": Not one of the best things ever by
    the Flower Kings, but Roine Stolt's mediocre is other peoples' brilliant.
  2. Porcupine Tree, "Arriving Somewhere But Not Here": very typical longish PT. Very good.
  3. Moxy Fruvous, "The King of Spain": incredibly silliness. Moxy is a Toronto-based group that does mostly comic songs, frequently a capella. It's extremely funny and very fun - particularly if you see it live. Alas, Moxy went on what seems to be
    permanent hiatus a few years ago, after releasing an amazingly lackluster final album.
  4. Genesis, "Mad Man Moon": Going back and listening to old Genesis is always amazing. Even a relatively mediocre old Genesis album is enough to remind me of just why
    Genesis is one of the major influences of pretty much all modern prog.
  5. Pallas, "The Last Angel": Pallas is a neo-progressive group that got started
    around the same time as Marillion. They're OK, and they deserve more attention than
    they got, but they've got nothing on Marillion.
  6. Naftule's Dream, "Black Wedding": progressive Klezmer, featuring an intro by
    an absolutely astonishingly great trombone player. Very cool stuff.
  7. Yes, "Going for the One": the leadoff track from one of my favorite Yes albums. Why don't more prog bands use pedal steel? It's got such a great sound!
  8. The Wishing Tree, "Fly": I wrote a longish opinion of the Wishing Tree last week. More listens haven't changed my mind.
  9. Sonic Youth, "Candle": This is classic Sonic Youth. If you like their sound and
    style, you'll love it. If you don't, you won't.
  10. Happy the Man, "Il Quinto Mare": Sometimes, a great band should just stay dead. Happy the Man was a brilliant act when they were originally together. Last year, they got
    back together and recorded a new album. I wish they hadn't. It's terribly dull. There's
    nothing technically wrong with it - it's got the same kinds of complex time/chord
    structures as old Happy the Man, but somehow it's all just flat. There's no emotion,
    no spirit, no energy.

No responses yet

Two-Three Trees: a different approach to balance

Mar 27 2009 Published by under Data Structures

23-thumb.png

This post is very delayed, but things have been busy.

I'm working my way up to finger trees, which are a wonderful
functional data structure. They're based on trees - and like many
tree-based structures, their performance relies heavily on the balance
of the tree. The more balanced the tree is, the better they perform.

In general, my preference when I need a balanced tree is a red-black
tree, which I wrote about before. But there are other kinds of balanced trees,
and for finger trees, many people prefer a kind of tree called a 2/3 tree.

A two-three tree is basically a B-tree with a maximum of two values per node.
If you don't know what a B-tree is, don't worry. I'm going to explain all the details.

A two-three tree is a tree where each node contains either one or two values. If
the node isn't a leaf, then its number of children is one more than its number
of values. The basic value constraints are the same as in a binary search tree:
smaller values to the left, larger values to the right.

The big difference in the 2/3 tree is balance: it's got a much stronger
balance requirement. In a 2/3 tree, every path from the tree root to the leaves
is exactly the same length.

Continue Reading »

5 responses so far

Bad Bailouts?

Mar 24 2009 Published by under Bad Economics

It's economics time again.

I hate economics. I find it hopelessly dull. But apparently my style of explaining
it is really helpful to people, so they keep sending me questions; and as usual, I do my best to try to answer them. Even if I don't particularly enjoy it.

So people have been asking me to explain what the proposed bank bailout plan is,
how it's supposed to work, and why so many people are upset about it.

Continue Reading »

No responses yet

Friday Recipe: Chinese-Style Roasted Beef Shortribs

Mar 20 2009 Published by under Recipes

It's been a while since I posted a recipe, and last week, I came up
with a real winner, so I thought I'd share it.

I absolutely love beef short ribs. They're one of the nicest cuts
of beef - they've got lots of meat, but they're well marbled with fat, and they're up against the bone, which gives them extra flavor. When cooked well, they've got an amazing flavor and a wonderful texture.

This recipe produces the best short ribs I've ever had. It's based,
loosely, on a chinese recipe, but it's cooked more in a western style.
There's one unusual ingredient, which is a chinese sauce that I've mentioned before on the blog, called sha cha sauce. It's made from brill shrimp,
garlic, and chili peppers. You can get it in a chinese grocery store. The english label is, unfortunately, "barbeque sauce", but you can identify it
by the ingredients, and by the picture of the jar over to the side.

xia cha.

Ingredients

  • 4 lbs shortribs, bone in, cut flanken style. (That means
    cut perpendicular to the bone, in chunks about 2 inches long.)
  • One large onion.
  • 4 cloves garlic. (more if you really like garlic)
  • 1 cup soy sauce.
  • 1 cup beef stock.
  • 1 cup dry gin.
  • 4 tablespoons sugar.
  • One teaspoon xia cha sauce.
    • Instructions

      1. Put the garlic and onion into a food processor, and
        run it until they're nicely chopped. Then add the liquids to
        the processor, and run it until the garlic and onions are a puree
        mixed into the liquids.
      2. Put the short ribs into an oven-safe deep dish, and cover them with
        the liquid. Put this into the fridge for a few hours to marinate.
      3. Heat the oven to 350, and put the marinated shortribs into the
        oven - marinade and all. Cook for 3 hours, taking it out and basting it every 30 minutes.
      4. By now, you've got some very well-cooked shortribs, sitting in the marinade, along with a huge amount of fat that cooked out of them. Take them out of the liquid, and set them aside.
      5. Strain the liquid, and skim the fat. What's left is a very strong, but very flavorful sauce.
      6. Put the shortribs back into the now empty pan. Give them a light baste
        with the sauce. Heat the oven up to broil, and when it's hot, put the
        short ribs back in, just long enough to brown and crisp the outside.

      And they're ready to eat. Serve it with the sauce on the side, along
      with rice and some stir-fried vegetables.

7 responses so far

Comments Should be Working

Mar 20 2009 Published by under Meta

Seed's tech guy did a reset and restart of the server, and it appears that now I'm able to turn off registration without completely disabling comments. So everyone who's been having trouble commenting, please give it a try again, and let me know if you have any trouble.

No responses yet

Friday Random 10, 3/20

Mar 20 2009 Published by under Music

  1. Valley of the Giants, "Back to God's Country": I mentioned Valley of the Giants a few weeks ago, as one of my favorite post-rock bands. A few weeks of listening to them incessantly hasn't changed that. They're absolutely brilliant. This track is very typical
    of them; it's got a slow start, with an almost droning main melody. And they take that,
    and develop it, through rhythm and harmony, until it's almost unrecognizable. And then
    everything changes.
  2. Hawkwind, "World of Tiers": typical Hawkwind. If you like them, you'll like
    this. If you don't, you won't.
  3. The Flower Kings, "Rumble Fish Twist": a live track by the Flower Kings. Every time I go for a while without listening to tFK, I'm amazed when I turn them on. Roine Stolt and company are just so incredible. To me, there's a kind of near perfection about the Flower Kings work that no one else comes close to.
  4. Kruzenshtern and Parahod, "Focus Pocus": Some of the strangest stuff I've ever
    listened to. K&P are somewhere between progressive Klezmer, Jazz, and noise... They're really amazing, but hard to describe or classify. If you can find a copy of one of their CDs, I highly recommend it, but they're very hard to find.
  5. Gong, "Infinitea": This band is yet another example of the "How did I not know about these guys?" phenomenon. They've been around for quite a while, coming out of
    the Manchester scene. They're basically a spinoff of sorts from Soft Machine. They are
    a really amazing progressive band, from the Jazzy side of things. They've been doing stuff
    since the 70s, and are still making new albums now.
  6. The Reasoning, "Dark Angel": This is a band that I can't make up my mind about. They're neo-prog. They've got brilliant moments, and they've got a lot of moments that are rather dull. I can't quite decide what I think on balance; I need to listen to them a bit more. On the good side, they've got three members with good (but very different) voices, and do a lot of really nice vocal harmony work, which is unusual.
  7. Uriah Heep, "What Kind of God?": A great disappointment. I've heard about
    Uriah Heep for the longest time, and I finally got around to buying one of their albums. I find it just intolerably dull. Really profoundly mediocre music.
  8. Sonic Youth, "Silver Rocker (live)": old Sonic Youth. I really love SY, and I
    think that their songwriter has gotten stronger over the years. But there's still a raw
    energy to their early stuff which the new can't match. It's still the same sound, and the
    older songs can sometimes tend towards being a bit on the simple side, but there's still
    something really special in their older material.
  9. Sylvan, "Strange Emotion": And another mixed bag. I was looking at other reviews of Sylvan, and someone described them as "Emo Prog". Not a bad description. It's definitely neo-prog, with the kinds of sound and structure that you'd expect; but it's got that mopey, self-absorbed feeling of emo-dreck.
  10. The Wishing Tree, "Ostara": And still another mixed one. This is Steve Rothery's band. (Rothery is the guitarist from Marillion.) I'm a huge Rothery fan - he's got both
    fantastic technical chops, and also fantastic musical taste. He's not just a loud fancy
    guitarist; he's a very musical guitarist. He's got an extremely distinctive style,
    and yet also manages to fit himself into whatever's going on around him. This album has
    some absolutely wonderful material; but it's also got a lot of really dull
    derivative stuff. The singer (Hannah Stobart) has a really beautiful voice, but she
    doesn't have her own style. She always sounds like she's trying to be someone else. Mostly that's Kate Bush, but at times, she sounds like she's trying to be Tori Amos, or
    Melissa Etheridge. But you can almost always listen to her and say "She's trying to
    sound like X". On the whole, I like them, but think they'd be much better if Ms. Stobart
    just figured out how to sound like herself.

No responses yet

Mr. Spock is Not Logical (book draft excerpt)

Mar 17 2009 Published by under Logic

As I mentioned, I'll be posting drafts of various sections of my book here on the blog. This is a rough draft of the introduction to a chapter on logic. I would be extremely greatful for comments, critiques, and corrections.

I'm a big science fiction fan. In fact, my whole family is pretty
much a gaggle of sci-fi geeks. When I was growing up, every
Saturday at 6pm was Star Trek time, when a local channel show
re-runs of the original series. When Saturday came around, we
always made sure we were home by 6, and we'd all gather in front of
the TV to watch Trek. But there's one one thing about Star Trek for
which I'll never forgive Gene Roddenberry or Star Trek:
"Logic". As in, Mr. Spock saying "But that would
not be logical.".

The reason that this bugs me so much is because it's taught a
huge number of people that "logical" means the same
thing as "reasonable". Almost every time I hear anyone
say that something is logical, they don't mean that it's logical -
in fact, they mean something almost exactly opposite - that it
seems correct based on intuition and common sense.

If you're being strict about the definition, then saying that
something is logical by itself is an almost meaningless
statement. Because what it means for some statement to be
logical is really that that statement is inferable
from a set of axioms in some formal reasoning system. If you don't
know what formal system, and you don't know what axioms, then the
statement that something is logical is absolutely meaningless. And
even if you do know what system and what axioms you're talking
about, the things that people often call "logical" are
not things that are actually inferable from the axioms.

Continue Reading »

17 responses so far

The Blog and... the Book!

Mar 16 2009 Published by under Book

I'd like to apologize for the slowness of the blog. Fortunately, there's a very good reason: I've got a book contract! "Good Math" will be published by "The Pragmatic Programmers" press. The exact publication date isn't set yet, but my schedule plans for a complete draft of the book by summer. (And I used the scheduling rules proposed by one of my favorite managers. He said that when a programmer gives you an estimate of how long something should take, multiply it by two and increase the unit. So if they say it'll take a day, assume two weeks. If they say a week, assume two months. In my experience, it's actually a really good predictor.)

Anyway... For the last couple of weeks, I've been setting up a new computer to use for writing the book (gotta keep my Google work and my private work separate!), finishing the first three chapters, and trying to get comfortable with the PP markup system.

While I'm working on the book, I'm going to be posting drafts of some sections as posts on the blog. As a result, you'll see some re-runs of older posts in a slightly different format. There will also be some brand new material in the book format. The book draft posts will be clearly marked, and for those, even more than usual, I'd appreciate feedback and corrections.

Of course, I'll also be posting non-book related stuff. For example, I hope to have a new data structures post ready this evening. As a result of my work on the book, I'm back on a Haskell binge, and I'm working up a post about a fascinating functional data structure called a finger-tree.

No responses yet

Perverse Incentives

Mar 16 2009 Published by under Bad Economics

A lot of people, reading the reporting on the current financial
disaster, have been writing me to ask what people mean when they talk
about incentives. The traders, the bankers, the fund managers, and all
of the other folks involved in this giant cluster-fuck aren't
stupid. So naturaly, the question keeps coming up, why would they go
along with it? And the answer that we keep hearing is something along
the lines of "perverse incentives".

The basic idea is that the way that the people in the industry got paid,
it was actually in their interest do do things that they knew would
eventually cause a disaster. How could that work?

Continue Reading »

13 responses so far

Older posts »