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 How do we handle standardizing things?

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). F...

posted 6mo ago by Hackysack‭  ·  edited 6mo ago by Hackysack‭

Answer
#3: Post edited by user avatar Hackysack‭ · 2024-05-19T15:35:19Z (6 months ago)
Clarify in my example that it's a list of strings.
  • 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"... then all of the solutions below are valid, despite serving different purposes.
  • ```py
  • min(s,key=len)
  • ```
  • ```py
  • a=min(s,key=len)
  • ```
  • ```py
  • print(min(s,key=len))
  • ```
  • ```py
  • import sys
  • min(sys.argv[1:],key=len)
  • ```
  • ```py
  • import sys
  • a=min(sys.argv[1:],key=len)
  • ```
  • ```py
  • 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 `0`s (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.
  • 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.
  • ```py
  • min(s,key=len)
  • ```
  • ```py
  • a=min(s,key=len)
  • ```
  • ```py
  • print(min(s,key=len))
  • ```
  • ```py
  • import sys
  • min(sys.argv[1:],key=len)
  • ```
  • ```py
  • import sys
  • a=min(sys.argv[1:],key=len)
  • ```
  • ```py
  • 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 `0`s (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.
#2: Post edited by user avatar Hackysack‭ · 2024-05-19T05:44:39Z (6 months ago)
Added a summarizing clarification
  • 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"... then all of the solutions below are valid, despite serving different purposes.
  • ```py
  • min(s,key=len)
  • ```
  • ```py
  • a=min(s,key=len)
  • ```
  • ```py
  • print(min(s,key=len))
  • ```
  • ```py
  • import sys
  • min(sys.argv[1:],key=len)
  • ```
  • ```py
  • import sys
  • a=min(sys.argv[1:],key=len)
  • ```
  • ```py
  • 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 `0`s (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.
  • 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"... then all of the solutions below are valid, despite serving different purposes.
  • ```py
  • min(s,key=len)
  • ```
  • ```py
  • a=min(s,key=len)
  • ```
  • ```py
  • print(min(s,key=len))
  • ```
  • ```py
  • import sys
  • min(sys.argv[1:],key=len)
  • ```
  • ```py
  • import sys
  • a=min(sys.argv[1:],key=len)
  • ```
  • ```py
  • 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 `0`s (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.
#1: Initial revision by user avatar Hackysack‭ · 2024-05-19T05:36:31Z (6 months ago)
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"... then all of the solutions below are valid, despite serving different purposes.

```py
min(s,key=len)
```
```py
a=min(s,key=len)
```
```py
print(min(s,key=len))
```
```py
import sys
min(sys.argv[1:],key=len)
```
```py
import sys
a=min(sys.argv[1:],key=len)
```
```py
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 `0`s (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.