The End Of The World is Coming in Just 501 Days!

A lot of people have been sending me links to a numerology article, in which yet another numerological idiot claims to have identified the date of the end of the world. This time, the idiot claims that it’s going to happen on May 21, 2011.

I’ve written a lot about numerology-related stuff before. What makes this example particularly egregious and worth writing about is that it’s not just an article on some bozo’s internet website: this is an article from the San Francisco Chronicle, which treats a pile of numerological bullshit as if it’s completely respectable and credible.

As I’ve said before: the thing about numerology is that there are so many ways of combining numbers together that if you’re willing to spend enough time searching, you can find some way of producing any result that you want. This is pretty much a classic example of that.

Continue reading

Big Numbers and Air Travel

As you’ve surely heard by now, on christmas day, some idiot attempted to
blow up an airplane by stuffing his underwear full of explosives and then
lighting his crotch on fire. There’s been a ton of coverage of this – most of
which takes the form of people running around wetting their pants in terror.

One thing which I’ve noticed, though, is that one aspect of this whole mess
ties in to one of my personal obsessions: scale. We humans are really,
really lousy at dealing with big numbers. We just absolutely
have a piss-poor ability to really comprehend numbers, or to take what we
know, and put it together in a quantitative way.

Continue reading

Academia vs Industry: an Updated Opinion

One thing that continually amazes me is the amount of email I get from
readers of this blog asking for career advice. I usually try to just politely
decline; I don’t think I’m particularly qualified to give personal
advice to people that I don’t know personally.

But one thing that I have done before is shared a bit about my own
experience, and what I’ve learned about the different career paths that you
can follow as a computer science researher. About six months after I started
this blog, I wrote a post about working in academia versus working in
industry. I’ve been meaning to update it, because I’ve learned
a bit more in the last few years. When I wrote the first version, I
was a research staff member at IBM’s T. J. Watson research center. Since
then, I left IBM, and I’ve been an engineer at Google for 2 1/2 years.
Having spent a couple of years as a real full-time developer has
been a seriously educational (and humbling) experience. If you’d like
to look at the original to see how my thinking has changed, you can find it
here.

At least as a computer scientist, there are basically three kinds of work
you can do that take advantage of a strong academic background like a PhD. You
can go into academia and do research; you can go into industry and do
research; or you can go into industry and do development. If you do
the last, you’ll likely be doing what’s sometimes called advanced
development
, which is building a system where you’ve got a specific
goal, where you need to produce something real – but it’s out on the edge of
what people really know how to do. You’re not really doing research, but
you’re not doing run-of-the-mill programming either: you’re doing full-scale
development of systems that require exploration and experimentation.

I’m going to talk about what the differences are between
academic research, industrial research, and advanced development in
terms of the basic tradeoffs. As I see it, there really five fundamental
areas where the three career paths differ:

  1. Freedom: In academia, you’ve got a lot of freedom to do
    what you want, to set your agenda. In industrial research, you’ve
    still got a lot of freedom, but you’re much more constrained: you
    actually need to answer to the company for what you do. And in AD,
    you’re even more constrained: you’re expected to produce a particular
    product. You generally have a decent amount of freedom to choose
    a product to work on, but once you’ve done that, you’re pretty much
    tied down.
  2. Funding: In academia, you frequently need to devote huge amounts
    of your time to getting funding for your work. In industrial research,
    there’s still a serious amount of work involved in getting and
    maintaining your funding, but it’s not the same order of magnitude
    as in academia. And in AD, you don’t really need to worry about funding
    at all.
  3. Time and Scale: Academic projects frequently have to be limited
    in scale – you’ve got finite resources, but you can plan out
    a research agenda years in advance; in industrial
    work (whether research or AD), you’ve got access to resources that
    an academic can only dream of, but you need to produce results
    now – forget about planning what you’ll be doing five years
    from now.
  4. Results: What you produce in the end is very different
    depending on which path you’re on. In academic research, you’ve got
    three real goals: get money, publish papers, and graduate students.
    In industry, you’re expected to produce something of value to
    the company – whether that’s a product, patents, reputation, depends
    on your circumstances – but you need to convince the company that
    you’re worth what they’re paying to have you. And in AD, you’re
    creating a product. You can publish papers along the way, and that’s
    great, but if you don’t have a valuable product at the end, no number
    of papers is going to convince anyone that your project wasn’t a failure.
  5. Impact: what kind of affect your work will have on
    the world/people/computers/software if it’s successful.

Continue reading

