How do you get to the point where you get a feeling of satisfaction just from writing good code? I don't want to have the finished product of my code my only way to satisfaction and happiness.
Well, if my code doesn't accomplish anything, yeah, I feel bored. I had a similar problem (still sometimes do), and I think what helped me the most was to do two things:
1) Rapidly prototype. If I'm making something new to me, and I'm not sure how it'll turn out (in terms of if it's even a good idea or not), I like to rapidly prototype it and quickly hack together a working, super simple demo that just shows the idea. This is nice because in a short amount of time, I can create something that actually does something, and I can play around with my idea and see what worked, what didn't, and what unexpected road bumps I hit while programming it. The key is remembering it's a prototype, not the real product, so I don't spend time making it pretty or adding the extra bells and whistles.
2) Break the (big) problem into smaller problems. Once I feel like I've got a good direction (after playing with my quick prototype), I essentially throw it away and start from scratch. The point of the prototype wasn't to serve as a starting code base; it was to serve as a solid foundation to build my ideas off of. I know a bit better what made the prototype fun/good/useful, and I can focus on the key elements (and go back and add the extra fluff another time) and how to design and set up the architecture for my actual program. But the big program by itself is huge, and could take years (of spare time work), so it's critical to break it down into several smaller problems that can be worked on. That way, I don't feel like I'm just endlessly writing code to no avail, but I can actually see my progress as I complete each sub-problem and (over time) see the solved sub-problems coming together to eventually form the whole program.
I guess what I'm really saying is that I love programming because I love problem solving and making cool things. If I just wrote code that never did/accomplished anything... I think I'd hate my job. So I had to learn to quickly prototype (to make a proof of concept that says "Yeah, this cool idea is indeed actually cool, and I can do it"), and then properly designing (this is the hard part for me, and I'm still getting better at it) the architecture of the big, real program and then decomposing it into lots of sub-problems that I can work on. I can see progress and results as I solve each sub-problem.
If you like programming, but not the process... maybe you should change your process?