| |
tlr
Registered: Sep 2003 Posts: 1791 |
Sorting by vote results in events/compos?
Could we have automatic sorting by results per compo in the event view?
That would be nice in compos with on-line voting like in the crack intro music compo. |
|
| |
CreaMD
Registered: Dec 2001 Posts: 3057 |
Not good for compos which don't have results based on CSDB voting. That means all party compos and all other online compos.
It would best implement simple javascrit layer allowing to sort table columns according to user desires. It's simplest to implement over the existing code.
roman
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
voting.php/ctrl-a/delete |
| |
Burglar
Registered: Dec 2004 Posts: 1105 |
Quote:It would best implement simple javascrit layer allowing to sort table columns according to user desires. It's simplest to implement over the existing code.
even more spaghetti?! |
| |
CreaMD
Registered: Dec 2001 Posts: 3057 |
What do you mean, Enno? |
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
dont let a vote/rank list tell you what is good or not.
listen to all and make up your own mind.
music is subjective, some like this, some like that.
its the most impossible to vote on, thats why eurovision song contest is such a mess.. |
| |
Burglar
Registered: Dec 2004 Posts: 1105 |
creamd, monkeypatching a rather big system as csdb on the frontend, which has no ajax-like framework or anything is a bad idea. it will create more spaghetti code and make csdb codebase harder to maintain. |
| |
CreaMD
Registered: Dec 2001 Posts: 3057 |
Aha. So you think adding a completely separate layer that just does sortable on something that has sortable data in it is making a code less maintaineable? It seems pretty weird to me. To me it makes the code completely intact because it added on presentation layer. If this site is combination of PHP with html and doesn't use some sort of MVC philosophy then it's of course a bit less comfortably designed and then adding anything to it makes it harder to maintain.
You are right about one thing though.. having ajax/framework around some parts of the site (espcially around editing parts) would be really comfortable. |
| |
Burglar
Registered: Dec 2004 Posts: 1105 |
it's a matter of knowing, not just thinking.
http://en.wikipedia.org/wiki/Monkey_patch#Pitfalls
http://www.nczonline.net/blog/2010/03/02/maintainable-javascrip..
|
| |
CreaMD
Registered: Dec 2001 Posts: 3057 |
I'm not sure if you understand the concept of the solution I proposed or just generally dislike the idea of solving the problems like that.
In this particular case. It's just one additional class added to the table (it would be just that in case this site was using e.g. standard jquery UI library). let's call the class "sorttable". That's all. It should work out of the box and can be re-useable all over the site. How does it break existing code or make it un-mantaineable in future. The table, (that is any table, and actually every table) has columns and heads. It's just adding sort of intepretation of the results for those who need it, it doesn't change the functionality of the site any way. It will still work without javascript and it will still work even when you add more columns or change practically anything in the table
You would prefer to make the whole sort thing in the code so it fits into the existing concept of how things work. That way you can still use ajax to make the update faster. Ok I don't mind. But I don't expect That solution coming anytime soon.
p.s.: only checked the links you provided briefly. I admit thjat you made interesting point. Ability to maintain order is one of my missing features... apart from many others. |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Burglar, this wouldn't be a monkey patch - the CSDb codebase would be entirely unaffected, and none of its code or classes would be overridden.
The JS in question is loaded by the browser, and would act on the page content after CSDb delivers it.
The 'Dont modify objects you dont own' article you linked to isn't applicable either - no changes are being made to any JS library classes; the only thing a sorttable plugin does is reorder some DOM elements.
I'm in favour of it. |
| |
Kristian
Registered: Apr 2002 Posts: 126 |
Sorting in general would be nice, but it's pretty worthless without more decimals in the user rating. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11390 |
and you think computing more decimals from a handful votes makes sense? seriously? =P |
| |
Burglar
Registered: Dec 2004 Posts: 1105 |
@ChristopherJam, you're forgetting that by building on top of the html, will make it impossible to change the regular html of event results. At least without also updating the added javascript stuff that does the extra sorting.
now, you could argue that you then always have to double work and that it wont really be a problem. but nobody likes double work.
the best solution would be is to add a few lines of code to the backend phpcode to add the sorting. A *far* simpler approach and it won't add additional maintenance requirements on a page.
anyway, this is all not really relevant anyway, I don't think perff wants to add it. |
| |
Kristian
Registered: Apr 2002 Posts: 126 |
Quote: and you think computing more decimals from a handful votes makes sense? seriously? =P
Uh... yes. |
| |
Didi
Registered: Nov 2011 Posts: 488 |
CSDb was never meant to serve as a voting platform for competitions. Usually it just shows results of competitions ran/running outside and users can add their own voting to the entries.
I just use the votes given on CSDb and create my own chart based on unweighted averages because 1 decimal digit is too less for a compo. |
| |
enthusi
Registered: May 2004 Posts: 677 |
Please compute the variance of the mean as well then. And see if its smaller than .01 |
| |
Hein
Registered: Apr 2004 Posts: 954 |
Isn't all the sorting available in here allready done with PHP (or MySQL)? Why change that method? |
| |
CreaMD
Registered: Dec 2001 Posts: 3057 |
:-) |