Others have already mentioned having a minimal, compete, verifiable example (MVCE), but I wanted to expand on the general philosophy behind it in a way that hopefully helps the non-code portions of your questions as well. There are really two guiding principles here:
Ain't nobody got time for that.
You're busy, we're busy, everybody is busy. The quicker the question can be read and the problem understood, the more likely it will get answers. In my case, I’m answering questions while I’m at work trying to find an answer to something related on a problem that’s taken up too damn much of my time already. I’m happy to apply the knowledge I’m gaining to help out someone in the same boat, but if I can’t figure out what’s going on in 5 seconds or so, I pass.
Similarly, most people answer questions that are easy (for them, at the time,) because our lives are already full of hard programming problems. Use what you’ve learned so far to make it an easy problem for someone. This also serves two more purposes:
It forces you to exercise your reasoning skills, which will actually make you a better developer. I’ve often answered my own question before I finished typing it simply by reducing the problem further as I go.
It’s an opportunity to showcase that you’ve done your homework. Clearly explaining what happens and what hasn’t worked shows you’re not just punting. There’s “I’m still learning” dumb (which we have all been at some point), and there’s lazy dumb. People really do ask questions that are answered by the first sentence of the entry in the docs, which makes SO users get a little downvote happy.
Aim for the highest value and greatest good.
It’s hard to get across for some reason, but treat this more like Wikipedia than a forum. A high-value question is arguably more important than the answer. Your question has a high value when others with the same problem find it first, and people can quickly assess if it’s what they’re looking for. Imagine you’re googling the problem for the first time, what would the perfect question look like?
Keep on doing your best and trying to improve (great job asking!) Remember, the bar seems high because you’re writing the anchor to an entry in the biggest, most important FAQ in the programming world. You’re officially a contributor, and your role is important!
this
, although some people don't like too many of them.