10

The deleted answer in This posting on SO has had the bottom of the code clipped on submission. The posting was definitely submitted with the whole script but it has snipped text off the end, rendering the code snippet largely useless.

Is this an inherent limit on the size of a posting or a bug - or am I doing something fundamentally wrong?


Edit:

It appears that this issue is a hard limit on the size of a posting. Perhaps the system should warn when it is doing this.

11
  • This is a second time dupe. Holy cow. Reported to mods as well. meta.stackexchange.com/questions/13035
    – GEOCHET
    Commented Aug 11, 2009 at 15:43
  • 4
    Actually that was a different issue and was not clipped due to length but due to a slightly dodgy regex in the SO codebase. Commented Aug 11, 2009 at 15:48
  • 2
    @ConcernedOFTunbridgeWells: Correct, this is a different issue. In the old issue, the revision history was complete but the post was truncated. Here, it just looks like you've exceeded the maximum number of characters allowed
    – Kyle Cronin Mod
    Commented Aug 11, 2009 at 15:53
  • Is there a hard limit documented somewhere? Commented Aug 11, 2009 at 15:57
  • 1
    Actually, given that there are some other issues that produce similar symptoms, it might be desirable for the system to explicitly warn on postings that exceed the limit. Commented Aug 11, 2009 at 15:58
  • 2
    I cry for those people who need every little thing in life documented for them.
    – GEOCHET
    Commented Aug 11, 2009 at 16:01
  • 2
    @Rich B - O.K. I'll bite. You've significantly misread this posting twice now. The first time you incorrectly thought I was referring to the question in the original posting and the second time you accused this of being a dupe of something it was not. Implications left as an exercise to the reader. Commented Aug 11, 2009 at 16:17
  • @Concerned: Indeed, you linked to a deleted answer. I went with the first thing I saw, other people made the same mistake as well. But you continue to rail on about needing documentation for obvious limits in a simple system. Implications left as an exercise to the reader.
    – GEOCHET
    Commented Aug 11, 2009 at 16:18
  • 2
    Actually, third mistake. I was suggesting that if the system has a hard limit, it should warn when the limit is exceeded. Commented Aug 11, 2009 at 16:20
  • @Concerned: Is there a hard limit documented somewhere? – ConcernedOfTunbridgeWells 47 mins ago
    – GEOCHET
    Commented Aug 11, 2009 at 16:45
  • Please see: meta.stackexchange.com/questions/13784/…
    – Shog9
    Commented Aug 11, 2009 at 17:50

4 Answers 4

5

30,000 character limit is perfectly reasonable. Just post the most relevant or "broken part" of the code. If you do need to post more, use a site like pastebin, pastie, Gist etc

While the limit is perfectly reasonable, silently truncating a users post is never good - I see no reason why a simple Javascript content-length-check could not be added to the question form..?

3

Whether or not 30k characters is enough (I think it is, by a huge margin), the OP's request that there be a warning is perfectly reasonable. We have such a warning on comments, so why not on answers? If the answer text is over, say, 10k characters, simply make visible the text "Warning: maximum 30k characters allowed."

2

Posting huge amounts of code isn't going to be very helpful in most cases. You should either be posting the piece of code in question, or perhaps putting up your code on PasteBin or other sites so that your question (or answer) is not absolutely hammered by long code.

15
  • 2
    "Hey, my Linux distro is broken. Can someone please help me?" TheTXI - "Use windows instead" Not helpful.
    – jjnguy
    Commented Aug 11, 2009 at 15:20
  • 1
    There are some cases when posting large amounts of code or text can be helpful. In those cases, the text should not be truncated.
    – jjnguy
    Commented Aug 11, 2009 at 15:20
  • I'm not entirely convinced by this argument - the firewall where I'm currently working blocks most sites like this. This is a fairly common occurrence and causes issues with postings that fan out to sites like flickr or pastebin. Commented Aug 11, 2009 at 15:21
  • I cannot think why you would ever need to post this much code in an answer. Please give us an example.
    – GEOCHET
    Commented Aug 11, 2009 at 15:22
  • 2
    I can't think of any either...But, it is a bug, unless the size of an answer/question is explicitly limited.
    – jjnguy
    Commented Aug 11, 2009 at 15:27
  • 1
    The point is not that you can't think of a reason; the point is that when it does happen, it appears to break SO. I've never seen any documentation stating an explicit size limit on postings. Therefore, the fact that it does not appear to be working properly suggests that it might actually not be working properly. Commented Aug 11, 2009 at 15:27
  • There has to be a size limit on answers. That is just an obvious fact. You are clearly exceeding it. It has nothing to do with code or anything else.
    – GEOCHET
    Commented Aug 11, 2009 at 15:30
  • 2
    I think that's actually something for the devs to answer, unless you've got some inside track on the SO code base that I'm not aware of. Even if SO has a hard limit of this sort it really ought to warn about it. Commented Aug 11, 2009 at 15:36
  • @Concerned: Why would we need the devs to answer something we already know? You can tell how often someone has an issue with hitting the limit by how many times this has not been brought up. Just fix your answer and move on.
    – GEOCHET
    Commented Aug 11, 2009 at 15:38
  • I don't need the devs to tell me what is too long. I can say that on my own. If something is going to be a giant wall of code, it is probably not going to be worth my time to dig into the whole thing and try to figure out where a small problem might be.
    – TheTXI
    Commented Aug 11, 2009 at 15:45
  • I think we're missing the point here. Regardless of whether anyone thinks the post was too long, the system silently clips the post on submission without any feedback. Given that there are some other issues with rendering it is not immediately obvious whether this is functioning as designed or an issue in the code. Now this issue is degenerating into a flamewar based on people's opinions about how long a post should be. -1, offtopic. Commented Aug 11, 2009 at 15:56
  • @Concerned: It is not a problem if you don't post huge walls of text in your answers. The limit is very generous.
    – GEOCHET
    Commented Aug 11, 2009 at 16:00
  • @Rich B - OK. We've now established that you think the post was too long. We've now also established that there is a hard limit in SO and the behaviour appears to be that SO silently truncates the post. Unfortunately similar symptoms can occur for other reasons, such as the one you pointed out above. Commented Aug 11, 2009 at 16:30
  • @Concerned: And the part of that you still don't seem to grasp is that I don't think anyone else but you cares that this silently handled. It seems fairly obvious.
    – GEOCHET
    Commented Aug 11, 2009 at 16:50
  • 3
    It's poor user interface design to silently cut submitted content. The user interface should specifically keep more characters from being typed into the text field, or it should tell the user that it has lopped off some content. Commented Aug 12, 2009 at 15:20
-1

It is clear you are just exceeding the maximum length of an answer, it has nothing to do with the code block.

30k characters is way more than generous.

I agree with the limit, your answer is unruly.

5
  • 2
    You can't see his answer because you aren't 10k yet. It is indeed cut.
    – jjnguy
    Commented Aug 11, 2009 at 15:17
  • 5
    Reading the question would probably be a good course of action before accusing the OP of being wrong.
    – jjnguy
    Commented Aug 11, 2009 at 15:18
  • Take a look at the bottom of the file and see if it makes sense. The snippet ends ',identity (i' - which is not the end of the code, and is not what was posted. Commented Aug 11, 2009 at 15:18
  • 2
    Indeed, I misread, I thought he was referring to the question. My bad.
    – GEOCHET
    Commented Aug 11, 2009 at 15:19
  • 3
    Unruly indeed. But a warning is still warranted in any case. Commented Aug 12, 2009 at 15:18

You must log in to answer this question.

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