5
\$\begingroup\$

In particular, X that I'm thinking about in particular is the Quick Sort algorithm.

There are currently 9 questions tagged in 4 different languages: 1 in lisp, 4 in C++, 1 in C and 3 in Java. There are 5 others found in a search that are not tagged .

A lot of the questions have more than just the sorting code in their question so maybe they deserve to stay. But I'm tempted to close some as duplicates for another since they asked about their implementation when really one of the other reviews on the duplicates could be applied. Though we're not reviewing their code, we have already reviewed code exactly like it.

What should we do about these questions? Should we start closing them as duplicates when there isn't anything substantially different about the code? Should we leave them be?

\$\endgroup\$
6
\$\begingroup\$

Firstly, do the same issues with the code exist between the various quick-sort implementations? There are a few issues which do show up repeatedly, for example:

  1. Not refactoring the swap logic into a function
  2. (C++) failing to use std::swap
  3. Failing to use the programming language stack

But at the same time, each implementation has it own set of distinct issues. And the same underlying issues show up in pretty much any question. This just happens to be the way they show up in quick-sort.

Secondly, while there are a number of quicksort implementations the styles are all fairly different. I don't see that they are similar enough that we could say that the code is "exactly" like it.

Thirdly, I'm not sure what purpose would be served by closing questions as duplicates. If our goal is to help people improve their code, (Code Review: Leading the fight on bad code), then closing the question as a duplicate and pointing them to someone else's code that was reviewed doesn't seem really helpful to me.

Altogether, I don't see that questions are really similar enough to be duplicates. Yes, there are common issues but that's true for every question on this site. It also seems to be that it isn't really helpful to close questions as duplicates. So I think we shouldn't close questions as duplicate unless say the exact same code is posted twice.

\$\endgroup\$

You must log in to answer this question.

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