The best tradeoff I've found is
1. Open-office layout two (specified) days a week; perfect for collaboration and meetings.
2. People work from home three days a week; perfect for those coding marathons.
Obviously you can still code in an open-office and you can still collaborate working from home, but it's sub-optimal. With the setup above, you're in the right environment for the right type of work most of the time, and employees love it.
Lots more about this here: http://www.archonsystems.com/devblog/2013/09/19/open-offices...