User talk:DanBron/Game of Nim

From Rosetta Code

Code Golf

Given the spirit of friendly competition on RC, I thought it might be fun to introduce a new kind of RC challenge, different from the usual "implement this algorithm" type of task: code golf.

The idea is to have a simple, but not trivial, task, where the challenge is more in whittling it down to its essentials than in innovating in the algorithm or extending functionality.

I've seen some misgivings about code-golf expressed elsewhere on RC, so I'm using this task to test the waters. My hope is that it will be a fun break for established users, draw the attention of new users, and will be invigorating generally. If that pans out, then we could create a class or category for code-golf, distinct from the typical "task" template.

Of course, because code-golf is quantifiable, it's more liable to cause disruptive competition between language camps. To forestall that and keep the competition friendly, I tried to make it clear that code-golf is to be considered a competition _within a single language_ and that it doesn't really make sense to compare _across languages_ (just as it doesn't make sense to compare "the shortest story" in English vs Chinese; English and Chinese have totally different concepts of what a written "word" is).

Anyway, seeing as this is a test case, I'd appreciate your feedback and comments.

--DanBron (talk) 14:21, 27 April 2013 (UTC)

Hi DanBron. How does code golf help to compare languages? The whole idea of golfing seems to be to obfuscate rather than elucidate. I don't think that golfing helps RC myself. -1
--Paddy3118 (talk) 16:56, 27 April 2013 (UTC)
Code Golf is one of the things we do not do here, along with performance comparisons. The problem with CG is that it tends to produce excessively compressed entries, which usually goes against the principle of idiomaticity of example; each example should show a newcomer to the language how they should solve that particular task. (The problem with performance comparisons? Well, apart from nasty code, they also suffer from being impossible to compare except on one particular system; they're just too localized in both space and time.) –Donal Fellows (talk) 07:25, 28 April 2013 (UTC)
There already seems to be a trend on the wiki to publish code examples as compactly as possible, often at the expense of readability and extensibility, explicit code golf challenges will probably only make it worse. Fwend (talk) 09:25, 28 April 2013 (UTC)