8

Update The consensus seems to be that is not a good idea, and is strongly discouraged by SE ("Every tag you use should be able to work, more or less, as the only tag on a question.")

Leonid suggested using for some of the posts I linked to below. I think this is a good idea, and we can now clean up -tagged questions (unless there are objections).


Today a tag wiki was created for the tag. I have concerns about having a tag with such a name.

Question: Do we need such a tag? If yes, what shall it be used for? And what is it going to be named?

What's wrong with the name "best practices"?

  • it is explicitly subjective, prone to debate

  • the SE platform puts up a warning when trying to ask a question with these words in the title (something along "this question looks subjective, it might get closed")

So why would we need such a tag then?

  • Looking at the existing questions, it seems that most are about idiomatic or usual ways of doing something. Sort of an equivalent of "what is pythonic" for Python. This is important.

  • I think it is important to have exchanges about programming style. As I said before, the Mathematica community shares less code than programmers do, and this kind of communication is really needed.

  • There are certain things that are commonly done in programming languages (e.g. writing packages), and can be done in several ways, but it might not be immediately obvious what the advantages of the usual way are compared to alternatives (again, package structure: anything can be in an .m file, but there are good reasons for following the usual package structure)

Existing questions using this tag:

Existing questions not using this tag


Summary: My personal answers to my own questions:

  1. yes, we need such a tag
  2. it is used for questions about idiomatic ways of doing something, or, as Brett said, questions with alternative metrics (there is not a clear right answer)
  3. it should not be named because of its subjective nature --- but I'm not sure what's a good word either. Should invent a good equivalent for "pythonic" for Mathematica :-) comes to mind, but it can't be applied to all examples I quoted either.

I'd really appreciate some more answers / opinions on this. Am I alone with my worry that might not be a desirable name? If I am, we can just keep that name, and consider this settled (but I have the feeling I'm not).


Related meta post: Are questions with alternative metrics on topic? (my opinion on this is still that these questions should not only be allowed: they are important to have)

  • Right now it's a pretty arbitrary tag that can be (and is) used for pretty much anything. I like your suggestion of reference-request, the other uses could be named code-style, effective-mathematica-code or something along those lines. We should also keep in mind that the tags should be intuitive (which idiomatic-usage is not), so that when new users guess a tag it is auto-suggested. – David Jan 29 '12 at 20:42
  • 1
    If Python code of that sort is pythonic, should Mathematica code of this sort be mathematicaic? – Isaac Jan 29 '12 at 22:55
6

Ideally all answers to questions here should be recommending good solutions that conform with the best practices (or whatever other terminology you'd like to use instead).

I don't think there's anything inherently useful about that tag and it (and other tags like it) are strongly discouraged:

Every tag you use should be able to work, more or less, as the only tag on a question. Meta-tags, like [beginner], [subjective], and [best-practices], are useless by themselves — they tell you nothing at all about the content of the question.

6

I dislike the term "Best practices". This article describes the attitude towards the term which I also share. It is also a kind of a moving target for a tag, because it is not focused. It is a mix of code review, programming techniques, language use, guidelines and what not. I think, instead of this single confusing tag, several tags with the meanings (and perhaps names) similar to what I mentioned are needed. Specifically, I think that:

  • We need a tag like code review, if we are to allow such questions on the site. My own opinion is that we should
  • We need a tag like language use, for questions concerned strictly with the use (or abuse) of some language feature, like options or scoping constructs
  • We need a tag like programming techniques for questions where the asker wants to know what other ways there are to solve a particular problem, either because s/he is not satisfied with existing solution, or wants to learn about other ways for educational purposes.
  • We may (or may not) need a tag guidelines, to cover cases which do not strictly fall into any of the above categories, perhaps because advice is seeked on some synthetic matter, such as e.g. performance tuning. This is the closest to "best practices", but, rather than emphasizing "best", this will be about the common wisdom and accumulated experience in some area of Mathematica
  • So I wasn't mistaken thinking that I'm not alone with these concerns. How do you suggest the example questions I linked to should be tagged? – Szabolcs Jan 29 '12 at 20:51
  • 1
    @Szabolcs Here is how I'd tag those: Best tutorial... -> Reference request, error-checking... -> guidelines, language use (the latter because Throw and Catch were explicitly mentioned), functions with options -> language use, developing packages... -> guidelines, Elegantly pairing... -> programming techniques, most common ways to make palettes -> programming techniques, and / or guidelines. – Leonid Shifrin Jan 29 '12 at 21:29
  • guidelines is a nice idea – Szabolcs Jan 30 '12 at 13:00
  • 1
    @Szabolcs If others agree, we could start using it and refactor existing questions currently tagged "Best practices". – Leonid Shifrin Jan 30 '12 at 13:07
  • I think what @AnnaLear said above is pretty much the same thing you said here, so yes, I'll edit the main post and we can start retagging. – Szabolcs Jan 30 '12 at 13:19
  • @Szabolcs Sounds good. – Leonid Shifrin Jan 30 '12 at 13:38
3

I agree that is too vague and should be removed.

I think that the existing tag covers the techniques/guidelines ideas Leonid mentions in his answer. We also have and to capture much of what people are asking for in these types of questions.

I agree that would be a useful addition and such questions should be on-topic.

I would suggest that this tag would be supplemented with tags that reference the goals of the question asker, e.g. the existing and . Perhaps we also need ?

  • 1
    Define elegant? It is also ambiguous. – rcollyer Jan 30 '12 at 3:33
  • @rcollyer - concise and yet readable (the opposite of code golf :), and teaches many who read it something new about the language. I was inspired by Mike Bantegui's comment on this question "simpler and/or more intuitive". – Verbeia Jan 30 '12 at 3:54
  • You make a good point. I still have reservations, but I'm not able to articulate them at this point. Have to think on this. – rcollyer Jan 30 '12 at 4:02
  • So the idea seems to be that we can use different tags, depending on the topic of the post. Leonid suggested guidelines, which I quite like. While I was thinking along the same lines first, now I'm worried that elegant-code has similar problems to best-practices (see Anna's post above) – Szabolcs Jan 30 '12 at 13:33
  • I am happy with guidelines too. – Verbeia Jan 30 '12 at 19:38

You must log in to answer this question.

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