It's been said a bunch of different ways over the decades. That particular way of phrasing it is mine. My grandmother used to say do the right thing, even when no one is watching and no one will ever know it was you.
The hobby bit is from Jon Stewart when he hosted the Daily Show.