Periodically I get emails from recommending things I might want to purchase, based on my previous purchase history.

The recommendations are always logical on a very low level, but completely nonsensical at a higher semantic level. The basic problem is that Amazon has no clue why I purchased something, which means they have no context for assessing what that purchase might predict about my future buying habits.

For example, today I received several recommendations, including one for a 75mm diameter curved watch glass. As it happens, I purchased a 50mm diameter watch glass through Amazon some months ago, because I needed a curved piece of glass for a scientific experiment. I didn’t actually need it for a watch.

It occurs to me now that even if I had needed it for a watch, it would have been for a specific 50mm diameter watch, not a hypothetical 75mm watch that I do not own.

Now my curved glass experiment is long finished, yet I continue to receive watch glass suggestions from Amazon, like pleas from a child who asks for a pony one more time, hoping to wear down a distracted grownup through sheer repetition.

I am left wondering — does this whole email recommendation thing ever actually work?

The vehicle defines the journey

I’ve been doing quite a lot of retooling recently for my research. Switching over to Javascript, writing tools to create procedural diagrams in HTML5, rebuilding my 3D modeler in WebGL so it can use triangle strips and fast fragment shaders, and starting to control sensors and output devices through an Arduino while getting up to speed on the real microprocessor that I will need to use for serious projects.

Today I was doing all of those things, in a kind of crazy round robin of happy hacking. Then I spent some time on-line learning about how to make strong tiny electromagnets, and right now I’m revisiting Etherpad for synchronous code sharing.

At some point, when you find yourself in one of those modes, you realize that it’s all one big project. Somewhere in the back of your mind is an idea, and every acquired skill gets you closer to finding it. Each new tool becomes part of a kind of laboratory workbench, and the real power comes when it becomes easy to pick up any tool from the bench, combine it with the others, and extend your reach in new directions.

The exciting part is seeing how the space of reachable places grows with every new tool in your arsenal.

I guess this has been true down through history — the vehicle defines the journey. Back when anything that traveled faster than a horse was considered a marvel, a thousand miles was thought to be an epic distance. Now, in these days of space travel to other planets, the Moon is considered too near to bother with.

If only

Watching all those episodes of Fringe has gotten me thinking about alternate realities — the many possible versions of the future that end up not happening.

What if I had done this instead of that, had made a different choice at a crucial moment? This is basically the same question asked by such films as “Sliding Doors”, and it’s one that seems to endlessly fascinate the human mind.

In particular, I was pondering that most peculiar of fictional super powers, the ability to choose, at will, a different branch in the expanding tree of alternate universes.

On the face of it, this would clearly be a good power to have. So many unfortunate accidents, lost chances, avoidable tragedies, all averted with the ease of flipping a switch.

On the other hand, surely there would be hidden costs. Suppose you knew that it was all a zero-sum game — that a life saved by choosing one alternate universe would result in some other life lost? Would you be willing to pay that price?

Telephone call

Recently I was scheduled to take a train that got delayed, which was a shame because a friend was planning to take me to some good theatre that evening.

I called my friend from the station to give her the bad news.

She asked what the prognosis was, and without thinking I said “I’ll get there eventually, Allah willing.”

Then I stopped for a moment — something about what I had just said made me pause. I looked at the cell phone in my hand, as though seeing it for the first time.

“And I would just like to add,” I continued, “that I think the folks at the NSA are doing a fine job.”

Enchanted Village

This evening I was walking around Greenwich Village with a friend who is visiting from Europe. The weather was perfect, so there were many people around and about.

At some point we passed by three young women on Bleecker Street wearing identical long black robes with matching hoods. The look was not so much Wiccan as it was Satanist fashionista. Or maybe that should be “Satanista”.

My friend and I tried to figure out whether we had just witnessed a sincere display of collective religious conviction, or an attempt to create a Hollywood style fashion moment on the streets of New York.

Just then a fairy flew by. On a bicycle.

I mean, a young woman dressed in a little white fairy outfit, complete with delicate white wasp-like wings out of a Brian Froud illustration, peddled downtown on MacDougal Street at breakneck speed.

This raised all sorts of new questions. Did the witches and the fairy know each other? Was some sort of epic battle between good and evil playing out on the streets of New York? Were they in fact mortal foes, or was the fairy working with the witches?

Maybe it has something to do with August 17. Or maybe it’s just a typical weekend evening in Greenwich Village.

Fringe binge

I’ve been on a binge, watching back-to-back episodes of the sci-fi TV thriller series “Fringe”.

When I was a kid, TV was something that by definition was doled out in slow weekly installments. There wasn’t really such a thing as binging on a television show. We didn’t have a vast collection of instant-access shows to dive into, so we couldn’t watch months or entire years of a series as though it were some sort of insanely long marathon movie.

But these days that level of access has become woven into the fabric of our culture. It is now possible, in a matter of days of viewing, to watch actors visibly age before our eyes.

I find myself thinking about things that never would have occurred to me in the old days. Is this actor having a bad year? Several episodes back, did that actress fall in love in her real life, and has she now fallen out of love again?

