A fun project with a clear goal is a helpful start, but you probably also need to get a few wins under your belt.
With a job where you're just propping up a rotting old codebase, programming probably just feels like crap after crap. Start a project where you can have something cool happen after just a couple of hours of coding.
The feeling of things actually progressing gives a lot of drive to continue. I guess thats the reasoning behind setting small, achievable milestones.
Go code up something fun & immediately gratifying :)