I love programming, but excessive programming is bad for health/sanity.
So I want to make it my goal to exercise for at least 30 minutes after work. I can't exercise right after work since my commute takes long time, and by the time I am home I am so hungry I could eat a horse.
So if I eat, then I can probably start exercising at around 19:45-20:00
By that time however I am so deep into programming personal projects that I can't pull myself out to do something physical. Even if I somehow manage to do that, my mind is completely absent from the workout and I half ass things.
It is completely impossible for me to exercise in the morning or any other time except 8.
Any suggestions on techniques to motivate oneself to exercise and stop being immensed in another task?
EDIT: just to clarify few things.
I travel to work which is two cities away from me via train. The trip takes around 2 hours, and there is very little room to run since both my home and work are located 5 minute's walk from the train stations. My only workout I can do during travel is try to lean against a wall in sitting position in the train to exercise my legs.
And I can't exercise in the morning for the same reason because i already wake up around 5:30 to get to work.
Additionally I am not obese or in any bad shape now for the time being, but sitting 16+ hours a day can make me. And by absent minded I mean instead of focusing on exercise I am daydreaming about the problem that I am still trying to solve, if I ever manage to pull myself away from computer.