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.

Actually that was a different issue and was not clipped due to length but due to a slightly dodgy regex in the SO codebase.
–
ConcernedOfTunbridgeWellsAug 11 '09 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 CroninAug 11 '09 at 15:53

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.
–
ConcernedOfTunbridgeWellsAug 11 '09 at 15:58

2

I cry for those people who need every little thing in life documented for them.
–
GEOCHETAug 11 '09 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.
–
ConcernedOfTunbridgeWellsAug 11 '09 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.
–
GEOCHETAug 11 '09 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.
–
ConcernedOfTunbridgeWellsAug 11 '09 at 16:20

4 Answers
4

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."

You can't see his answer because you aren't 10k yet. It is indeed cut.
–
jjnguyAug 11 '09 at 15:17

5

Reading the question would probably be a good course of action before accusing the OP of being wrong.
–
jjnguyAug 11 '09 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.
–
ConcernedOfTunbridgeWellsAug 11 '09 at 15:18

2

Indeed, I misread, I thought he was referring to the question. My bad.
–
GEOCHETAug 11 '09 at 15:19

2

Unruly indeed. But a warning is still warranted in any case.
–
Kurt W. LeuchtAug 12 '09 at 15:18

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.

There are some cases when posting large amounts of code or text can be helpful. In those cases, the text should not be truncated.
–
jjnguyAug 11 '09 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.
–
ConcernedOfTunbridgeWellsAug 11 '09 at 15:21

I cannot think why you would ever need to post this much code in an answer. Please give us an example.
–
GEOCHETAug 11 '09 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.
–
jjnguyAug 11 '09 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.
–
ConcernedOfTunbridgeWellsAug 11 '09 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.
–
GEOCHETAug 11 '09 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.
–
ConcernedOfTunbridgeWellsAug 11 '09 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.
–
GEOCHETAug 11 '09 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.
–
TheTXIAug 11 '09 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.
–
ConcernedOfTunbridgeWellsAug 11 '09 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.
–
GEOCHETAug 11 '09 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.
–
ConcernedOfTunbridgeWellsAug 11 '09 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.
–
GEOCHETAug 11 '09 at 16:50

2

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.
–
Kurt W. LeuchtAug 12 '09 at 15:20