Friday Random Ten, 12/18

  1. Naftule’s Dream, “Speed Klez”: Naftule’s Dream is a
    brilliant progressive klezmer band. I happen to love klezmer,
    but I think that anyone into jazzy prog rock would also enjoy
    them. They’re terrific.
  2. Oregon, “Celeste”: Oregon is a band that I can’t make
    up my mind about. They’re a jazz trio, with most melodies played by
    a wonderful oboist. They tend to really push the boundaries –
    playing with unusual tonalities, really pushing the edge of
    the envelope with their improvisation. It’s quite impressive. And yet,
    they frequently leave me feeling cold, like there’s nothing under
    the technique.
  3. The Flower Kings, “The rainmaker”: Ok, you’ve heard me
    babble about the Flower Kings before. They’re the best prog band in
    the world today, and quite possibly the best ever. They’re wonderful,
    and I’ve yet to hear anything by them that I didn’t absolutely love. Go
    buy their recordings.
  4. Parallel or 90 degrees, “Jitters”: Po90 has a new album! Po90
    is Andy Tillison’s original band. Tillison is the co-founder, with Roine
    Stolte from the Flower Kings, of The Tangent, another wonderful band.
    Po90 has been mostly inactive for quite a while – but they just came
    back with a new album, and it’s absolutely terrific. It’s interesting
    how different it is from the Tangent – Tillison is the primary composer
    for both, but they manage to have very different sounds. Highly
    recommended.
  5. Do Make Say Think, “In Mind”: fantastic post-rock. DMSY is one
    of the best at what they do. If you like Godspeed or Mt. Zion, you should
    enjoy DMST.
  6. Isis, “False Light”: More fantastic post-rock, but from a very
    different style. Where DMST is post-alternative, Isis is sort of
    post-metal. The vocals take a bit of getting used to, but the overall
    quality of the music makes it worth the effort.
  7. The Clogs, “Tides of Washington Bridge”: Still more fantastic
    post-rock, from still another style. As you can tell, I’m a very big
    post-rock fan. Part of what I love about it is the breadth of the
    genre – it ranges from almost classical like the Clogs, to almost
    thrash, like Isis – and yet, it also manages to have a common form
    that makes it post-rock. The Clogs are one of my two favorites from
    the classical side of the genre. (The other being “Rachel’s”.)
  8. Red Sparrowes, “Buildings Began to Stretch Wide Across the Sky”:
    iTunes seems to be in a post-rock mood. Red Sparrowes are another
    terrific group, from the same stylistic family as DMST.
  9. Bach, “Wiewohl Mein Herz in Traenen Schwimmt”, from the St. Matthew Passion:
    In my opinion, Bach is quite simply the finest composer who ever lived.
    And the St. Matthew Passion is probably my favorite of his compositions.
    It’s a work of sheer musical perfection. Music just doesn’t get
    any better than this. If you can listen to this and not be moved,
    then you have no heart.
  10. Thinking Plague, “Consolamentum”: Every time Thinking Plague
    comes up in a FRT, I manage to get something about them wrong. Their
    guitarist either has a Google alert set up, or he reads my blog, because
    he shows up and patiently corrects my errors. I think of
    Thinking Plague as a very unusual post-rock group; lot’s of people try
    to categorize them differently, because exactly what they are is a bit
    hard to pin down. They’ve got a very unique style that really isn’t
    much like anything else I’ve ever heard. They work with odd tonalities,
    sometimes verging on atonal; they’ve got vocals, but the voice isn’t
    a lead, it’s treated as just another instrument in the mix. It’s not
    the easiest thing to listen to – but if you like interesting,
    complex, beautiful music that doesn’t stick with conventional
    tonality, then these guys are amazing. I found a couple of youtube clips to
    include below the fold to give you a taste.

Continue reading

ID Garbage: CSI as Non-Computability

An alert reader pointed me at a recent post over at Uncommon Descent by a guy who calls
himself “niwrad”, which argues (among other things) that life is
non-computable. In fact, it basically tries to use computability
as the basis of Yet Another Sloppy ID Argument (TM).

As you might expect, it’s garbage. But it’s garbage that’s right
up my alley!

It’s not an easy post to summarize, because frankly, it’s
pretty incoherent. As you’ll see when we starting looking
at the sections, niwrad contradicts himself freely, without seeming
to even notice it, much less realize that it’s actually a problem
when your argument is self-contradictory!

To make sense out of it, the easiest thing to do is to put it into the
context of the basic ID arguments. Bill Dembski created a concept called
“specified complexity” or “complex specified information”. I’ll get to the
definition of that in a moment; but the point of CSI is that according to
IDists, only an intelligent agent can create CSI. If a mechanical process
appears to create CSI, that’s because the CSI was actually created by an
intelligent agent, and embedded in the mechanical process. What our new friend
niwrad does is create a variant of that: instead of just saying “nothing but
an intelligent agent can create CSI”, he says “CSI is uncomputable, therefore
nothing but an intelligent agent can create it” – that it, he’s just injecting
computability into the argument in a totally arbitrary way.

