If there is a code golf competition are you allowed to submit a submission that is clearly not going to win? I.E thousands of bytes? I know they do say that solutions must be serious competing entries, but for the sake of a complete answer as well as personal interest are such answers permitted. I feel like these esolangs are really killing languages like Java and Python. Are such answers permitted?


1 Answer 1


All answers must be serious contenders for the winning criteria in use. For code golf, that means you should make your code as short as you can.

What this means:

  • Don't leave any superfluous whitespace in your code.

  • Don't make variable names longer than they have to be.

  • Don't implement features the challenge doesn't require (prompts, input checks, etc.).

  • Don't get hung up on best practices or style guides. Code golf is about short code, not good code.

You can still use any language you like, no matter how verbose. Just try to make the answer in that language as short as you can. Comparing scores of different languages is rather meaningless anyway, even when it comes to "real" languages. J almost always beats Perl, which almost always beats Python, which almost always beats Java, which almost always beats Rust...

Note that I said as short as you can. Even if somebody posts a shorter solution, you shouldn't feel discouraged.

Summing up, just have fun golfing and don't worry about that rule.

  • \$\begingroup\$ "don't worry about that rule" seems antithetical to the points made in this answer, with respect to the question ("do all submissions have to be golfed?"). \$\endgroup\$
    – user45941
    Jul 9, 2016 at 1:38
  • \$\begingroup\$ My point is, as long as one is actually golfing his code, he'll satisfy the requirement. \$\endgroup\$
    – Dennis
    Jul 9, 2016 at 1:41
  • \$\begingroup\$ I absolutely agree with this answer, but I will say occasionally it's hard to tell if a new user is unaware that it needs to be golfed or just inexperienced at golfing. For example, if a new user posts a python answer with 4 spaces for indentation, are they not even trying, or bad at golfing? This problem becomes worse as I get better at golfing, and pick up the tips and tricks of it. \$\endgroup\$
    – DJMcMayhem
    Jul 9, 2016 at 5:59

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