I want that too - motivation to answer programming-related questions. What is yours?
1) There's a certain rush when someone puts you on the spot and everyone else is going to see your answer.
2) It's like a mini project with a sense of completion for only a couple of minutes work.
3) I end up learning a lot just by trying to answer in a way that's clear to someone other than me.
Maybe the strong programmer's vices that I tend to see something and I go "Wait! I could solve that!!!"
And proceed to waste about 10 minutes to hours to craft out a perfect solution (in my own eyes, anyway) and relieving the programmer's pride.
(Confidence level: +10)
... Probably the fuzzy feelings like helping others come later that we could rationalize off to other people to hide the real fact.
(... and yes, earning reps and badges are fun, sort of like toys inside packets of junk food meant to lure impulsive kids :p)
I enjoy helping other people learn something new or solve a problem. For quite awhile I was thinking about getting my PhD and becoming a teacher for this reason. Turns out that I like actually writing software too much to give it up. SO is one avenue to fulfill that original desire of mine to teach. Blogging, which I've only recently taken up -- partly due to enjoying SO so much -- is another way. This way I have the best of both worlds -- and I don't have to write a dissertation!
Definitely the reputation.
What I have found that I do is answer a question as quickly as possible, trying to be the first person to answer. Then, I'll go back and edit it with a better example or more details, hoping to continue to get voted up.
I've found that it takes a lot of effort (for me) to gain a decent amount of reputation points. To get where I am I spent like two days with Stack Overflow open all day on one monitor constantly monitoring new questions and trying to jump in. That's just way to exhausting and time consuming to do on a regular basis though.
I like to write, and I believe it gives me much easier and cheaper motivation to write than my Blog does. The topics are generated for me, and I feel much less need to justify my writing - I already have a waiting consumer.
It also feeds directly into new blog topics from time to time.
Coming here, you learn a lot from other programmers. Of course, nothing is built on SO without the users, so what's the harm in answering a question while you're visiting? I usually get that "Oh! I know the answer to his problem!" feeling, and I know that by submitting my answer, I add onto the circle of life that exists between all programmers on the site sharing knowledge.
I answer and ask because I like to learn, I like logic, I like to solve things, I like to know the best way to do things, I like to do things...
My knowledge increases each time I answer or ask questions. It is like putting points on knowledge.
And I know I can trust this community by their reputation and by the votes cast. If I am uncertain of something I wait until people cast votes telling me: "yes, this is right, go for it" or "no, this is wrong, go the other way". And there are a lot of experts living here.
The idea discussed on the latest podcast is really great, to have a lifetime reputation. Because that is what best describes what I really know.
My main goal is to learn and in second place is the reputation. Reputation can show others how much you answered, asked and the quality of your answers and questions. And it shows other things as well. If you are from a contry where the main language is not english you already have "oh look, he speaks spanish but he has high rep on SO, his english might be pretty good".
Reputation will probably help me to find a great job someday. I am centain of this because: "IT IS OVER NINE THOUSAND!!!!!"
And of course, the magic unicorn power overflowing from this website motivates me.