I have answered a challenge and the code ended up being longer than expected. I'm also pretty sure there is still room for golfing the code but I can't see it at the moment.

Is it okay to ask a question asking for tips on how I can golf it here? Is that covered by this site or is there somewhere else I can ask?


1 Answer 1


Yes, these are on topic. And we've had a few of them in the past, some of which were really well received. But don't be surprised if you get some close votes or downvotes first. Some people seem to think anything that's a question (as opposed to a challenge) belongs on Stack Overflow, or they'll think it's a badly written language-specific challenge. It might help if you make very clear that you've written some golfed code and you're interested in how it could be shortened further to pre-empt that situation a bit.

  • \$\begingroup\$ Okay thanks, I was sure it was on topic, and seemed to think I'd seen a post before, I just couldn't find it. \$\endgroup\$ May 15, 2017 at 10:56
  • \$\begingroup\$ @TheLethalCoder they are usually tagged with tips but you'll have to go searching for them between the per-language tip lists. \$\endgroup\$ May 15, 2017 at 10:58
  • \$\begingroup\$ What's the etiquette on these types of question if I find improvements myself? Self answer? Wiki answer? Comment? Edit question? \$\endgroup\$ May 15, 2017 at 12:13
  • \$\begingroup\$ If you find an improvement by yourself after posting the question, write it as a self answer. That's what other people would do if they found the improvement themselves. \$\endgroup\$
    – user62131
    May 15, 2017 at 17:59

You must log in to answer this question.

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