For every programmer how many jobs are taken away by automation!?
Likely some. That doesn't mean there aren't new opportunities for those capable and skilled enough to take them.
I read about a steel mill in the Chicago area that closed back in the early 2000's. Obama was part of a group that sought to help all the displaced workers find new jobs (and, no this isn't to bash Obama in the least here it was just the reason I was looking at the story to begin with).
Anyway, this group started interviewing the workers asking what they made in wages and what they did at the plant. One guy described in the article was making like $30 an hour plus benefits (that's a fantastic wage in the early 2000's). He operated a bar straightening machine. He described his job as pushing a button to load the bar, then another to straighten it, and a third to release it and send it to the next operation. He had a high school diploma and was completely unskilled. The group couldn't find anything better than a minimum wage job for him.
The union at the steel plant had effectively overpriced his value as a worker grossly.
Or, a clip I watched on 60 Minutes where this kid in his 20's was griping about losing his job at a GM auto factory. This was in the late 80's. They showed him on the line putting doors on cars using an assisting robot arm to maneuver the door into place where he hooked it up and secured it with an impact driver. He was making the equivalent of almost $70 an hour in wages and benefits. He had a house, vacation house, boat, RV, etc. and was crying that he'd have to sell most of that. He too was a high school graduate with no real skills or training.
60 Minutes then showed the plant in Mexico GM opened to replace the one the kid worked in. They interviewed a worker who did the same job the kid did. He was ecstatic that he made a whole dollar an hour doing the same job for the same quality.
My point here is that US business and industry has often found itself priced out of the labor market. It just isn't worth doing some things in the US because the labor costs too much. Unions, regulations, excessive government rules and taxes, all play a role in doing that. Right now, a single worker costs an employer over $10,000 a year or more in meeting all those regulations and paying all the employer tax burden on that employee.
Automation is a way around that for employers, thus they use it.