I'm not asking why you work as a programmer, but wether you have a passion for the act of programming.
I think of programming the same way an artist thinks of painting or a musician thinks of music, it's not simply a means to an end, or a job, but something inside of you that needs to be expressed.
Sure, you might think I'm nuts (and maybe I am) and that programming should be a straightforward engineering task, full of precise methodology and governed by a strict set of guidelines. Many people lament that programming isn't as advanced as other types of engineering and desperately try to find some way to corral it into a more precise science.
Maybe it should someday, but otherwise I want nothing of the sort. I love to program.
I've been writing programs since I was in high school and learned on a teletype connection to a mainframe somewhere. Basic and Fortran II (which oddly enough was written in Basic). My first solo program was a carnival, pretty simplistic but it worked, and I was hooked. That was 35 years ago I think. My first real programming job came in 1981, so soon that will be 28 years.
Despite all the time and all the changes I still love programming.
I still love the art of debugging, especially figuring out problems with almost no information. People who learned to program in the "early days" learned how to debug with virtually no tools, no unit testing, almost nothing but intuition and trial and eventually experience. One time during the years I worked on Deltagraph, a user called into the support folks and said "All of a sudden, every time I launch the program it crashes". Today most people who think the app needed to be reinstalled or the user had bad hardware of something. I figured out what they meant and fixed the bug in a couple hours with no more information that the one sentence. It was an odd combo of preference settings that weren't handled correctly. It was a puzzle and it was actually fun to fix it.
If you don't find something like that fun you aren't a passionate programmer.
Another thing I love to do is start a new program, cmd-N (or control-N on windows), a blank canvas onto which something that had not previously existed will be poured. Sometimes you have a lot of requirements and specifications and sometimes all you have is an idea. Then over time a program appears and works and does whatever it was supposed to do. That's magical, like creating the universe or something.
Some programs are mundane, some are boring, some are magical and the best of all is doing something no one has ever thought of (Trapeze was one of those). Of course being a programmer means updating existing code as well (I spent 5 years on Deltagraph, oddly enough the app doesn't appear to have substantially changed in the 15 years since).
Even refactoring can be fun. With Deltagraph 1.0, I asked the publisher if they wanted multi documents open at once (was not that common in 1988) and they said no. So I used globals (the code was in C, shoot me) and of course after version 1.0 was released everyone wanted multiple documents open right away. So I spent a day going through the entire codebase and mapping out the use of globals, and the points where multiple documents needed to be hooked in. I was able in just a couple hours or so to determine exactly where and when the globals needed switching and it worked the first time. Man that was a cool feeling. Sadly this code is problem still in the damn code today! Sure using globals today is bad karma, but that was 20 years ago for me!
What I really love is tackling something no one else knows how to do, or maybe no one has ever tried to do. That's the most magical thing of all, figuring out how to write a program to do something totally unique, or even seemingly impossible.
Try putting that on a resume! No one wants to hire you if your best skill is doing something you really have no experience in, everyone wants Weblogic 8.X and you better have 3 years of experience in it or you are a nobody to us.
Oh well, I am beyond getting the usual jobs via the usual methods, since no one hires a 51 years old programmer with up to date skills and 28 years experience being a passionate programmer who still loves to program. I work on iPhone games, do some work for a games company, and hopefully will find some other opportunities by finding contacts in this new industry (for me).
I don't begrudge people hiring younger programmers who have specific skills that are in demand. There are tons of jobs in the IT world where passion is not really a requirement to work. Yet the work of passion is always going to be better than the work of someone who's only in it for the job. Of all the programmers I've met in my life, the ones who really really loved to program, to learn new things, to push the envelope of what's allowed, have always done the best work. Young or old it doesn't matter but the passion, the desire, the need to program is always going to be the people you want to hire.
The whole open source movement is a testament to passionate programmers. Who in their right mind would work for free for long hours and over long periods of time just for the shear joy of programming, of creating something cool or useful or badly needed. You don't do this if it's just a job. You do this because you love to program, love the challenge, love the creation, love the difficulty.
I love to program, and if I ever lose that love, I will no longer be a programmer.
It will be a sad day.