These changes, particularly in the Yahoo case, reflect poorly on those managers in my mind, not on the concept of remote work.
The ideal programming environment is effectively remote- every engineer in their own office, with multi-party audio or video (e.g.: google hangouts) for collaboration.
If your primary cost is engineering staff, why would you make them %50 less effective when they're working and on top of that take 2 hours out of their day each day for a stressful commute?