3
\$\begingroup\$

The recently added list for golfing tips in ECMAScript 6 sparked a bit of a discussion in the comments (and the close/reopen votes) whether tips for different versions of one language should go in the same list or whether we should create a new list. This is mainly relevant if a new version of a language is released which adds significant syntactic features useful for golfing.

There is a precedent for creating separate questions: Perl 5 vs Perl 6. But I'd prefer to have a community consensus about this policy on meta for future reference.

I will add two answers for the existing opinions along with the arguments I could find. Feel free to amend them or add your own answer if I missed anything.

\$\endgroup\$
0

3 Answers 3

5
\$\begingroup\$

We should split lists by version

Tips for the older version are often superseded and don't apply any more. Hence, they just dilute the content that is still useful and applicable for the new version, which will also have a hard time gathering the necessary upvotes to bubble to the top of the list.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ One thins to be noted in ES6 vs ES-pre-6 is that, with respect to code-golf, hardly any tip for ES-pre-6 applies for ES6. Most of the bloating of ES-pre-6 is gone away in ES6, so if you are looking at tips for ES-pre-6, then you are anyways not going to be better at golfing. Now if there is only one list, the ES-pre-6 tips won't help the user much, and the ES6 tips will be hidden amongst 100 other answers, somewhere very below in the list due to very less votes. \$\endgroup\$
    – Optimizer
    Sep 13, 2014 at 10:50
  • \$\begingroup\$ Just for the record (that is, for others): after looking through the old list, we found that most of the tips in there are not actually JS-specific or are duplicates of one another. We counted a total of 12 ES5-specific tips, only 3 of which are deprecated in ES6. What the ES5-list really needs is a cleanup. \$\endgroup\$ Sep 13, 2014 at 16:48
  • 2
    \$\begingroup\$ I think a few of the lists need a clean-up to remove stuff which is applicable to dozens of languages and should be in the "general" tips. On a separate note, I'm not sure what relevance bubbling to the top of the list has. There may be a very small benefit to having more frequently applicable tips have a higher score, but in general I think the point of these lists is that you read all of the answers because they're all potentially relevant to some golf. \$\endgroup\$ Oct 13, 2014 at 13:51
-1
\$\begingroup\$

We should keep all versions in the same list

Some old tips are still applicable, so if we split the list, one would now have to browse through both lists to find all the relevant tips for the language in question. Alternatively, we could copy over the tips that are still relevant, but duplicating content is rarely a good solution. So it might be best to just put them all in one list, with a note in each answer which versions it applies to.

\$\endgroup\$
1
  • \$\begingroup\$ NB the statement that "Some old tips are still applicable" can be interpreted in two ways, and both are true (at least in the case of ES6): some tips are applicable to both ES-pre-6 and ES6; and some tips in the old combined list are ES6-specific. \$\endgroup\$ Sep 13, 2014 at 10:25
-1
\$\begingroup\$

We should split them by tip

More specifically, we should split them into a problem and solution format, like every other Stack Exchange site does.

Benefits

  • Consistency with the Stack Exchange format
  • Searchable question titles
    • Everyone who has the same problem will arrive here from Google. Even in beta, we get rated very highly when a question titles matches a search. When the problem is too broad, as our current tips lists are, we become far less searchable.
  • Incentives for providing "good" questions and answers
    • No more community wiki. If you ask a good question, you get rewarded. If you provide an awesome answer, you get rewarded.
  • A tip that spans multiple languages could be generalized into a single Q & A
  • Allowance for competing answers
    • We currently lack the means for multiple users to compete to provide the best answer to a question. Maybe one of our tips could be beaten. Maybe some of then are useless in practice. We wouldn't know, because we never asked a practical question.

Consequences

  • Problems that are solved different ways in different languages would require a language tag
  • We would have to do something to the current tips questions
    • Dissect them? Historical lock them and treat them as not a duplicate of anything? I actually like the latter option.

Example Question

How do I do X[optional] in language Foo[/optional]? I've tried this, and done that research, but I can't figure it out.

Example Answer

This is how you do X.

