# What exactly is the difference between code-bowling and code-trolling?

In February 2011, our first code-bowling question turned up.

Over two years ago, this meta post turned up. It asked whether , a genre then occasionally seen on Stack Overflow, was suitable for the site. Two years on, no objective winning criterion has been found for code bowling, and few if any good questions or answers have been seen, although only 12 have been posted.

A comment by m.buettner on this sandbox post explains the issues clearly:

I'm afraid this has the same problems as pretty much any code-bowling question. You can basically make any program infinitely long by adding abstraction layer over abstraction layer or adding useless detours in the code. So the winner boils down to who has the most endurance or writes the first valid code-generator and which point you'll have a submission with infinite score. Most people try to close this loophole by saying "no bit of code must be useless", but depending on how you interpret it, it either doesn't close the loophole or doesn't justify anything beyond print "Hello World"

# Issues with code-bowling

• Program can theoretically be infinitely long, see this answer or some of the others on that question. Since infinity == infinity, all answers can be the same length and there is no objective winning criterion and none can be found - even "don't use any function twice" still leaves too much room.
• Often far too broad like this question to compose any long vim command.
• Similar to code-trolling.
• We can't have competitions without rules. The first code-bowling question explicitly stated:

There are no real rules. As long as the program functions, have [a go] at it!

# The Solution

My opinion is that we must kill code-bowling. If code-trolling is bad, there is no justification that I can see to keep code-bowling. It would go against our policies of "objective winning criterion" to keep code-bowling. We would be contradicting ourselves if we killed code-trolling but not code-bowling.

In 2011-2012, when code-bowling was born, we effectively gave it a trial period to see if any good questions would turn up. No good questions which meet the site's rules have turned up. Therefore, code-bowling must suffer the fate of code-trolling.

• If we're gonna kill every question genre that gained some popularity pretty soon instead of PPCG our site will be renamed as CG. Why don't we just add stuff like "hardcoding every case in ifs" etc as standard loophole? – user12205 May 31 '14 at 18:52
• @ace There's no real, objective way to ban code that does nothing. If you restrict it to "don't use a function more than once", people will use all the functions in a language and eat their output somehow. Hence an answer can either have an infinite score or one which is so language-specific that one or two languages with lots of builtin functions would just dominate the tag for no other reason. And although it does look like we're killing lots of tags, ultimately this is only the second – user16402 May 31 '14 at 19:08
• Off-topic: it's interesting how you've modified the quote to "have [a go] at it!". See english.stackexchange.com/q/7173 – user12205 May 31 '14 at 19:36
• @ace Would you really call code-bowling (or code-trolling for that matter) a programming puzzle? – Martin Ender May 31 '14 at 21:50
• @m.buettner I'm in favour of changing the site's name to Programming Challenges and Code Golf, so code-bowling may fit if they are interesting/high quality – user12205 May 31 '14 at 21:54
• The thing that I don't really like, of course, is the "kill with mighty fire" model which brought down code-trolling. Things should be a bit quieter than that.. – user16402 Jun 1 '14 at 16:17

How about requiring that code-bowling questions work with strict restrictions that inherently limit the possible total? Essentially, the analogy would be to the gutters in actual bowling.

For instance, write the longest Hello World program... that doesn't reuse the same character twice. Or that never uses the same function/operation/structure twice.

Basically, I'm asserting that the problem is that "code-bowling" isn't well-defined to begin with, and a more proper definition will produce more interesting challenges. Removing the concept entirely will just limit the potential for interesting questions.

