I'm always surprised when I meet programmers who don't enjoy what they're doing. Don't misunderstand me - I realize that software development is not everyone's passion. Still stunned every time. For the life of me, I can't imagine doing anything else. For me, writing software is a great delight in more ways than one.
I always liked building stuff. The process of going from nothing to something is amazing. One of the earliest memories of my childhood is me playing with little red bricks, building castles. Later, of course, there was LEGO... It was always more interesting to create something of my own than to use the provided instructions. There were never enough pieces though. Previous creation had to be destroyed, so a new one could have the resources to be built. Sometimes, it was really hard. But even the greatest wonders didn't stand long. Sure, they lasted longer than others, but demolition was only delayed, never forsworn. Process of creating was more important than the results.
Just making stuff is one of the greatest joys I get from programming. Sadly, it's the one that I tend to find at work the least. Problem solving, fixing and changing are more usual than being a real maker. These days, I tend to get this visceral joy more often when I'm involved in open source or writing small programs for my own purposes.
I have vivid memories of my first week on my first job. Not a lot of time was given to get my feet wet. Almost immediately, I was asked to create something that would go straight to production. And it certainly did. And after that, a couple minutes later, someone was already using it. I felt pure joy from knowing that something I created was being utilised by someone. All previous software creations, at best, were only showed to several other people. That day it changed. I created something evidently valuable and it felt great.
Not a lot of other undertakings can offer an opportunity to touch lives of hundreds, thousands, or even millions of people every day. Even if it's mostly in a very minor way. Sometimes we get too bogged in the code, and forget to celebrate what we create. We shouldn't.
Every developer had this day. You've been hitting your head against the wall for hours. This thing that should work is just not working. And you can't figure out why. You start to think that you'll never figure it out. And then... You solve it. To describe that with an expression from Portal 2 - solution euphoria.
Figuring stuff out is great. And I even learned to enjoy head-against-the-wall-banging problems too. Partly, because I became better, more methodical at solving them. But more importantly, I know that, despite the initial insurmountably, I'll get to the finish line and become better for it. I jump in head first and enjoy the hell out of the process too, not just out of the result.
And that's just the main three that jumped to my mind. There are certainly more. I would love to hear why you enjoy programming in the comments.