6

A few days ago, I found a question dealing with the problem I was having and ended up using the solution proposed in the accepted answer.

However, I then re-wrote the code from scratch and “solved” the problem in a different way. Now, I am considering about posting my solution in order to get some feedback about my code, mainly about “brittleness” and best practices.

If I were to post my code as an answer, should I expect that kind of feedback?

Please let me know if I have to be more specific.

Prompted by @percusse's comment, here is the question I was referring to: Work breakdown structure (WBS) TikZ.

4
  • 1
    Is there a particular reason that you didn't include the link to the question?
    – percusse
    Commented May 16, 2015 at 17:42
  • @percusse: No reason in particular, I just thought to start by being general and then add info if requested. BTW, I added the link to question I was talking about.
    – Pier Paolo
    Commented May 16, 2015 at 18:39
  • 7
    I would say no, typically you would not get feedback on an answer, the occasional comment but not the depth of feedback you get for a question. so if writing the code raised some questions in your mind about the best way to approach it, ask a new question (you can link to the old one if that context is helpful) but it is better to ask the pecific question rather than just post code and ask for a critique. Commented May 16, 2015 at 19:12
  • 6
    This answer would be, to all intents and purposes, a question. So you should post it as one. You can link to the old one to establish the context.
    – Alenanno
    Commented May 16, 2015 at 20:01

1 Answer 1

4

To start, remember that all questions should strive to be answerable and not matters of opinion (even though I sometimes love to offer mine). My basic rules of thumb:

  • If it answers the question, it belongs in the answers section.
  • If you're asking a question, ask a question.

These two maxims are not mutually exclusive.


Despite the comments, I don't believe it's entirely inappropriate. Take for example my question/answer on an application of coffins: The question was interesting and the answer was useful, so it received attention (and a bit of helpful criticism). I wouldn't expect constructive criticism for a self-answer, but I would expect the same level of moderation and community education that I see with normal answers.

That said, I have also seen code posted here asking for review (see and these questions in particular). It's not unprecedented, but it has its philosophical drawbacks.

is inherently opinion-based. I don't mean to say we don't have many wonderfully opinionated resources on our site, but I do think we should take caution in what we allow as a rule. Comments are a fine place for short discussion. If you'd like a longer chat about it (and can find someone willing to make the time investment), post-spawned chatrooms are a good resource offered by the platform.

Frankly, I wouldn't mind seeing more on the site. It's another way we can learn from each other – arguably more meaningful for the individual than the direct 'solve the problem' approach. Even in this case, the wider community benefits from having more questions answered. Still, exactly how this is approached might not be the best fit for the SE format.

In the confines of this platform, I would say asking a general question and posting a working self-answer (asking for criticism near the top) is the best course of action.

1
  • You have raised an interesting point, one that I totally had not thought about. Unfortunately, I see two problems with it: 1) It cannot be applied to my specific case because I wold essentially post a duplicate question and 2) I would basically hope for some kind of insight in the comments. Still, it is a “strategy“ I could use in the future, but for the moment I think I will try to formulate my question asking for suggestions about “best practices“ regarding specific issues.
    – Pier Paolo
    Commented May 19, 2015 at 8:10

You must log in to answer this question.

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