The code I would like to have reviewed, found here, is more than 30,000 characters long. I don't feel like that in and of itself makes it off topic, but removing code from it so that it can be posted here WILL make it off topic, because it will no longer function.

I've read How long is long code? and How long can code be?, but I still have no idea how to cut my post back and have functioning production code.

Any suggestions?

up vote 10 down vote accepted

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 to know to conduct a review can be removed, and of course you can keep everything in your local copy.

If that's still not enough or there is nothing to remove, you may just have to find a way to split them into separate questions. They can still be grouped together under a similar title. We won't fault you for that as long as the whole project functions properly.

However, if your code is way above the character limit, and more than just a few questions are needed, then your project may be too large for review. The character limit, and our policy about not reviewing code directly behind a link (where any amount of code can be given), help with that. If you're not sure that it's too large, then post what you have, and the community will decide.

  • Ok. I'll come back and update it. Thank you. – RubberDuck May 28 '14 at 0:31
  • 1
    The header is actually important to post. I know I've read somewhere that it's ok to post code under other copyrights in addition to the default Stack Exchange uses. I've published this code elsewhere, and would like it to retain that Share & Attribute copyright. – RubberDuck May 28 '14 at 10:36
  • 1
    Does including a header allows another license to be retained? – Aseem Bansal May 28 '14 at 20:32
  • @AseemBansal: I'm not sure myself, so I've contacted SE. – Jamal May 28 '14 at 21:00
  • I can't find the Q&A I was reading before. This case is moot, as I'm using the same license as CodeReview. – RubberDuck May 28 '14 at 21:01
  • @ckuhn203: Since that's the case, then you may be able to safely remove the header. The email has already been sent out, so it may help to address such cases with difference licenses. – Jamal May 28 '14 at 21:03
  • @Jamal that would be a good FAQ Q&A once you've received a response. – RubberDuck May 28 '14 at 21:34
  • 1
    @ckuhn203: I'll keep you updated, unless someone from SE posts first. I'm not entirely sure how much SE can help (this may be a more lawyer-y thing), but moderators are not to be an authority on this. – Jamal May 28 '14 at 21:39
  • To save precious characters, may it also be possible to place the header once in a question and tell it implies to all of the code? Possibly even adding in every piece of code in place of the header a small message that describes why the header is removed and where the licensing is to be found (at the top of the post). – skiwi May 30 '14 at 18:54

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 your question. What volunteer, working for fake Internet points, would want to read such a long question? Furthermore, would the question be too broad to be coherent? You've got registry-interfacing code, database-interfacing code, connection pooling support, authentication code, … Could you make several questions, each focusing on a function or two, on just the problematic parts?

  • You could consider it a kind of commentary on your code. For example, is there too much repeated code?

  • You could consider it a kind of commentary on the verbosity of the language.

  • 1)Maybe I misunderstand the core concept of the site then. The class functions as a whole, so while I do have A specific question, I am interested in general review. That's why I posted it here. 2) Sometimes we have to work with what we have to work with. Blaming VBA feels like a cop-out. – RubberDuck May 28 '14 at 0:59
  • 3
    Sorry, the point about VBA was a snide remark; don't take it personally. I sympathize with what you have to work with. – 200_success May 28 '14 at 1:01
  • You also have the option of posting your specific questions, like I suggested, but linking to the entire project hosted elsewhere for reference, e.g. GitHub. Sometimes, a reviewer will spot a problem in code that wasn't even included in the question. – 200_success May 28 '14 at 1:03
  • 2
    Apology accepted and your points duly noted. – RubberDuck May 28 '14 at 1:04
  • Another example of a question to review a larger project – 200_success May 28 '14 at 1:05
  • 1
    Thanks for the examples. I received an answer before I had a chance to edit, so I'm leaving the question as is, but I'll try to ask better questions in the future. – RubberDuck May 28 '14 at 10:39

You must log in to answer this question.

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