Up Voting System
About
Discuss the up voting system used for kata, kata solutions and comments.
Discuss:
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Translation missing: en.models.comment.label_info.forum_topic.none
-
No Label
- Cancel
Please sign in or sign up to leave a comment.
+1 to needing to be able to downvote "best practice" on a solution
People really just upvote the shortest answer for "Best Practices" even though there is a "clever" option.
Golfing is fun, but not a good practice
+1 to the pool of "Please implement solution downvotes" suggestions. So tired of seeing terrible solutions snowball to accumulate insane number of "best practice" votes simply because they are cryptically short.
didn't know where to post this, so feel free to delete it after solving. This user has multiple meaningless offensive comments across the site, most of them in russian. Like "die b***", "you are c***". His nickname can be translated as "N*** are f***". Can he be banned or anything? Thank you https://www.codewars.com/users/%D0%9D%D0%B5%D0%B3%D1%80%D1%8B%20%D0%BF%D0%B8%D0%B4%D0%BE/comments
Seems there must be a way to view which of our code submissions received the upvotes?
It would seem a shame not to be able to locate such invaluable information.
Why can i not upvote 'best solutions' or 'clever solutions' ?
Your site should allow downvoting kata solutions. Without downvoting, there is no active check against upvoting.
If someone is able to come up with a solution, then it's great that they were able to solve the kata. However, I see solutions upvoted for "best practices" when they clearly lack actual good practices, such as proper indentation/spacing, early returns, and meaningful variable names. I also see solutions that take the naive approach (such as unnecessarily diving into nested loops instead of leveraging a mathematical formula), but they are upvoted for being "clever".
If solutions are upvoted for "best practices" when they lack best practices, or upvoted for being "clever" when they are not clever, then new programmers will be misled into thinking that bad solutions are actually good. I have several years of professional experience, and I think that this site has a lot to offer to new programmers, so I look forward to seeing it grow. Once again, please allow downvoting kata solutions.
Hi, I am new to Codewars. Joined just 2 days back. I would like to vote on solutions that I find to be interesting but for some reason I am not able. Is it will you have be above a certain kyu to be able to vote or something of that sort? Please let me know is there any way I can vote besides clicking on the button
Same here! I could only comment and upvote on 8kyu problems. Sad!
Does any of the Mods(or whoever makes decisions) read these? There is alot of feed back for the upvote system and nothing has been changed.
Yes.
https://github.com/codewars/codewars.com/issues/2237#issuecomment-759748091 https://github.com/codewars/codewars.com/issues/2052#issuecomment-607520277 https://github.com/codewars/codewars.com/issues/1391
...and many more.
Thank you for pointing me to the git page. I see this issue has been discussed now for man years. Hss there been any protypes or newer versions impimented in this time frame?
How to check which of my solutions got Up Votes
Why can one vote for his/her own solutions? Voting your own solution should be disabled in my opinion.
If one manages to solve a Kata efficiently or with clean code, I think its alright for one to give oneself a 'pat in the back'.
I think it favors people who are more audacious.
Agreed. But let's keep in mind that CW is a site used for solving algo problems, so Clean and Clever solutions really help for people who may be struggling in coming up with one.
I agree. I would still prefer it if self votes would not be allowed. It does not hinder clean and clever solutions from beeing upvoted.
@premature: According to your profile your account was made in February this year and you did 366 Katas. That can't be correct or is it? How where you able to do so many Katas in such a short period of time? I am impressed.
Yup, I picked up Python in early Jan 2021. I used HackerRank for a week or two but felt like there were a small range of problems. So I moved into CW in Feb. I have been basically grinding katas these past 3 weeks starting with 8 kyus. To be honest, @Kischy, I didn't realise I completed that much.
Even if you do vote for your own solution it won't really give you points so... it's not really worth much to disable this feature.
Hello , Please some one help me to solve this problem :
Les équipes d'acrobates font partie de la culture marocaine, elles jouaient dans les marchés traditionnels pour distraire les gens. Une des scènes les plus incroyables est quand ils se mettent debout les uns au dessus des autres pour former une sorte de pyramide.
Une pyramide de hauteur L est formée de la manière suivante : Une personne au sommet se tient debout sur les épaules d'une autre personne, qui elle tient debout sur les épaules de deux autres personnes, puis 3 et ainsi de suite.
On souhaite savoir quel est le nombre d'acrobates qu'il faut pour former une pyramide de hauteur L.
Input : 2 6 3
Output: 16 4
I agree with alot of the other indiviuals in this discussion on the point that there is way to many upvotes for hard to read, hard to maintain and hard to understand one line code solutions. Just because you can do it in one line using lambda or list comperhension does not always make it the best practice, cleaver maybe but definitely not always the best practice. This is teaching new individuals like myself the wrong way to code. If you submit some of these solutions to a company in real life you are liable to be laughed out of the room. My suggestion is to remove the upvote capabilty from individuals until they reach a level of 5 or 4 and hopfully by then the will understand the difference in cleaver and best practice.
Maybe have to submission for each kata, one for best practice and one for cleaver.
I agree with this. Too many newbs (myself included) give out thier first best practices upvotes to those solutions that deserve instead a clever (at best). Was there ever a tutorial explaining the difference? Some solutions do have a clever looking best practice though, so it's a tough thing to explain. Fortunatly, people seem to have figured out the correct response once they are solving 5 Kyus.
I agree with this!
I agree with many other comments here: easier Katas are flooded with inefficient, upvoted one-line & code golf solutions. There doesn't seem to be enough incentive to write "Best Practice" solutions that are simple, performant, documented, robust, & readable.
Concise solutions aren't inherently bad, but they're currently overrepresented. I believe Codewars should add more incentive for "Best Practice" solutions, including good runtime & memory performance. As far as I'm aware, Codewars is the best code challenge website for learning programming languages & implementing comprehensive unit testing. There are other websites better suited for concise solutions.
Hi guys,
what do you think about having a new Voting category: funny I always see ridiculous solutions to simple problems that are legit funny, but get upvoted with smart or best practice, which does not really fit.
Plus side of this is also that I can then sort by funny rating if I am in that mood :D
Best, Max
Hi,
you can open an issue with this suggestion here: https://github.com/Codewars/codewars.com/issues
I like this one but i don;t see this feature coming anytime soon XD
I agree with you, we need the funny category.
For example I have solved most of the katas with one-liners just for fun. Most of the times that is definetly not the "best practice", and a long lambda function is more funny than "clever" practice :)
I need helo with Level 8 C#
And a spell checker too!
Upvotes for katas should only be permitted for people who have completed the kata itself. See, some of my katas have gotten downvoted 3 times in less than 5 minutes with no new solutions. People make multiple accounts just for this purpose I guess. Also, for the people who have _ * the voting power, can those votes be made _ * as much?
i know who you are talking about XD
you should raise issue of this at here https://github.com/Codewars/codewars.com/issues
For example, my kata, https://www.codewars.com/kata/5f1891d30970800010626843/discuss/python got targeted and got an unsatisfied vote, with one more completion and no more new solutions.
he does that with every kata ()
ZED? I don't think so, he already has a solution. Who is it?
I understand that the 'Best Practice' button is subject to some misuse. That begs the question: how can one who is new to programming find proper role models?
Good examples are an excellent resource for learning, but mistaking a bad example for a good one can actually lead one astray! If I cannot trust the 'Best Practice' score, is there a more reliable way to figure out which solutions are ones to be inspired by?
follow people who you want to inspired by and click on
Solutions of Users I am Following
on solution page.That sounds excellent! Then the only thing left is to gather a bunch of inspiring people. Thanks for the tip!
Up voting is inherently cancerous and promotes hivemind groupthink instead of individuality.
The problem seems inherently a human trait -- the tendency to defer to the "wisdom" of the crowd. It's not uncommon for people to agree with a larger group on something even when their gut (and brain) tells them otherwise.
People need to think for themselves.
The code runtime should also be mentioned beside the code in solution section so users can know which method is faster then other. It may also help them in realising which solution is the better one.
After seeing all those comments below, I think the ability to upvote solutions should be an unlockable privilege. Many users are just voting one-liners that are unreadable as best-practice. I am not saying they are bad solutions, but as the current state stands, a significant amount of users aren't clear on what is 'best practice'. Best practice is maintainable code that is easy to read, while being performant at the same time. The clever votes do not seem to have a problem to them, because nearly everyone is trying to write clever solutions.
In my opinion, a user needs to solve a given amount of katas before they can upvote a solution. Why? The more katas you solve, and the more solutions you look at, you gain a better grasp of what is best practice and what is clever, and you can (hopefully?) define a fine line between these upvotes. Honor should not be used as the unlock threshold, as one can complete a few 1 or 2 kyus and gain a great amount of honor in a small amount of katas.
Is there any way to better enforce (or enforce at all) the votes around best practise? It seems right now people just favour a clever approach and deem it also best practise; which it never is as far as I can see.
Best practise is readable/clean, re-usable and fast but not necesarilly clever. There are plenty of example on good conventions, such as google (for js as one example): https://google.github.io/styleguide/jsguide.html
Squishing code into one line with no comments should never, ever be flagged as best practise.
Why are slow solutions often the #1 voted just because they contain the fewest lines of code? In terms of efficiency for the end user I'd be interested in seeing a category that solves a problem with the minimal execution time. An example of this is in C# where nearly every solution uses LINQ, which is slower than non-LINQ based solutions despite it being shorter.
Can I do something so people will see my solutions? It feels like the first dozens/ hundreds of people, or the ones with truly great solutions gets upvoted, while the others can't realy get "clever"/ "best practice" upvotes. With katas that has over 20K submitters, how can someone see my try?
They'll have to scroll down to find it. Users can sort by: Best Practice (default), Clever, Newest, and Oldest.
Somtimes I also use another sorting to see and vote e.g. newer solutions instead of the ones that have already a lot of.
How can I upvote a kata? Thanks!
First you have to solve it, and after that you'll see:
Thanks!
First, I have problem with running program because I thought that I had to write the main function, so my program made a mistake. I did not find instructions. Luckily I solved the problem.
It seems to me that when a new Kata in Beta is downvoted 5 times, it is immediately sent to retired with no ability to re-enter the beta process (for what I know, at least) This is very discouraging for 2 reasons:
I would recommend forcing people to leave a comment if they give negative feedback (only for Katas that are in Beta of course) and maybe increasing the amount of negative votes required to at least 10, or giving an easy option to re-enter the Beta phase.
Can the upvote system for best practice be removed for beginners? I get that most of the newbies up-voting unreadable one-liners will be weeded out in the real world. But these counter-practice solutions encourage very unreadable code that is bad for anyone trying to learn a language and learn it well.
Is there any way I can know about a downvote? As in what code or comment got downvoted? I seem to have lost a point but I don't know why. Perhaps I could learn from my errant behavior, right? Thanks all.
AFAIK you can only see them if you find them by chance, and sometimes you won't even know why that comment was downvoted.
What does "How satisfied are you with this Kata" ask? Is it asking about how do you rate the Kata ? Or is it asking how satisfied are you with your performance on this Kara or maybe how comfortable are you with solving this kind of Katas ?
first option: how do you rate the kata
Thankyou! Master.
PLEASE make it possible to know which code solution has been UPVOTED. I think people would learn more about their specific skills this way.
1 year later and I'd like to bump this. I'm very curious to know what of my solutions have been upvoted so I can get a better idea of what other programmers think is good in my code.
Agreed!
Would be good if there was a tracker or notification if one of our solution gets upvoted.
What qualifies as an upvote? I vote Clever and Best Solution sometimes... but my Solution UpVote stat = 0
I think it counts the upvotes of your solutions (made by others)
good
After submiting Kata I usualy view solutions of other users. While viewing comments, I can click "View Solution" button and then solution of commenting person shows up. I can't upvote this solution when I think that its best practice or clever. I cant search Solutions by user. Only workaround is following selected user but I dont want to do this. Function of searching solution by user should be added.
How can I vote, write problem and what is Kumite. Please explain how to use codewars
I would like to see a "downvote" option. Perhaps moderated to avoid abuse, and requiring a justification for the downvote. I see bad solutions upvoted as best practices, and that's not healthy for a learning tool.
Many people have suggested this, but it doesn't really do anything. It's just re-labeling and re-leveling the playing field. Newbies and people with bad taste will still do their thing, and they'll utilize the downvote button too so it's not like giving everyone more power will make wiser people more influencial.
So many have said it before, the top rated solutions are the shortest not the best. IMPLEMENT A TIME TO RUN NEXT TO THE SOLUTION. We need the overall best not the shortest code to learn.
"They said it before, and we'll say it again..."
Add my vote also for a parallel "time to run" score! :D
Possibly this could lead to excessive re-running of solutions to get a lucky fast score. So maybe limit the publicable time-to-rum score just to a user's first successful solution for a given kata, or something like that?
Duration of execution is a criteria but this shouldn't be THE criteria to determine the best solution. The best solution should be a fine balance between complexity(related to execution time), readability and best practice.
> implying shortest code is never also the fastest code > implying fastest code = best code
Okay, let's switch to micro-optimizations then?
There are many dirty tricks to make your code execution faster. Most of which you will never use in production code. People will start upvoting fastest answers as "Best Practice" and people who learn to code will pick up some bad habbits. The only thing that could work is a special category of katas, purposely curated for execution time optimizations with solutions showed from fastest to slowest.
To be fair, the never-lasting debate about "what is best practice" happens because
best practice
can be many different things (same toclever
):It's kinda like you're in Oscar and there's only a "Movie of the Year" category. Of course everyone will argue about its all-encompassing nature.
The way to go is, of course, split it into those categories and rank by there. But then it (probably) becomes too complicated for everyone. So I guess we're stuck at now.
You are right, and sometimes the shortest code is also the best, depending on language ie Haskell, JS Java C# F#, if it is short because it is coded functionally, or with nice comprehensions in python. not always just depends
With regards to the "How satisfied are you with this kata?" question:
Is it appropriate to answer "Somewhat" for most kata and only say "Very" for kata you particularly like? I don't really feel "Very satisfied" with many of the basic kata I have completed or seen (particularly things that have many duplicates i.e. primes, averages, string parsing, fibonacci, cipher etc) but also don't want to be penalizing people who take the time to create kata that function properly and may be useful to other users.
In other words is it appropriate to only give a "Very" satisfied rating to unusually creative or well-designed kata, or should this be the standard response to any working kata that has a decent description and appropriate test cases? Thanks for any responses and apologies if the answer to this is already written out somewhere else (I didn't see it in the Docs section).
This is what they said on the wiki.
If you got a lot of value out of the kata and found it to be well constructed, you should vote "Very"
*If you got some value out of the kata but the quality may not be top notch, you should vote "Somewhat"
If you got no value out of the kata, in regards to enjoyment, education experience, etc, then you should pick "None".
However, they also said something about the None rating:
If you think the kata itself is valuable but you simply have some issues with it, then you should select "Somewhat" and create an issue instead. If you thought the kata is really great, other than the issues, then you can choose "Very". Please do not choose "None" simply because the kata has an issue but it is otherwise a good kata. The satisfaction rating is meant to indicate quality of kata as a concept, not its current state of condition in terms of open issues.
Users of beginner and novice rank kyu should not be able to vote for best practice.
Simply look at the this solution: http://www.codewars.com/kata/reviews/54a5ebd237f4350faf00006c/groups/54a5f844478d8eb3f7000222
This solution is simply brute forcing the problem and is horrible practice.
My guess would be that this solution reached the top due to many beginners voting for it due to the fact that it resembled their solution.
Many beginners simply aren't yet trained for the analytical mindset necessary to identify true best practices.
Agreed. I think it would help, also, to actually be able to downvote best practice.
A solution that I would like would be that you'd actually have to write a word or two on why you think it is a good solution. Then whomever reads the comments can also value each vote according to his or hers own values.
Another solution would be that "best practice"-points are awarded for receiving said points from other people and that for each level achieved, you are awarded a number of "best practice"-points to mete out by default.
Aviod popularity contests by not allowing low/mid level users tag for "best practice" or "clever" on Kata solutions. Just because a solution looks interesting or is insanely short does not mean it is sound. I would like to be able to rely on expert opinion in those realms. I'm here to learn so would prefer to trust as much of the presented opinion as possible.
Case in point: the Kata "printer errors". The top solution is set up in such a way that it would error on a null. Several people have commented the same on it yet it sits at the top with 26 "best practice" and 25 "clever".
https://www.codewars.com/kata/printer-errors/solutions/javascript
Totally agree. I've just started here and I'm noticing that horrific solutions (such as brute forcing) occassionally show up as the highest ranked "best practice" for easy kata.
Users who are below the "competent" kyus should certainly not be able to select best practice solutions (perhaps only experts should be able to).
Hi, I agree with both of you, but sometimes performance and readability (which is as important as speed for a Best Practices solution) don't go hand in hand. Other option is to give higher voting power for more competent users.
IMO in the current situation is the "Best Practices" voting "kind of useless". There are also funny cases when the same solution has high number of votes for both "Clever" and "Best Practices".
Regards,
suic
I think the missing piece in the voting might be something like "readability". I seems that best practise is used too fuzzy way.
About the performance: Maybe the site will be able to figure it out / compare it by itself one day. I don't see why that should affect your voting.
I came across a couple top-voted solutions with run-times of O(n^2) or worse when even a O(n) solution exists to the given kata. Sure the linear solutions may be longer, but solutions with horrible run-times should not be promoted as "best practices".
I don't know how to bring the upvoters' attention to run-time performance. But some general mechanism would be helpful to prevent people from converging on suboptimal solutions.
I havn't been here for quite some time....this time I want to learn more about python while the last time I wanted to learn JS (solvinb Kata's by reading tutrials/books on the paradigms, techniques and languages themselves)
The question is: what is the best solution? Overall I would say that the best solution in most languages is the one, that:
While your argument about the run-times is def. valid I think this is not true for everything. If I remember my basic programming training correctly: Sacrificing above mentioned for a better runtime everywhere makes a project harder to maintain, as code is read far more often than written. Therefore code can and should be viewed as a form of written communication, where a good style is in balance between having it short and crisp while giving everybody the infotmation needed to understand what is going on (communicate to inform, not impress).
When the project in the end has run-time issues, you should look for the bottlenecks and work on those. When I using this (great) platform to learn JS I saw many (in my opinion) badly written but high voted solutions, that used bad variable names (a, b, c, d) which are put there automatically during the minification process.
Maybe the best practise voting system should be remodeled? ....a few thoughts on that could be (all standing for themselves while stacking should be possible)
I am aware of the fact that most of what I have said might sond picky. But I am propably no exception in using this plattform to learn a programming language. While I have seen clean code (from other languages) I also know run time sensitive solutions and the necessity for both, wheras a total novice might not now the difference and is prone to learn a bad style.
...only my 10 pence of thought on the topic, no offence to anybody. I honestly like and adore this plattform and am thankful for the creators, developers and the work that was necessary to built it.
I would suggest to have a MAX of points earned for upvotes per kata. I know the importance of rewarding those doing katas, but maybe a max of 50 would be more fair. For example, "testing 1-2-3" got 643 upvotes and it place the creator at position 160 on the leaderboard yet he only creating ONE kata, and solved about 100 katas. This make no sense. There are several katas similar to this.
Thoughts?
HOW CAN I UPVOTE A KATA PLEASE???
See thread below. Here's the picture again:
It just doesn't appear anywhere.
Oh, finally I found the answer on my problem, indeed right here in the forum down below. All is clear now:
Great site, codewars is great, but too often I see solutions that are upvoted due to the "coolness" of it being a one liner ball of mud linq statement or similar.
In the business world, code is read many many times more than it is written, and ease of digestion for fellow programmers is a very important aspect.
I think a catagory for "Clean Code" to focus on things like clarity of naming, single responsibility would be great as well. Or a catagory for each of the SOLID principals.
I care little for "clever" code that takes 20 times longer to pick apart, or badly named variables that increase my digestion time.
I agree with you that there are upvoated solutions by "coolness", but I'll suggest a different solution.
The Clean Code category is already covered by the Best Practices. The problem is the lack of a regular Like button that everyone seems used to.
People just want to express that they've liked a solution, regardless of its practices or cleverness. I think Codewars should give that option, so the other categories can remain "unpolluted" by those votes.
Hi, I see your point, but codewars is a game and its primary purpose isn't to write production ready code. In some cases, those cool one-liners show you new features of a language or some important shortcuts. One-liners are about exploating the capabilities of the langauage or about applying some mathematical insights, which aren't obvious at first sight.
Nevertheless, this is a complicated topic. I've seen this while I was learning new languages. At the beginning it's easier to read and understand simple and clean (but often primitive) code, while later is much easier and quicker to read and understand terse (and maybe more cryptic) code which is without noise.
Best,
suic
There's two categories of UpVote for solutions. The problem is that the most concise solutions are getting UpVoted as "Best Practices" when they are clearly not. They are "Clever". That is why we use minifiers in the real world. I can only assume that this occurs due to folk who don't code for a living not realising the least code possible is very very rarely the Best Practice.
Well said, andy. I agree that clever is being mistaken for best practice. Certainly the 'cool' one-liners are harder to read.
@andyAnderson: Very well said.
While I agree that the Best practice button is being abused and treated as a like button as is the clever I will defend the concept of the clever button I only use it for things like taking a complex relationship and out writing a method that calculated the answer based on deriving an underlying mathematical relationship or using some other useful optimization or expanding the code to cover a real case or better yet class of cases that wasn’t tested for, this would also cover clever memorization strategies. Not just code golf or some other degenerate code practice that may be cool but not readable or functional.
Is there any way to tell which of your solutions has been upvoted? I noticed I got some points for this but have no idea which of my (usually terrible) solutions was somehow marked as clever or best practices.
Anyone got an answer for this? Couldn't find any easy way of locating my own upvoted solutions either...
Same here, I can't believe that any of my solutions got upvoted, but it says they did and I would love to see which ones they were. I upgraded to red to see if I could view them from the expanded stats page, but still nothing.
This is why I came to this discussion. I just got an extra upvote, but I don't know which of the hundreds of algorithms I've written got upvoted. It would really help. I suppose I'll have to write a script to find it? LOL, now there's a thought!
same here. perhaps I wrote a brilliant piece of code two months ago that went unnoticed, perhaps it was the one I had just great joy in creating the night before. I WISH I COULD KNOW!
I love codewars! It's a great site. I'd like to focus on voting on solutions. Right now we have two upvoting options "Best Practice" and "Clever". I feel these categories miss a very important aspect of solving algorithms -- time and space complexity.
Many solutions with poor time or space compexity are often voted up because they are one-liners. If an algorithm can be solved in 1 line but have
O(n)
space complexitiy (eg allocating an n-sized array) vs 2 lines and haveO(1)
space complexity (eg a single counter variable), then the 2 line solution should be voted to the top.We could use the existing voting options to vote-up algorithms with better time or space complexity. But maybe this is an opportunity to reconsider what we care about in regards to solving algorithms.
Do we care if a solution is "Clever" or more vaguely a "Best Practice"? Or do we care about code readablity, time complexity and space complexity?
Also we can put actual numbers on the complexities, instead of voting we can rate an algorithm with it's Big O notation.
O(1), O(n), O(n^2), .. etc
I quite
I'd say that the addition of a "Fastest" category could cover that but then where do you stop? Do you add "Shortest"? Or what about a "Shortest and Fastest" category and then a "Cleverist and Fastest but not Shortest" category? If the Clever and Best Practices categories were used correctly I think we'd just about have it covered.
I think time & space complexity should be checked in tests. Like in codility. It is pretty important "how" user solves the task not only "if".
I think downvotes should be supported. I can understand why you haven't added them but to me the current system doesn't seem to me to be working, I say that because the quality of katas is highly variable and some of them are surprisingly poor. I have logged comments for some of them but really the best solution would be to allow me to downvote and force me to add a comment for the author explaining my issues. That way the author gets feedback and I have done my bit to ensure other people know that there are potentially issues with the kata and that they might want to consider skipping it.
I agree, downvoting would be a useful mechanism to flag poorly written katas and/or encourage authors to fix them. Any user with a given account age/level of community engagement/# of katas solved/whatever should be able to downvote. Right now total upvotes is not useful info--it's just a proxy for length of time a kata has been on the site, since there's no way to reverse the trend.
I sent the suggestion through the feedback chat.
but what I was thinking is sorting the results from fastest execution time to the slowest .... that way if your code is really good you will already be at the top, until someone downvotes it ?
(the reason I would love this is for learning purposes, I am new to programming and effient vs fancy is a big dilema to people learning.)
There needs to be a better way for newer solutions to get upvoted.
I feel that some of my solutions are done better than some of the top voted solutions, but I'm at the end of the pile behind everyone and their mother who just started learning (no offense, this is a learning environment which I support). So no one will look at my code and upvote/comment/critique.
It would be so much better if solutions could be sorted by runtime or overall efficiency, instead of upvotes.
Thanks!
Sometimes readability is more then fast execution. But yes I totally agree to you. I signed up here because I wanted to see not just how others solve some problem but also what solution is considered "best" by majority. Then I expected there to be microforum for every kata where discussion about why this and that is better. Simple "best practice" tag without comments are often not there yet. There is lot of work to be done...
@stealthguy I don't even see katas you authored when visiting your profile. Have you deleted them?
Yes, but here also some solutions should be filtered out. Or there should be better guidelines how to write tests, to not let cheat them in many different ways.
There is now a paradox with voting.
Most of the katas are currently actively upvoted during beta and rarely upvoted after that.
Now there are some ancient beta katas that don't get approved due to unresolved issues (e. g. because it is a duplicate of another kata), and such katas have significantly more votes than their similar counterparts who finished beta early.
That leads to a trend where high-quality katas usually get less votes than katas with issues. This is not good.
To resolve this, I suggest resetting kata votes to zero on approval. This will make it fair for all katas.
Of course, this will also require subtracting beta-stage votes from total votes on existing approved katas.
The button to upvote the Kata could be more prominent. It took me quite some time to notice that thing. I also think this encourages people to upvote an interesting Kata. At the moment, most Kata's get between 5% and 20% upvotes from the warriors who completed the Kata and I think this is not a good representation.
I TOTALLY agree with the button being more prominent. I am still new to CW and I struggle to locate this button every time. Why not have this action in the same area where you bookmark the kata? The number of upvotes sits there too, but it is not clickable. Makes no sense at all. I just completed a fun kata in beta and struggled with this (again) hence me looking for an 'could be improved' comment.
I think it would be nice to be able to sort solutions based on runtime. Any thoughts on the possibility of this?
I agree... at least we should be able to learn how long the other solutions took to pass the test.
I agree. I see its often the shortest code in words, that are upvoted, when it should be based on runtime insted.
Sometimes runtime is not the ultimate criterion. What I mean is yess add new way of sorting solutions by runtime it is going to be great! But do not remove current tagging by doing that.
Shouldn't we be allowed to downvote solutions (most importantly best practice vote) as we can with comments? To compensate for inappropriate upvotes.
It might be more constructive to point out the problems with a solution in a comment. Then people that are learning can see what exactly is wrong with the solution.
Sure, you should do that. Still, that doesn't solve the problem with potentially wrong or non-best-practice solutions being on top (or having positive votes, instead of negative)
Yeah this is something that we may add, although for now we want to see how things evolve for a bit longer. Often there is a few solutions that have 1 or 2 up votes when they really aren't best practices. These aren't so bad I think, because not having the downvote button actually causes people to instead leave a comment, which helps to foster discussion. We prefer to encourage discussion, our mission here isn't to catalog the worlds best solutions to a specific problem.
Having a "downvote" comment where you are forced to give a reason why its not a best practice might be a solution here. Another possible improvement is to show-by-default comments for solutions that have been voted on, so that someone doesn't miss the comments on why something is not actually a good practice.
The issue gets a bit more problematic though when there is a poor solution with a ton of votes. Downvotes would really help this case, although having comments as to why its not really a good solution be visible by default would probably stop the crowd from following along on the trend of up voting a particular solution.
What about having a best practice upvote require either making a comment that's linked to the best practices upvote, or upvoting a best practices comment? I think that the best practice feature would be much more useful if we could see why a solution is considered to be using best practices.
For what it's worth I don't think clever needs a similar system since it's usually self evident and it's not as important a vote as best practices.
Upvote comments sound good, but you can get upvotes with "Wow, so short -> best practice", so I still think down-vote isn't a bad idea.
+1 for downvote.
I don't think it's enough to just add a constructive comment to a bad solution that has a tonne of upvotes. I doubt if a large number of users even read the comments.
I've only been a member for a day and already noticed the problem described by others here.
I like the idea of requiring a comment for a downvote, and I like the idea of requiring one for an upvote too. I find the solutions disappointingly devoid of discussion, this may help.
What about the following alternative to downvotes: allow "Issue" comments on solutions.
+1 for downvote. I've seen a lot of inappropriate "best practices". I think it's a really shame.
+1 for downvote. It's really unfortunate when solutions that are problematic have lots of best practices upvotes.
I rather like the idea of upvoting best practice comments, rather than directly upvoting a best practice, as having a solution voted best practice doesn't really do much for most folks.
Could someone explain to me how upvotes on katas work? It seems like sometimes I can upvot katas and sometimes I can't, with no discernable rhyme or reason.
You should be able to up vote any kata that you have completed. If this isn't the case then its a bug.
Where do I press to upvote katas?
Next to the "Share this kata" section. Note that only approved katas have an upvote link. Beta katas get upvoted if you classify them as "ready".
Thank you. Excellent explanation. :)
I thought a bit about how to sort solutions. Here are my design considerations:
Here is a potential way to calculate the sort order for the solutions page:
This is just an example to show how I would calculate the score from scratch. The variable names should be descriptive enough to make it clear what the code is doing. Let me know if you have any questions.
An example solution object:
If the score for the above sample solution is evaluated after exactly 24 hours, then the score will be 71.67. If evaluated after exactly one week, then the score will be 8.17. If an additional upvote by a kyu 3 user is gained during that week, then the score would be 11.17.
This is pretty interesting. A sort score field could be used that gets re-computed by a background task every time a new solution is saved or something is up voted. A simpler version is being used to compute the popularity score on the kata list page. We just use published_at.to_i as the base of the score, I may update that to use a half-life as well.
Something like this could be used for the default sort. I still think having straight-forward "highest voted" & "most recent" views would also be helpful. Also the sorting helps to solve part of the "late to the party" issue, but doesn't really help the "code golf preferred" issue that is starting to take place. I think its very important to be able to reward solutions as being easy to read, practical, efficient, creative, etc. Being to able to vote/tag a solution as having those attributes could also play into the default sort score.
As a side-note, it could be interesting to start to see kata form around possible algorithms to be used on Codewars (or other sites... but who cares about them). Once we support forks than users could "rebound" (if you are familiar with dribbble) other users kata/algorithms with design/logic changes. At the very least I can see a sort score & popularity score kata being very cool.
+1 for 'New solutions should generally sort to the top' Really good new solutions are at the bottom of page and nobody upvote them. It would be no problem for old solutions because good solutions are upvoted and stay at the top.
Not sure I completely understand getSolutionRankingScore and getUpvoteBonusScore,
but it seems that upvote points don't decay over time.
Wouldn't the concept fail to produce the desired effect if upvote points don't decay?
At the top of the discussion page for a kata there's a count of upvotes, type of kata, number of times completed. Intuition had me expect the upvote count to be an upvote button itself and it took me a while to find the up vote button on the other side of the page. I think the upvote count should be a button so it's consistent with the way upvote counts and displayed next to posts, solutions, etc.
Is there any randomness to the way solutions are displayed? If not, it means there is a huge bias towards existing upvoted solutions which essentially prevents new, better solutions from ever climbing the ranks. The system should work similar to Hackernews comments, where new comments start at the top, and then using an algorithm based on avg upvotes per view, start falling back down, sometimes very quickly, and are replaced by the already upvoted solutions.
Solutions aren't displayed randomly yet. This is definitely an area that needs more focus and we intend to make some changes soon. Randomly showing solutions that aren't already up voted is probably the first step. Providing a couple of different views (latest, most popular, most concise, most creative, etc) is another approach we have been throwing around.
Some sort of "trending" view would probably help a lot too, where it excludes the up votes coming from maybe the top 5 solutions and focuses on the most recently up voted ones instead.
Good to know, and those are all good ideas. One other thought is to force people (or allow people to earn a little extra honor) by looking at other solutions and deciding to upvote or not to upvote. So you might show one solution per screen with two big buttons for each of those actions, and people would be forced or encouraged to look at some number of other solutions to the problem they just finished before moving on to their next kata. The number would probably need to small if it is required, because forward momentum/addiction is clearly important.
One other idea along these lines (and following HN) is to not show the number upvotes, to eliminate bandwagon bias. Or at the very least, not show the number of upvotes until you had yourself explicitly pressed "Upvote" or "No upvote".
Another view could be ranking according to test complition time.
I assume you meant "running time" and not "compilation time," since most (all?) of the languages here are interpreted. Regardless, though, I don't think that's a relevant metric. Katas are primarily about writing clean, readable code -- a human metric that has little to do with compilation time or running time.
I think the Reddit style is nice and it does indeed feel good to see your own vote impacts your comment.
I think all comments should be considered up voted by default by the person who made them, reddit style. That avoids any dilemma over whether you should (or if it's appropriate to) up vote your own comments.
I don't know if the system at the moment already ignores self up votes (for the purposes of honour and such) but even if it's merely cosmetic I think it would be clearer if it just defaulted to up voting your own post.
How about we just disable the ability to up vote your own comments? Right now you can up vote your own comment (but don't get points for it).
That's fine too. I just thought of the self-upvote-by-default thing because that's how reddit does it. Maybe because it feels better to have your comments start at 1 rather than 0? :) I suppose it comes down to a matter of taste.
From a strict votes perspective I think the reddit style makes sense. The question is does that become confusing with the honor points system? You shouldn't get an honor point just for leaving a comment, comments should only be worth points if someone else finds them useful in some way.
I realize that its already confusing as it stands now, to be able to up vote your own comment but not earn honor for it. Thats really more of a bug than a design issue though.
It would be pretty elegant to simply award honor only if the upvote count is greater than one.
I'm a little late on the announcement, but this change has been implemented - in case you haven't noticed :)
You can still upvote your own kata solutions though.
Yeah, you can still upvote own kata solutions and (at least in my mind) it's not very appropriate ;]