Awesome! But since we're stress-testing it, let's try doing things wrong.

First thing that I noticed is that it doesn't let you post if there's a poll error. That's great! ... except it doesn't respect four spaces to put something in code format, so I can't easily tell you what I tried and what failed. Putting tests in their own comments to make it more obvious when something passes.

[edit]Oops, this also floods recent comments.

Showing 3 of 4 replies (Click to show all)

Polls are stored by their id, which makes it so they can't be edited after the fact. (Probably wise.) But what happens when you refer to an old poll by its id?

This is |pollid:10|, which refers to the poll from this comment.


What about a future poll?


4Vaniver8yTrying to put two kinds of polls together: How many bugs will I find? [pollid:11] The code for that was |poll:number|{all of them}{none of them}, with the pipes replaced by square brackets. It looks like the interior poll type takes precedence, which is probably what should happen, but it might be better to complain instead.
8Vaniver8yTrying to do a poll with only one option fails gracefully. Example: What kind of book did you read last? [poll]{a book} Modifying the number of periods modifies the number of options available: [pollid:12] |poll:True............False| One period is well-defined: Nope. |poll:True.False| throws an "invalid poll type" error. What about leaving off one of the names? |poll:True...| throws an "invalid poll type" error as well.

Less Wrong Polls in Comments

by jimrandomh 1 min read19th Sep 2012310 comments


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?