scipy / SciPyCentral

SciPy Central
http://scipy-central.org
BSD 3-Clause "New" or "Revised" License
16 stars 12 forks source link

Thumbs #134

Open ksurya opened 10 years ago

ksurya commented 10 years ago

Reputation system for the site

  1. upvotes, down votes for submissions. Each revision object has its own reputation
  2. only upvotes for comments
  3. Reputation for user profile
  4. Search is ordered based on reputation
lomegor commented 10 years ago

Things to fix:

  1. What do you think about adding upvote and downvote buttons to the listings (like that main page, search, etc.)?
  2. Upvote and downvote buttons should have the cursor being a pointer (like it was a button or a link).
  3. I assume I can't vote if I'm not logged in, but there's no message about that and the arrows are still visible.
  4. It takes too long to see a change in the reputation. It should update automatically with javascript before the AJAX, and correct if there was an error making the change.
  5. I would change the up arrows for sections (to expand them and close them) to a plus and minus sign, maybe. Because now with upvotes it looks like I can upvote the sections.
  6. When I vote, the space between the upvote and downvote arrow gets bigger.
  7. There should be a way to remove votes. For example, it could be like Reddit, and if I click in the same arrow again it removes the vote.
  8. Are comments being ordered by reputation or just by date?

There may be more bugs, but I'm not founding them yet. I think you have a lot to fix between the two branches either way.

lomegor commented 10 years ago

So, a couple of question about the decision you made here:

  1. Why aren't there downvotes and upvotes in the listings of submissions? Do you think it would be good to have them?
  2. Why isn't there a downvote button in comments? Why only upvote?
  3. Why are comments ordered by date and nor by reputation (or viceversa)?

There is no correct answer for these questions, I just think that you should have an answer for them and understand what are the pros and cons of each solution.

ksurya commented 10 years ago

[I will answer 1st comment later on after making some changes] Regarding the 2nd comment:

  1. There is no point of voting in listing without actually reading the submission! that's why I thought not to add buttons in listing
  2. upvote for comments was put so that, you might want to admire someone's comment and nothing else.. probably, users might give particular attention to it while going through all comments
  3. sometimes people want to reply to previous comments! it makes no sense to me if I order based on reputation.
lomegor commented 10 years ago

