In \\forum\\templatetags\\, there is this code. I just wanted to verify if this logic is correct?

# In order to represent the accept rate in percentages we divide the number of the accepted answers to the
# total answers count and make a hundred multiplication.
    accept_rate = (float(accepted_answers_count) / float(total_answers_count) * 100)
except ZeroDivisionError:
    accept_rate = 0

I feel that it should be (pseudocode)

(Total number of answers accepted / total number of questions asked) * 100

asked 18 May '11, 12:45

bits's gravatar image

accept rate: 0%

edited 18 May '11, 12:46

Oh, are we allowing multiple answers to a question?

(18 May '11, 12:46) bits

Yes, I think so.

Related issue: should a user's answer-acceptance rate be reduced by questions they ask that receive no answers?

(18 May '11, 13:49) Andrew_S ♦

I agree with this post. The percentage shouldn't be a percent of the total on the board, but a percent of the individual's work. 100% should mean "I make sure to close or answer every question I ask."

(18 May '11, 16:18) JonathanB

I agree with @JonathanB here. Additionally, I think @Andrew_S that questions without an answer whatsoever should be discarded in the calculation.

(18 May '11, 16:22) karoldvl

@karoldvl is right, if there are no answers you cant accept one, so they should be excluded.

(18 May '11, 17:01) JonathanB

As per everyone above: If there are no answers you cant accept one, so they should be excluded. But I want to add another thing. First of all, I am not sure if multiple answers can be accepted. Looking at code it seems like there is such a facility. If there are multiple answers accepted in a single question, then they should be counted as 1 accepted answer. So effectively, we are looking at the % of questions that have any accepted answers.

(18 May '11, 19:47) bits

So, should I file a bug about this?

(19 May '11, 12:58) bits
showing 5 of 7 show 2 more comments
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 18 May '11, 12:45

Seen: 1,341 times

Last updated: 19 May '11, 12:58

powered by OSQA