Using half stars for aggregate ratings

6 views
Skip to first unread message

Jonathan Klein

unread,
Aug 19, 2013, 2:57:31 PM8/19/13
to joindin-d...@googlegroups.com
Hi All,

I'd like to make a change to show the true average rating for a talk, and display the average rating with half star resolution (so your talk could have 4.5 stars overall).  This wouldn't change how reviews are submitted at all.  I've created the relevant images, and the change seems straightforward, but it involves changing the return type of the get_talk_rating MySQL function, which is in the joindin-api repo.  This function rounds the result of the average calculation, which loses all of the granularity and makes it impossible to fix this in PHP.  I propose changing this function to return a float, and tweaking the PHP to handle that in all call sites.

Is this the kind of patch you guys would accept?  Are there any gotcha's I should know about before doing this?  Is there a good reason why this function returns an int?  Thanks!

-Jonathan

Stefan Koopmanschap

unread,
Aug 20, 2013, 2:27:28 AM8/20/13
to joindin-d...@googlegroups.com
I think the idea is great, but we need to check with the apps as well whether they can handle this.

Stefan

August 19, 2013 8:57 PM
--
You received this message because you are subscribed to the Google Groups "joindin-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joindin-develop...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

joshua.thijssen

unread,
Aug 20, 2013, 2:56:33 AM8/20/13
to joindin-d...@googlegroups.com
Another option would be to use fixed point. Just multiply stars with 10. 45 stars would be displayed as 4.5. It also allows for finer granularity in thw futurw as well


Sent from Samsung Mobile

Jonathan Klein

unread,
Aug 20, 2013, 9:25:21 PM8/20/13
to joindin-d...@googlegroups.com
Even if we did that we would still need to change all of the call sites, so I'm not sure it would provide any benefit over returning a float, right? 

Lorna Mitchell

unread,
Aug 29, 2013, 5:34:31 AM8/29/13
to joindin-d...@googlegroups.com
I am okay with adding this feature, but I would only merge it if the app developers were happy.  Rich does the android app, and either Michelle or Mel can speak for the iphone one.  Right now, we've got both apps in rework, and a new website in progress, so it's much more complicated than normal to add something like this at this point - please accept my apologies for my resulting lack of enthusiasm!

Lorna

Lorna Mitchell
http://lornajane.net


Jonathan Klein

unread,
Sep 1, 2013, 1:42:41 PM9/1/13
to joindin-d...@googlegroups.com
Okay, in that case I'll hold off on doing this for now.  I've attached the images I created in case someone wants to pick this up at some point once the apps and site are more stable. 
rating-0-5.gif
rating-2-5.gif
rating-3-5.gif
rating-1-5.gif
rating-4-5.gif
Reply all
Reply to author
Forward
0 new messages