The first three minutes of this video talk about how a few people can't visualize things in their minds.
This is an interesting condition because I have always been kind of the opposite. Very often I close my eyes and visualize things in my mind.
I have played chess in my head many times although with a great deal of difficulty. I think that I was better at this when I was younger. Under the right circumstances, I might get a good visual of the board in my head. It helps to have no distractions. Even when I play chess normally I am easily bothered by distractions.
Every time I have written a computer program I've tried to visualize ahead of time the different parts in my mind. Some people might do this on paper but I might spend hours just thinking about it before I write any code.