There are some basic tools missing from people's mental toolboxes. In many cases these are the same tools that likely they failed to instill in Math classes.
Reduction, breaking a problem into components or stages, then further down to individual steps is the key one they missed. Learning how to attack a problem and what strategies let you chop it into perl-syntax sized chunks is a tricky thing...
Further, multi-focus, the ability to keep the goal, the main loop of the program, the sub sections, and the individual line you are on all in your head at once seems to be a talent the best have.
I would like to point out that "Math class" is not the only place to learn these things. Music is another arena in which the skills necessary for programming may be learned. (Note this interesting comment along these lines.)
Like many other things, Music is separable into many layers: reading the notation, playing an instrument, writing music, conducting, etc. Moreover, each layer at one level may also be composed of sub-layers.
For example, you have to know the mechanics of playing your chosen instrument, may need to know how to read what's written, and if reading written music, must definitely know how to interpret the notation, in order to play music. Then, if you're playing with a group of musicians, you may need stay together by following the leader or perhaps by simply listening to the others at the same time you're playing.
(As an aside, it would be interesting to ask the monks how music has affected their programming. I don't mean give me a list of what you like to listen to, but not this either, as it is a little too abstract (though I like it). What I would like to see is discussion about what skills learned via music tranfer to programming.)
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link
or How to display code and escape characters
are good places to start.