If we're ever feeling smug about our position at the top of the animal kingdom, it is humbling to consider that we live in the company of more than a quadrillion ants. For each person on this earth, there are a few hundred thousand ants, bustling about, foraging for food, building complex structures. At least by the numbers, the ants are winning.

To me, ants are fascinating for another reason. They challenge our concept of self.

An individual ant is a feckless creature. It wanders around aimlessly, seeming to have no ability or purpose. But when you get a lot of them together, it's like alchemy. They transform into creatures that astound us with their intellect.

I remember reading an article a few years ago about how ant colonies eat. The authors studied 20 colonies of green-headed ants, and described a remarkably elaborate feeding process that can best be described as a collective mouth and gut.

The food for each colony was collected by worker ants, exactly according to the needs of the colony. The workers extracted the carbohydrates, which they could eat, and then fed the remainder to the larvae in the nest, who require high-protein diets. The larvae ate and then fed the remainder back to the workers, who could better digest the processed protein, and anything left was taken out of the nest by the workers and dumped as waste.

The process is so reminiscent of digestion in higher-order animals that it makes you wonder, which is the organism: the ant or the colony?

If I were to try to describe the mechanism for the emergent intelligence in ant colonies, I might use two words: communication and gift. A passage from E. O. Wilson's novel, Anthill, describes this nicely:

"The members of the Trailhead Colony transmitted their messages using about a dozen chemical signals, which they picked up by smelling one another constantly with sweeps of their antennae. An ant who was well fed said to a less well-fed nest mate, Smell this, and if you are hungry eat. If the ant approached and was in fact hungry, she extended her tongue, and the donor ant rewarded her by regurgitating liquid directly into her mouth."

Thinking about ants and their networks of communication and gift, I can't help but think of the internet.

In 2005, Paul Rademacher reverse-engineered the JavaScript code for Google Maps, wrote a program to scrape Craigslist apartment listings, and overlaid the Craigslist listings on Google Maps. It was the first web mashup.

It's hard now to appreciate how clever that was at the time. Today, most web services offer free APIs, and it's common for people to use multiple APIs to build something more intelligent than any of the individual services. APIs serve as a mechanism for communication and gift.

In retrospect, web services and APIs were a logical extension of blogs and RSS. What one did for text, the other did for software. This is common in the history of technology. New paradigms tend to start in technologies that are cheap to build, and spread to technologies that are expensive to build. They spread from text to software to hardware.

By that token, I imagine we will soon see more hardware APIs. Our phones will communicate with our cars, and our cars will communicate with our home thermostats. People will build hardware controllers that combine multiple APIs to coordinate our devices in surprising and thoughtful ways.

But that is an easy prediction. To see a further into the future of hardware, we might look at what's happening with text today. When we look at Twitter and SMS, we still see communication and gift. But more strikingly, we see smallness.

If software follows content, I imagine we'll start to see lots of APIs that do small things. But they will easily interact with one another to together do big things. And if hardware then follows software, I imagine that we will see lots of small devices that do simple things alone, but complex things together. They might remind us of ants.