Wondering how many on this forum have experienced finding solutions to problems while asleep.
Different parts of a boat need to do different things, and often your next boat can't be designed by copying your last one and making things smaller or bigger; you need an entirely new concept for a new function.
So when I sit and "think" about the problem, trying to make progress on it, I usually spin my wheels and get nowhere. I can't draw, I can't write, because I'm forcing it. Trying to make money thinking, right, and it just won't come.
But often, later that night, I'll have a fully-formed picture of the solution come into my head, of the thing that was puzzling me back in the daylight. I'll get up, turn on the light, go to my desk, and sketch the thing out, with explanation about what the different chicken scratch lines are. I put my mouse on top of it so my cats don't knock it onto the floor, because in the morning I've complete forgotten I even woke up and drew it. The next morning, there's my solution sitting on my desk.
So faced with problems demanding solutions, I've learned to just relax and be the space that the solution can come into.
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.
Never happens anymore. Maybe my programming style changed, or I just got better at not thinking about work too much outside of work hours.
I've had a few since then, but not many that left an impression. One was automated test generation during my job as a test engineer for Digital Signal Processing chip (fitful sleep with unending ideas about generating tests).
Another was last year, after I had answered a question on stackoverflow. It was good enough to warrant a blog post: https://learnbyexample.github.io/mini/dreaming-solutions/
This is not something particular peculiar about just certain individuals but actually is, in fact, one of the functions of sleep.
I would vividly recommend anyone to read it, in order to improve their own life overall, that includes memory recollection + reconciliation.
[0] https://www.goodreads.com/book/show/34466963-why-we-sleep
Once read an article that research showed that studying before sleep would increase retention 30% compared to studying in the morning. So at night your brain is actively working and you can take advantage of that.
In fact, dreaming (and thinking) in code (or any activity) is known as Tetris Syndrome or Tetris Effect.
I rarely have code dreams, but when I do it's usually rows of IDE text that I can't make out from a distance.