My program was crashing and I eventually came up with a theory about what I was doing wrong. Based on that theory, I made a change and now my program works. However, I want to be sure that my understanding is correct. I thought about asking a question along the lines of "Here's my code. It wasn't working and I think the reason is X. Am I right?"
Is this type of question appropriate? After all, if I am right, what could a responder do other than say, "Yes, you're right"?
Would it be better to post my original problem without my solution and then answer my own question (people can comment if my answer is wrong)?