The trick is to never stop procrastinating. I'll get to that code after I read a few articles... 1.5 articles in and I'm getting bored again, I'll finish these after I write a little code... repeat.
And at the end I'm still as tired as if I worked 100% focused on something, I try to avoid this as much as possible.