Sometimes we get questions from a first-time contributor asking for help golfing a particular piece of code that they wrote. Often these question don't fare so well. Can we do anything here?

There's many ways for these questions to go wrong. A benign one is for answerers to treat it as a standard code golf challenge. Except, it's limited to a single language and often unclear on what the task is exactly, so it would be closed as a normal challenge. The answers are often just "X bytes" and some golfed code without explanation, which isn't really giving tips for the asker.

Another failure mode is the that asker says answers won't work for them because of some unmentioned rule like that the code has to fit in one line or run within two seconds. We have pretty liberal rules about I/O and things that can lead to improvements that the asker can't use. Conversely, they might have allowances we don't know about like free imports.

Finally, a number of these questions seem to just be attempts to cheat at an ongoing outside competition, which leaves a bad taste in my mouth.

I think questions like this are important to handle well. We have users coming in with an existing interest in golfing and drive to improve, and they might stay as long-time productive contributors. How can we make these types of questions work out better?

  • \$\begingroup\$ It may be good to add either information from the answers here, or a link to this question, in the tips tag description. While new users probably won't read it, I think it will help the users of this site more easily solve the problem of guessing if the poster wants to post a challenge or if they want to ask for help. \$\endgroup\$ Commented Mar 2, 2020 at 20:17
  • \$\begingroup\$ @FryAmTheEggman I made a pass at editing the tag. Let me know if you have other suggestions. \$\endgroup\$
    – xnor
    Commented Mar 25, 2020 at 8:11
  • \$\begingroup\$ I think what you added was good; I made a small edit to include that the code has to already be working. \$\endgroup\$ Commented Mar 25, 2020 at 13:43

1 Answer 1


Enforce standards for these questions

I think a lot of the problem is that golf-this-for-me tips questions aren't held to the site's usual standards of clarity, completeness, and objectiveness. I know these can be hard for new askers to get a handle on, but we already require the same for challenges they'd post. Sandboxing should be strongly encouraged here too.

Basically, I'm saying these questions should be closed if our close reasons apply.

I propose these requirements for clarity:

  • The task being solved must be specified to the level we expect of challenges. A reference implementation is not sufficient.
  • Any additional requirements should be noted, such as language, version, and run-time.
  • Any deviations from site standards in scoring or I/O format should be noted.
  • All relevant information must be in the question body, not behind a link or in comments.

Additionally, these questions need to meet the standards of focus, research effort, and attribution that are expected of Q&A on the network, in particular for "help me with this code" questions seen on SO.

  • Simply dumping code and saying "How can this be shorter?" is not acceptable. The poster needs to state things they've tried or point out specific parts they think could be improved.
  • The source of the challenge should be credited, with a link if possible. If applicable, the asker should explain why it's OK for them to post the challenge and ask for help with it.
  • \$\begingroup\$ I think it would also be beneficial to ask such questions to include what else they have tried. That way we can avoid repeating work, etc. they have already tried. \$\endgroup\$ Commented Mar 2, 2020 at 20:21
  • \$\begingroup\$ Sometimes people voluntarily help you golf your answers. \$\endgroup\$ Commented May 19, 2023 at 17:50

You must log in to answer this question.

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