This question picked up two answers before it was closed as stub-code. Now, the OP added the missing snippets without removing a single line, and the answers are likely still valid as they only covered the structure of the code, which was unchanged. Why was this edit rolled back as invalidating the answers when it didn't invalidate any answers, and it made an off-topic question on-topic?
I believe that the code added in Rev 5 should be kept, and the question reopened, because:
- Rev 5 doesn't invalidate any existing answers.
- That revision just added code, and didn't really modify existing code. (If the added code were in a separate block rather than interspersed, I doubt that we would even need to have this discussion.)
- The users who answered took the risk when they gave their advice despite having incomplete information.
- Making the original poster ask another question with identical intent is just pointless red tape.
I rolled it back, since I handle the following principles.
If a question has answers, you don't edit the code. If a question is off-topic, we close it.
This gets tricky if an off-topic question can only be made on-topic by changing the code, since the moment a question gets answers there's a catch 22 situation.
In my opinion, off-topic questions should not be answered.
If the general consensus is that this specific edit should not have been reverted, let's hear it.