Should questions be split up into separate sections (Background, Problem, Question, etc), using headers or bold lines? Does it help with readability, or does it make it more of a chore to read the whole thing? I came across this issue while trying to improve my questions after a question ban.
When I take the time to do something like that, I put a short version at the top: just the question. Then background and supporting data farther down.
That way readers can determine if they might be interested without a large investment of time or brainpower but all the details are available if they are willing to invest some time in helping me.
This is a writing decision and it should be driven by your audience and by the context in which they will be reading the question. You want to make it easy for potential respondents, because you are asking them to give you something for no return beyond some quite worthless internet points.
Here's my thought after reading both your questions: why not ask one section at a time?
My reasoning is that any serious programming effort is going to involve a number of individual challenges, and each one is a step toward completing your goal. Why not track those steps one at a time?
Besides, StackOverflow isn't about getting the community to do a lot of work for you, it's about getting help when you're stuck. A good question on SO will do the following:
- Offer an interesting challenge to experienced coders
- Provide a snippet of the code you've already tried
- Conclude with a clear question mark: the one question you really need answered
To me, one question shouldn't really have multiple sections. If your issue is complex enough that there are multiple interesting, challenging question points, and if there's a significant amount of code you've already contributed toward each section, then you should ask multiple questions instead.