Linked Questions

0
votes
0answers
126 views

Does the Python shell count as a “programming language”? [duplicate]

I used the Python shell to answer a question. Is that OK or should I have created a whole program for it?
0
votes
0answers
113 views

Is a function allowed? [duplicate]

Is it allowed to use a function instead of a complete program, in a code-golf question? (This has probably been asked before, I'm unable to locate the link.) Asked wrt @agtoever 's query on Output ...
0
votes
0answers
104 views

Are C# LinqPad answers encouraged? [duplicate]

The question Find i^n, given n does not clearly state whether the solution must be a compilable program or can be an expression, neither does it identify where the input shall come from. This leads ...
2
votes
0answers
49 views

Is boiler-plate code required for challenges? [duplicate]

When solving a puzzle with an appropriate solution, does the programming language standard boiler-plate source code need to be included: For example, should I include all of this: ...
459
votes
2565answers
240k views

Sandbox for Proposed Challenges

What is the Sandbox? This "Sandbox" is a place where Code Golf users can get feedback on prospective challenges they wish to post to the main page. This is useful because writing a clear and fully ...
372
votes
46answers
167k views

Loopholes that are forbidden by default

There are a number of standard loopholes which experienced question-setters seek to explicitly close. However, inexperienced question-setters may unintentionally leave them open, or respondents may ...
91
votes
80answers
23k views

Default for Code Golf: Input/Output methods

It looks like we have a consensus that we want certain defaults for the format which answers are expected in for code-golf. On that poll, the question arose twice, which input/output formats should be ...
82
votes
38answers
18k views

Things to avoid when writing challenges

If there is something that you find annoying / counterproductive / unfair / detrimental / no longer funny in challenges (question posts), describe it in an answer here, and propose a recommended ...
18
votes
5answers
795 views

Things to consider when creating a challenge

There's a lot to remember to include when writing a challenge for this site. What are some things that are easy to forget? Return to FAQ index
18
votes
4answers
486 views

Do all challenges have to be answered with code?

We have a tag fastest-algorithm and we've had it for a while now. Submissions are scored based on the time complexity of the algorithm. This means that the actual implementation has no effect on the ...
14
votes
4answers
1k views

Should function literals be allowed when a function is asked for?

I'm arguing with the poster of this answer. The function literal as is doesn't cause the function to be defined, it has to be assigned to a variable, giving it a name or wrapping it like ...
18
votes
2answers
344 views

Are functions that only work when called valid as answers?

In Haskell it is possible to define functions that will cause a compiler error unless they are called elsewhere in the program. For example the following code causes a compiler error ...
22
votes
2answers
2k views

When is code that requires a REPL acceptable?

Question in brief: For what challenge types and in what circumstances should code that requires a REPL be acceptable in an answer? There seems to be an understanding in chat that code that only works ...
7
votes
3answers
301 views

When submitting a function, can global variables be declared outside the function? [duplicate]

1. When submitting a function, can global variables be declared outside the function? For example, if I have the C code f(n){int a,b,c=4;dosomething;} am I ...
8
votes
3answers
225 views

Function-only answers to function-or-program questions should provide a test program

From Default for Code Golf: Program, Function or Snippet?, it is clear that the default for code-golf is to allow program and function answers. For function-only answers, it may be advantageous for ...

15 30 50 per page