The best time I ever had was in a "bull pen" situation (our team at the time called it alternatively the "oven" or the "barn"). It was at a new job, doing something new to me (server automation), and our team consisted of one of their senior devs, myself, and two really "green" new guys who were also hired along with me. One was new in the sense that they had a fresh comp-sci degree but had never worked in the field before, and the other had worked in the field, but never at an employer (only as a remote contractor).
The place had no open desks for us, so they decided to turn the small conference room (we had interviewed in) into our shared "office". Trouble was, it had no A/C vent in it. Hence, with four people and four computers and four monitors - it became "the oven" (there were other reasons we named it what we did, but they aren't relevant here).
But the camaraderie we built in a short amount of time as a team was beyond anything I had experienced before. We'd keep the lights off, a fan running, and a spotify playlist cranking out weird music (our lead controlled it, he was younger than me by many years - as an older person just turning 40 - his choice of music was both odd, and interesting - I'm glad for this, as I discovered new music genres I never knew existed - like Pirate Metal - yes, Alestorm was one such band).
Eventually we got a portable A/C unit, which made things more tolerable.
Ultimately, though, that room helped to form a team that cranked out some interesting code in a very short period, which I think helped to lead the company to be sold to a larger competitor about a year or so later. I ended up leaving the company (the new owners did a "rehiring" process in which they offered me my position at a 25% pay cut - yeah, sure, let me get right on that).
Cubes are almost always back to the people coming so it’s anxiety inducing to me. An office with you facing the door is the only way for peace in my mind.
I have had private offices, two person offices, cubicles, and once in a bull pen with a glass wall. (we called it 'the fish bowl').
Private office comes in first! Cubicle (as long as the walls are at least five feet) comes in a close second.
Open floor plan (or a bull pen) comes in far far far last.