Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
These two seem the same to me: they don't describe what they've done or the problem well. I seem to use them interchangeably, depending on what the other people think. I think they're definitely both valid, so what is the difference?