I apologize for giving the negative definition (under What This Post Is Not) before the positive (under What This Post Is). I do so in order to clarify that this is not a simple reiteration of some prior posts (like those here and here) on this topic, which might sound similar and which have been unfavorably received. Feel free to skip to the positive definition.
What This Post Is Not
This post is not about established rules, per se, but rather about etiquette and best practices, toward creating informative answers. This post is not the fruit of cursory research; I have been seeking a normative answer for over an hour.
I am not complaining about strategies used by others to effectively accrue reputation. Neither am I fishing for viably competitive strategies when "racing" against established users to answer a fresh question.
If this precise topic does indeed have an accepted answer, or if it is covered via the guidelines, please know that I made an honest but unsuccessful effort to find it. Thank you for your patience.
What This Post Is
My Existing Process
Feel free to skip this.
As a new user of Stack Overflow, who wishes to productively contribute, I often skim the "Newest" feed of coding questions, within the scope of my particular domain knowledge. My goal is to help where I can, with clear and thorough answers, and in the process accrue enough reputation to exchange illuminating comments and to (eventually) place bounties on questions of particular importance to my job as a (junior) developer.
As a rule, I try to make reproducible and self-contained (ie. omitting no dependencies) the code in my answers. I also document my code granularly, to guide the poster in understanding my process, and I furnish links to external documentation. Where applicable, I include my sample output. Above all, I test my code before posting it as an answer, to ensure that it works (as portably as possible) the first time the user might implement it.
Also as a rule, I edit my answers for three reasons:
- To improve readability (by disambiguating my wording; fixing grammar; polishing the formatting; etc.).
- To correct a functional error in my code.
- To append an Update which introduces a superior approach by either (a) overhauling my own approach based on my new insight; or (b) crediting another user with the superior answer.
When editing for readability, I routinely make incremental edits, as I am essentially "cleaning up". When editing to update, I submit the edit in one fell swoop, as a dynamic "work in progress" would be incoherent until completion and thus unfair to the reader. When editing to fix errors, the scope of my edits will vary from incremental for the cosmetic (ex. fixing a variable name) to wholesale for the conceptual (ex. mending an overlooked boundary case).
In short
While I strive to be thorough, I feel that — at the very least — the threshold for "minimum viability" in an answer requires that (1) any code actually work, and (2) the "answerer" test such code reproducibly to ensure (1). Specifically, I feel that "complementary code" — intended to complete the code supplied in the question — should not throw an error when merged and run with the original code. For inexperienced "askers", I also feel that at least some explanatory prose is proper in an answer.
Context
I recently attempted to answer a simple question, posed by a very inexperienced user ("the asker"), that was well within my wheelhouse.
While I typed, I noticed an experienced user ("the answerer"), with very high reputation, post an instantaneous and hasty answer. While the answerer's code was technically correct, it failed to import the necessary dependencies: had the asker appended this code to their own in their IDE, it would have thrown an error (for the unknown function). Unsurprisingly, the answer showed no sample output, as the answerer had spared no time to run (and test) the code. Finally, the answer did not contain a single word of prose, either in discussion or as a comment in the code itself; in particular, it made no mention of the missing dependencies.
Given the inexperience of the asker, and the near-certainty of a run-time error, I would not have considered this a "minimally viable answer" upon posting. To meet this threshold, I would have included the imports in my code, tested it, and made some mention of its purpose.
Shortly thereafter, the answerer altered their answer with an absolute barrage of incremental edits: one every few seconds. These edits were scattershot: several rendered the answer nearly incoherent until the remaining edits were complete, a little while later. At no instant in this period would I have considered the answer minimally viable: it simply lurched from one muddled state to the next.
In the end, these edits — which were inevitable and clearly not inspired by any new insight — culminated in a coherent answer. This answer managed to include the dependencies, elaborate on the purpose of the code, and display a sample output (which doubtless entailed a successful execution after the answer was initially posted).
The result was that the answerer "anchored" their answer as the top answer — by instantaneously posting it in haste — and then "retrofitted" it — with a flurry of predetermined edits — to meet their own standards.
The Point
I would appreciate if the Stack Overflow community could clarify the following, especially if encountered as a "foot-in-the-door" strategy to accrue reputation:
- Where exactly does the Stack Overflow (generally) place the threshold for a "minimally viable" answer? Are my criteria (under In Short) too restrictive? Too permissive?
- Does Stack Overflow (generally) consider it a breach of the guidelines ("Answer the question") — or of etiquette — to hastily post a minimally unviable answer, merely to "anchor" the answer as the earliest, and then make predetermined edits to actually answer the question? Note: I am not claiming that the answerer did this.
- Does Stack Overflow (generally) consider it a breach of etiquette to hastily post a sloppy yet minimally viable answer, "anchored" as the earliest, and then make predetermined edits to meet any further standards of accessibility (especially to inexperienced askers)? I do believe that answerer did this; and (more generally) that an answer containing exactly two lines of (functional) code — and nothing more — is hardly accessible to inexperienced coders.
Thank you for your consideration!
Update
In light of some thoughtful responses, which will certainly prove useful to many users, I would like to highlight my particular motivation.
There are certain questions that elicit diverse answers of comparable viability, where the asker can select the approach that best suits their needs (ex. processing speed, memory capacity, compactness of code, etc.). However, my example involves a question so elementary that it invites only one meaningful answer, of which all later answers must be a copy—or an unnecessary convolution.
As an inexperienced user, I mostly scan for tame questions well within my wheelhouse. As such, I (and other prudent newcomers) will engage disproportionately with such elementary questions until I (we) are more established in the community and (with this validation) confident in our expertise.
And to establish oneself in this fashion, reputation is required...
318732 + 923843 =
, and then later filling in the resulting sum1242575
. While the exact value of the answer would be still uncalculated at the time of posting, the answerer would have known there was only one possible edit to make. Point is, the edits were not the result of some new realization or approach: they were elementary and inevitable.