Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Meta

Post History

60%
+1 −0
Meta Preferred length limit for Code Golf posts

65,535 The database field can already handle up to 65,535 (216 - 1) characters. Same for all post types and categories I don't see a need for different limits for questions and answers, or for d...

posted 3mo ago by trichoplax‭

Answer
#1: Initial revision by user avatar trichoplax‭ · 2024-09-25T03:03:33Z (3 months ago)
## 65,535

The database field can already handle up to 65,535 (2<sup>16</sup> - 1) characters.

### Same for all post types and categories
I don't see a need for different limits for questions and answers, or for different categories.

### Challenges
I sometimes find the current 30,000 character limit restrictive, particularly for challenges that involve example code and many test cases. The challenge specification doesn't need to be nearly this long, but I'd like there to be plenty of room for challenge authors to include relevant code and data.

### Answers
I'd also like to post other types of challenge than code golf, such as King of the Hill contests. For these I would like there to be plenty of space for people to post both long code and explanations. Unlike code golf answers which are generally very short, other challenge types may lead to answers that are longer since the scoring criterion does not require short code, allowing for a more readable layout and explanatory comments.

### Precedent
If answers exceeding 30,000 characters seem unlikely, I've seen real world examples of these in a [King of the Hill contest I posted many years ago on Code Golf Stack Exchange](https://codegolf.stackexchange.com/questions/135102/formic-functions-ant-queen-of-the-hill-contest).

I designed the contest to allow answers that were only a single line of JavaScript, but to also allow for more complex strategies to emerge through competition over time. The eventual winner was an answer with 33,648 characters (only possible because I had previously requested the limit be raised for that community).

I like the idea of a King of the Hill contest that also has golfing elements - perhaps a small character limit or some kind of cost per character. However, I wouldn't want *all* King of the Hill contests to have such restrictions. I'd like plenty of space to experiment.