Is it appropriate to post as a question something along the lines of, "I wrote this really cool thing. Can you work out what it does?" (and post the code).
My reason to think yes is, it still spreads knowledge - it serves the interests of answerers and readers.
Stack Overflow does allow answering your own question, i.e. asking questions you know the answer to.
How to handle "Explain how this ${code dump} works" questions deals with 'code dump' questions in general, but I am of course referring to posting a minimal snippet with no unneccessary details.