2

I've heard that this is the place to ask for guidance on moving forward with a rejected edit. I have an old question that I wanted to revisit to check out the other answers that had accumulated. I liked one of the answers, but thought the rationale behind it might hard to understand for some and the code could be clearer (it took me a bit to parse out what was being done). So, I edited it but it was rejected because:

This edit deviates from the original intent of the post. Even edits that must make drastic changes should strive to preserve the goals of the post's owner.

I'm not sure how I was altering the original intent (perhaps by using variables for the patterns?); the changes seemed quite minor to me. Anyway, I'd like to understand how I can improve the answer while still staying within the bounds of an appropriate edit.

10
  • 3
    You're changing how the code functions. That's not what edits are for.
    – Cerbrus
    Commented Dec 21, 2016 at 14:50
  • Right now the community does not like suggested edits that change code. Commented Dec 21, 2016 at 14:51
  • 2
    Why not write your own answer? Commented Dec 21, 2016 at 14:51
  • What defines "changing code" exactly? Was it the use of variables for the patterns? The biggest thing I'd wanted to do was just to change the file name he was using from "a" to something else since "a" is also the pattern that is being searched for, making it all rather confusing.
    – TTT
    Commented Dec 21, 2016 at 14:54
  • @RobertLongson I thought providing a new answer effectively identical to his would be less helpful than modifying his, but if that's the preferred approach, I can easily do that.
    – TTT
    Commented Dec 21, 2016 at 14:54
  • 3
    If it's identical, why bother editing his at all? If not write your own. Or add a comment suggesting that the answerer might consider clearer variable names if that's what you're trying to do here. Commented Dec 21, 2016 at 14:56
  • 1
    @RobertLongson Effectively identical. My changes would produce the exact same answer via the exact same methods, I'm just using defined variables instead of static strings. Like I said before, I'm fine with doing my own answer if that sort of change is considered beyond what is appropriate for an edit, it just surprises me. But, then, I'm new to editing others' material on here.
    – TTT
    Commented Dec 21, 2016 at 15:01
  • No please no, don't pipe or nest grep, cut and sed, use awk for a one pass in one context and streaming the file. For your edit, changing the variable name alone would have been ok IMO. Adding pattern for variable just cause harm in an already long line and is useless as the a and c comes from the question itself.
    – Tensibai
    Commented Dec 21, 2016 at 16:20
  • @Tensibai Yes, some of the awk solutions are superior in some regards. But since my original question requested a sed approach, I don't think it's appropriate to revise the question to that nor to accept an exclusively awk-based answer. Perhaps someone could ask a new question for this?
    – TTT
    Commented Dec 21, 2016 at 16:34
  • The comment was more informative (just in case). There's already a bunch of sources on why not piping grep/cut/sed in favor of awk.
    – Tensibai
    Commented Dec 21, 2016 at 16:38

0

You must log in to answer this question.

Browse other questions tagged .