[anonymous]8y0

A function to automatically compute the averages should be implemented.

awk is made for this, but it took me a few minutes to whip this up in java. I figured if numeric polls are used in the future, this can be used as a code-base. The indentation isn't coming through, but any IDE will fix that for you.

This doesn't work on arbitrary numeric entry polls, but for those, you can gather the statistics as you go along, putting it in the GATHER loop

EDITED to fix serious bug.

usage: paste this into PollStat.java, compile it. then run

java PollStat < poll.csv.txt

So far, the winners are endoself and army1987. I wasn't far off.

~~~~~... (read more)

1ArisKatsaris8yNot really -- if you check out the wiki page [http://wiki.lesswrong.com/wiki/Comment_formatting#Polls] this type of poll is meant for discrete options, not for numbers or probabilities. For probabilities the "poll:probability" type should be used, which does automatically compute averages and medians.

Less Wrong Polls in Comments

by jimrandomh 1 min read19th Sep 2012310 comments

79


You can now write Less Wrong comments that contain polls! John Simon picked up and finished some code I had written back in 2010 but never finished, and our admins Wesley Moore and Matt Fallshaw have deployed it. You can use it right now, so let's give it some testing here in this thread.

The polls work through the existing Markdown comment formatting, similar to the syntax used for links. Full documentation is in the wiki; the short version is that you can write comments like this:

What is your favorite color? [poll]{Red}{Green}{Blue}{Other}

How long has it been your favorite color, in years? [poll:number]

Red is a nice color [poll:Agree....Disagree]

Will your favorite color change? [poll:probability]

To see the results of the poll, you have to vote (you can leave questions blank if you want). The results include a link to the raw poll data, including the usernames of people who submitted votes with the "Vote anonymously" box unchecked. After you submit the comment, if you go back and edit your comment all those poll tags will have turned into [pollid:123]. You can edit the rest of the comment without resetting the poll, but you can't change the options.

It works right now, but it's also new and could be buggy. Let's give it some testing; what have you always wanted to know about Less Wrongers?