I've found that a short (20 minute) commute can help a lot with this.
I'm actually serious -- the commute is like a palate cleanser between work and home. It helps even more when I ride a motorcycle, as the concentration on my safety totally wipes the coding from my brain, and I walk in the house with a clean slate.
Yeah I've seen some people that work from home mention this - the ritual or transition of going from work to home is something they miss. To a degree of course, I mean 20 minutes isn't too bad, for me it's often more than an hour which is a bit much.
I'm actually serious -- the commute is like a palate cleanser between work and home. It helps even more when I ride a motorcycle, as the concentration on my safety totally wipes the coding from my brain, and I walk in the house with a clean slate.