One of the signatures of the Great Recession is the fact that we have sustained, long-term high unemployment along with a labor shortage. While unskilled blue-collar workers can't find a job, corporations like American Electric Power are struggling to find enough trained electricians, pipe-fitters, and other skilled workers.

This is not just a product of the recession, but a long-term structural issue: the "skills gap" that differentiates the fate of those workers who have acquired marketable knowledge and skills and those who have not. The unskilled can get by when the economy is good, but they can't get ahead, and when there is a prolonged period of economic malaise they find that they are expendable, and they are simply pushed out of the economy.

The fate of the unskilled laborer is only going to get worse. And while this is now primarily hitting blue-collar workers without college degrees, a different sort of "skills gap" is beginning to open up for white-collar workers. Whole classes of professionals who think of themselves as irreplaceable skilled workers--in many cases, highly skilled workers--are soon going to discover how much of what they do can be automated or outsourced. We will all be expendable soon.

It is not new to talk about the need to acquire "irreplaceable" skills. But what is not properly appreciated is the scope of the challenge this poses to people in all kinds of jobs, and the exact defining characteristic of what will make a skill "irreplaceable."

The basic rule of economics after the Industrial Revolution is: if a task can be automated, it will be. Or to put it differently, if a worker can be replaced by a machine, he will be. Call it the principle of expendability. The only thing that has changed since the first power loom is the number and nature of the tasks that can be automated. The first thing the Industrial Revolution did was to automate physical tasks. But now we are beginning to automate mental tasks, and what we are just beginning to see is the scope of the mental work that can be automatized. It is much wider than you probably think.

An awful lot of work that is usually considered to require human intelligence really doesn't. Instead, these tasks require complex memorization and pattern recognition, perceptual-level skills that can be reduced to mechanical, digitized processes and done by a machine. These include many tasks that currently fill the days of highly educated, well paid professionals.

Take doctors. A recent article by Farhad Manjoo, the technology columnist for Slate, describes how computers have begun to automate the screening of cervical cancer tests. A task that used to be done by two physicians, who could only process 90 images per day, can now be done with better results by one doctor and a machine, processing 170 images per day.

Or take lawyers. A lot of work done in the legal profession consists of asking a client a series of simple questions about his needs, using the answers to select a standard, well-established legal procedure (such as incorporation or the writing of a will), and then filling out forms by plugging in "boilerplate" language. All of which can be programmed into a database and done by computers online, as it now is by services such as Legalzoom.com.

Everywhere you look, you see the same trend. A huge volume of trading on the stock exchanges is now done by computer programs, not floor traders. Or take customer service, which might seem to require someone who can understand questions and reply with a comforting human voice. Well, meet Siri.

Multiply this by a hundred different professions, and there is surprisingly little that cannot be automated. Look at your own profession and rather than thinking defensively, listing all of the things you do that you're sure could never, ever, ever be done by a mere machine, start thinking creatively, coming up with all of the things that can be automated, given a sufficiently complicated algorithm. Believe me, if you're not thinking about this, someone else eventually will.

If you're not taking this seriously yet, let me give you one more example. I recently came across a story about a composer and music theorist who created a computer program that writes cantatas in the style of Johann Sebastian Bach. (A cantata is a short piece with a well-defined structure, which makes the task a little easier.) The climax of the story is a concert in which an orchestra played a mixture of the computer's compositions and actual Bach cantatas. An audience of music experts could not reliably determine which was which.

Chances are, you aren't the next Johann Sebastian Bach, so if someone can automate what he did, someone can definitely automate what you do. (Can it be done with commentators and, ahem, columnists? Well, I suppose it depends on the columnist.)

All of which means that an awful lot of well-educated, well-paid people are in for a shock.

To be frank, I'm not that sorry for them. Over the years, I have come to realize just how many skilled white-collar professionals are just phoning it in when they go to work every day. They fill out paperwork and connect the easy dots in pre-established formulas, rather than doing original, creative, conceptual thinking. Chances are you've seen one of those "mystery diagnosis" shows on cable TV, the ones that tell you the story of some guy who suffers a mysterious, debilitating ailment for years before he finally finds a specialist who tells him he has some rare disease. It seems like every one of those shows begins with a doctor who listens to the patient's symptoms, plugs them into a common, familiar, and completely wrong diagnosis, and then lets it go at that. It begins with a doctor who's going through the motions rather than doing original thinking to solve the problem.

There has been a lot of discussion recently about the falling value (and rising price) of a university diploma, and this is part of the reason for it. Much of a contemporary university education is designed to train dot-connectors, to fill students' heads with established formulas and the received wisdom, but not to teach the kind of creative problem-solving that can only be learned, in my experience, by going beyond the canned knowledge peddled in the classroom and dealing with actual, real-world challenges.

More deeply, what cannot be automated is the conceptual thinking that allows us, not just to fit a new fact into an established mold, but to understand facts that do not fit the established mold. This implies a real challenge to workers in the next century.

There has been a lot of anxiety recently about the supposed "disappearance" of the middle class. Well, you ain't seen nothin' yet. Decades ago-think Detroit in the 1950s-people still had the illusion that they could earn a prosperous middle-class living just by turning bolts on an assembly line. Now the machines turn the bolts, and those workers' grandkids are about to discover that they won't be able to earn a middle-class living any more just by shuffling papers and connecting the dots in pre-established formulas.

Whole categories of workers have already disappeared. I was recently talking with my father, whose career spanned from the 1960s to the 2000s, about the disappearance of such a thing as a "secretary." Warren Buffett is apparently the only guy who still has one. Think of the things secretaries used to do, back in the "Mad Men" era. Typing? We have word-processing software, spell checkers, and laser printers now. Taking phone calls? We have cell phones and voice mail. Managing schedules? We have online calendars and project-management software. And did I mention Siri? My dad pointed out who has replaced the secretary in the modern office: the IT expert, whose job is to help us manage all of these virtual secretaries.

The basic pattern is that any job that requires only perceptual-level skills-complex tasks of memory and pattern-recognition-can and will eventually be done by a machine. To justify a claim to higher productivity, we will have to be working on the conceptual level, as creative thinkers and most crucially as entrepreneurs, which is a much more demanding discipline.

This new era is not a curse but an opportunity. The whole reason for automating every kind of human work that can be automated is to increase the productivity of our labor. In previous waves of innovation, mechanization made many traditional jobs obsolete. A few years ago, I noticed a trend of naming children after old-fashioned blue-collar professions, such as "Cooper" and "Hunter" and "Mason," highlighting the fact that for most people, these names no longer stand for a profession or a kind of work. But those who made the transition to the new era in which many of these old jobs no longer existed are better off because the new technology has made everyone is so much more productive. Similarly, many of today's jobs will soon be expendable, but we will all be richer because we each have so many machines working for us, from the robot in an automated assembly line to the smartphone in our pockets.

But benefiting from this new era will require that we make the transition to working on a higher, more productive level. And that will require the ultimate in "skilled labor": the ability to think.