I've noticed that a lot of homework questions asked about on Stack Overflow, particularly in the Python tag, task students with "drawing" some sort of "shape" or pattern at the command line by outputting asterisks, digits or other such symbols according to a mathematical rule.
Now, I want to stress: these questions are almost universally bad, and most are in some way irredeemable - that is to say, there's no chance of getting OP to provide whatever would be needed to fix the question, because an OP with that much of a clue wouldn't have had a problem with the assignment in the first place. Some are just debugging questions - and sometimes the problem falls into a common pattern, other times it's idiosyncratic. Probably a lot more, though, are how-tos where OP is just generally stuck, and lacks the ability to decompose the problem, figure out individual steps and implement them. Furthermore, many of them are incorrectly tagged design-patterns which I'm sure is annoying a few people.
However, there are a lot of useful things that can be said about these questions in general. Having a canonical would mean questions can be closed more quickly to avoid FGITW1, and ensure a bunch of these beginners don't walk away empty-handed. I imagine a question that includes a few example requests and then asks "how do I approach tasks like this?", and answers that make reference to other existing canonicals (e.g. to explain string multiplication, doing multiple prints on the same line) and describe some logical analysis (stuff like "if you want to right-align X symbols within Y columns, conceptually this means putting Y-X spaces before the symbols").
My fear is that any obvious attempt at this would swiftly be closed as NMF, downvoted, and delete-voted. Some people don't seem to like artificial canonicals for "easy" questions at all, but aside from that it would be hard to refute the NMF argument anyway.
Is there any way to make this work? Perhaps as several questions? If anyone here has specific experience teaching beginners in a classroom environment, perhaps you can offer more specific suggestions?
1 Yes, I know that closing as a duplicate prevents the 9-day Roomba rule from kicking in. However, an accepted or upvoted answer does that too, and also blocks the 30-day and 365-day rules. It's hard to get three people to coordinate and click through the closure interface before any of several single actors clicks Submit, and it's impossible to prevent OP from accepting an answer that "helped" even if it didn't answer a question. Aside from that, if a question is closed and not deleted, however terribly asked it is, I only see a reason to care if it's messing with search results or allowing bad ideas (like, say, gratuitous use of eval
) to spread.
print
will skip to the next line by default, so we should start by thinking about what text needs to appear on the first line, then the second etc; then look for a pattern in that; then think of a way to express that as a mathematical rule". Something like that.