14
\$\begingroup\$

What I suggest

I'd like to open a community wiki post that address and explain the most common beginners bad-practices/mistakes in an XXX language, to be used as a reference when answering.

Reason

It often happens that someone is asking for a review on an intermediate/advanced level about his code, while presenting very common beginners bad practices or mistakes.

To give an example (with Python), something like:

if len(my_list) == 0:
    # ...

I'd have, everytime, to explain to a different person why that shouldn't be done (along with other four or five things like that). This might take a while, maybe even half of my answer without a glance of answer to the main OP concern of review on his code.

This is why I'd like to be able to reference a complete explanaitaion without losing much time. More or less something like:

This line:

    if len(my_list) == 0:

Should be replaced with:

    if not my_list:

All reasons well explained at Point n.7 here <link>.  
[My additional comment if necessary]

[... Going on with the actual review ...]

Pros

This are the pros that I see:

  • Who answer wouldn't have to write the same things again and again to different people
  • Who answer could focus his energy on the main problem.
  • Who answer wouldn't have to go into details of the feautures of the XXX language.
  • It will all be referenced inside CodeReview.
  • The asker will find have good and wiki approved explanation.
  • The asker who follow the link will find there other common mistakes and learn.
    Some of them might not even be in his posted code, but he might fixed them anyway, and the next time he ask for a review he might present a better code.

What do you think?
Is it doable?
Will be useful?
Could it be improved?

\$\endgroup\$
6
  • 4
    \$\begingroup\$ I like the idea in general, but I think the tag wiki of the language in question would be a better place for this than a community wiki question. \$\endgroup\$
    – sepp2k Mod
    Commented Mar 5, 2012 at 20:54
  • 1
    \$\begingroup\$ This is a great idea. One other concern of mine is askers being unaware of something as standard as PEP-8 (in the case of Python). It's most important points should be part of the proposed wiki. \$\endgroup\$
    – tshepang
    Commented Mar 5, 2012 at 23:54
  • \$\begingroup\$ @sepp2k: I didn't thought it was doable, but it sure looks like a better place :) \$\endgroup\$
    – Rik Poggi
    Commented Mar 6, 2012 at 10:19
  • 3
    \$\begingroup\$ How do you link to a specific issue if everything is in a single wiki-entry? \$\endgroup\$ Commented Mar 7, 2012 at 20:43
  • 1
    \$\begingroup\$ I would argue that using the tag wiki isn't sufficient because it doesn't allow for discussion on different suggestions. And as @Cygal mentioned, if people provide detailed explanations for specific answers, those can be directly linked to in the future. \$\endgroup\$
    – seand
    Commented Mar 14, 2012 at 21:46
  • \$\begingroup\$ @seand: I'm not sure on how the tag editing process works, but for sure a community wiki is very opened to discussions, suggestions and improvements. \$\endgroup\$
    – Rik Poggi
    Commented Mar 15, 2012 at 12:26

2 Answers 2

4
\$\begingroup\$

So far nobody opposed to the creation of these Language References so I'm going to assume there are no major conflicts.

From the comments received so far two problems came out:

  1. Where:
    • Commuity wiki post.
    • Tag wiki of the language.
  2. How to link it.

At first when the tag wiki option came out I was for it.

But now I'd go with a Community wiki post. It will be:

  • Easier to handle.
  • Opened to duscussion.
  • Easy linkable (this will also solve problem 2).

There will also be the possiblity to link to it from the main meta.codereview page. Like meta.stackoverflow link to its faq. To show what I mean:

faq from meta.so proposed meta look

Obviously it would be on meta.codereview :)

This could be another advantage of having a post wiki instead of a tag wiki. I don't know if it could be done or not, but it might be something to start thinking about.

\$\endgroup\$
2
  • \$\begingroup\$ Guidelines for these questions (and their answers) should be established, such as: the question text should be consistent with the only difference between them being the languages, answers should cover 1 code snippet or 1 specific syntax topic, questions should only be added to the reference sidebar when they get X answers. \$\endgroup\$
    – seand
    Commented Mar 15, 2012 at 15:29
  • \$\begingroup\$ @seand: If you want it might be good to leave an answer with the guidelines you have in mind :) \$\endgroup\$
    – Rik Poggi
    Commented Mar 15, 2012 at 17:40
0
\$\begingroup\$

What do you think about a question on meta? Everybody could answer to it and comment the given idioms. It would be easy to link to specific answers from Code Review questions and the language wiki.

I think this discussion is important since it's not only about Python: other languages will follow naturally.

\$\endgroup\$
7
  • \$\begingroup\$ Hm? Your question was asked ten days ago, and your last comment was nine days ago. I waited to see if you were doing something, but I didn't see anything. I can remove my question if you want. It's not about stealing anything, which is why I'm encouraging community wiki. I'm really sorry if I offended you. \$\endgroup\$ Commented Mar 15, 2012 at 8:55
  • \$\begingroup\$ I waited because this community is really slow. I was going to leave an asnwer this morning (to this question), saying that I think that a wiki would be a better idea, hoping that other would join with their answer so that with upvote and downvoted it could have been seen what the community wants and if I got to get consenses I'd have opened a wiki question, maybe with suggestions already gathered from here. (I can't see the point in switching this answer to wiki). \$\endgroup\$
    – Rik Poggi
    Commented Mar 15, 2012 at 8:59
  • \$\begingroup\$ What prevents your from leaving an answer right now? It would be the best way to know what is the preferred solution. Whatever the outcome (I don't care that much), the main goal is to create the reference you talked about (which is a great idea of yours), and it looks like we're going to succeed anyway! This makes me happy, not sad. \$\endgroup\$ Commented Mar 15, 2012 at 9:06
  • \$\begingroup\$ The fact that the reference already exists. \$\endgroup\$
    – Rik Poggi
    Commented Mar 15, 2012 at 9:14
  • \$\begingroup\$ Deleted the question. Someone could create a new question whenever the community reaches consensus on this. \$\endgroup\$ Commented Mar 15, 2012 at 9:38
  • \$\begingroup\$ I calmed myself down, you really got me before. I should have politely asked you to remove the question and wait for the community to better express its opinion. (I don't know if it looks like one, but it would be an attempt of apology for this mess of comments). \$\endgroup\$
    – Rik Poggi
    Commented Mar 15, 2012 at 11:23
  • \$\begingroup\$ Your answer is basically the same, but with more details. I wouldn't have upvoted myself here! \$\endgroup\$ Commented Mar 21, 2012 at 8:34

You must log in to answer this question.

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