Skip to main content
26 of 26
add link about editing code
wjandrea
  • 32.6k
  • 21
  • 36

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?