[pmwiki-users] a simple rating system for recipes

The Editor editor at fast.st
Wed Apr 18 15:23:08 CDT 2007


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.  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.  And the
simpler the better.

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

Cheers,
Dan



More information about the pmwiki-users mailing list