It definitely depends on the type of down time I have, and the moment of the day.
Let's qualify the types of down time first:
- Known Duration vs Unknown Duration
- Short (minutes) vs Long (hours)
A Long Known shortage of work allows: Learning, Tooling and Refactoring.
- Learning: self-education either by books or on the Internet, at work I consider it fair to do anything related to your field, but I strongly suggest avoiding hobbies.
- Tooling: there's always some script begging to be polished or be written.
- Refactoring: how many FIXME or TODO do you have in your code :) ?
And then the moment of the day:
- Goodbye Time (evening)
- Meeting Time (a meeting is looming ahead)
- Pause Time (mid-period, lunch time)
- Work Time (you just resumed work)
A Short shortage of work allows a pause: if Goodbye Time or Pause Time, then just quit early; if Meeting Time, prepare it a bit more; if Work Time, well just idle quietly (SO is quite nice during compilations* ...).
And then there is the dreaded Unknown Long shortage. You feel like it will be long, but you know that as soon as it ends (you finally get the response you needed) then you'll need to resume working asap, no dallying or finishing up what you had begun.
For those you need to do some work that can be interrupted without notice:
- work that does not require much time to get into (else you'll lose it)
- work that can wait and won't erode OR that can be stopped and commited as is in a matter of minutes
It's perhaps time for some comment cleanup, or for commenting some code that deserve it, looking up for those logging messages that are subpar, etc...
Personnally, I keep a little TODO file around in which I note things I will want to get done in the future, both important things and inconsequential things. In a time of shortage, I dig into it and try to find a task suitable. It works pretty well for me :)
* compilations: I am working in C++ :p