Replies: 1 comment 1 reply
-
I agree it's a problem. Stuff I see that's more of a problem and far more common than regexes, which have their place, is single line triple-nested functions or chained ternaries with multiple conditions. These can be very clever, but are the anti-thesis of readable and thus not best practices. I see them highly upvoted as both all the time. As it stands, the upvotes and categories are meaningless because too many people just double upvote anything they liked. I like your solutions so far. Some further ideas: Option 5: Allow users to only vote Best Practices OR Clever. Let the volume of votes on a solution say if is both. It could initially default current votes for both to Clever, since Clever solutions are rarely best practices. |
Beta Was this translation helpful? Give feedback.
-
Problem
When I'm sorting by Best Practices, I don't want to see Clever one liner regex or bitwise solutions at the top of the page, over comprehensible and verbose solutions you would most likely use in a technical interview.
Context
I am not the only person to note this bad UX.
What is important in technical interviews? Being able to explain your approach and showing off how good of a teammate you can be. Inscrutable clever solutions do not do either of these things. Readability is one key metric for large codebases!
Note that I am explicitly not "against" people having fun, showing off their fancy solutions! My gripe is that these solutions will often have a large number of "Best Practices" votes, despite being subjectively terrible to understand or learn from, which pushes them to the top of the page. One example is this one liner regex solution, which has the highest number of "Best Practices" upvotes, to a 6kyu kata. How does this help new programmers trying to learn?
Solutions
Option 1 - Algorithmically Adjust the Best Practices Filter
Create a new metric for the "rank" of a solution. This rank should be used to sort the solutions on the Best Practices filter.
If a solution has roughly equal weighting of "Best Practices" and "Clever" votes (+/- 20%), penalize the this solution a little.
If a solution has a large "Clever" to "Best Practices" ratio (say over 2:1 votes for Clever : Best Practices) then penalize this solution a lot.
Option 2 - Create a New Filter
Create a new filter category, with the adjustments from Option 1 implemented.
This disturbs the status quo as little as possible.
Option 3 - Create a New Vote Category
The current vote categories are "Best Practices" and "Clever". Create a new vote category for "Readability" or something.
This is not my favorite solution, because it does not address "incorrect" votes and possibly just creates a new mess.
Conclusion
If you want to keep the "Best Practices" filter as it is, sure, fine, I don't ultimately care. But give me the option for a better learning experience! I could go the rest of my life without seeing your clever multi method chained regex solution.
The current user experience of scrolling past opaque arcane solutions to simple and understandable solutions is objectively unsatisfactory, because of the lack of checks and balances in a broken voting system. Sorting by Best Practices does not in fact, show you solutions with the actual Best Practices.
Beta Was this translation helpful? Give feedback.
All reactions