It works for me. I can go to gym religiously 3 days a week, and been doing it for years. Sometimes there's a company online after-hours or something... sorry, can't go , it's my gym day. If you start allowing certain things to stop you from doing what you want, then anything starts becoming a good excuse to not do it. Don't let that happen.
Regarding programming: I can keep up for months but sometimes I run into a problem that is really annoying to fix... I know I can fix it given enough determination, but then I think I am not getting paid for this, so what the heck... which results in me starting a new project and leaving that one aside until I actually need it (which happens every now and then).