But the music dream was a very unique and memorable experience.
Code and programming sometimes plays part in my dreams, sometimes I just continue to work on the program I worked on before going to bed. At least that is what I remember after waking up. Did not bring me any great breakthrough so far. But continuing the real code the next day goes lighter, sometimes.
The feeling of code dreams is not as weird as from the music dream. Maybe I am just used to that from being in the flow in my waketime. When in the flow, code, or the abstract problem I work on, is all there is - similar to the dream. It also has the bonus that I can actually get things done and they persist. No wake-up and puff-all-gone.
To conclude I would liken code dreams to a light version of prototyping. You try out some stuff, throw it away and (hopefully) do better the next time you work on similar stuff. Not that I can consciously remember the lessons learned, but it trains intuition and the feel for handling problems.