Take a page from the US Army, they know how to rapidly set up living quarters for large numbers of people.
http://upload.wikimedia.org/wikipedia/commons/3/3c/Military_...
Would it be nice to live in such a place? Maybe not, but it would eliminate rent and the commute time. Also, living in a code-tent seems pretty bad ass (at least after it's over).
A more humane version might be to just rent a large villa and stuff all the programmers in there. Aren't there a lot of abandoned McMansions in the US?
Point is: from an operations perspective, there should be a more optimal solution than pissing away $50k a year on single-bedroom apartments. If a company were to come up with a smarter solution, the programmers could make more net money while being paid a lower gross income.
A visit to the headquarters of Russian Railways can feel a
bit like a voyage back in time. The guards wear the peaked
hats and gruff manners of the Soviet era. A display shows
the children of railway workers triumphing in chess and
athletics. Vladimir Yakunin, the company’s boss, started
his career with the KGB. He concedes that his company is a
giant of an organisation: it has 1.2m employees, 20,000
stations, 86,000km of track, a network of schools and
health clinics and even an equestrian school.
...
He also points out that some of the oddities of his
company, such as its schools and clinics, have been around
for a century and derive from the difficulties of running a
railway in the middle of nowhere. There is no such thing as
pure capitalism or pure socialism, he argues; only more or
less sensible solutions to practical problems.
http://www.economist.com/node/21542929A one bedroom flat at 34 m^2 in a good Stockholm location you might be looking up to $300,000.
But no healthcare costs so it probably averages out in the end :o
It's not unusual for rent/mortgages to eat up 30-50% of someone's income in most of the world.
If you have a company in an area where the rent levels (and cost of living in general) are high, you will have to pay high salaries if you want to have any employees at all. But presumably having a company in the area allows you to generate more wealth than you would in any other area, which offsets the salaries.
The only way you can take advantage of it is by moving to such a place. But note that companies are taking advantage of the reverse by moving their offices to places where the cost of living is lower, which means they can lower their salaries.