Well, this thread is starting out depressing, isn’t it.
I would like to know more about why you question your desire to do programming.
As people above have pointed out, some source of motivation could be to tend to your own little “side projects”. But to be honest, that’s not always doing it for me. Often, I don’t want to see any code and rather start a movie or watch a stupid youtube video…
I’m very lazy, so much so that even if I know I’d like to do something (like coding), I don’t want to bring up the mental effort to get started on it. So I lean back and let myself be stupified by something meaningless. It’s procrastination squared.
However, one thing I found that can pull me out of such moods is watching not some pointless bullshit, but instead an entertaining video on programming, or about a new programming technique or framework. Even if I don’t want to do anything with it any time soon, it helps just hearing somebody talk about this stuff.
Check out this guy: https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q
He’s this weird Swedish programmer who speaks in this funny accent (even for Swedish people) and talks about various programming patterns and his own musings about the industry sometimes.
Or talks from people about javascript or related stuff (there are new ones almost daily, because there are dozens of conferences going on at any given time).
So that kind of stuff helps me smoothly transition from my “Meh, don’t wanna.” moments, into a somewhat more energized state of mind in which I am then much more likely to open an editor and punch in some lines of code.
To answer your question more succinctly:
I try to immerse myself in the programming industry, watch videos, read articles or newsletters (subscribe to everything you can get your hands on), so that I am surrounded by programming stuff, no matter how much over my head a lot of it might be.
That way you don’t fall completely out of it and are more likely to be carried along and learning a few things even when you’re not much in the mood.