6
\$\begingroup\$

The question Does this method guarantee that cells in a CSV will be correctly partitioned? is a duplicate of this one (10k+ and mods only) which asks whether a singular function properly 'escapes' bits of text from a CSV when handed to the function.

My personal opinion is that it does not meet the criterion to stand on its own, namely that the following close reason would apply:

Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site. I merely provided the question as contextual reference as it's the catalyst that prompted my posting this question about the close reason.

The code is placed, and the user says "This is the proper output: [examples]" but there is no other context for the question - not context of usage beyond "This function does [purpose]'". It also explicitly asks "Does this method guarantee that the cells in a CSV will be properly formatted and data values properly processed" (my interpretation), which falls into the "generic best practices" category of this close reason as well.

To clarify my understanding of the close reasons, and my interpretations, is my interpretation valid? Or is the scope of what that close reason broad enough that it needs refined because of cases like this?

If my interpretations are not valid, then please explain why so I can alter my interpretations in the future.


To be clear: I am not questioning the validity of the question that was posted already. I'm questioning the scope and therefore my interpretation of the close reason of "Lacks Concrete Context", and at what point a question drifts into "generic best practices".

I see context for the original question post, namely that it's trying to scrub CSVs of invalid contents so that the CSV structure is properly kept. But whether or not this is scrubbing in a valid way, in my opinion, drifts into "generic best practices" rather than a concrete-context question. This is solely based on the interpretation of the close vote.

Therefore, the focus of this Meta post is the clarification on the close reason's scope and at what point any given question drifts into the "generic best practices" category, not whether the question I linked to is inherently on or off topic.

\$\endgroup\$
  • \$\begingroup\$ This is my question. I don't want to be rude but I have a very hard time understanding how it lacks context. csv's can take this form, right? "this","is"\r\n"a","csv". In my case the text in each cell is dynamic and I am trying to make sure that it doesn't break the csv format that I am going with . That is, var foo=' "csv" '; "this","is"\r\n"a",foo should not be able to break out of its cell. This is a concrete implementation of a method that requires more thought than usual. I'm not really interested in discussing my question bureaucratically like this but I felt I should say something. \$\endgroup\$ – user875234 Aug 9 '18 at 18:45
  • 3
    \$\begingroup\$ @user875234 I think Malachi made a failure, I'm not questioning the validity of your question per se, I'm questioning my interpretation of the close reasons available on the site after Malachi asked me for clarification on why I claimed your first, now deleted, question was seen as "lacks context" by me. That is, I'm looking for community guidance with regards to the close reason and at what point code becomes "generic best practices" or "stub code" or "code without sufficient context to understand how it's used" - your question just happened to be the catalyst for this question to be posted \$\endgroup\$ – Thomas Ward Aug 9 '18 at 18:49
  • \$\begingroup\$ I apologize, I should have made that clear \$\endgroup\$ – Malachi Aug 9 '18 at 18:54
  • 1
    \$\begingroup\$ What surprises me is how many down and close votes that question got before someone finally asked the OP for more context. That seems rather unfriendly to me. Or was that already attempted with the OP's first (closed) question? \$\endgroup\$ – Pieter Witvoet Aug 10 '18 at 11:15
  • 2
    \$\begingroup\$ @PieterWitvoet To fill in the blank. Thomas and another user commented to that effect on the first question. I have also seen what you describe on a lot of questions, which doesn't seem too friendly. \$\endgroup\$ – Peilonrayz Aug 10 '18 at 11:29
  • \$\begingroup\$ Related: --> How much context is the required minimum? \$\endgroup\$ – Malachi Aug 14 '18 at 14:12
1
\$\begingroup\$

My opinion on the close reason, is that the code must work, it must be real code, and there must be enough context to understand what the code does.

The Question in Question has all of these and even has another aspect I failed to mention which is required in some fashion: a way to run the code.

This can be demonstrated several ways

  • an example
  • input/output
  • method parameters (This can be somewhat of a gray area)

The Close Reason brings up 5 distinct things that make the question off-topic, of which I don't believe that this question falls into, let me elaborate

  • Psuedocode is not runnable.
  • Stub code has pieces of the real code missing.
  • Hypothetical code is not real code.
  • obfuscated code is also not real code.

The code that the OP has posted is real, complete, running code that is clear about what it is doing

While I don't think that this question fits into the General Practice clause of this close reason, I do note that the question posed is broader than the code provided and asks about functionality of a third party application.


That being said, I think that we can still give a review of the code that is presented to prevent certain characters from being entered into cells in a specific way.


The Last Piece of the puzzle

Context.

This seems to be where most of our contention is when closing questions, we need the Context thing nailed down a bit more.

My thoughts are that if there is enough, for someone who knows the language and the libraries that are being used, to understand what the OP is trying to accomplish and the post fits all the other on-topic reasons, then let's review it.

\$\endgroup\$
  • \$\begingroup\$ How very strange, +3/-2 on both our answers. I don't even know what we've done wrong. \$\endgroup\$ – Peilonrayz Aug 11 '18 at 21:08
  • 1
    \$\begingroup\$ @Peilonrayz it would be nice for some comments about what is wrong with our answers, or what the downvoters disagree on. \$\endgroup\$ – Malachi Aug 13 '18 at 13:42

You must log in to answer this question.

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