Databases are hammers; MapReduce is a screwdriver.

A bunch of people have sent me links to an article about MapReduce. I’ve hesitated to write about it, because the currently hyped MapReduce stuff was developed, and extensively used by Google, my employer. But the article is really annoying, and deserves a response. So I’m going to be absolutely clear. I am not commenting on this in my capacity as a Google employee. (In fact, I’ve never actually used MapReduce at work!) This is strictly on my own time, and it’s purely my own opinion. If it’s the dumbest thing you’ve ever read, that’s my fault, not Google’s. If it’s the most brilliant thing you’ve ever read, that’s my credit, not Google’s. I wasn’t asked to write this by Google, and I didn’t ask their permission, either. This is just me, the annoying geek behind this blog, writing solely
on my own behalf, speaking for no one but me. Got it?

The reason that I’m interested in this is because it’s related to my PhD work. Back in
grad school, what I worked on was applying parallelism to structured data in
non-scientific applications. That’s pretty much what MapReduce does. And the solution
that I proposed was a kind hierarchical scatter/gather operation – which is, very nearly, the
way that MapReduce works. The big difference? MapReduce beats what I did. The guys who designed MapReduce noticed something that I didn’t, and took advantage of it, which made M/R programs a lot cleaner and easier to write. The article that I’m going to discuss criticizes M/R for exactly that key idea.

Continue reading

Before Groups from Categories: a Category Refresher

So far, I’ve spent some time talking about groups and what they mean. I’ve also given a
brief look at the structures that can be built by adding properties and operations to groups –
specifically rings and fields.

Now, I’m going to start over, looking at things using category theory. Today, I’ll start
with a very quick refresher on category theory, and then I’ll give you a category theoretic
presentation of group theory. I did a whole series of articles about category theory right after I moved GM/BM to ScienceBlogs; if you want to read more about category theory than this brief introduction, you can look at the category theory archives.

Like set theory, category theory is another one of those attempts to form a fundamental
abstraction with which you can build essentially any mathematical abstraction. But where sets
treat the idea of grouping things together as the fundamental abstraction, category
theory makes the idea of mappings between things as the fundamental abstraction.

Continue reading

Friday Recipe: Cantonese Steam Fish

I’m a big fish eater. In general, given a choice about what to eat, I’m
usually happiest when I get to eat a nice fish. Even now that I’ve started eating
beef again, most of the time, I’d rather eat a nice piece of wild salmon
than pretty much anything made of beef.

When it comes to cooking fish, I think that there’s no cuisine that does
a better job with fish than Chinese. The chinese style of cooking fish is, in
my opinion, perfect. It relies on getting really good quality, fresh
fish – and then doing as little to it as you reasonably can, so that the wonderful
flavor of a really fresh fish comes through.

The best example of that is a Cantonese steamed fish. You do so little to
it – and yet the result is one of the best dishes in the entire world. To make this
work, you need a really fresh, smallish fish. I typically do this with either rainbow trout or striped bass, and I try to get it from someplace where I can be sure that the fish was
swimming no more than 24 hours before. The easiest place to find fish like that is usually
a chinese grocery; American grocery stores often have fish that’s been sitting on ice for a long time. Chinese shoppers are, properly, very picky about their fish, so you tend to get it much fresher from a chinese grocery.

Continue reading

Friday Random 10

Haven’t done this in a while: 10 random tracks from my iPhone:

  1. Porcupine Tree, “The Sky Moves Sideways”
  2. Mogwai, “I Chose Horses”. Mellowness from one of the greatest Post-Rock groups around.
  3. Thinking Plague, “Lux Lucet”. Thinking Plague is one of the strangest things
    I listen to. I don’t know quite how to describe it. Often atonal, seriously dissonant when not outright atonal, oddly structured. It’s very peculiar stuff, definitely not to everyone’s taste.
  4. Gordian Knot, “Singularity”. A very hard/loud instrumental piece. Definitely in the prog genre. Beautiful guitar solos, great bass pulse driving it.
  5. Marillion, “King”.
  6. Lunasa, “Punch”
  7. Naftule’s Dream, “The Wanderer”. Would you believe progressive Klezmer?
  8. King Crimson, “Neal and Jack and Me”.
  9. Pink Floyd, “Marooned”. It’s a crime to call this dreck Pink Floyd, when in
    fact it’s really nothing more than Dave Gilmour masturbating with his guitar. Ick.
  10. PDQ Bach, “Es War Ein Dark Und Shtormy Night”. If you’re not in the know,
    PDQ Bach is the alter ego of Music professor Peter Schickele. He claims that PDQ is
    the 13th illegitimate child of J.S. Bach. Schickele in constantly “finding” PDQ Bach
    compositions lining birdcages, etc. This is from PDQ’s period of setting “poetry” to
    what passes for music to PDQ. Featuring words like “Approaching I saw ein Knight in shining armor with ein codpiece enorm,” set to pseudo-Schubert. Great for laughs, and not to be
    missed if you get a chance to see him live!

The Nasty Little Truth about Idiots Who Don't Understand Dimensions