Two things that I need fix ASAP to continue testing:

  1. I get a server error whenever I try to vote anything (unless it's my own thing).
  2. I would change the text when trying to upvote own thing to "You cant vote your OWN ...". Also, the exclamation mark at the end of Oops loos like an l.

If you are not getting error 1, maybe you should try cloning SciPy master, ./quickstart.py, the checkout this branch and migrate (you will have to fake the first comment migration probably... that's something that should be added to quickstart - it could be in the same branch you are fixing the search problem).

lomegor commented 10 years ago

Ok, got voting to work. Number 2 still holds, though. Other things to improve:

  1. If I double click on upvote or downvote, I can do it multiple times.
  2. The points should change automatically when I click on the arrow, the arrow should change color immediately, without waiting for server's response; otherwise it looks weird. You can't either make the arrow change back on server error, or just don't tell anything to the user on error.
  3. It's taking a lot of time to vote a single submission... try to see if you are doing anything too much. Otherwise I'll take a look at the code later to see why it's taking so long.
  4. I would change the color of the arrows when they are disabled so it's clear that I can't vote (or maybe just remove them altogether).
  5. BTW, why did you choose not to let people vote their own submissions? I mean, most sites let you, it's an unnecessary restriction, and they can only vote once so it's not something that can be abused.
  6. All the things I said apply to comments as well.
  7. Something I'm not too sure about: did we always see all the revision on the home (including all revisions)?
  8. What do you think about votes carrying on to new submissions? I don't think it's necessarily a good idea because, it's after all a new thing... The same question goes for comments (i.e. if comments should be a part of submission instead of revision). I think new revisions are like new edits on comments, too, which would mean that the reputation should be part of the submission. What do you think?
  9. I think it's not clear on the home page (and I assume search) that the number besides the title is the reputation. Especially since there are no arrows. Either include the arrows, or figure out a way to make it clear that the number is the reputaiton.
  10. Maybe think about changing the color for the arrows when activated.
  11. If I click on an arrow and I immediately click on a link, for some reason the "server error" message appears on the arrow (even though I think it works).
  12. Are revisions ordered on the homepage on Top Rated? It doesn't seem like it.
  13. Also, on Top Rated page it seems that they are not correctly ordered (right now I have 6, 0, -2, -1. 2. 0 reputation in that order)
  14. It seems that the Recently Changed tab view all link is taking me to all-revision which is ordered by rank, not by recently changed.
  15. Is Most Viewed tab on homepage working?

That's a lot to do for now.

ksurya commented 10 years ago

[2] The JS code waits for server to complete request. So, we see small lag which sometimes can be observed clearly. This kind of method ensures

  1. To display only when its successful
  2. The total number of votes is refreshed. If some other user votes in the middle, its also counted.

We can also do it in the other way First update the data from the client code itself. Then, edit them only if they are different from server.

Please let me know if you have any better idea.

lomegor commented 10 years ago

As I said, I think it would be better to do it the other way. As it's not important data, it's not really awful if we are showing incorrect data to the user.

On 13 September 2013 18:16, Surya Kasturi notifications@github.com wrote:

[2] The JS code waits for server to complete request. So, we see small lag which sometimes can be observed clearly. This kind of method ensures

  1. To display only when its successful
  2. The total number of votes is refreshed. If some other user votes in the middle, its also counted.

We can also do it in the other way First update the data from the client code itself. Then, edit them only if they are different from server.

— Reply to this email directly or view it on GitHubhttps://github.com/scipy/SciPyCentral/pull/134#issuecomment-24409908 .

ksurya commented 10 years ago

[1] I have observed it but didn't know the reason. But after making other changes, I didn't see it

[3] Roughly, its taking 250-400ms for a vote. Do you think its huge?. I tried to reduce number of queryset iterations required while counting number of up votes, down-votes. I think this should help a bit but not too much.

[4] I removed the arrows. Its clear that way

[5] It does not make sense voting their own submissions. Besides, if a person has 50 submissions, and votes on each of them, it gives him 250 reputation on his profile!! It seems to be considerable abuse

[7] Right now, we only see latest revision on home page while search queries contain all revisions!

[8] I have actually posted about it in mailinglist when I started thumbs but it didn't get any considerable discussion. I think if we are going to create revisions even for a typo in existing submission, carrying reputation makes sense. Otherwise, it may not be necessary.

[12][13] They are ordered based on wilson score. If you have changed "reputation" field from admin, try changing "score" fields and see. It has to work. Technically, the score fields range from 0-1

[15] This data is created based on "pagehits" app and its data. Sometimes, if we make less hits on our db, we don't see any submissions there. However, if there are hits and we delete respective revision from db, the homepage raises error. This has to be fixed though.

lomegor commented 10 years ago
  1. I think Most Viewed isn't working, but I'm also seeing it in master. Can you please take a look and create an issue if it's like that? Also, should we be showing revisions instead of submissions on that tab?
  2. I would change the word "Votes" on the lists of items to "Points" or something like that.
  3. The score on the item page is not horizontally centered again.
  4. If I click multiple times on votes (really really fast, a lot of times), I start getting 500 server error.
  5. Related to number 4, when this happens, the votes keep updating itself each time a response gets a 500 server error (which looks weird). Maybe you can just avoid updating the score back on error.
  6. It's really taking too long to vote. I'm going to take a look at why that happens in the code, but you should invest more time on that. I'm getting about 1 second to get a response from the server.
  7. I think you have solved the problem with multiple clicking changing the reputation of an item too much, but it still changes the reputation of the user! For example, I just got SciPy Central to -4 and none of his submissions or comments are downvoted (just by multiple clicking on upvote and downvote, really really fast).
  8. I thought you were going to to change it so reputation carried on to new revisions? If you did, it's not working. I don't think reputation should be linked between revisions, just that when a new revision is created the reputation is copied.
  9. The message for Can't Vote is also not centered correctly, and the one for comments is not vertically centered (i.e. the arrow of the message is not pointing to the vote arrow).
lomegor commented 10 years ago

I'm not even sure what you call score, and what you call reputation. You use both terms interchangeably in comments and code, and you even use wilson score some times, which makes everything more confusing. Choose the terms you want to use for each, and do so consistently. For example, reputation can be the simple sum of upvotes and downvotes, and score the wilson score.

lomegor commented 10 years ago

I'm not sure if I already said it, but have you tried creating indexes for Thumbs to see if we can improve the performance?

lomegor commented 10 years ago

Ok, I think that's it for now.

gauteh commented 10 years ago

:+1:

gauteh commented 10 years ago

Maybe something can be borrowed from: https://faq.i3wm.org/questions/