Perhaps the hundreds of nitty frustrations drive away all but those who habitually focus on the end goal. Perhaps it is merely that computers are young, programmers are younger, and the young are always optimists. Do not underestimate the value of print statements for debugging. I believe that part of what propels science is the thirst for wonder. It's a very powerful emotion.
All children feel it.
Something happens between first and twelfth grade, and it's not just puberty. Not only do the schools and the media not teach much skepticism, there is also little encouragement of this stirring sense of wonder. Science and pseudoscience both arouse that feeling. Poor popularizations of science establish an ecological niche for pseudoscience. If you can't learn to do it well, learn to enjoy doing it badly.