"The best programs are the ones written when the programmer is supposed to be working on something else." - Melinda Varian.
This is missing one important variable -- the age of the project. Sure, if I have to fix a bug at work, in some crufty old software, that I probably didn't write, that's a lot less appealing than writing brand new, clean, perfect code on my own project.
On the other hand, if my new project gets to be a few years old, and develops some cruft of its own, and I have to fix a bug in it, that might look a lot less appealing than a brand new work project, in which I am writing new, clean, perfect code.
This is missing one important variable -- the age of the project. Sure, if I have to fix a bug at work, in some crufty old software, that I probably didn't write, that's a lot less appealing than writing brand new, clean, perfect code on my own project.
On the other hand, if my new project gets to be a few years old, and develops some cruft of its own, and I have to fix a bug in it, that might look a lot less appealing than a brand new work project, in which I am writing new, clean, perfect code.