Well I wish I had that luxury.
My order is :
1) Quiet workspace (if not private office at least a 2-3 persons office).
2) Good hardware including monitor,keyboard and mouse
3) Opportunity to change positions (a laptop would be great) because you tend to have new ideas when you change the environment.
I worked for a year in an office with 3-4 other programmers. It was ok .. though managing to focus required me to stay late and/or come early.
My preference (though I have only worked for 1 week in a private office) is clearly for the private office.
During performance evaluation (I got a good performance review) I mentioned I wanted to keep a team/room setup in order to continue to deliver and improve.
One month later we were moved to an open plan layout and the problems begun to grow :
1) No way to setup ventilation and temperature for each desk .
2)Noise and distractions - headphones are a temp solution
3) The feeling on intense supervision (my monitor is setup so that people can view it from anywhere in the room especially the boss).
So I mentioned my performance would drop and so it did and I also mentioned as alternatives having flex time and or working from home.
None were accepted.
Well it's their loss as I do not want to stay late and /or come early without being rewarded for the effort so I guess you need to really learn to cope with it.
Oh .. there is also Getting Things Done to help you get in the flow (which can and is usually broken by your manager) and stay with it.