in reply to
Hmm, good question.
If the OP really doesn't seem sure of what they are trying to achieve, then I'd rather get a clarification of their goals, as posting unrelated code can, and often does, further confuse matters.
On the other hand, if the OP knows what they want to do, but aren't sure how to start/finish, then that's a whole different thing.
I do like to see some code in a question, not because I'm overly bothered about people trying to get a free ride, but because it helps show where they are coming from.
As is perhaps evidenced by the small amount of actual hard code that I post, I'm quite partial to encouragement of getting people to try it for themselves, although I'm also wary of leading people down the "What do you mean there's a module for it?! I've been trying to get this to work for x hours!" path.
A good approach may be to refer people to a relevant Q&A or catacombed code..?..thing? where the "guess" resides.