I must admit, I love best practices questions! I love what they do for the site with people competing to try to find the answer that clicks with the most people. It's where the voting system and the competitive nature of answering starts doing something interesting with respect to community approval, a radical difference from some question which can be answered by the fastest gun in the west.
Hopefully without casting a negative meta effect, I want to direct attention to this answer from dear paxdiablo
: C state-machine design. It's a design question, definitely a subjective best practices one, with an answer that rose to the top through a popularity vote. And pax's answer is filled with conjecture and anecdotes, it's far from a Spock-style dry technical precision answer. And yet, isn't it wonderful? This is what I want from stackoverflow! I want to read the thoughts of experienced enthusiasts and pros about their experiences and what worked and didn't work so well for them. Isn't that one of the main things that experienced people can share -- what they found to work well in practice? Am I being too selfish?
The highest-frequency question in the tag I often hang out in, c, is this one: Should I cast the result of malloc (in C)?, which is effectively a best practices question. It seems like a double-standard when these questions are so popular among the community and we refuse to close/delete them while discouraging such questions outright yet nevertheless linking to such questions all the time.
And it does boil down to opinion, but even those who disagree with the accepted answer there on casting malloc results, which is a firm "no", can still find some decent rationale for why the answerer believes that explicit casting here has more cons than pros. It's probably among the most commonly-linked questions within the C tag with the community as a whole telling new people that they shouldn't cast the result of malloc. To understand why not, see that question -- the community approves.
It is a popularity contest at the end of the day, but that's true of the voting system in general. It's put to good effect when it rewards some perceived sense of "quality" beyond the first person to get a correct, routine answer.
It's hard to fake experience with a best practices question. The background of the answerer tends to show through, and a good answer can be put in terms of pros and cons which aren't too subjective. Whether we agree with them or not, interesting dynamics occur there. An advanced developer often doesn't struggle with correctness the first time around writing code, they often struggle with maintenance of large-scale codebases, they struggle not to become confused by the complexities of their own creation. Best practices becomes increasingly more relevant and interesting and starts to take the spotlight with increasing experience. At the very least, it tends to provide more informative reading material than a troubleshooting question which boiled down to the person using =
instead of ==
.
I would suggest going all the way to the opposite end, make it a tag! Then people know what they're getting themselves into when they click on a question with a best-practices
tag. It might even have a tag description like:
All ye who enter, beware. This area contains subjective answers which may be out of date, hopefully backed by experience, but we make no guarantees.
We already have a lot of tags which are often fronts for best practice questions, like architecture, design, coding-style, and design-patterns. I love these tags since they often present questions which are more challenging to think about and respond to than your average "What's wrong with this code?" homework question.
Best practices is a very relevant topic in programming even if it's not considered suitable for this site due to its chaotic nature. If best practices aren't found here, they might be found in a book written by some random author, from a team's standards, from some archaic boss, or just completely from a personal source. Yet it seems like a shame to take these out of SO, as SO does something a whole lot better than these other potential sources. It subjects any writings about best practices immediately and directly to a community-wide review process. I can't think of a better format for such a topic than one which has this raw and direct exposure to a voting system. It's flawed, as best practices always will be, but it's considerably less flawed in this type of format (unless we completely distrust SO's community voting to favor good answers in general, for which I must then ask, "what then is the point of a voting system and even SO in general if we don't trust the votes to align with good answers?").
With respect to the temporal nature of the answers, that's true but it's true of programming in general. Libraries and frameworks can become considered obsolete even more quickly than what is accepted to be a best practice. It's something to think about a lot, how this site is going to deal with outdated information in the future, but I think that's just a concern in general of just about anything except a language/hardware/OS/API-agnostic question about data structures and algorithms.