They already are, and a union could actually prevent it.
A union could say something like "if you want any union workers, you can't have more than X% of open jobs be to non-union workers (or non-US workers)". This is pretty standard fare, and I doubt most (US) companies would forgo US software engineers entirely.
Look at yelp, their official hiring policy is almost "anywhere but the bay". (its technically more nuanced, and closer to "distributed across major global metros", but basically the implication is lower cost workers outside of SF.
I don’t understand the motivation for yelp to express the policy that way. Just say “here’s the job, here’s the required skills, here’s the pay offered…”
If that pay attracts someone from the Bay Area, what’s the problem at all? If it doesn’t, what’s the problem vs the current policy?
Yelp is a Bay Area company that used to be made up of Bay Area employees paying Bay Area rates. Then they started moving overseas to lower the cost of hires.
If you’re an American software engineer, inside or outside the Bay Area, that’s a worrying trend.
Professional licensing is messy in a different way. First, it’d be harder to retroactively license people. Second is the there is significant variety is specialty (ML, kernel research, front end) so it’d be harder to create a standard for licensure.
A license creates scarcity, and deputizes a few people as “licensed” which grants them some special privileges. But not quality of life privileges, work privileges. My mother is a licensed engineer in another discipline. She has to “stamp” or approve anything before it can be built. A lot of her job is resisting management requests for her to stamp everyone else’s work (cheaper unlicensed engineers). She says the extra job security is more than ruined with extra stress and fighting. If she says someone else’s work is inadequate… it’s a problem for everyone including her to fix. So… we could require that licensed software engineers approve all code reviews that go to production…? But not do anything to mandate quality of life improvements. You couldn’t even prevent outsourcing because you can have one licensed American whose sole job is approving the overseas code reviews. They may not even be team specific. Sounds terrible to me.
The benefit of a union is negotiation. A Union could say “no unpaid oncall”, and “you have to hire x% union workers”. With a license…? How would you enact those protections? How would you slow layoffs, or ensure jobs don’t get outsourced? One thing people always forget: unions don’t have to dictate pay.
There are examples of unions today. Google had a union. It wasn’t very popular because no one thought they needed it, but it was there. Most government jobs in the US have a union. Hollywood actors have a union, and those actors get paid very well. The union uses the actors as bargaining power - if you want the famous actor, you need the union cameraman and sound guy. It prevents a lot of the behind-the-scenes work from being outsourced.
Union camera, sound, lighting, makeup, costume, directors, editors, screenwriters. Literally almost impossible to make a film outside of union rules in LA.
It works for film due to some historical circumstances but don’t known if it will work for software
Outsource to where? Outsourcing isn't exactly new and many large orgs already outsource as many activities/projects/roles as possible. Even with outsourcing there is still a skilled tech labor shortage.
When GM or Ford wants to outsource, they need to pour billions into new plants in Alabama or Mexico or other non-UAW locations.
If google wanted to outsource, they could hire people globally, with very little cost or efficiency loss. All else being equal, a dev in Baton Rouge (or Bogota, or Buenas Aires, or Bangalore) is as productive as one in San Jose. And it doesn't cost anything extra to bring one on.
A union could say something like "if you want any union workers, you can't have more than X% of open jobs be to non-union workers (or non-US workers)". This is pretty standard fare, and I doubt most (US) companies would forgo US software engineers entirely.
Look at yelp, their official hiring policy is almost "anywhere but the bay". (its technically more nuanced, and closer to "distributed across major global metros", but basically the implication is lower cost workers outside of SF.