is a fairly popular tag with just about 200 questions at the time of posting. It also has a pretty minimal description:

Imposes a restriction on the source code used to solve the challenge, for example, having no numbers in the source code.

While short tag description can have a lot of benefits I have been noticing a good deal of low quality or problematic questions tagged with restricted source lately. So I thought it might be time to talk about what makes a problem good and bad and what we can do to help people make good challenges with this tag.

So, what does it mean to be a good restricted source question?


1 Answer 1


Restricted Source should be program verifiable

A source restriction should be verifiable by a computer, otherwise a question is unclear and should be closed. If it cannot be checked by a computer, it is likely not actually a restriction on the source of the program but on something else. (like the algorithm implemented or the programming language chosen)

How does this apply to questions currently tagged with ?

In my mind there are three types of challenges.

  • Restricting operations:

    These questions ban a type of operation, such as addition or for loops.


  • Banning characters:

    These type of questions give a list of characters that you are not allowed to use in your program.


  • Patterned requirements:

    These questions require the entire source code to follow pattern or structure specified in the question.




The first one is unenforceable. If you ban addition is incrementation allowed? If you ban loops is recursion allowed? These kinds of restrictions cannot be checked by a computer and human checkers might even disagree. These are not restricted source questions and should be closed as unclear.

The second type are a little better and by far the most popular of the three types. For a single encoding it is not very hard to write a program to check if answers follow the restriction. For other encodings it might be harder and there might be room for interpretation or disagreement but overall it is clear and . These are however boring. We see a lot of implement a trivial task without these characters and they are no longer novel and should be discouraged in the tag wiki.

The third type of challenges, the patterned type, are the most interesting of the bunch, they are often verifiable regardless of the encoding. These challenges are what we should promote as the use of .

  • \$\begingroup\$ How do you categorise challenges in which a program has to fail/change behaviour under certain types of mutation (the opposite of radiation-hardening)? (This is a restriction commonly used as a method of banning comments.) Is that restricted-source at all? \$\endgroup\$
    – user62131
    Feb 26, 2017 at 3:11
  • \$\begingroup\$ @ais523 I was not familiar with these prior. In my opinion these are not restricted-source but I am not an expert in this area. \$\endgroup\$
    – Wheat Wizard Mod
    Feb 26, 2017 at 3:14
  • \$\begingroup\$ Related. \$\endgroup\$ Feb 26, 2017 at 10:25

You must log in to answer this question.

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