I'm not a musician, more of a painter. I got started after reading the book "Drawing on the Right Side of the Brain" by Betty Edwards. She presents this idea of how the brain halves are different and complete each other, but that we are very left-brained in society today. She presents a few tricks to get into more right-brain thinking, and shows how it makes anyone a better painter.
Everyone who gets into this right-brain mode becomes silent, can sit and work for hours, time just disappear. When it ends it feels like one wake up. It is to be in "flow". I imagine that this happens to you musicians as well when you have your instrument.
As a programmer, I recognize the same when I can write code and easily have it run. Either programming interactively as with a lisp REPL, or by running a suite of unit tests. The ability to create and see it in action is important to stay in flow. Long compile times before I can see something run and I'm thrown out of flow.
When painting I move into details, perfecting a shadow or correcting a ratio in a sketch, then move out to see the impression of the whole. In programming I move into details in units of the program, then move out to see how it fits in with the entire program. Again, not being a musician I imagine you move into details, adjusting tone levels or timings in a section, then move out to feel how the entire tune sounds.
Of course, I think I barely spend 25% of my working day programming. It is dominated by communicating; describing how something should be used, design meetings, time-estimates, support questions, branching/merging, helping colleagues. Very left-brain:ed activities.
I've also seen some curious correlations between computer programmers and practitioners of orienteering (which seems to be a sport that is only popular in scandinavia?). In orienteering you need to be good at taking this abstract version of reality in form of a map, build a mental model from that description, and correlate the mental model with the observed reality.
I think both musicians and programmers should find similarity in having a written down abstraction, imagining it, and making it happen.