-8
\$\begingroup\$

Code-Golf scoring without need to print all in one line

Often great answers in code-golf questions are too hard to read. Also the counting of bytes or characters should just count all characters not including white space. With all the great golfers here, let's some script ideas for scoring so every answer is counted the same but the answers can still be posted in a well-formatted style.

| |
\$\endgroup\$
  • 7
    \$\begingroup\$ I don't think that being hard to read is a real problem. \$\endgroup\$ – Rainbolt Jun 26 '14 at 19:52
10
\$\begingroup\$

Whitespace should be counted. If it wouldn't be, this rule could be abused easily, by using the language Whitespace or by using a space as a variable name (this is possible in Golfscript!).

Instead of doing this, it would be better if golfers provide a ungolfed version of their code (in addition to their golfed code), with proper indentation.

| |
\$\endgroup\$
  • 5
    \$\begingroup\$ There was recently the other abuse, where someone encoded his entire solution in a string of whitespace characters, added a quick decoder and called eval on it. \$\endgroup\$ – Martin Ender Jun 26 '14 at 23:41
7
\$\begingroup\$

I have always encouraged people to post an ungolfed version of their program alongside (i.e., in addition to, not instead of) the golfed version, to enable slightly easier reading by humans.

  • The golfed version still needs to squeeze all unnecessary spaces out, use single-character identifiers, etc., and is the version used for scoring.
  • The ungolfed version is simply a more readable version of the golfed version, with standard indentation and good identifier names. The ungolfed code must be identical to the golfed version in every other way.
| |
\$\endgroup\$

You must log in to answer this question.

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