• I don't think prescribing the restriction in the tag description will be of much help. There could be more interesting restrictions than just "don't reuse any character/function/operator/structure". By requiring the restriction to be something like that, we could miss out on a lot on a lot of interesting code bowling challenges, because I don't think you (or anyone) can foresee the kinds of limitations people will come up with. If we want to keep code bowling around, we just have to make sure that new challenges do introduces such a restriction whatever it may be. – Martin Ender Jun 2 '14 at 9:13
• I wasn't saying that the restrictions would be specified in the tag, just that the tag would require that there ARE strict restrictions. That is, the tag might be described as "Code-bowling is a competition to solve a particular (usually simple) problem in the most bytes or complexity, subject to significant restrictions" – Glen O Jun 2 '14 at 10:55
• Oh okay, I read it as deciding on some restriction up front. If you are just saying that there has to be a restriction, I actually addressed exactly that in the second paragraph after the bullet-point list in my answer. (I don't blame you for not reading it. It got pretty long.) – Martin Ender Jun 2 '14 at 11:32
• I think my issue with capping code-bowling to some maximum is what happens when multiple answers hit that cap? How do you decide who wins in that case? – Kyle Kanos Jun 4 '14 at 14:33
• @KyleKanos - Same thing as what happens in code-golf when multiple answers tie for shortest. But then, I suspect you haven't read through the comment carefully enough - restrictions, not caps. Restrictions should be in place that prevent infinite solutions. For instance, limits on number of uses of any particular ASCII character, or limits on function use, or limits on sequences of characters, or limits on nesting/assignments, or limits on what form a solution can take (placing restrictions on abstraction), etc. – Glen O Jun 4 '14 at 15:14
• @GlenO: I read and understood what you meant, but whether you call it "capping" or "restricting," the end result is the same: there is some maximum value achievable. – Kyle Kanos Jun 4 '14 at 15:26
• @KyleKanos - again, just as there is a minimum value achievable in code-golf. But different languages have different maximums, and it's not always trivial to obtain the maximum, even if you know of ways to produce infinite solutions. For instance, writing a "hello world" with no repeated uses of characters is a challenge in itself (three "l"s, two quotes, two "o"s, and that's before the command to print)... having to do it while trying to also maximise the code length is even more of a challenge. Especially if you also require that variables are given single-character names. – Glen O Jun 4 '14 at 15:30
• I'm not sure what your point is there ^. There's definitively some maximum value, my question was simply: what happens when 2 (or more) people hit that maximum? You answer it in your first sentence of your first response. My previous comment was merely to rebut your assertion that I didn't read your post or subsequent comments. – Kyle Kanos Jun 4 '14 at 15:33
• Since this has 10 votes, I edited the tag wiki to reflect that it needs to be in conjunction with restricted source. – PyRulez Jun 13 '14 at 0:43

TL;DR: I don't like the existing code bowling questions, but I'm not sure there is no hope for it. I'm not suggesting a course of action in this post, but just laying out some arguments for either side, so people can form their own (informed) opinions.

I don't agree with the parallels you're drawing between and . There are a lot of differences between the two. In particular writing long and unmaintainable code was just one way to approach a code trolling challenge. But code trolling wasn't about that. Code trolling was a lot more general (which was one of its main problems). Hence, I don't think you can form a valid argument here that is based on comparison with code trolling.

I do agree with being problematic though (well, of course I do, your post quotes my own comment :D). However, I have to disagree a bit with you here as well. In particular, I don't think code bowling is lacking an objective winning criterion. Because "largest code size in bytes/characters" is equally objective as any code golf. The problem is coming up with loophole-free rules that can be enforced objectively.

I'm not saying it's impossible, but it's very hard. Statements like "no line must be useless" are not objectively enforcible. Not reusing functions is objective, but it leaves loopholes like just putting in an infinitely long literal or variable name. And I'm not even sure it would be a useful rule if it worked. You have to work really hard to get that down, and for the challenge to be fun as well, it should actually be hard to write a valid submission longer than 100 characters or so, because I don't want to slave away at writing 10k lines of code just to be competitive in the challenge.

Okay, so what I did was the same I did for : I looked at every single question that has been asked. I left out the two ones that are closed anyway, so it's down to 10:

• The very first code bowling is in fact really just code trolling with the restriction that the code has to work. This may have been why you drew the parallel between the two. It obviously lacks both objective rules and objective winning criterion.
• There are a few that are tagged both and which basically amounts to code trolling as well: this, this as well as one of the closed ones.
• There are five which basically end in ridiculous quasi-infinite size submissions. They either ignore the fact that something like that would be possible, or tried to rule it out with things like "no redundant code" which you can always work around. Or if you start arguing that something is redundant you can very quickly extend the argument to any detour at all being redundant, which defeats the point as well.
• There is this question where I can't gauge if the challenge itself is actually impossible or - if not - if it would be trivial to extend to an infinitely long submission. But it's more of a code challenge anyway then actual code bowling, because the scoring is quite elaborate and just happens to incentivise convoluted code.
• There is this question which avoids the problem by putting a hard limit on the code size. I think this is actually a very decent idea, and probably the only half-reasonable instance of code bowling so far. Unfortunately, this particular question has another flaw, which is the not objectively measurable readability of the ASCII art. But that's beside the point here.

In general, I have to say, code bowling has been pretty crappy so far. But as opposed to code trolling, it doesn't seem to be something inherent to code bowling as a scoring mechanism. That last question shows (to me, at least) that with a bit of careful thought, a few good code bowling questions might be possible, and people just haven't been trying hard enough. At the same time there is an appreciable probability, that it's just too damn hard to come up with decent rules for such a question.

