I should write a blog post about this, but my answer is: There is no magical fairy dust approach will work and not suck in all cases. My suggested approach is: * separate the logic and I/O * Duplicate the IO, don't duplicate the logic