A programmer spends about 10-20% of his time writing code, and most programmers write about 10-12 lines of code per day that goes into the final product, regardless of their skill level. Good programmers spend much of the other 90% thinking, researching, and experimenting to find the best design. Bad programmers spend much of that 90% debugging code by randomly making changes and seeing if they work.
I'm not sure how much of this is really new, and it parallels the detailed material in The Logic of Failure about the ways people who were good at complex computer simulations were different from those who were bad at them. In particular, those were good put work into thinking about whether what they were doing made sense and checking on it, while those who were bad either gave up easily on the whole take, or spent their time on small problems which were easy to define but not very important.
Link thanks to Geek Press.