• total_votes seems inaccurate sometimes

    From Nightfox@VERT/DIGDIST to Digital Man on Fri Aug 4 19:58:34 2017
    Hi DM,

    SlyVote has a "stats" feature which shows some statistics on the polls that might be of interest, and one thing it shows is the total number of votes for each poll and their options with the highest (unique) number of votes. For the number of votes, it displays the total_votes property of the message header, but it seems that isn't always accurate. For instance, in the Dove-Net Hobbies sub-board, there's the poll "What is your favorite hobby?" The total_votes has a value of 5 on my system, but there are 9 votes on the poll (one the first answer has 2 votes and the 3rd answer has 7 votes).

    Nightfox

    ---
    ž Synchronet ž Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Sat Aug 5 00:27:32 2017
    Re: total_votes seems inaccurate sometimes
    By: Nightfox to Digital Man on Fri Aug 04 2017 07:58 pm

    Hi DM,

    SlyVote has a "stats" feature which shows some statistics on the polls that might be of interest, and one thing it shows is the total number of votes for each poll and their options with the highest (unique) number of votes. For the number of votes, it displays the total_votes property of the message header, but it seems that isn't always accurate. For instance, in the Dove-Net Hobbies sub-board, there's the poll "What is your favorite hobby?" The total_votes has a value of 5 on my system, but there are 9 votes on the poll (one the first answer has 2 votes and the 3rd answer has 7 votes).

    That poll here only has 7 votes:

    ŚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄśśśś
    ³ Subj: Whats your favorite hobby?
    ³ Attr: Replied Poll
    ³ From: KK4QBN (KK4QBN)
    ³ Date: Wed Jan 11 2017 12:29 am EST (6.9 months ago) ĄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄśśśśśś

    stuff like RC planes, etc. Amateur Radio, BBSING,

    1: RC Planes, Helicopters, Multirotors [2 29%]
    2: Ham Radio [0 0%]
    3: BBSing [5 71%] ū

    Additionally, I've checked the msgs JS representation, and the total_votes property value is also 7:

    total_votes = 7
    upvotes = 2
    tally = 2,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0
    number = 1453
    offset = 0
    to =
    from = KK4QBN
    subject = Whats your favorite hobby?
    id = <5875C2C1.29.dove-hobby@kk4qbn.synchro.net>

    So I suspect that you may have some duplicate votes or out-of-order votes (votes received before the poll)? Or some other oddity that is causing this with that particular poll. Do you see this same problem with other polls?

    digital man

    Synchronet/BBS Terminology Definition #42:
    SCFG = Synchronet Configuration Utility
    Norco, CA WX: 69.7ųF, 65.0% humidity, 2 mph S wind, 0.00 inches rain/24hrs

    ---
    ž Synchronet ž Vertrauen ž Home of Synchronet ž [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Sat Aug 5 12:54:00 2017
    Re: total_votes seems inaccurate sometimes
    By: Digital Man to Nightfox on Sat Aug 05 2017 12:27 am

    So I suspect that you may have some duplicate votes or out-of-order votes (votes received before the poll)? Or some other oddity that is causing this with that particular poll. Do you see this same problem with other polls?

    It turns out it was a bug in SlyVote. For the stats screen, it sorts the polls by number of votes (highest number of votes first), and I had a comparison where I made a typo, using = instead of ==. I have fixed that and committed it to CVS (along with a few other updates).

    Nightfox

    ---
    ž Synchronet ž Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Sat Aug 5 13:45:43 2017
    Re: total_votes seems inaccurate sometimes
    By: Nightfox to Digital Man on Sat Aug 05 2017 12:54 pm

    Re: total_votes seems inaccurate sometimes
    By: Digital Man to Nightfox on Sat Aug 05 2017 12:27 am

    So I suspect that you may have some duplicate votes or out-of-order votes (votes received before the poll)? Or some other oddity that is causing this with that particular poll. Do you see this same problem with other polls?

    It turns out it was a bug in SlyVote. For the stats screen, it sorts the polls by number of votes (highest number of votes first), and I had a comparison where I made a typo, using = instead of ==. I have fixed that and committed it to CVS (along with a few other updates).

    Cool, glad you found it.

    digital man

    Synchronet/BBS Terminology Definition #30:
    ISDN = Integrated Services Digital Network
    Norco, CA WX: 86.5ųF, 48.0% humidity, 6 mph ESE wind, 0.00 inches rain/24hrs

    ---
    ž Synchronet ž Vertrauen ž Home of Synchronet ž [vert/cvs/bbs].synchro.net