The code we look at and work with on SO is so "dead". Answerer's can scan it over with their eye's, but it's not natural. Answerer's can copy it into an IDE to bring it to life, but this is not effecient.
OP's should be allowed to updload a method that can be executed within a selectable context (E.G a console app). Give the method a common name so it will hook and execute. Imagine template pattern. If one participates in TopCoder its quite similar. OP's should be allowed to specify their own secure template that can't be seen by answerers. This should be a special case as it requires some knowledge and coding to implement. Second, custom template upload is a special case because people should learn to reduce the problem down to a simple compileable example first. Answerer's should be able to modify the method hook and propose it as a unique solution.
This not only allows answerer's to be more effecient and more natural, but it encourages iterative improvement and works the same way that we normally perform our daily development tasks. A debugger will print error messages.
I'm speaking in terms of .NET, but this could apply to other frameworks/languages.