I managed to trash yet another laptop – the city commute through the subways seems to be pretty hard on computers! – so while I’m sitting and slowly restoring my backups, I was looking through the folder where I keep links to crankpots that I’d like to mock someday. I noticed one that I found quite a long time ago – and to my surprise, I realized that I never wrote about it! And given that I’ve been mocking relativity-haters lately, it’s particularly appropriate to cover it now.

The site is called “The Nasty Little Truth About Spacetime Physics”. It takes quite a different approach to criticizing relativity. As we’ve seen in past posts, most anti-relativity rants dislike relativity because it implies that there is no fixed reference frame – that there’s no such thing as an absolute velocity, no distinguished point at the unmoving center of the universe. That’s not this guys tack; no, he’s much smarter than that. His argument is that if you accept the idea of spacetime as defined by relativity, that
it logically implies that motion is impossible – and since we can clearly move, than means
that relativity is wrong!

Some of the most famous physicists in the world are not telling the truth about one of the most taken for granted concepts in scientific history. They are not telling us how they can come up with their fanciful time travel theories (wormholes, advanced and retarded waves traveling in spacetime, etc…) using a model of the universe that precludes the possibility of motion. Nothing can move in spacetime or in a time dimension-axis by definition. This is because motion in time is self-referential. It is for this reason that Sir Karl Popper compared Einstein’s spacetime to Parmenide’s unchanging block universe[*], in which nothing ever happens.

Before I continue, less I be immediately branded as an anti-relativity crank, let me make it perfectly clear that I agree with the mathematical and predictive correctness of both the Special and the General Theory of Relativity.

Now that is some primo crackpottery! You’ve got to love it when the crackpot starts off his argument by both denying that he’s a crackpot, and refuting his own argument!

Continue reading

Fields, Characteristics, and Prime Numbers

When we start looking at fields, there are a collection
of properties that are interesting. The simplest one – and
the one which explains the property of the nimbers that
makes them so strange – is called the
characteristic of the field. (In fact, the
characteristic isn’t just defined for fields – it’s defined
for rings as well.)

Given a field F, where 0F is the additive
identity, and 1F is the multiplicative identity,
the characteristic of the field is 0 if and only if no
sequence of adding 1F to itself will ever result
in 0F; otherwise, the characteristic is the
number of 1Fs you need to add together to get
0F.

That sounds confusing – but it really isn’t. It’s just
hard to write in natural language. A couple of examples will
make it clear.

Continue reading

New Hampshire Primary Votes, Election Fraud, and Recounts

After last week’s New Hampshire primaries, I’ve gotten a lot of email requesting my take on the uproar surrounding recounts and voting machines.

For those who haven’t heard, there’s been some chatter
about cheating in the election.
In polls leading up to the election, Barack Obama was
leading by a large margin. But he ended up losing the election to Hillary Clinton by a couple
of percentage points. The argument about fraud centers on the fact that there are two voting
methods used in NH: electronic optical scan machines, and hand-counted paper ballots. In the
districts that used paper ballots, the vote results tended to look more like the poll results –
significant lead for Obama. In districts that used optical scan, the results were strongly in
favor of Clinton. This discrepancy, combined with the pre-election polls, have led some people
to suspect that the Clinton campaign somehow cheated.

So, my take? It doesn’t look like there’s anything wrong with the results, but we should do an audited recount anyway.

Continue reading

Abstract Real Numbers: Fields

When I learned abstract algebra, we very nearly skipped over rings. Basically, we
spent a ton of time talking about groups; then we talked about rings pretty much as a
stepping stone to fields. Since then, I’ve learned more about rings, in the context of
category theory. I’m going to follow the order in which I learned things, and move on
to fields. From fields, I’ll jump back a bit into some category theory, and look at
the category theoretic views of the structures of abstract algebra.

My reasoning is that I find that you need to acquire some understanding of what
the basic objects and morphisms mean, before the category theoretic view makes any
sense. Once you understand the basic concepts of abstract algebra, category theory
becomes very useful for understanding how things fit together. Many complicated things become clear in terms of category theoretic descriptions and structures – but first, you need to understand what the elements of those structures mean.

Continue reading

The Genius of Donald Knuth: Typesetting with Boxes and Glue

Today is the 70th birthday of Donald Knuth.

If you don’t know who Knuth is, then you’re not a programmer. If you’re a programmer and you don’t know who Knuth is, well… I have no idea what rock you’ve been hiding under, but you should probably be fired.

Knuth is one of the most famous and accomplished people in the computer science community. He’s done all sorts of great research, published a set of definitive textbooks on computer algorithms, and of particular interest to me, implemented a brilliant, hideous, beautiful, godawful piece of software called TeX.

When I went to grad school, instead of being a teaching assistant, I worked for the department as a sysadmin. I ended up spending close to six years doing almost nothing but technical support for TeX, which explains my mixed emotions about it in the description above.

Continue reading

Wow. Just wow.

I was just perusing my stats on sitemeter – and to my amazement, I discovered that Good Math/Bad Math had its 2 millionth view this weekend. 2 million pageviews! I never dreamt that this little blog would ever see a number like that. Astonishing! Over 1.3 million visits to the blog so far!
Thank you all!