Alexander The Great

February 10, 2009

Human Language vs SQL Computation

Filed under: Science — alexanderthegreatest @ 11:26 pm
Tags: , , , ,

SQL Server offers a number of ways to get at your data. You don’t explicitly choose – it has options, and it picks the most applicable data access method for a query and the structure of the data. I think our state of the art knowledge of cognitive science doesn’t understand the specifics, and I was thinking about how this works as an analogy.

  1. Table scan – An entire table is read from disc, slow by slow, and evaluated against the query request. Ignoring the downsides, this is the most broadly applicable method in the toolkit. Any query could be satisfied with table scans.
  2. Index scan – Generally a range scan. In a customers table, this would apply to a query for all customers whose last name begins with a C. An index is a b-tree, so the server will traverse it, reading only the necessary parts, get the locations for the physical data rows, and read them, and only them, from disc. Obviously this is preferable, but not always possible.
  3. Index seek – Usually a single, particular row is demanded, and it’s the only row pulled off the disc. When this happens against a clustered index, you the best performance possible.

It’ll use a mix; if you ask for two predicates (state == ‘ca’ && last_name == ‘kaku‘) with an and, it will perform the most limiting first, then verify only that set against the most permissive. That’s the most economical solution available.

The English language doesn’t have a word for schadenfreude. Usually when somebody says language X doesn’t have a word for Y, you won’t normally lose money betting against them.  The implication is that people who use that language don’t understand the concept being that word, as if Americans couldn’t comprehend the sister of your girlfriend. But what if I said English doesn’t have a word for the sister of your father? You would say “That sounds like your aunt.” And you’d have the answer pretty quickly – obviously you’re “hitting an index” and only even considering a fraction of the words available that might mean that.

Could you do something like a table scan of/in the mind, if you wanted to? Say you want to list all the words you know, or even the names of all the people you know? I don’t think that’s possible. It’s not because we forget – this stuff comes back instantly, in context.  It just doesn’t seem to be organized to be available out of context.

January 6, 2009

Who vs Whom

Filed under: Evolution — alexanderthegreatest @ 11:23 pm
Tags: , ,

I declare this distinction unofficially dead. 300 years ago, choosing the wrong form could get you into disrepute, forever ending one’s status as a lady or gentleman. Today, knowing when to use one or the other marks a person as a word watcher.

Imagine asking your child “Whom did you play with at school today?” (This usage is alleged to be correct.) If you can’t imagine teaching this to your children, it’s moribund if it isn’t already dead.

Even the most staunch “defender of language” will admit that questions just aren’t begun with whom. William Safire, a more sober advisor of linguistics, suggests “When faced with a choice between the pedantic and the incorrect, recast the sentence”.

The “correct” usage, by the way, has a simple rule. Practice a different version of the sentence. If you would say he, use who and you, but if you would say him, use whom and ye. Who and you and he are subject pronouns, while whom and ye and him are object pronouns. You would say “you love him” not “you love he” and so the question ought to be “whom do you love?” That would have made for a disappointing blues song, though.

Finally, let’s get to the meat. Whom is dead, but how can we really tell? Native English speakers don’t use it. Like “Ebonics,” whom is simply not Standard English. Languages evolve, while some constructions (ye, whom, though sayeth, verb last as in “with this ring I thee wed”) die, and others are born.

No native speaker says “I running” or “John Mary kissed” or “who was playing with John and?” Even 3 year olds avoid these errors most of the time, because these really are errors. Refusing to split one’s infinitives may be a sign of education, but it’s not a part of the English language. If it were a fundamental part of the language, nobody would have to explain it to you, because you’d already know and obey it.

Create a free website or blog at