I tend to code projects that have absolutely no connection whatsoever to what I do at work: that way I can enjoy the challenge and feel proud of the result (if it works!).
One thing to bear in mind though - in my situation, working for a large multinational, there's a clause in my contract that says that my employer owns all intellectual property rights to anything I write/devise, even it's done on my own equipment and time. So occasionally there's some crossover and I write something for me that would be useful for them. I then offer it as a working proof-of-concept and they're welcome to use it. However, in general, they choose not to, and I'm often left wondering whether they'd pursue me legally if I just said F*k it and published it anyway.
One thing to bear in mind though - in my situation, working for a large multinational, there's a clause in my contract that says that my employer owns all intellectual property rights to anything I write/devise, even it's done on my own equipment and time. So occasionally there's some crossover and I write something for me that would be useful for them. I then offer it as a working proof-of-concept and they're welcome to use it. However, in general, they choose not to, and I'm often left wondering whether they'd pursue me legally if I just said F*k it and published it anyway.