Post Made Community Wiki by Alan Barber
source | link

For keeping my attention up I use doodles. I always have a pen and a notepad lying behind my keyboard and doodle away. It isn't more then scrabbling on a piece of paper without any meaning but it keeps my attention up just enough and doesn't get me distracted so I can snap right back to what I was working on.

I've done this all my life unconsciously but recently found a wiki about it: