Warm up with refactoring
In the post about warming up for coding I forgot to mention one other way to warm up that works for me, which I think is somewhat popular too: picking up some old code to refactor.
There are some aspects to refactoring that make it work as a good warm-up:
- You know what the code is supposed to do, so you don't need to be creative (as in creating something out of thin air).
- You have working code that you can use to check that what you change does not have any unintended effects, so you don't need to care too much about being wrong (and you can add tests to make sure you are not, which is another good warm-up itself).
- You have a chance to try out new language features and new architectural decisions.
In summary, it's a focused effort that you can take in self-contained steps, that makes you feel better and gives you something useful too. Good before starting something more taxing.