Both blue- and white-collar routine jobs are at risk of displacement by robots, while nonroutine, abstract occupations are more difficult to automate – for now.

Jobs involving creativity and emotional intelligence are the least likely to be replaced by automation.

Lifelong re-education may be the surest way to professional survival.

If the idea of a C-3PO-like robot occupying your current job, whether that's teaching a class of kindergarteners or auditing taxes, sounds far-fetched 10 years from now, you're not wrong. However, experts caution that 25% of U.S. jobs are at "high risk" of automation (with another 36% at medium risk).

According to a recent report by the McKinsey Global Institute, "What lies ahead is not a sudden robot takeover but a period of ongoing, and perhaps accelerated, change in how work is organized."

If "sudden robot takeover" isn't right, perhaps a better analogy would be a slow robot war of attrition. Indeed, in the last 60 years, only one job has been entirely lost to automation: elevator operators.

When experts say an occupation is under threat, what's happening instead is that individual tasks are slowly being taken over machines, with whatever human element that remains being conducted by far fewer employees. One example of this is office support. "Offices once populated by armies of administrative assistants, research librarians, and payroll and data clerks now run with leaner support teams and more digital tools," the report stated.

According to the report, 40% of Americans hold jobs that could shrink by 2030.

When classifying what jobs can and can't be replaced by robots, economists sort occupations along two dimensions: routine vs. nonroutine and cognitive skills vs. physical skills. We tend to think of machines as replacing the physical jobs and leaving behind the cognitive, but so far, what they've actually done is replace the routine jobs – both physical and cognitive – while increasing demand for the nonroutine.

Jobs with repeated tasks done by hand are most at threat. This is nothing new, however, just look at automated checkout machines.

The assertion that routine physical jobs are most likely to become obsolete is confirmed in the McKinsey report, which forecasts that the number of jobs held in office support, food service, production work, customer service and retail sales will all decline within the next decade.

It's not the first time technology has rendered certain jobs obsolete, but this time, the conditions are different. "My grandfather was trained as a blacksmith and farrier before World War I. When automobiles and trucks replaced horses in the interwar period, the company he worked for sent him and his fellow blacksmiths to mechanic's school," said Peter C. Earle, economist at the American Institute for Economic Research. As a mechanic, he was able to apply the same skills to a new medium.

These days, however, "when you look at many of the jobs that AI and automation are replacing, they tend to be repetitive or formulaic," Earle said. "So unlike blacksmiths and farriers training to become auto mechanics, many of the new jobs are extremely technical – for example, algorithmic coding or data science – and don't lend themselves to quick training for an orderly shift in employment."

It's not just the physical laborers being replaced: the office-park class may also be in peril. Automation is good at replacing jobs with straightforward rules, codes, inputs and outputs, many of which are considered white-collar, like accountants or paralegals. Both fall into the category of routine, cognitive, nonphysical, repetitive occupations. (Note: The author is not immune.)

The translation industry illustrates this change. Globalization means demand for translation services are on the rise, but the advent of a technology called neural machine transmission (NMT) is putting the jobs 500,000+ translators at risk, said Ofer Shoshan, CEO of One Hour Translation. Demand for human translators may only last the next three to five years.

"I think we should not sugarcoat this," Shoshan said. "There will be an impact; the way to deal with it is to first to understand and accept the fact it is coming."

In another troubling conclusion made by the McKinsey report, technology may be creating more jobs than it's destroying, but it's bad news for the middle class.

Many of the aforementioned jobs at threat of automation are middle income. Especially hard hit are the middle-income jobs that don't require a degree. As a result, technology is polarizing the workforce. Laid-off workers that can't afford to become software engineers are instead forced into deskilled jobs with no prospect of career advancement.

With robots outperforming humans in all the repetitive tasks, what's left are the nonroutine jobs, where there's either too much variability in the work to be cheaply replaced by a robot or the technology hasn't been invented yet. This includes jobs like janitors and nannies – individual tasks may be mechanized, but only a human can coordinate them all (not to mention that few people would entrust their children to robots).

Finally, nonroutine cognitive jobs represent the quadrant of occupations that are neither hurt nor untouched but helped by technology (i.e., without technology, there's no demand for social media managers or cybersecurity experts). Jobs like these are ones that require complex decision-making, creativity and problem-solving skills. Once again, this aligns with McKinsey's forecasts: Demand in healthcare, STEM occupations, creative fields and business services is expected to increase.

Earle distills this with another rule of thumb: Occupations are safe if either "(a) data is hard to come by, or (b) no amount of data facilitates quicker or better performance."

In other words, if data can't be fed into a machine that'll spit out a faster, better solution, it's best done by humans. "Offhand, these include entrepreneurship; many jobs in medicine, childcare, and elderly care; certain exotic types of sales and trading; and, interestingly, artistic and interpretative positions," Earle said.

So while improv or creative writing have never been the most employable college majors, at least they won’t be rendered irrelevant by automation (though AI has dabbled in painting). Careers involving high emotional intelligence, like teachers, therapists, nurses and caretakers, are also hard to replicate with a machine. Humanity may be the one thing artificial intelligence will never have.

Even still, data can be applied in surprising ways – innate human complexities can be captured in an algorithm. The New York Times recently reported on Cogito, an AI application designed to "optimize" humanity by detecting changes in customer service representatives' voices and alerting them to perk up or show more empathy.

All these claims come with a massive "for the time being" disclaimer. Even workers in STEM fields, undoubted beneficiaries of technological innovation, are under threat from the constant evolution of technologies in their field.

It's also worth noting that predicting the future has made fools of many. "A lot of the predictions involving which occupations will be rendered obsolete … are based upon simple linear extrapolation," Earle said. "Innovation often takes strange and unexpected turns, though, which may render today's forecasts unrealistic or even laughable in 10 or 20 years."

Rather than trying to guess which jobs will remain relevant, perhaps the best survival strategy is to develop transferable skills and remain agile. "The old model of front-loading education early in life needs to give way to lifelong learning," the McKinsey report recommended. "Training and education can no longer end when workers are in their '20s and carry them through the decades."