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

How do we handle standardizing things?

+12
−0

Code golf, being about exploiting things, often brings about many questions about edge cases. Since we don't want each challenge to have to deal with all problems again and again, it makes sense to standardize some defaults for questions about various topics (including, but definitely not limited to, what's a valid answer, what are allowed I/O rules, what's a quine, a program, a language, etc).

Codidact has help topics, customizable by moderators, but we still need some way to create the standards in the first place.

Proposal

Meta gets a new tag, named "standards" (or "defaults"; if you have name suggestions, suggest them!), addable to questions by moderators.

Such meta questions discuss a single topic, with each answer being a separate suggestion. Depending on the type of question, either the best voted answer is the accepted standard (e.g. quine definition), or all answers above some certain threshold of votes (what specifically should that be?) is counted as a default (e.g. a single input or output rule, as there can be many).

Since it can be useful to post answers with the express intent of them being downvoted to signify that something is not acceptable, the answers on these questions shouldn't give reputation, if possible.

These posts could, afterwards, be linked in the help pages, tag descriptions, or wherever else applicable.

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

2 comment threads

Meta rep? (3 comments)
General comments (3 comments)

3 answers

You are accessing this answer with a direct link, so it's being shown above all other answers regardless of its score. You can return to the normal view.

+7
−0

This sounds like a great idea to me. To summarize how we can move forward on this:

For the Codidact Team

  • Create a new meta tag (defaults? name pending) that is one of the options for the required tag on meta
  • Create a new post type that applies to all posts and answers on posts with this tag that awards no rep for votes (and doesn't affect stats like sum of received votes)

For the Community

  • Once the above is done, start creating rules topics!
  • Some examples of good ones to start with (examples from SE) are I/O rules and loopholes

For moderators

  • Once these posts exist and have enough answers, summarize them into help topics for the site.
History
Why does this post require moderator attention?
You might want to add some details to your flag.

3 comment threads

New meta tag done (3 comments)
Question about new post types (9 comments)
New meta tag (1 comment)
+5
−0

Update: the meta tag is live, so we can start the posts. I have created a few here with a few sample answers, but the rest is up to the community! Make sure to vote on other answers as well as post your own.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+1
−0

Something I would like to see here are explicit and specific constraints on how submitted solutions are expected to accept the challenge input and output their solutions (if output is the goal).

For example, if a challenge states that your goal is to "find the string of least length in a list"... then all of the solutions below are valid, despite serving different purposes.

min(s,key=len)
a=min(s,key=len)
print(min(s,key=len))
import sys
min(sys.argv[1:],key=len)
import sys
a=min(sys.argv[1:],key=len)
import sys
print(min(sys.argv[1:],key=len))

I briefly (very briefly) looked around for some kind of template or ruleset, but I wasn't able to immediately find anything. This community would greatly benefit from a tab/link on the topbar/sidebar that points to a clearly defined set of rules and expectations for anyone wanting to post a challenge or submit a solution to a given challenge.


(This is a criticism, but hopefully not read as an angry one)

The challenge I'm working on is https://codegolf.codidact.com/posts/279434. This is a great challenge concept. My issue with it is that it is not clear how my solution should accept the challenge input, nor is it clear what constitutes a valid solution.

Given a list of strings(and optionally, their length) as input, weave the strings together.

I can make assumptions on how to accept the input, but the submitted solutions don't follow that assumption. Some take interactive input. Some assume the input is in some pre-existing variable (which makes golfing really easy, since accepting input or reading argv would require extra characters).

Working out what is a "valid" solution is a bit harder, though. Does it need to be a function? Can it be assigned to a variable? Can it just be the bare-minimum code that you would assign to a variable? (See the code blocks above for an example.)


I know exactly how easy it is to make the mistake of not being clear enough in the requirements of a challenge. A few years ago, I posted a mini-challenge in the community I moderate in, where the challenge was to convert seconds into a human-readable format (aka convert 61 seconds into 1m, 1s, with weeks being the maximum unit). I also explained to drop all 0s (and their corresponding unit), so 60 seconds would become 1m instead of 1m, 1s.

I then gathered the submissions in order to measure the elapsed time of them. It was then that I realized my error. Nearly everyone had submitted something that outputted the solution rather than returned the solution. I asked them to resubmit their solutions as functions that returned the value instead, as writing to STDOUT adds extra time and skews the results.

I ended up having to revise the rules multiple times because I just underestimated how easy it is to misinterpret/misunderstand something unless you are annoyingly explicit about it.


The only standard rule I can think of is to make all challenge input be read into the program as a space-separated list of strings, and to make the program write the answer to STDOUT. This would make it really easy to verify whether the output is correct or not. At the very least, I think a template for challenge authors could be extremely useful. It could be like those default templates you see for GitHub issues, but for challenge problems instead.

Lastly, I apologize for my admittedly clunky writing. It's been years since I've wrote an essay. Also, if I've somehow just overlooked the ruleset, please yell at me.


Edit: The point I was mostly trying to make is that a template would help nudge challenge authors to be more descriptive and specific in their requirements. A hard ruleset probably isn't necessary. You can never have too much information, however.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

The "default-rules" tag (1 comment)

Sign up to answer this question »