If the user that posted the question deletes the code to which the question belongs to, after accepting an answer, should one restore the code or simply notify the user or moderator?

share
    
Did this actually happen? –  Winston Ewert Nov 13 '12 at 0:02
    
Yes, see codereview.stackexchange.com/questions/18502/… –  user555 Nov 13 '12 at 0:05

2 Answers 2

up vote 3 down vote accepted

If the user has decided they don't want the code listed on the site, I think we need to delete the question. Asking for code review on code you don't want people to see is well silly, but it happens somehow. In this case, the user asked for the question to be removed so I did. I think we have to respect the poster's desire not show their code.

So: You should flag questions which have code removed, and the mods should delete them.

share
10  
Is this really the best way to go? Anyone who has posted an answer that got accepted is going to lose reputation points if you delete the question. Also if the poster didn't want their code to be here he/she shouldn't have posted the code/question at all. –  user555 Nov 13 '12 at 1:14
4  
@user555, admittedly its not great. The user should never have posted the question, but it's too late for that. The only solution I see is to delete the question. –  Winston Ewert Nov 13 '12 at 4:09
13  
Posts on all SE sites are licensed CC BY-SA. I don't believe we are under any obligation to remove code just because the original author doesn't want it to be here anymore. –  Matt Nov 14 '12 at 15:00
5  
@Matt We don't have obligation to do that, but we should also be nice to people. And if someone says that they made a mistake by posting their code (because it's confidential, or something like that), I think it wouldn't be nice to insist on keeping that code. –  svick Nov 15 '12 at 7:38
2  
I think the reason for wanting it to be deleted should be taken into account, but unfortunately people can lie. –  crdx Nov 16 '12 at 19:29
    
If the question is well-received by the community, has merit, and contains no sensitive information (including such code), the OP can still request disassociation from the question. Otherwise, the CC license remains in effect here. –  Jamal Jan 6 at 20:11

Deleting code from a question after it received answers is certainly not acceptable behavior. If the code in question was sensitive or something like that, the poster can delete the whole question.

Code Review is different from other SE sites in that pretty much every “question” here is “too localized”: it's not likely that someone else will have exactly the same question. But that doesn't mean we should make our answered questions even less useful for others.

I think restoring the code is the right way to go here, so I did just that. If something like that happens in the future again, feel free to restore the code yourself. And since you don't have the reputation required for non-reviewed editing, your edit will be reviewed by someone else anyway.

share

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .