> -----Original Message----- > From: Ian Vaughan [mailto:[email protected]] > Sent: Wednesday, January 07, 2009 5:15 AM > To: cf-talk > Subject: My Starbucks Idea - and Coldfusion > > Using coldfusion what is the best way of implementing a user vote > facility on suggestions submitted. So as users click on the "thumbs > up" icon it becomes more popular and the same when the click on "thumbs > down" the idea becomes less popular. > > Hope this makes sense?
Sorta, kinda? ;^) More information would be good. To speechify a little, you're not going to get very far unless you can segment your problem. Divide and conquer. To do this you really have to define what you want out of your system - really understand it. What does "popular" mean (quantified, to the system)? Does the item appear more often? Always? In order? Can each user impart the same amount of "popularity" or do more popular users have a greater impact? Can popularity be altered by the author (can I improve an idea based on feedback)? Is a "thumbs down" equal-but-opposite to a "thumbs up" or not (most successful systems do not make negative feedback - which is more common - equivalent to positive feedback). Is popularity a simple count of votes? A percentage (of what - total users, total items, visiting users, positive users, etc)? A calculated value (and calculated how)? Is it is a specific value or a simpler rank/grade (Popularity = loved|liked|ignored|disliked|hated)? Lastly spend some time considering where you want to end up - how you want the system to evolve? You don't have to know completely, but some time should be spent to ensure - as much as possible - that your decisions now won't prevent you from doing something later. Once you do that up-front work you should start seeing a collection of tools rather than a single nebulous "feature". The tool to capture popularity is separate than the tool that calculates it which is separate from the tool that selects items based on it and so forth. Okay - that was more speech than I intended. I worked, years ago (9 years ago, actually - damn I'm getting old), on a similar, but smaller problem - here's an article about one aspect of it: http://www.depressedpress.com/Content/Development/ColdFusion/Articles/Weight ingRandom/Index.cfm In this case I wanted to weight otherwise "random" selections. So "popularity" would cause some items to appear more than others, but other items would also, sometimes, appear. The system in the article worked fine but I think it's a definite victim of "everything's fast for small N" - for the 20 or 30 possible choices we had it worked well, for thousands of choices it would be (I'm almost sure) WAY too slow. Still it might give you some ideas. The basic idea is that you're not selecting "items" rather you're selecting popularity. Think of it as a carnival game: there are 10 buckets and a ball is randomly thrown at them. If the buckets are equal sizes then there's (for the sake of argument) an equal chance for the ball to go into any of the buckets. If you want a particular prize to come up more often (say the plastic Kazoo) you can make that bucket bigger while a prize that shouldn't come up often (the brand new PSP) should have a smaller bucket. So most people will get the kazoo but there's still at least a chance that they'll get a PSP. Another analogy might be a raffle: each ticket has only one chance out of the total to be selected but each person can have multiple tickets. The more tickets somebody has the "more popular" they are. Somebody that has half of the tickets will probably win - but somebody with only one ticket still has a chance. I'm assuming, of course, that this a feature you'd actually like/have - the ability to "randomly" select an item where popular items are more likely to be selected. Maybe that's not something you were considering at all. ;^) Jim Davis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317514 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

