I've never contributed anything to SO, but this is one of the most valuable answers they could give.
Worst case, the people helping you can better understand the context around what you're trying to accomplish. Best case they recognize that there's a much easier way to do what you're trying to do, when you're too busy bashing your head against the wall on the particular implementation that you chose.
So often when people get stuck, it's because they were shaving a Great Brown yak.
But the Great Brown Yak can only be shaved with a razor from Bhutan. So they go to get the Bhutaneese razor but first they need to prove their worth by climbing the nearby mountain.
In order to climb that mountain they need the best climbing gear in the world, which is only available from a small shop in Honduras.
To get to Honduras from Bhutan they need their passport, but they lost the page with their photo on it.
Since they can't get back to their home country they need to get a passport photo some other way.
So they go to Stack Overflow and beg for someone to help them forge a passport photo.
SO asks what they're trying to accomplish, and they mention they need some Yak fur, and it needs to be brown.
SO suggests that they shave the Minor Brown Yak which can be shaved with an off the shelf Gillette but produces indistinguishable brown Yak fur, and could be done in five minutes.
A better way to respond would be: “Here is how to do precisely what you’re asking, but there may be a better way if you more clearly stated your end goal.”
Maybe the real issue is finding yak fur, or maybe its a razor, or maybe its climbing gear, or maybe its the passport. Or maybe the yak fur turns out to also just be a way to solve an even realer problem?