I too have worked in both environments. I prefer to have a private office where I can make it quiet or play some music without the need for headphones. As a current cube dweller, I don't question why management loves the "open" plan. They are either cheap or they saw a movie where a bunch of software geeks were huddling up and making ground breaking progress. That's not the way it happens in real life. Most "collaboration" is just bullshitting. I don't discount that real meetings and collaboration are important but getting the job done happens inside the developer's head and that requires a quiet environment free of interruptions.
What programmers really need is privacy - an office with walls and a door, enough bathroom space to accommodate everyone - typically, from what I have seen the minimum number of stalls is woefully inadequate at even the newest places I have worked, and a couple of public-ish places where collaboration is made easy. Finally, don't skimp on the furniture. Comfortable chairs or chairs of choice by employees who have a preference will keep them in their seats longer.