I'll begin with a healthy dose of pessimism.
I write software for a living, and I am becoming more and more convinced that my job will soon – in a few years or a few decades – be outsourced. It won't go to a developer in India or China. Or it may, but that's not what concerns me. Instead, my job will be outsourced to a datacenter. Everything I do professionally, from reading and giving feedback on specs to estimating development schedules to architecting and typing in the code and writing unit tests to reviewing others' code, every one of these things will be subject to automation. We can't do it now, of course, not at any price. But the technological state of the art continues to improve and corporations have huge economic incentives to replace me and my peers with something cheaper; for me, this alone is enough to lend credence to the possibility.
To add a note of irony, it is software engineers like me, especially those with an interest in machine learning, who will be the ones to put us all out of work. We are not known for our solidarity, after all.
When I was in grade school I wrote a conceptual short story that shares a title with this post (and is now mercifully lost to the entropogenic mists of time) on what would happen if all jobs were automated. I had only rudimentary knowledge of economics, and I certainly wasn't aware of ideas like the tragedy of the commons and the global coordination problem and Robin Hanson's em scenario, and I painted a rosy picture of our leisurely future—I had the sense not to allow things to go too smoothly, out of some vague intuition that stories need conflict to be worth telling. I recall that I wrote in a bloody revolution and a fearless leader: only original ideas are allowed here.
I was surprised, then, to see a treatment hardly more sophisticated in the latest issue of Wired. Kevin Kelly contends that as computers and robots take our jobs, more and more interesting jobs will become available to humans, just as they did in the aftermath of the industrial revolution. There's a certain degree of truth to this in the near term, but setting aside the questions of how displaced humans will cope with the changes in what is expected of them, Kelly's argument only holds water if there still exist things that humans can do that automation can't. I see no reason to expect that this criterion will continue to hold unless powerful groups make a concerted political effort to ensure that it does, which is not something I would support.
Let us keep in mind how poorly we treat those who cannot currently contribute to society. Sooner or later we will have to face this question: how do we define personal worth in a world where most people have no economic value?
An addendum: Gary Marcus at the New Yorker has been talking about this kind of thing a lot recently. He responds to the Wired article:
... there is no causal mechanism, physical, economic, sociological, or legal, that guarantees that new jobs will always come into existence. Adam Smith’s invisible hand seems to offer the promise that ... markets will set prices in rational ways. That doesn’t mean, though, that there will always be remunerative, let alone satisfying work for human beings to do.
The whole piece is worth reading. Marcus mentions that this process is already well underway in the legal field: Armies of Expensive Lawyers, Replaced by Cheaper Software.