There's something that has been bothering me for some time about the response to some answers here on Ask Ubuntu, and came to my attention again on this post. My answer, while working and achieving desired results, has been critiqued because it's apparently "cryptic" and "lengthy".
I've consulted the help page and here what is says (emphasis added):
Read the question carefully. What, specifically, is the question asking for? Make sure your answer provides that – or a viable alternative. The answer can be “don’t do that”, but it should also include “try this instead”. Any answer that gets the asker going in the right direction is helpful, but do try to mention any limitations, assumptions or simplifications in your answer. Brevity is acceptable, but fuller explanations are better.
In other words, an answer should be solving a problem and adding value, while brevity is only icing on the cake. Thus, I would like to know what the community thinks. Does length of a solution matter? What is the limit to which we define "cryptic" answers?
I don't necessarily seek a "solution" but I do want to see what the community thinks on this matter.
My view on the matter
While I do admire brevity of certain answers, I don't see a valid reason to critique a working solution based on the length. "Cryptic" is also a very abstract concept. A regular expression can be cryptic to someone who has never touched Perl
or sed
, while completely obvious to a seasoned professional.
The opposite is also true: an explicit solution can be confusing and obscure for someone unfamiliar with the language used in the answer, the algorithm, or the idea of the approach. What's more confusing to me is the "cryptic" being used where answer has explanations of the concept and details of an answer.
But in either case, I don't see how length and "cryptic-ness" are related to actually getting the job done and delivering value to OP. Discussing merits of approach, suggesting improvements, and suggesting more idiomatic approaches is fine, but automatically dismissing an answer for being less pretty than something else seems entirely wrong.
Regular users of Code Golf site will recognize that there are often really illegible, but short answers. And Code Golf is specifically aimed at that - shortest amount of bytes wins. But it's not how our site is supposed to work. Or is it ?
sed
wins golf but python is readable) or about the whole answer (Elian Kagan vs Gunnar Hjalmarsson)?awk
would be easier to use here thansed
. You had my upvote anyway.