I've said this a few times in comments, but I think it merits an answer.
In the UK we do have unions for software engineers/programmers. The primary one is Unite, which has the primary engineering union as a constituent. The sector for computing workers is IT & Communications.
The union situation in the UK is complex and now relatively few people are union members because of a lot of power being cut from the unions in the 80s, due to anti-union political policies and a few unions setting a bad example, which allowed the mood for changes.
To stay strong, most of the old unions merged together and have continued to do so for some time. When I was born, most engineers were part of the AEU, the Amalgamated Engineering Union, this merged with the electricians to become the AEEU in 1992. The AEEU merged with the MSF (Management, Science and Finance) union in 2001 to become Amicus. UNIFI (Union for the Finance Industry) and the GPMU (Graphics, Paper and Media Union) merged in to Amicus in 2004, and in 2007 the T & G (Transport and General Workers) merged in and the name was changed to Unite.
There is still strong anti-union feeling in the country, particularly from the professional classes, who mistakenly believe that the primary purpose of the union is to bleed companies dry by forcing up wages and striking. This is not the case. The primary responsibility of a modern union is to protect their workers from malpractice by their employers. This is usually in the form of free legal protection for defending members against illegal working practices, unfair/wrongful dismissal cases, health & safety issues, etc.
For the cost of being a member, the ability to get expert lawyers involved for free on your behalf when the **** hits the fan is a life saver. One of my ex-colleagues is presently taking an old employer to court over unfair dismissal claims. He was always highly anti-union and is now having to pay out an immense amount of money to take highly disreputable people to court who have huge wallets. Bet he wishes he had paid the £10.96 a month.
Most professionals, instead of joining "unions", join pseudo-unions in the form of professional membership bodies. The primary organisation in the UK for programmers is the BCS (The British Computing Society). Becoming a professional member of this body gives a degree of recognition, requires accreditation via exams, and gives post-nominal letters. The body also provides many networking opportunities via a wide variety of groups that meet frequently for talks and discussions. The organisation is also has Royal Charter, so can issue Chartered status to IT professionals, or indeed engineers as they can award the Chartered Engineer status. I believe there are equivalent organisations in the US and other domains.
Many professions also have regulatory bodies, which are usually compulsory membership and function like unions in part. Doctors in the UK have to be registered with the General Medical Council (GMC), and are usually members of the medical union, the British Medical Association (BMA). So it is not only teachers that are professionals and unionised.
To summarise, joining a union is possible for programmers and is highly advisable unless you have total blind faith that your working career will always be free from any potential legal situation. It is not all about the masses against the classes, it is just common sense to protect yourself and the family that depend upon your job.