4
\$\begingroup\$

I have an idea for a new genre of questions, questions, and I thought I would run it through meta before giving it a try.

The basic idea is that you have to try to solve a problem, but certain characters cost certain amounts! Here's a quick example:


I could have this table:

| a-z   | 10 |
| A-Z   | 15 |
| =!    | 15 |
| {}    | 20 |
| ()    | 25 |
| []    | 50 |
| +-*/% | 55 |
| "'    | 60 |
| ;     | 1  |
| other | 80 |

Now lowercase letters cost me 10 points, uppercase cost 15, etc.

I could then limit this challenge to certain languages. Here's a small list off the top of my head:

  • C
  • C++
  • C#
  • Java (you get class A{public static void main(String[]a){}} for free)

So, what do you think? Good? Bad? Ideas? Waffles?

\$\endgroup\$
7
  • 3
    \$\begingroup\$ Waffles. Definitely waffles. \$\endgroup\$
    – Justin
    Commented Jan 21, 2014 at 23:40
  • 8
    \$\begingroup\$ I don't like the idea of restricting entries to specific languages only. In my humble opinion, the best code challenges are language-agnostic. Say I, whose favourite language is not a commonly-used language and who would hate to be excluded from participating. \$\endgroup\$
    – C. K. Young Mod
    Commented Jan 21, 2014 at 23:47
  • \$\begingroup\$ @ChrisJester-Young I've always been against language-specific questions too, but this could be abused by using a language in which, say, ;=!{} and letters are the mainly used characters. \$\endgroup\$
    – Doorknob
    Commented Jan 21, 2014 at 23:48
  • 3
    \$\begingroup\$ You should always ask yourself - if it could be abused maybe it is the definition which is not good. E.g. I'm currently unclear what kind of puzzles are interesting in this new scoring system - i.e. write a challenge where your scoring table makes a reasonable difference to standard code-golf rules. \$\endgroup\$
    – Howard
    Commented Jan 22, 2014 at 6:31
  • 1
    \$\begingroup\$ +1 for "What makes this interesting?" I see what you are aiming at, but I think that unless you restrict a given challenge of this type to one specific language, it will always have an exploitable bias toward certain languages. For example, in languages where capitalization is reserved for system words/functions, there is a definite bias in scoring upper and lower cases differently. Granted one can argue that code golf itself is implicitly biased toward less-verbose languages, but there's a key distinction in that it is the language, not the questioner's criteria, which imparts that bias. \$\endgroup\$ Commented Feb 23, 2014 at 0:12
  • \$\begingroup\$ @ChrisJester-Young on the other hand, trivial challenges restricted to languages where they are not trivial are often fun, too. Say, create a 10x10 array in javascript \$\endgroup\$ Commented May 25, 2014 at 6:35
  • \$\begingroup\$ This sucks for No Comment, though that doesn't matter as much; in ncmnt, numbers are represented as unary tildes (~), and multiplication is a comma, etc. \$\endgroup\$
    – cjfaure
    Commented May 26, 2014 at 9:30

2 Answers 2

5
\$\begingroup\$

The main idea is good, but it would only work in a language-specific way, as someone will definitely find a language, that uses differnet characters to represent the concepts.

So instead of this, why not add costs for language features?

| calling a function              | 10 + 2*parameters |
| pushing a value onto the stack  | 20                |
| assigning a value to a variable | 15                |
| using a code block              | 5                 |
etc.

Of coure there might be debates on what can be considered a "function call" or a "code block" in like Befunge or GolfScript, but these might be ironed out in the tag wiki.

The result cost might be based on the character count + the cost of the language features

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Definitely worth keeping a raw character count in the play. I like the challenge of having to track which one-character variable is which. (Yeah, I know I could just as well refactor after debugging, but that's no fun) \$\endgroup\$ Commented May 25, 2014 at 6:38
3
\$\begingroup\$

It's an objective winning criteria.

I don't know that I'd find it particularly compelling, but I don't see any bar to using it on the site.


I am wondering about the name, though. ?

\$\endgroup\$
4
  • \$\begingroup\$ I'm not asking whether it would be allowed; I'm just asking for input from the community. Yeah, I'm terrible at coming up with names :-P \$\endgroup\$
    – Doorknob
    Commented Jan 22, 2014 at 2:31
  • 5
    \$\begingroup\$ The correct name surely involves the word weighted. \$\endgroup\$ Commented Jan 22, 2014 at 11:05
  • 2
    \$\begingroup\$ weighted-golf? \$\endgroup\$
    – user10766
    Commented Feb 20, 2014 at 23:30
  • \$\begingroup\$ Or perhaps "green fees"? \$\endgroup\$ Commented Feb 23, 2014 at 0:07

You must log in to answer this question.

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