Sometimes a person will ask a "How to do X?" question. Then someone comments, "You could use code to implement [general approach Y]." Then the question gets closed as off-topic because they didn't provide a code attempt.
The guidelines for GIS SE make it clear that if you ask for code without making a coding attempt, you won't get an answer. But what about situations where the original poster didn't request code? Even if the best solution would use code, that doesn't make the original question off-topic. Isn't the suggestion to use code a valid answer?
For example, in Calculate viewing angle (2D) between polygons and points, the asker wants to find the locations of the two outermost, points on a polygon that are visible from a given point. After some discussion, another user suggests that this would be best implemented in code. Now this question has 3 close votes. There are some excellent suggestions in the comments, but if the question gets closed then all that work will be lost.
Wouldn't it be better post an answer that recommends a general approach (that could be implemented with code) instead of closing these questions?