While Mystran's desription is excellent, especeially regarding professional programming, it misses some key factors.
First is that most professional programmers have to wear several hats, especially in a small company; it is not uncommon for a programmer to have to cover aspects of systems administration, network administration, quality assurance, hardware maintanence, and even help desk or tech support. Even in larger firms, where jobs are more specialized, knowing the details of these other jobs is often critical. Conversely, many other jobs - system administration, QA testing - require a certain amount of skill at script programming.
Second, amateur and pro bono programming is at least as important as professional programming is. Many programmers, students and veterans alike, contribute to open source projects such as Linux for the good of the community, as well as for recognition from their peers. Also, programmers tend to heavily automate and customize their own computers, which often requires scripting and toolbuilding.
But the most important thig to understand is that programming is not so much a career as a state of mind. It has been rightfully said that a someone can be a programmer without ever having used a computer, just because of their mindset. So, undestanding the psychology of programming is essential.
Larry Wall, the original designer of Perl, is known for saying that the chief virtues of a programmer are laziness, impatience, and hubris. He is quick to note, however, that there are true and false forms of each. For example, he asserts that 'true laziness' is expressed not as an unwillingness to work, but by working hard now to automate away tasks so that you never have to do them again. True impatience is an unwillingness to accept inadequate systems and tools, and the ability to work at fixing those problems rather than giving up on them. True hubris, finally, is the refusal to accept commonly assumed limits of what can and cannot be done, even if it means setting your ego aside to do it.
For more details, see
this quote, which originally appeared in
the Camel book's chapter on Software Design.
For other insights into the peculiar psychology of programming, you might want to look at
The Jargon File and
The Art of Unix Programming. However, you should be awre that ESR is very opinionated (even prejudiced), and you will want to take his pontificating with a some skepticism. If you can find a copy of it, then
The Tao of Programming is also excellent, if rather old, and quite humorous as well if you can get the jokes.
You could also read the archives of the online comic strip
User Friendly.
Finally, the best way to understand programmers is to learn a programming language, read as many programs as you can, and write some programs of you own.
For more specific advice, see the
Advice for novice programmers thread of this very forum. For further resources, see the
Book Thread in the OS forum, though you should be aware that many of the books listed there are specific to the topic of operating systems and low-level hardware programming.