Benny-D you should read about http://en.wikipedia....and_mathematics which probably enlightens you about logic and music
They key factor is your will to expand your know how. Expanding knowhow leads to new problems and solutions, which after all, may affect the way you code or rule out unimportant factors for a software project.
Basically by extending your own knowledge, and by abstracting this knowledge you'll learn about other problems and their proper solutions - if they exist. However by doing so, as a result this will affect the way you think and therefore the way you think logical. As long as you'll only stick with a specific topic you will gain a tunnelled vision, which, as sinkfaze stated, doesn't allow you to judge on other type of problems, simply because you'll lack the expirience.
Logic itself is a trained behaviour which results on transferring abstracted facts onto new situations. This is something which can be learned. Take simple maths, we all learned about numbers in our early school days - this allows to a certain degree to use this knowhow in new situations and do simple calculations with ease - allthough we didnt learn every single item from a multiplication table, but rather the concept behind it.
Unless one's brain is physically damaged, everybody may learn anything - it's just a matter of time and one's personal will. And with anything i mean anything, one can also learn to be intelligent or creative. But again, it always starts with the will to do so and one's capability to do research - which is something that can be learned, too.
For all those screaming, that intelligence cannot be learned, have a look at a ways to cheat at an IQ test, to cut it short, when you train such tests more often, it's very likely that your measured result will be higher than it would have been otherwise
If you take the IST-2000R which is one of the 'modern' tests, the only thing it proves is how much you've already learned, as most of the testing subjects need a form of prior knowledge in order to understand the test itself. Extending this prior knowledge (verbal, mathematical, visual "intelligence" tasks etc.), doesnt make you more intelligent, but allows only to cheat on the test itself and pushing your result.
As for creativity it requires to learn many different issues, mostly about humans psychological structure, ethical and moral thinking and such - if this know how is combined with efforts on creating something new, it will be regarded as "creative". A gifted person, doesnt need to learn this particular topics, but does this entire process more intuitive - which is a genetical matter, but the results are the same.
Thinking logical is a mere consequence of trained and adapted behaviour. Programming itself may help to train that, but only in certain scenarios - as outlined before.