# Tag Info

445

Interpreting the challenge too literally That is, if the challenge says "write a function that, given a number n, returns the n-th prime", posting something equivalent to: function f($n) { return "the$n-th prime"; }

367

Fetching the desired output from an external source This includes doing an HTTP request to fetch the page with the question and extracting a solution from that page. This was mildly amusing back in 2011, but now is derivative and uninteresting.

313

Using a made-up language specifically designed for the challenge This includes any language with commands that "do whatever I choose them to do". Claiming that your answer is written in "MyOwnLanguage", where the command x means "read a sequence of numbers, split them into groups of three, and print the last numbers of those groups ...

229

Using lots of spaces to "hide" code out of bounds, especially in underhanded questions. This isn't very clever or tricky, in my opinion, and yet wins all too often. Example: #include <stdio.h> #include <time.h> #include <stdlib.h> int main() { srand(time(NULL)); // Make sure to seed rand so it's VERY random, we want to make super ...

174

Using the program name to store data without counting those bytes Example - this bash script prints Hello World! echo $0 Must be saved in a file called Hello World!. When using the filename to store data, add them as extra bytes to your solution similarly to any non-standard parameter. For example the correct byte count for the above is 7 (echo$0) + 12 (...

170

Outsourcing the real answer I still did not see people using this thing here in serious answers (just in some jokes ones), but already saw it being used seriously elsewhere. To circumvent restrictions and rules in the question (normally size), the answerer writes a small program that downloads the real program from elsewhere and then compiles and runs it. A ...

141

Hard-coding the output Unless the question is an obvious exception (the primary exception being those tagged kolmogorov-complexity), your program is expected to do work, not just print a pre-calculated result. If the question doesn't require input and so a solution which just prints the answer would seem to meet the spec, downvote the question rather than ...

138

Copying an (unimproved) answer from elsewhere If it's not your own work, and you can't even try enough to golf or improve it, then it's not yours to post.

138

Fake random numbers Pretty much any underhanded challenge involving random numbers will have someone post this one: int getRandomNumber() { return 4; //chosen by fair dice roll. //guaranteed to be random. } It was funny when Randall Munroe did it 7 years ago, not anymore. It has been used in many challenges, some even multiple times in ...

130

Adding input or rules which weren't explicitly mentioned in the challenge There was recently a case where an answerer claimed Nowhere does it say the program can't (also) ask the user what the [result] is. Adding additional input or new rules, because they haven't been explicitly forbidden, can considerably simplify the challenge or make it trivial. ...

119

Zero-length quines Considering an empty program a quine was original in the 1994 IOCCC. Over two decades later, if you can answer a question with an empty program and that question is scored by length (e.g., code-golf) and is tagged as quine, source-layout or restricted-source, just notify the OP.

106

Using a different name for something that's prohibited The title is not very clear, I know, but this is what it means: if a specific function is prohibited, someone can use a language where another term than "function" is used (for example "subroutine"), and then that user can claim that their submission is valid because they aren't using a function but a ...

93

Identical functions with different names For example, if + is forbidden, using num3 = num1.add(num2) or num3 = num1 num3 += num2 or num1++ or (GolfScript) ) etc.

91

Using a non-free language on a Cops and Robbers challenge Most (currently all) cops and robbers challenges consist of two parts: A cop submission, where a user posts some secret property of a program, such as its output, a scrambled version of the code, etc. Then, other users, the robbers, try to deduce the original program, or another program with the ...

90

Using prior knowledge to circumvent other loopholes In particular, gaining an unfair advantage by inventing new languages for future challenges that are being sandboxed, discussed in chat, are your own, etc. For example, creating a language that solves a task specified in a sandboxed post with a one-character built-in (or even a zero-byte solution) should ...

82

Using MetaGolfScript MetaGolfScript is a family of programming languages. For example, the empty program in MetaGolfScript-209180605381204854470575573749277224 prints "Hello, World!". It is similar to using extra command line arguments, where they should also count as characters. And using the standard interpreter is likely using the program name to store ...

80

Posting a code snippet instead of a complete answer Note: There is now a separate question covering this loophole in more detail. This is a issue mainly for code-golf, code-challenge and variants. Only in very few cases this seriously affects popularity-contest. The issue is when someone post a function, a method, an instruction or a code-snippet ...

68

Suicidal entries to King-of-the-Hill challenges. EmoWolf was funny the first time, but it's getting out of hand. While some not-too-serious answers are often necessary to kickstart a king-of-the-hill challenge, purely suicidal answers put in little effort and tend to get more upvotes than serious entries, simply because they're "funny". I'm not suggesting ...

65

Trust the community and add a standard loophole I think the community can handle the add-a-builtin problem (I may be very wrong). I think that if someone adds a feature to their language that is clearly meant to only solve one particular challenge, the community will probably downvote that answer into oblivion. However, I still think we need a rule against ...

63

Creating a new compiler for a language after a challenge was posted There is some debate arising from this answer. He created his own compiler for the C programming language that extends the language specifications. It seems pretty obvious that this will be declared a loophole, to me at least, but I'm posting this for the record.

60

Abusing native number types to trivialize a problem It is common practice to restrict challenges to cases where input, output and/or intermediate values of the algorithm of choice fit into the language's native number type. At least for input and output, this is generally assumed even if not stated in the challenge specification. There are at least two ...

58

GNU APL and ngn/apl use UTF-8, so use a byte counting tool. NARS2000 only uses UCS-2, so 2 bytes per character. IBM's APL2 is the only modern APL that natively supports APL EBCDIC, so 1 byte per character. Dyalog APL uses any Unicode format, or the classic Dyalog character set (Table 1 below).* APL+ only uses its own 256 character set (Table 2 below), so 1 ...

55

Optimising for the given test cases This applies to code-challenges and things like fastest-code, where you write some code that is measured by a criterion like runtime or size of your output (e.g. in compression challenges). These often employ an obviously finite set of test cases, because you have to measure the metric somehow. It's not in the spirit of ...

48

41

Yes Languages invented after a challenge should be allowed to be posted, but not be allowed to win.

41

Allow duplicate answers I think we shouldn't take action against duplicate submissions, even when the code is identical. We should assume good faith: the second submitter almost surely came up with the code on their own. We see on anarchy golf that identical submissions are common among experienced golfers when code is hidden. We have enough of a FGITW ...

40

URL shorteners / shortened URLs Every once in a while, we get a challenge that requires fetching some data from the internet. While some of them manage to ban URL shorteners in time, other don't. I propose to forbid them by default because of the following reasons. URL shorteners that were created after the challenge was posted are akin to adding a feature ...

40

Scope As I see it, there are five types of invalid answers: Answers that produce incorrect results. This is the most common type, and usually an accident. Answers that produce correct results, but break a rule of the challenge, ignore parts of the spec or violate a loophole. For example, answers that make use of banned built-ins fall into this category. ...

Only top voted, non community-wiki answers of a minimum length are eligible