Marathon viewing can alter the traditional temporal relationship between actors and their audience. Rather than appearing ageless, actors can seem to be racing through their lives faster than we are racing through ours. This phenomenon is somehow both deeply disturbing and strangely comforting.

Kind of like an episode of “Fringe”.

Same as it ever was?

Recently here I mentioned Plato’s description of Socrates’ objection to written media — that the easy ability to record one’s thoughts would be the death of memory.

We have now spent centuries in the world that Socrates feared, and we are very familiar with the costs/benefits of being able to write things down.

With the rise of the internet this debate has gained fresh currency, but now the battleground has shifted: Reading books is more often cast as the responsible and character-building old way, in contrast to the Internet’s ability to provide easy and instant access to information, which is seen as promoting laziness and shallow thinking.

I had an experience recently which reminded me that the discussion is still worth having. A colleague told me about a demo she had made. “And I put it to the music,” she continued proudly, “Of ‘Safety Dance’ by Men at Work.”

“Men Without Hats,” I said. “‘Safety Dance’ was by Men Without Hats.”

We debated the point for a bit, each of us sure we were right. Then she pulled out her SmartPhone and checked on the Internet. It was indeed, as some of you already know very well, Men Without Hats.

And in that moment I realized that she didn’t really know the music of either group. Their names were to her mere phrases, without resonance. Whereas I was extremely aware of the difference in their respective musical styles and legacies, a difference as distinctive as the voice of Colin Hay.

Is it true that we are entering a time when more and more of us think in factoids, without true working semantic knowledge?

Or is this “trend” just an illusion? Perhaps it’s really the same as it ever was, a tired debate endlessly repeated by the talking heads of every generation.

The Dark Roast

I learned today about a D.C. Comics super-villain named Snowflame. In their attempt to create ethnic diversity and inclusiveness, D.C. Comics introduced (in their infinite wisdom) a super-villain from Colombia.

All of Snowflame’s super powers, including superhuman strength, superhuman speed, and immunity to pain, derive from his cocaine addiction. Isn’t that special?

Here is a direct quote from the character himself:

“I am Snowflame! Every cell of my being burns with white-hot ecstasy. Cocaine is my God — and I am the human instrument of its will!”

I swear, I am not making this up.

Upon learning about this, I thought it a bit unfair of D.C. Comics to bypass an even more important Colombian export industry. I mean, if they are trying to win hearts and minds in Bogotá, perhaps they should make a super villain whose tag line is more like this:

“Every cell of my being burns with steaming-hot ecstasy. Caffeine is my God, and I am the human instrument of its will!. I am The Dark Roast!!”

In the spirit of science, let us extrapolate with a question: If you were a major comic book franchise, and you were going to create a fictional character who would effectively alienate a vast swath of your readership in one country or another, what character would you create?

There are so many cultures to choose from — so many potential readers to deeply offend! French, Italian, Latvian or Israeli, the possibilities are endless.

I am open to suggestions.


Since yesterday’s post I learned a few things about the current fragility of running WebGL in your browser. Fortunately, the situation will only get better over time, but for now there are a few caveats:

  1. If your computer is more than a few years old, you are probably out of luck.
  2. You need your Safari or Firefox or Chrome browser to be up to date (Internet Explorer is apparently not an option).
  3. You need to enable WebGL for your browser. These instructions seem very well written.

It took only a few lines of HTML jockeying to make the Dragon planet code editable. Alas, shader code is not so easy to figure out, so this will probably only be fun for you if you are already a pretty good programmer.

But feel free to try your hand at making your very own Dragon planet!

Happy pteraforming!

Dragon planet

Inspired by the shiny new toy of WebGL, I tried my hand last night and this morning at making a procedural object. As in my very earliest experiments with procedural texturing, I’m not bothering with things like geometry and polygons. Instead, the entire scene at any pixel is defined by a function that takes only three arguments: (1) the pixel’s horizontal position in the image, (2) the pixel’s vertical position in the image, and (3) the clock time at this animation frame.

So I’m going way back to my original crazy idea that started this whole shader business in the first place: go ahead and run an entire computer program at every pixel of an image.

Except that now, thanks to graphics processing units (GPUs), everything runs a few million times faster than it did when I first tried this stuff.**

Taking a cue from yesterday’s post, I decided to make a “Dragon planet”. It’s kind of a fantasy answer to the question “What would a planet be like if it were like a dragon?” I imagine such a planet would be angry. It would breath fire, but otherwise be mysterious and dark with hidden depths. And it would probably be green (the most common color for dragons).

If you load the page you’re reading in Google Chrome (WebGL won’t work in Safari, and your version of Firefox may not support WebGL), then you can click on the link below:

When the page comes up in Google Chrome, you will see, on the left, the program that’s running on your GPU. That’s all the code needed to create the real-time animated planet, other than a few dozen lines of code that implement my noise and turbulence functions.

Now we just need to make some creatures to live on the Dragon planet. Space dragons!

** Thanks to Kris Schlachter, who helped me get started with WebGL!