14
\$\begingroup\$

This question was asked a couple of weeks ago, and has not been answered in that time. It has languised: https://codereview.stackexchange.com/questions/79233/edmonds-karp-algorithm-for-maximum-flow-in-java

In the interim, the question asker has updated their code substantially, and posted the revised code here: Bidirectional Edmonds-Karp algorithm in Java

It makes little/no sense to review the first version of the code, so, I have temporarily closed it as a duplicate of the follow-on.

Note that the second question should be edited, perhaps, to include some code from the first....

Is that the right thing to have done?

Other options (listing them even if they are not necessarily good options) are:

  • edit the original question, and revise the code to be the latest version
  • delete the original entirely
  • post the code in the second question as an answer to the first

Thoughts?

\$\endgroup\$
  • \$\begingroup\$ We cannot delete the original entirely unless the unchanged code is removed from question 1 into question 2 as the OP did not cross-post it. \$\endgroup\$ – Hosch250 Feb 18 '15 at 5:59
  • 1
    \$\begingroup\$ @Hosch250 Why not? If the code from question 1 is required to answer question 2, then question 2 should be closed as unclear. Questions should all stand on their own independent of any outside sources. \$\endgroup\$ – nhgrif Feb 28 '15 at 0:35
  • \$\begingroup\$ @nhgrif It isn't unclear as it stands, it just doesn't have all the code in the original question that a review was requested on. \$\endgroup\$ – Hosch250 Feb 28 '15 at 0:42
10
\$\begingroup\$

Yes, I believe this was the right thing to do.

The entire point of posting a follow-up is to incorporate reviews from others without junking-up the original question. Even if you find improvements yourself, you can always add to the existing question (edit or self-answer). A follow-up may be okay if it's a different implementation, however, that would technically no longer resemble a follow-up.

In future cases, you can always close as a duplicate first and help the OP go from there. If the original question does get edited, then the duplicate can be deleted. Otherwise, if the duplicate can be edited into something different, then it can be reopened.

\$\endgroup\$
5
\$\begingroup\$

Closing as a duplicate is an option; however, the questions technically are not duplicates, and the OP could learn a lot from the different reviews their questions would get.

This reminds me a little of my meta question about self-answering. Because there were no answers to be invalidated, I would suggest the OP be advised to merge the new question into the old question, but remind them that this is only acceptable because there are no answers on the question.

\$\endgroup\$
3
\$\begingroup\$

I think the question asker's most appropriate course of action would be to post his revised code as a self-answer, and then open up the new question with the revised code.

Another acceptable course of action might be to completely edit the original question to not include the old code and just show the current revision of the code.


Many of the rules defining what is and is not on topic on code review point toward ensuring that the person asking for the review has some vested, personal interest in having the code reviewed.

While it is possible that when originally asked the first question met this criteria, it's hard to believe that the original question continues to meet these criteria after the original asker has heavily revised the code himself and posted the new code in a new question seeking further improvements.

If this were a project in source control, which version of the code would we be reviewing? The head revision? Or some random revision from yesterday? What would be the point in reviewing a version of the code that's already been revised?

\$\endgroup\$

You must log in to answer this question.

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