94

I would like to edit posts on Stack Overflow. How do I make a good edit that will improve the quality of the post?

Return to FAQ index

2 Answers 2

134

You should read some of the editing guidelines in the Help Center. But there are some aspects of editing that aren't discussed much in the Help Center that have been clarified on Meta. Keep these things in mind while editing.

Don't edit spam posts

When you see a spam post, flag it. This brings it to the attention of the moderators. If you edit it, it is harder for the moderators to see that it was spam. For more information, see Should spam posts be edited? on Meta Stack Exchange.

Make your edits as complete as possible

According to the editing guidelines in the Help Center:

Edits are expected to be substantial and to leave the post better than you found it.

Please refrain from making multiple small edits to the same post, especially when you can only suggest edits for review by others. Instead, fix everything you can all at once. Additionally, try to improve every aspect of the post that you can. Please try to improve all of the following in a single, comprehensive edit:

  • Spelling/grammar
  • Post title and tags
  • Formatting
  • Other improvements

Use inline code formatting only for code

You can use inline code formatting to indicate that some snippet of text is actually code. The Markdown syntax for this formatting is to surround the snippet with backticks (` the same key as the tilde ~ on the US layout).

Do not use it for non-code (e.g., names of products, protocols, file formats) except in some cases like filenames. It is also not appropriate to use inline code formatting for emphasis; use bold or italics for that instead.

As has been noted many times on Meta, excessive use of backticks may lead to "Lyme disease". In other words, excessive use of inline code formatting actively harms the readability of posts. Therefore, please use them sparingly.

Avoid polishing turds

If the post should be deleted, then flag it—don't edit it.

The purpose of editing is to make a post easier to understand and easier to find. If a post should be deleted, then flag to close/delete instead.
Editing these posts is sometimes called "turd polishing"—no matter how much you polish a turd, it'll always remain a turd. Similarly, if a post is inherently worthless, it'll always remain worthless, no matter how much you edit it.

Don't translate foreign languages to English

Content on Stack Overflow should be in English. If users insists on posting in a different language, they should go to the Stack Overflow sub-site that is specific to their language, if one exists.

The rationale for this is in the FAQ:

Please do not translate posts for the OP. They need to be able to respond to feedback, and if they cannot themselves translate the post we cannot be certain that they can understand any feedback provided (by comments, answers, or Help Center content).

Of course you can post your own answer, independent of what inspired you.

Don't use Stack Snippets for code that isn't client-side HTML/CSS/JS

Stack Snippets are for directly browser-runnable code, nothing else. At present, that's a pretty limited set. For everything else, stick with the normal code formatting. If you see a post that wrongly uses Snippet markdown, see if there's anything else to fix to make the edit worthwhile.

Don't edit code in questions unless you know exactly what you're doing

It's OK to format code appropriately using the block-style code formatting but, apart from that, you should be very careful when editing code—especially code in questions. If you change the code in a question, you may accidentally remove the bug that causes the problem.

Also, keep in mind that in some programming languages, the indentation has meaning. For example, in Python and Haskell. So don't modify the code unless you know exactly what you are doing.

If you do edit code, please make sure you don't change the author's intent. It's often better just to leave a comment asking for clarifications for perceived typos or other issues in code. If you have less than 2000 rep, please leave a very clear edit comment for why you are changing code.

For more details, see When should I make edits to code?

Correct the casing

Many things have an official casing. For example, the name of the Apache web server is "Apache". If you see someone spell it as "apache", correct it. Similarly, "HTML" is all capitals, but "jQuery" only has the second letter in capitals.

When in doubt, use your favorite search engine to validate product naming guidelines.

Remove "l33t sp33k"

Stack Overflow is a site for professionals (and enthusiast amateurs). It is not professional to use l33t sp33k.

So if you see l33t sp33k, or txt msg spk, replace it with proper English.

The first person personal pronoun in English is "I", not "i". The second person personal pronoun in English is "you", not "u". So, replace "u" and "i" with "you" and "I".

Use emphasis sparingly

You can put things in boldface or italics, but do this only when it is really necessary. Emphasis is used to draw extra attention to something. If almost everything demands extra attention, then nothing will get extra attention.

As a rule of thumb, before putting something in boldface or italics, ask yourself: if I could put only one thing in this post in boldface or italics, would it be this? If the answer is no, then don't.

Remove 'Hi' and 'Thank you' - but only while you're at it.

'Hi', 'Thank you', 'Hope this helps', 'Thanks in advance' — these things are considered noise on Stack Overflow.

However, if you have less than 2000 reputation, your edits must be reviewed. So your edit will take your time and that of at least 2 reviewers. This means it is hardly ever worth the effort to remove things like "Hi" and "Thank you" unless you're editing already.

Remove all noise

In addition to salutations, signatures, valedictions, and taglines, anything in a post that doesn't pertain to the question itself is considered noise. Common examples of other kinds of noise include, but aren't limited to:

  • Any other social interaction or chattiness - "Please be nice, this is my first question."
  • Complaints or rants - "This stupid thing never works!"
  • Explanations of skill level - "I'm new to Java" or "I'm an expert in Perl"
  • Really vague claims of research - "I've been stuck three days." or "I searched a long time before asking."

Write a relevant Edit Summary

Before you have full editing privileges, you're forced to write an edit summary to explain your edit. These are very important as they add context that reviewers often lack. Sometimes an edit can seem redundant to a reviewer until they notice that you've left a comment explaining why it matters to change the small detail or replace one link with another. Even with full editing privileges, this is valid context for anyone who checks the history of a question's edits and needs to understand what motivated your edit.

This is especially important when editing material from an OP's comments into a post. Edit reviewers might not notice the comments on a post, so they won't know where your the new material came from. When editing new material into a post, use the Edit Summary to explain where the material came from.

Don't go on editing sprees

Keep in mind that if you have less than 2,000 rep, all of your edits need to be approved in the suggested edit review queue. Don't waste reviewers' time by searching for and correcting simple errors en masse.

Also, editing a post bumps it to the front page, so don't edit too many posts in quick succession.

If you feel the need to search out and correct a simple issue on several posts, please be sure to correct other issues while you're at it.

If you feel that there is an issue that affects a lot of posts, first discuss it here on Meta. Then the community can decide if mass editing is warranted.

Avoid putting tags in the question title

We typically don't put tags in titles. If a question is about C#, for example, we simply use the tag and there is no need to put that in the question title as well. Search engines know about tags - Google prefixes the titles of Stack Overflow questions with the first tag on the question. Don't edit tags into the title of a question unless it's absolutely necessary. And if you do see a tag in the title of a question, see if you can remove it or reword the title.

From the Help Center guidelines for tagging:

The only time you should use tags in your title is when they are organic to the conversational tone of the title.

For example, rather than writing, "JavaScript, jQuery: When should I use one or the other?" – which forces tags into the title – you can convey the same information in a conversational tone:

Can I use jQuery to foo the bar on the baz, or am I stuck using plain JavaScript?

1
  • 3
    Istn't the maximum of 5 suggested edits for users below 2k rep already preventing "editing sprees"? Because if yes, this is just a duplicate to "Keep your edits substantial", is it? If it is just about the 2k+ rep users, it could be phrased more clearly.
    – Cadoiz
    Commented Dec 15, 2021 at 14:34
37

Edits made by users with full editing privileges (2k+ rep) are applied instantly and are generally trusted to be correct and in good faith. If you have full editing privileges, you can feel free to make larger changes to posts, add or modify technical details if what you're doing doesn't go against the OP's intentions, or make very minor edits (any edit that improves the post is acceptable).

However, before you reach full editing privileges your edits are put through a review queue to check for problems before it either gets applied to the post or is rejected.

Additional guidelines for suggesting edits

Because your edit is going through a queue, it basically needs to be obviously correct (spelling/grammar/wording/formatting improvements are always safe). Reviewers aren't judges of technical accuracy and they don't have the full context to decide on large changes, so it's a good idea to lean on the conservative side when suggesting an edit.

Avoid adding information to answers

You may want to add additional information to an answer to reflect changes in a new software version, fix an incorrect point (without changing the meaning of the core explanation), or add your own simpler variant of the solution. This is great and it's encouraged if you have full editing privileges, but if you are suggesting an edit you are asking edit reviewers to verify the technical accuracy of your edit. People from all different backgrounds who likely know different languages will be reviewing your edit, so they won't be able to confirm if your edit is correct. You may be able to get by with this for larger tags, but it's generally discouraged until you have full editing privileges.

Do not transcribe images to text

Transcribing images can introduce errors and adds unnecessary strain on reviewers to ensure the transcribed text matches the image exactly. Leave it to the author or users with full edit privileges to deal with. For details, see Should we edit a question to transcribe code from an image to text?

Be wary while restructuring questions

Many questions can take a lot of editing love, and it's great if you can understand the question and essentially delete it all and replace it with a clear problem statement and MCVE. This usually works if you know what you're doing and have 2k rep. But when suggesting an edit, often edits that don't change much of the technical details will have a higher chance of getting through the system. You should be clear in the edit summary if you moved code the OP posted elsewhere into the question, but only do so if there isn't a conflict with CC-BY-SA. And make sure the title looks good, since it's the first thing reviewers see. If you look like you know what you're doing, the edit will probably be approved. But make sure you know what you're doing and don't just replace a question (however poorly written) with your own.

Keep your edits substantial

Most posts have a lot of problems to fix. Since your edit requires the time and eyes of at least 3 reviewers to get approved, make sure you fix all the obvious stuff. Make sure:

  • All the spelling and grammar is perfect
  • There are no salutations, thanks, or signatures
  • Code is formatted properly
  • The title describes the problem
  • There are no extraneous tags and a language tag is specified

These problems are so easy to see and correct that suggested edits in the queue are expected to fix all of these. It's even better if you go on to fix larger issues like inlining external code when it doesn't conflict with CC-BY-SA, restructuring questions so that they're easy to follow (background → code → problem overview → failure of attempted solutions → core question), clarifying unclear parts, adding information from comments, etc.

Write descriptive edit summaries

Explain what you're doing to reviewers and the OP. Make sure your editing never makes people wonder what you were thinking when you suggested your edit. This is especially important if you think others may disagree with your edit.

In general, just try to be as clear as you can in communicating what you're doing and don't make edit reviewers work too hard and you'll be fine. You can try things to see if they're OK before you have full editing privileges because the review queue is there to filter out bad edits. You can, in a way, do more without full editing privileges because of the safety net system, but you must understand the limitations of going through the edit queue.

0

You must log in to answer this question.

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