-4

A user has attempted to improve some answers (1, 2) by editing their code. Before the editing took place, the code wouldn't work (e.g. it would raise IndentationError) or wouldn't be formated as code at all.

After the edit, the code still does not work because the indentation is incorrect.

No harm was done through those edits (I haven't checked all his python edits), but it could have an effect if a user messes up existing indentation because he wasn't aware that Python indentation is meaningful to the compiler and not just a matter of style.

It could also be harmful if for example a python beginner posts incorrectly indented code, and the editor changes it thinking it doesn't matter.


Should a custom flag be raised when a user's code-edits indicate he is unaware of the specific language details, so that a mod can investigate further and/or the user is notified?

6
  • 4
    So, what should this editor have done? Left unformatted code blocks alone because he doesn't know the language? Knowing the language is not a requirement for pressing Ctrl+K. The person who posted the answer should have done it, but because they didn't, Robert has done it for them. It's not his fault their answer still sucks.
    – Cody Gray Mod
    Commented Mar 2, 2016 at 11:48
  • 1
    @CodyGray Did you check all his code edits? Where they all non-harmful? I haven't checked them. Should they be checked? Should I notify a mod through flagging so that he takes a faster/more thorough look than me?
    – user
    Commented Mar 2, 2016 at 12:02
  • 3
    @CodyGray "So, what should this editor have done? Left unformatted code blocks alone because he doesn't know the language?" - Yes
    – user
    Commented Mar 2, 2016 at 12:12
  • 1
    Completely wrong. Even if the code doesn't compile in its current state because the indentation is wrong, it is a massive step forward from where the posts originally were, with a bunch of random words that didn't even look like code because they were incorrectly formatted. At least now, someone who does know the language can come back and fix the indentation. Honestly, the only other option than the community editing these answers is for them to just be deleted outright.
    – Cody Gray Mod
    Commented Mar 2, 2016 at 12:18
  • @CodyGray The reason I asked this question was because I have no fast way of checking the user's edits on python code. For example if a new python programmer pastes code (in non-code format) and an editor arbitrarily "fixes" the code (with arbitrary indentation), it would cause a big waste of time for everyone involved. In this case, leaving the code unformated would be completely right.
    – user
    Commented Mar 2, 2016 at 12:31
  • I'd say as long as ONLY code formatting was added - it is ok, because there's no harm to original post. Those particular edits are bad not because of that, but because they also destroy original meaningful formatting inside code. Commented Mar 2, 2016 at 17:56

1 Answer 1

2

Searching for user:1116757 [python] show zero results, which indeed may be a good reason to assume this person does not know about its intricacies.

The original source shows that, even though the answerer did not use Ctrl+K shortcut, someone who is aware of Python's rules should have picked up on that and could have edited it correctly right away.
With the edit, the original indentation got destroyed.

Well meant as these edits (surely) are, maybe you should leave a @comment and ask him not to edit Python anymore.

The other example answer was, even in its original state, bad enough to warrant a downvote.

3
  • Although i agree on most of what you said, i m not so sure leaving a comment on an edited answer would be the right course of action (it would be unrelated to the topic discussed, therefor noise, which is generally not good). Also, i don't think @SomeUser would notify the SomeUser (I might be wrong on that).
    – user
    Commented Mar 3, 2016 at 14:41
  • 2
    @Fermiparadox: it is possible to @ping any post editor: Ping an editor for repeated invalid editing behavior. And indeed it would not be useful to add this to another post, so just do so on one of your examples.
    – Jongware
    Commented Mar 3, 2016 at 14:44
  • Oh I was wrong. Good to know @ping sends a notification. And, to my surprise, in the post you link there seems to be a strong agreement by community on using @ping to notify editors.
    – user
    Commented Mar 3, 2016 at 14:47

You must log in to answer this question.

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