21 votes

Asking questions - including full code

I have my 'pet theory' about Code Review. This is my personal theory, and it is about human psychology, so you will have to take it with some salt..... It goes like this: You post code for review, ...
user avatar
  • 96.7k
19 votes
Accepted

Tackling overwhelmingly long questions

There is no requirement for a Code Review answer to critique every part of the code exhaustively. If a question contains a lot of code, some possible responses might be: Ask for clarification in a ...
user avatar
19 votes

Complete Review of Small Application

There is a 30k character limit to post questions on all Stack Exchange sites; Code Review's is over 65K. If it fits into one question, then you may absolutely ask it. Otherwise, perhaps you will find ...
user avatar
19 votes
Accepted

Can I ask for review for something specific without posting too much context?

Strictly speaking, Code Review requires you to post real code from a project that you are working on. In practical terms, though, any plausible realistic code is acceptable too. If your real project ...
user avatar
15 votes
Accepted

Asking questions - including full code

The code that you want to have reviewed should be included. There are several questions on Code Review containing a whole lot of code, I myself tend to have very much code in my questions, and it's ...
user avatar
15 votes

What is the appropriate MINIMUM length of a Code Review question?

Should questions like this be closed as off-topic? No, questions like that are reviewable... I find that some of the shortest code samples contain large amounts of wrong. For this particular example ...
user avatar
  • 32.4k
13 votes
Accepted

Should I be asking shorter questions?

Your code is average, maybe a bit on the large size, nothing that I'd not answer. Your problem is I see a wall with code, text, some lists, more text, more code, more text, more code and then 'how ...
user avatar
  • 41.6k
12 votes

One Question Per Question

The size of the post should not be a major consideration. We've had questions about everything from one-liners up to the 64 kB limit. Rather, the issue is whether there is unity in the question — a ...
user avatar
12 votes

What is the appropriate length of a Code Review question?

There is no actual limit for posted code, aside from a few limiting factors: Character Limit. All SE-Posts are limited to 30k characters (including markdown) Contrary to the usual network-wide ...
user avatar
  • 25k
12 votes
Accepted

Is it appropriate to ask for review on an entire GitHub repo?

No, it wouldn't be ok. Your question would get closed quite quickly, with a dedicated close reason, stating: Questions must include the code to be reviewed. Links to code hosted on third-party ...
user avatar
11 votes
Accepted

"Function to erase a character in a string" question was unfairly closed

I concur, and agree with its reopening. If you don't have anything to say about the code, you don't have to review it. If you don't like the question, you are free to downvote according to your ...
user avatar
10 votes
Accepted

My code is too long. How do I trim it down when code posted here is expected to function?

One thing you can do is to remove the heading at the top of the first code block. It doesn't add anything further to the question, so it can be safely removed. Basically, anything that we don't need ...
user avatar
  • 34.7k
9 votes

Is it okay to post questions that don't contain a full program/library?

You are always welcome to post just part of your code for review. It is always best though, to provide enough context to make sure the code you post is sensible. The code you post does not need to ...
user avatar
  • 96.7k
8 votes
Accepted

Requesting a review of part of a small project

Post the relevant code you want reviewed and include a link to the GitHub repository. You may include additional code you don't want reviewed, if you think it will help reviewers (for example, it ...
user avatar
  • 107k
8 votes

Project translation from Java to C#

If your code is not working as intended, you should not ask about how to fix it on Code Review. Such a question would be considered off-topic. Assuming that your code does work as intended, you still ...
user avatar
8 votes
Accepted

How should I structure my post if my code is over 400 lines?

First of all, you're allowed to post the whole thing as-is, all in the same question. 13,000 characters is well within the limit of what a post may contain (65,536 characters as a hard limit), leaving ...
user avatar
  • 12.6k
7 votes
Accepted

How many lines of code are too much?

The only hard limit is the 65,536 character limit that Stack Exchange imposes on all questions. That certainly is a lot of code, and while you could post it all (I've posted a huge question or two ...
user avatar
  • 30.7k
7 votes

My code is too long. How do I trim it down when code posted here is expected to function?

You could try to reduce the character count by reindenting using tabs instead of spaces. However, step back and think about why the 64 kiB limit exists. You could consider it a kind of commentary on ...
user avatar
7 votes

One Question Per Question

We had questions here which had only a small amount of code in it but got rather long answers regardless if it stated no question, or only one question, like for instance "How can this be improved ...
user avatar
  • 49.9k
7 votes

What is the appropriate MINIMUM length of a Code Review question?

The length of the code is actually not important. A short question can contain reviewable code. ...
user avatar
7 votes

Tackling overwhelmingly long questions

What @200_success said. For the particular post in question, I just started at the top, started critiquing the Naming and, well, never even got past the first Sub ...
user avatar
  • 8,800
7 votes
Accepted

May I post this Huffman tree program with several files?

As a general rule, we prefer to see: Your full code, unedited, exactly as it appears in your IDE. Code Review has an extended 65,535 character limit. Unless you're getting close to exceeding that, ...
user avatar
  • 8,800
7 votes

Should I be asking shorter questions?

I don't think that there is anything wrong with your question length. If anything, I would guess that the fact that your questions are written in Clojure is a bigger factor in explaining why they ...
user avatar
7 votes
Accepted

Where can I find an expert opinion on a large codebase?

It's hard to answer this kind of question without knowing very much about your specific code. But basically, a single question can contain 65,536 characters. This should of course also include a ...
user avatar
7 votes
Accepted

What was wrong with my question?

Like @1201ProgramAlarm mentioned in the comment The problem is that the code to be reviewed must be embeded directly in the question. As it stands, there is no code in the question and nothing to ...
user avatar
  • 49.9k
6 votes

Should I be asking shorter questions?

There are a couple of subjective reasons which may or may not impact the lack of answers. You seem to be quite focussed on code-length. Some of the reviewers, including myself, are not interested in ...
user avatar
  • 12.6k
6 votes
Accepted

Posting a whole project, ready for public review

If you read that entire section, you see: If you are looking for feedback on a specific working piece of code from your project in the following areas… Best practices and design pattern usage ...
user avatar
6 votes

Is it appropriate to ask for review on an entire GitHub repo?

To add to Mat'sMug's answer, it is best to focus on individual pieces of code, chances are that reviews of that code will be applicable to the rest of your project. I would suggest that you find ...
user avatar
  • 20.3k
6 votes
Accepted

Does Code Review require OPs to provide an MRE?

Code Review is not Stack Overflow. If you look under the "Asking your question" section of the How do I ask a good question help topic, you'll see that it says that you can leave supporting, ...
user avatar
5 votes

Tackling overwhelmingly long questions

You can always ask a user in a comment to improve the question. I often suggest question askers to read Simon's guide for asking a good question, which contain many tips for making a question easier ...
user avatar

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