Continue reading

Another Cantor Crank: Representation vs. Enumeration

I’ve been getting lots of mail from readers about a new article on Google’s Knol about Cantor’s diagonalization. I actually wrote about the authors argument once before about a year ago.

But the Knol article gives it a sort of new prominence, and since we’ve recently had one long argument about Cantor cranks, I think it’s worth another glance.

It’s pretty much another one of those cranky arguments where they say “Look! I found a 1:1 mapping between the natural and the reals! Cantor was a fool!”

Continue reading

What is math?

File:Braque.woman.400pix.jpeg

I’ve got a bunch of stuff queued up to be posted over the next couple of days. It’s
been the sort of week where I’ve gotten lots of interesting links from
readers, but I haven’t had time to finish anything!

I thought I’d start off with something short but positive. A reader sent
me a link to a post on Reddit, with the following question:

Throughout elementary and high school, I got awful marks in math. I always
assumed I was just stupid in that way, which is perfectly possible. I also
hated my teacher, so that didn’t help. A friend of mine got his PhD in math
from Harvard before he was 25 (he is in his 40’s now) I was surprised the
other week when I learned he isn’t particularly good at basic arithmetic etc.
He said that’s not really what math is about. So my question is really for
math fans/pros. What is math, really? I hear people throwing around phrases
like “elegant” and “artistic” regarding math. I don’t understand how this can
be. To me, math is add, subtract, etc. It is purely functional. Is there
something you can compare it to so that I can understand?

This hits on one of my personal pet peeves. Math really is a beautiful
thing, but the way that math is taught turns it into something
mechanistic, difficult, and boring. The person who posted this question
is a typical example of a victim of lousy math education.

So what is math? It’s really a great question, and not particularly
an easy one to answer.

Continue reading

Advanced Haskell Data Structures: Red-Black Trees

unbalanced-trees.jpg

So, we’ve built up some pretty nifty binary trees – we can use the binary tree both as the basis of an implementation of a set, or as an implementation of a dictionary. But our implementation has had one major problem: it’s got absolutely no way to maintain balance.

What that means is that depending on the order in which things are inserted to the tree, we might have excellent performance, or we might be no better than a linear list. For example, look at these trees. As you can see, a tree with the same values can wind up quite different. In a good insert order, you can wind up with a nicely balanced tree: the minimum distance from root to leaf is 3; the maximum is 4. On the other hand, take the same values, and insert them in a different order and you get a rotten tree; the minimum distance from root to leaf is 1, and the maximum is 7. So depending on luck, you can get a tree that gives you good performance, or one that ends up giving you no better than a plain old list. Playing with a bit of randomization can often give you reasonably good performance on average – but if you’re using a tree, it’s probably because O(n) complexity is just too high. You want the O(lg n) complexity that you’ll get from a binary tree – and not just sometimes.

To fix that, you need to change the structure a bit, so that as you insert things, the tree stays balanced. There are several different approaches to how you can do this. The one that we’re going to look at is based on labeling nodes in ways that allow you to very easily detect when a serious imbalance is developing, and then re-arrange the tree to re-balance it. There are two major version of this, called the AVL tree, and the red-black tree. We’re going to look at the red-black. Building a red-black tree is as much a lesson in data structures as it is in Haskell, but along with learning about the structure, we’ll see a lot about how to write code in Haskell, and particularly about how to use pattern-matching for complex structures.

Continue reading

A Special Midweek Recipe: Ad-Libbed Cranberry Chutney

It’s not saturday, but I’ve got a recipe that I needed to write down before I forget it, so you’re getting an extra bonus.

I usually make a simple cranberry relish for thanksgiving. But it needs to be made a couple of days in advance. This year, I completely forgot about the cranberries until this morning. So I figured I needed to do something else. A good chutney sounded nice. I went hunting online, but couldn’t find anything that sounded good, so I went ahead and ad-libbed. And the results were amazing – this is definitely the new cranberry tradition in the Chu-Carroll household. Sweet, tart, and spicy – it’s a perfect compliment for the turkey.

Continue reading

Creating User-Defined Types in Haskell

  • (This is an edited repost of one of the posts from the earlier
    version of my Haskell tutorial.)
  • (This file is a literate haskell script. If you save it
    as a file whose name ends in “.lhs”, it’s actually loadable and
    runnable in GHCI or Hugs.)

Like any other modern programming language, Haskell has excellent support
for building user-defined data types. In fact, even though Haskell is very
much not object-oriented, most Haskell programs end up being centered
around the design and implementation of data structures, using constructions
called classes and instances.

In this post, we’re going to start looking at how you implement data types
in Haskell. What I’m going to do is start by showing you how to implement a
simple binary search tree. I’ll start with a very simple version, and then
build up from there.

Continue reading