Recently, somebody was given a homework assignment with an exercise specification that left much to desire. Yet, they've tried to make the best out of it and managed to write some code that seems to do something related to the specification; even though it is not clear how this code would be useful. They then posted their code together with the specification for review by the community.
The question received two answers so far; one of which I posted myself. The other answer looks more like a code review, although significant parts of it are basically a rant about the poor specification. My own answer is very high-level and barely mentions the code in the question at all and instead clarifies some terminology and recommends further reading on superior algorithms.
To my surprise, the question itself as well as both answers were well received by the community. My own answer currently even scores significantly above the mean score for my answers. I'm positive that both answers were useful for the OP, yet I'm wondering whether we want these posts on this site. Are they generally useful and within the scope of this site?
Should I refrain from answering such questions in the future?
If we don't want these questions, how should they be dealt with? I don't see a close reason that immediately seems appropriate. (I don't actually have VTC privileges on this site.)