When, I feel like I am in an endless cycle of fixing bugs and working on the same projects or similar projects. When I feel like I am on the treadmill of programming, I do three things: pause, remember, and focus on the future.
Pause my analytical brain:
I just pause, take a breath, and smile. You should try it. It all works together to create a grateful attitude.
Remember my first:
I remember when I when I wrote my first lines of basic on my Timex Sinclair, and later on my Commodore 64. Then obsessing over Unix, and other programming languages and idioms. I think about my first job. The excitement of that first day. My excitement the first day in my current position. In my head, I combine all of those good feelings. For me, those are wonderful feelings. Maybe remembering your first job, computer, or huge ass monitor and touching on those emotions will help lift you out of the rut.
Focus on the future:
I look at the new advances in our field. I take a short-term look at what I have accomplished and a long-term look at the future. If no new projects exist on the horizon. I imagine useful changes. I patiently listen to user suggestions without filters and think about what it would be like to implement their wildest ideas.
Many times, just pausing and remembering is all I need to do to get out of the rut. Focusing on the future is always a good thing, listening to users is a good thing. Implementing their wildest idea, maybe run that by the Product Manager.