Ad
  • Custom User Avatar

    Also, just like StackOverflow, fastest gun in the west effect applies, and it's mostly everyone upvoting on the same early solution that was top because it was top and hence most visible.

    Also, voting system is popularity vote so it's not necessarily a good indicator at all. Do you want to listen to 1000 novices, or 3 very experienced coders explaining the same topic? ;-)

  • Custom User Avatar

    Best Practices or Clever depends upon who you talk to, and whether they had their coffee yet, or which day of the week it is. for example, one might insist that Best Practices applies to this solution, while another might remind us how code golf is not always the best solution. also, Best Practices seems more presumptive than Clever, since Best Practices conforms to some standard, while Clever is basically like saying cool bro

    since a vote basically means thumbs up, choose either one

  • Default User Avatar

    I'm not sure why this is marked as "Clever".

  • Custom User Avatar

    Though it's the most "natural" answer, shorter is not always better. Using reduce to separate values and keys in a single run would be more efficient than iterating over hash twice.