I now do everything (including code) in a single window that is no larger than the focus of my field of vision.
I keep all my windows stacked in the center of my screen and CMD-Tab through them. I have become very fast with CMD-Tab (and related shortcuts).
I used to code with multiple windows -- IDE, preview, logs, StackExchange, etc. all open in multiple places. The lack of focus made it less productive for me.
Now, I keep a small log window open in the lower right section of my screen, then have my code editor and preview window stacked.
My workflow is basically: code, code, code, CMD-s (save), CMD-tab to preview window, CMD-r (run/refresh), CMD-tab to the log window so I can view the errors, then back to code to start bug fixing.
My head never moves. My neck is always at the right height and my eyes are always in the right place. I use a standing desk and this setup has helped prevent neck and shoulder pain.
Another big benefit: I am 100% as productive when using my the 27inch monitor at my desk as I am at my laptop 13inch screen - the workflow and screen setup is exactly the same.