Hot answers tagged

24 votes
Accepted

Can I edit broken code if I'm sure I'm recreating OP's original code?

I prefer to err on the side of commenting and closing, rather than fixing the code for them. Reasons include: Fixing broken code is a slippery slope. Newer users will see that and assume that ...
user avatar
19 votes

Should code be forcibly translated into English?

Stack Exchange in general has an English-Only policy. There are some exceptions for language-specific sites (like Stack Overflow in Portuguese). Code Review is not an 'exception' site. It is clear ...
user avatar
  • 96.8k
16 votes

Editing in missing #includes

So questions must compile and work, in order to be considered on-topic questions. No. The code must compile and work in author's environment, so that OP isn't asking the CR community to fix their ...
user avatar
15 votes

When is an edit considered enough to be acceptable?

Moderators have no restriction on edits that they can make. There is no technical reason that it would have had to go through a review, or be accepted. Additionally, there is no minimum edit ...
user avatar
  • 96.8k
15 votes
Accepted

Is it okay to modify code in a post if we've discovered a bug, before receiving an answer?

That's absolutely okay as there's no intentional answer invalidation involved. In order to keep out noise with this, you should just make the changes without adding in-post notes about these changes. ...
user avatar
  • 34.7k
15 votes
Accepted

Removing leading white space in question code blocks

In general you shouldn't be editing code in the question, but instead reviewing it. But there are at least two cases where it's fine to make an exception: Where the poster has fumbled the formatting. ...
user avatar
  • 49.2k
14 votes

Is it okay to modify code in a post if we've discovered a bug, before receiving an answer?

Two scenarios: I just posted, and found a bug seconds after. Leave a comment on your post to that effect (in case anyone is currently in the process of writing an answer), and then ninja-edit the fix ...
user avatar
14 votes
Accepted

What are our answer editing guidelines?

The Edit Review queue is notorious for people making mistakes in the process. The problem is almost entirely related to the fact that answer edits are much rarer than question edits. Code Review has ...
user avatar
  • 96.8k
13 votes

Discouraging gigantic headers in answers?

I think it would be inappropriate to change headers into bold text. For one thing, it's a trivial edit — if it were a suggested edit, would it really be worth +2 and bothering other users to review ...
user avatar
13 votes

Discouraging gigantic headers in answers?

I believe this is more a matter of personal preference than anything else. Personally I tend to use ### (h3 in HTML) for ...
user avatar
13 votes
Accepted

Does a question with (a lot of) OP response to a posted review qualify for a rollback?

The state of the question as seen in https://codereview.stackexchange.com/revisions/214917/6 (before my rollback) literally says "In response to Peter Taylor's answer". It makes the question ...
user avatar
13 votes
Accepted

Should we improve the code to be reviewed in an edit?

This specific case is a bit unusual in that the edit was "suggested" by a user with the same username as the original author. Note also that the original author's account is unregistered, which ...
user avatar
  • 25k
12 votes
Accepted

Is it allowed to edit code if there is no answer?

Sure you can edit your question/code if there are no answers. Just don't place alternative code-junks without adding the comperative-review tag. Replacing the code in question is fine without ...
user avatar
  • 50k
11 votes

Why SED over sed?

All languages have a name, and when talking about that language, it's official name should be used. For example, it's “Java“ and not “JAVA”. Sometimes, the name of a language is the same as name of ...
user avatar
  • 12.4k
11 votes

Reviewing a question that doesn't belong

Your instincts are good. The question was off-topic because the code did not work. Therefore, the only way to make it on-topic would be to edit the code, which is forbidden. (Well, you could also ...
user avatar
11 votes

Indentation in answers

There's no unwritten rule for that, no. People (me included) edit answers to improve formatting all the time, here or anywhere else on SE - there's even incentives (imaginary Internet points!) for ...
user avatar
11 votes

Not notified of unwanted edits to question

Let's try adressing the questions first and then some more general stuff: Why did I not get a notification that my question received and edit? This MSE post suggests that edits need to meet ...
user avatar
  • 25k
10 votes

When is an edit considered enough to be acceptable?

Let's get one thing straight: There's no such thing as 'too minor' edit anymore. When approving or rejecting edits, there used to be a "too minor" reason for rejection. This reason does not exist ...
user avatar
10 votes

Over-editing my own answer

I don't think this would quite work. For one thing, it could be abused by anyone looking to edit in malicious content behind the scenes (although you can maybe argue that new users cannot have access ...
user avatar
  • 34.7k
10 votes

Do we want site-specific editing guidance?

What would really help is if all these "well intentioned" edits were filtered through review queues instead as people learn.... unfortunately, that threshold for people is still with beta-level ...
user avatar
  • 96.8k
10 votes

Editing in missing #includes

I do agree with @200_success that it was better left as a comment. I don't feel that even something like #include should be added to the question by someone else. ...
user avatar
  • 34.7k
10 votes

Discouraging gigantic headers in answers?

Disclaimer: I use H3 headers all the time I agree that gigantic headers don't look good. But we might disagree on where we draw the line on what is "gigantic". As @200_success wrote in his answer, ...
user avatar
  • 107k
10 votes

Major edits made to my question about using a string or array to index object in JavaScript

Thank you for revising the question — Rev 5 is much better as a Code Review question than the original. That said, I hesitate to reopen it, because I'm not 100% sure I understand what you are trying ...
user avatar
9 votes
Accepted

Blockquotes and formatting

Use blockquotes for blockquotes. Use headers for headers. There is no guarantee that blockquotes will look like nice headers on all Stack Exchange interfaces, including the desktop, mobile, and ...
user avatar
9 votes
Accepted

Updating cross-posts, where the author has done so, on a different site

No. Do not edit. First of all, that this question is cross-posted to Stack Overflow is irrelevant. The only time the code in a Code Review question should be edited is if it is clear that something ...
user avatar
  • 25.2k
9 votes

Question author updated the code as a diff. Should I have applied the patch?

Your solution is to tell the OP what he should be doing. Don't do things based on assumptions of intent. If the OP cares enough to post here, and genuinely wants a review, he should also care enough ...
user avatar
  • 9,779
9 votes
Accepted

Should Code Review serve as a refactoring cookbook?

The point with CR (again - IMnsHO) is rather to present a proper, readable and maintainable coding style. This is where we might disagree. The point of Code Review Stack Exchange is to ask for ...
user avatar
9 votes

Should Code Review serve as a refactoring cookbook?

Getting the best value out of Code Review I disagree with the premise that Code Review is about "Whatever your XXX, apply YYY". Code Review looks at your code, holistically and in the context of its ...
user avatar
9 votes

A moderator edited my question. I don't like the way it looks now

Let's check the edit diff and see what it's about: title diff ...
user avatar
  • 25k
9 votes

Regarding editing questions

The edit with approval system requires three people to participate. There was a decision made in the beginning that three people should not get bogged down in small edits that could be easily ...
user avatar
  • 20.7k

Only top scored, non community-wiki answers of a minimum length are eligible