Why not add a line stating your intentions? Something like:

*I am currently editing in an explanation of the above code.*

Then, provided you actually finish the answer, you get to be the fastest gun without adding to the pile of crap answers. That said, a temporary code-only answer can still be problematic.

Depending on the question, posting code-only answers can reinforce the "give me the code" mentality where stackoverflow is used to outsource the mental faculties of the questioner. Adding an explanation (and perhaps slightly generalized code instead of something that they can plug in) helps the _questioner_ appreciate what this site is about.

So try to post _some_ explanation. If it's a couple lines of code, you can probably get away with a sentence that takes 20 seconds to write.

Example:

___

<!-- language: lang-js -->

    var foobar = $("foo").bar();
    var foo = foobar.foo;
    var bar = foobar.bar;

Just use jquery to create a foobar object. The raw foo and bar objects are stored as properties.

___

_1st edit_

<!-- language: lang-js -->

    var foobar = $("foo").bar();
    var foo = foobar.foo;
    var bar = foobar.bar;

Just use [jQuery][1] to create a [`foobar`][2] object. The raw `foo` and `bar` objects are stored as properties. You can of course do this without jQuery ([shown here][3]) but it takes a lot more code and jQuery should be used in all web projects anyway. etc.

___

But, realistically, a few seconds makes a difference when you are playing fastest gun (because questioners often don't know better). And since (in practice) you are rewarded for this behaviour, it's going to keep happening.

**So at least commit (publicly) to adding an explanation ASAP. Better than nothing. And make sure your answer isn't just a placeholder while you finish it (this is cheating). It needs to actually be a useful answer when first posted.**

It's also possible to have excellent code-only answers ([here][4] & [here][5]). But they usually take longer to write than a simple explanation.


  [1]: http://jquery.com/
  [2]: http://jquery.com/foobar
  [3]: http://stackoverflow.com/a/18120786/728393
  [4]: http://meta.stackoverflow.com/questions/258673/can-code-only-answers-be-high-quality
  [5]: http://meta.stackoverflow.com/questions/262695/new-answer-deletion-option-code-only-answer