[pmwiki-users] a simple rating system for recipes

Patrick R. Michaud pmichaud at pobox.com
Wed Apr 18 15:34:29 CDT 2007


On Wed, Apr 18, 2007 at 04:23:08PM -0400, The Editor wrote:
> On 4/18/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >On Wed, Apr 18, 2007 at 12:41:04PM -0700, Martin Fick wrote:
> >> I don't think that it is working right.
> >>
> >> The ratings are in order:  5-13230-15
> >> minus the dups:            5-13235
> >> ordered by rank:           55332-1
> >> But the recipe reports:    55332 0XX
> >
> >The recipe doesn't look for duplicate ratings from the same person--
> >it's okay for someone to enter more than one rating.  (We could
> >see about preventing this... but that just means that someone could
> >use multiple names.)  It's an open-editing environment anyway, so
> >we already assume some level of trust among the community.
> >
> >Negative ratings are listed as "X" in the final output, because
> >otherwise the minus signs mess things up.
> >
> >So ratings of +5 -1 +3 +2 +3 +0 -1 and +5 are first
> >sorted to produce +5 +5 +3 +3 +2 +0 -1 -1, and then are
> >converted to characters to produce "55332 0XX".
> >
> >Pm
> 
> 
> Just for simplicity's sake, I'd be inclined to give ratings of simply
> +1 to +5 (kind of like the PITS system).  1 would be opposed, 5 would
> be for, 3 would be neutral.  

Even in PITS we allow 'X' and '0' votes -- we just don't put them in
the form.  

And these aren't "votes" as in "opposed/for", they're 
ratings ("dislike/like").  Someone can dislike a recipe without
being "opposed" to it.  But there needs to be a rating that
sits somewhere outside the norm -- something that is so extreme
as to say "warning, stay away".

> I think it solves the problem of
> remembering a + for the zeros, and explaining why negatives look like
> x's.  It should be simpler for the user and for the code.  

It doesn't really affect the code -- it's just one (ternary) conditional
that handles it.  Not even an extra line of code for it.

> I'd also be curious to see your code for the $Rating variable.  Very cool.

I'll publish the recipe shortly.

Pm



More information about the pmwiki-users mailing list