\$\endgroup\$
15
  • \$\begingroup\$ The main consequence would basically be, that we'd get a lot of language-specific micro-optimisation challenges. (I'm not saying that's either good or bad.) \$\endgroup\$ Oct 13, 2014 at 15:28
  • 1
    \$\begingroup\$ @MartinBüttner I agree that tips questions could be thought of as "micro-optimisation challenges", but I fear that they might be closed for being too trivial. Maybe we need a shift in attitude, such that easy questions are acceptable. \$\endgroup\$
    – Rainbolt
    Oct 13, 2014 at 16:10
  • 2
    \$\begingroup\$ Major downside: if I want to read all the tips for a language, I have to load a dozen or more pages. \$\endgroup\$ Oct 13, 2014 at 16:14
  • \$\begingroup\$ @PeterTaylor Likewise, if you want to learn how to program in C++, you'll have to load dozens of Stack Overflow questions. I don't see anyone campaigning to compile those into one big list. If you have dozens of problems, then yes, you'll have to load dozens of pages. \$\endgroup\$
    – Rainbolt
    Oct 13, 2014 at 16:30
  • 3
    \$\begingroup\$ If I wanted to learn how to program in C++, I'd look for a single resource (a book or an e-book) and only use Stack Overflow as a supplement. Each tip question serves as that primary resource for "How to golf in X", because for some reason there isn't an O'Reilly "Code-golfing JavaScript in a Nutshell". \$\endgroup\$ Oct 13, 2014 at 16:39
  • \$\begingroup\$ @PeterTaylor This isn't a major downside because the information is still there. At worst, it would just be slightly more tedious to search by language tag. The current format is more tedious for folks with specific problems. They have to wade through dozens of answers trying to find one tip. There is definitely a trade-off between "comprehensive list" and "unnecessary information". What if you have a problem that wasn't solved yet? You can't even ask it without spawning a new question. O'Reilly isn't going to write a new chapter in his C++ book just for you. \$\endgroup\$
    – Rainbolt
    Oct 13, 2014 at 16:56
  • \$\begingroup\$ If you have a problem which wasn't solved yet then the current position seems to be that you can ask it as a new question, so it's a different issue to whether the current tips lists should be split into a dozen (or in one case 49) separate questions. As for specific questions which have already answered, both PPCG and Google search answers as well as questions, so splitting them up doesn't much help much unless the optimisation is so obvious that it's just a question of "what's the syntax?". The tips lists are really for less obvious ideas. \$\endgroup\$ Oct 14, 2014 at 7:46
  • \$\begingroup\$ @PeterTaylor If the current position is that new questions are separate, then how did you manage to load all of the current information onto one page? As far as searchability goes, Google gives rates matches on question titles extremely highly, putting even unanswered questions at the top of the list if you get a close match. "What's the syntax?" is an awful question. I would close it as unclear. Re: "The tips lists are for less obvious ideas": And those ideas would somehow be lost if they were molded into a standard Q&A format? \$\endgroup\$
    – Rainbolt
    Oct 14, 2014 at 13:09
  • \$\begingroup\$ I don't understand the first question in your most recent comment. "What's the syntax?" wasn't intended as the entire body of a question, but an example of the category of question which someone might want to search for and which could have a title which would match the search terms. If you haven't already, try looking through codegolf.stackexchange.com/q/54/194 and asking both "What title could this question have?" and "What would someone who doesn't know this trick be searching for when they find it?" \$\endgroup\$ Oct 14, 2014 at 13:42
  • \$\begingroup\$ @PeterTaylor Name any trick that has practical use in that list you linked to, and I'll gladly generate a proper title for the problem it solves. "What's the syntax?" is not a category of questions that anyone would search for. Making a point with unrealistic examples is pointless. People might search for tips for golfing in Python. I propose adding a tag for that. That's how every other site categorizes questions. Why should we categorize them any other way? \$\endgroup\$
    – Rainbolt
    Oct 14, 2014 at 15:45
  • \$\begingroup\$ They should all have practical use: otherwise they don't belong in the list. But to pick a good example of the point I'm making, codegolf.stackexchange.com/a/407/194 . Someone who knows this is possible but has forgotten the syntax might find it under the title "What's the syntax for extracting every nth character from a string in Python" (which really belongs on SO rather than here); someone who has a golf which would benefit from the trick but doesn't know it will find it more easily by reading a single page of tips for golfing Python than by any other means. \$\endgroup\$ Oct 14, 2014 at 17:09
  • \$\begingroup\$ @PeterTaylor Splitting a huge list into multiple questions would neither increase nor decrease the amount of overlap we have with Stack Overflow. The content is exactly the same, but spread out over multiple questions. Your misleading example, "What's the syntax for [...]", should actually be "What's the shortest syntax for [...]". I bolded a key word that you missed. The revised question would almost certainly be closed on Stack Overflow, and is clearly on topic here. \$\endgroup\$
    – Rainbolt
    Oct 14, 2014 at 18:17
  • \$\begingroup\$ @PeterTaylor You have repeatedly implied that splitting a huge list into many individual questions would somehow make the information harder to find. I have repeatedly suggested adding a tag to the questions. What exactly is wrong with my suggestion? Does this not offset your "major downside"? \$\endgroup\$
    – Rainbolt
    Oct 14, 2014 at 18:20
  • 1
    \$\begingroup\$ It's not a question about what the shortest syntax is, because there's only one syntax. The point of the tip is that people might not know that it is even a possibility. \$\endgroup\$ Oct 14, 2014 at 18:31
  • 1
    \$\begingroup\$ I don't think I have once implied that splitting the list into individual questions would make the information harder to find. What I have stated is that it would make the information harder to read in its entirety. The whole point of the grandfathered tips questions is to make it easy to read all of the useful tips for your language, so that you can then think "That one might be useful in this problem". If they're going to be split into multiple pages then the utility goes down considerably. \$\endgroup\$ Oct 14, 2014 at 18:34

You must log in to answer this question.

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