I think most folks writing a code bowling challenge just think "oh, let them write TONS of code, that would be fun, yay code bowling." Maybe we could change that vibe by rewriting the tag summary to something like "The goal of code bowling is to maximise the size of your code length subject to some constraint." And people would also have to make sure that the constraint has to be very rigid, because I don't think anyone wants to write (and much less read) those thousands of characters long submissions and just stop at an arbitrary point because they can't be bothered any more. You should have to work as hard for each single character in code bowling as you do in code golf. If you can come up with rules like that, I'm all for code bowling. As long as you don't I won't really grow fond of it.

With that in mind, I don't really know what course of action to suggest here. In two years, only one question managed to get anywhere near being a good code bowling challenge (in my opinion). So it might well be possible, we just need to try harder and keep looking. At the same time, I'm not really sure we will find the holy grail of code bowling any time soon, so maybe this concept doesn't warrant it's own tag (which just seems to attract badly thought-through challenges) and those new concepts should be given their own chance as a simple . I don't think we need to be as harsh with this as with code trolling, but I wouldn't mind cleaning up most of the existing code bowling either, because currently it's not really doing any good.

So as I said at the beginning, I'm not actually voicing a clear opinion on what to do here, I just wanted to collect the above information here, so people can draw their own (informed) conclusions.

Long-ish PS: After thinking about it for a while, my own recent challenge is a bit of a code bowling (disguised as a code challenge). I asked people to print as many digits of the golden ratio on a strict character budget per digit. This is not much different from asking for the longest code that prints a sufficient number of digits, which depends on the code length. I had a really hard time closing loopholes to prevent infinite scores, which made the rules ridiculously complicated, and I wouldn't want every code bowling challenge to have to be that convoluted. However, I think I did manage to create a situation where - very soon after they started - participants (except the accepted answer) actually had to work hard for every single character, just like you do in code golf. But as you can see, the accepted answer, even though not scoring infinity, side-stepped all that and did find a loophole in the end. So while I wasn't aware of it, I've also fallen victim to the perils of posing a code bowling type question.

For me, the difference is this: Code-Trolling is like watching a clown slip on a banana skin and fall over: amusing once, but not after you've seen it a thousand times. Code-Bowling is like listening to someone reading the phone book: bloated and dull for everyone.

Code-Bowling answers do at least work. Nominally, Code-Trolling answers are supposed to work too, but there were plenty that didn't work (including some of my own) that got upvoted, in some cases heavily.

On the other hand, Code-Bowling is actually a less objective winning criterion than the Popularity-Contest criterion that was slapped on Code-Trolling. It is not at all clear what is a legitimate way to bloat code and what isn't.

So, question for question, I like Code-Bowling less than Code-Trolling. But I don't see that it's causing the same level of problem. There have been 12 questions asked, ever (the first in early 2011) of which 6 were asked in 2014 (current rate just over one a month.) In contrast, there were 23 Code-Trolling questions in under 141 days according to the references below. That's more than one a week! Code-trolling was a plague, fuelled by people (some new to PPCG) who'd never seen a clown slip on a banana skin before.

So, much as I dislike Code-Bowling, I wouldn't move fast to eliminate it if others are enjoying it. I don't believe in restricting others' freedom and I can just ignore these questions. It isn't whipping up the vigilante close-voting that was occuring with Code-Trolling before the community decided as a whole that it didn't want it. So, if you ask me to vote I will abstain. But if you force me to vote I will say kill it!

References (for statistics)

• As mentioned in my answer (and at one point in m.buettner's), the objectivity problem isn't inherent, it's a flaw in the definition. Require restrictions, and you get an objective winning criterion. See my code-bowling question here: codegolf.stackexchange.com/questions/30159/… - and I'm planning another one (not a Hello World) already that has very different restrictions/scoring but should also work well. – Glen O Jun 5 '14 at 4:14

# Should we kill komolgorov-complexity?

After all, in the wiki for it says: "Goal is shortest length (i.e. code golf)."

So we could just get rid of it entirely and use instead. Then there are tags like , or , which don't correspond to any particular type of challenge either, but instead are there to, you know, tag the post.

My point is, lets just enforce on any question tagged with , like how pretty much all komolgorov-complexity-questions are also tagged with code-golf or how most code-trolling-questions used to be a popularity-contest, and be done with it. This way there is an objective winning criteria (i.e. the community decides at what point a persons code is unnecessarily bloated), fans of code-bowling can still participate in writing lots of code, and everyone is happy.