2

In this answer, I took over some of the OP's code.

I did not solve the typo (Sumbit instead of Submit) on purpose, for my fix was not about his spelling but about his code. An hour later though, someone edited my answer to solve just that particular typo.

A few things should be considered:

  • Did the OP perhaps write it wrong intentionally?
  • Does fixing a typo contribute to the quality of the answer?
  • Would fixing a typo change the general behaviour of the original code? (eg. function names)

In this particular case the answer to these questions would probably be no.

Hence my question; what is the general behaviour on dealing with typo's in code you take over from the OP? Was the edit on my answer justified or unnecessary? Should I fix typo's in the OP's code in the future?

0

1 Answer 1

4

If you see problems with the OP's code other than the one that is causing the problem being asked about, it's your decision whether to address them or not. You're certainly welcome to fix additional problems with the answer (or at least mention them) if you would like to, and you're certainly not obligated to find and fix any other problems as long as you're answering the question.

Either way, it's a decision for the answerer to make, and it should not be changed by other users. If someone else would like to address other problems with the question, they can bring it up in comments or their own answer.

5
  • I don't really see a problem with quickly fixing a small typo like that, in an answer. (As long as it doesn't become a suggested edit). The person answering could easily have overlooked the typo, or made one himself. If it isn't obvious the person answering intentionally kept the typo, why not just fix it? That said, I'd prefer it if answers would fix as much of the OP's code as possible, including mentioning typo's.
    – Cerbrus
    Feb 23, 2015 at 15:30
  • 1
    @Cerbrus You're welcome to hold that view in your own answers and if you really want to, you can take that into evaluation when evaluating the quality of an answer, but editing the content of another user's answer isn't appropriate use of editing.
    – Servy
    Feb 23, 2015 at 15:36
  • Even if that answer introduces new typo's?
    – Cerbrus
    Feb 23, 2015 at 15:50
  • 2
    @Cerbrus If it's clear to you what the author intended to write, and they introduced a typo in writing it, then fixing it would be fine. If it's not clear that they intended to not introduce the typo then you shouldn't be changing it.
    – Servy
    Feb 23, 2015 at 15:53
  • That I can agree with.
    – Cerbrus
    Feb 23, 2015 at 15:55

You must log in to answer this question.

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