Comm Lab Web Poll Homework: Favorite Sexual Position

For my comm lab web homework, I had to build a simple poll using Sinatra and Ruby.  I decided to do something a little more interesting, a variant of my favorite Halloween candy app that I posted up on github.

This poll asks people to choose their favorite between two sexual positions.  The choices: missionary, doggystyle, giving oral, receiving oral, giving anal, receiving anal, 69, scissoring, over the table, on the table, cowgirl, reverse cowgirl, dry humping, making out, public sex, mutual masturbation, mammary sex, standing sex, and spooning sex.  The great thing about this type of poll is that it still gives you plenty of options, but since it compares two of the options, it encourages voting multiple times instead of just once.  From there you can approximate peoples’ favorites by seeing how the choices were weighed against each other.  (I wish presidential elections were this way too)

I had a lot of problems with this poll’s development but that was mainly because I’d never coded in Ruby or set up views for an app before.  I also had problems configuring my MacBook Air for shotgun and Sinatra.  But I got those installed correctly after doing a git clone of sinatra and then getting the appropriate Ruby gems.  I also had to adjust my .profile path.  But then it worked after all the clean installations and it was beautiful making changes to my code without restarting Sinatra!  What a lovely development environment!

I tried to deploy my app to heroku because the ITP server runs like garbage (edit: turns out there were some runaway scripts on the server), but I couldn’t get it to run and my heroku logs weren’t very helpful.  I’m sure it was a newbie mistake related to using the right config.ru and Gemfile files, along with using the right database adapter configuration line for DataMapper.  Eventually I got it all working — I switched over to Postgres after also figuring out how to install Postgres on my MacBook Air.  This was a lot of front-loading on my Mac but it’s going to be sweet to use for development from here on out.  The comm lab web class has been great for this reason alone, getting my Mac in order, but I’ve also completely crash-coursed in Ruby and Sinatra and I love it.

I also learned you can’t do incrementers like “i++” in Ruby.  But += will work fine.  I’m not a fan of strict casting and whatnot (being a lazy PHP loser).

At any rate, it looks like the old traditional positions are the running favorites (Not Safe For Work, NSFW).  Doggystyle and cowgirl came in at the top.  Results seemed fairly consistent across genders.  I got 925+ votes on this thing in just a week or two.  I didn’t spot any abnormal results really, although it looks like almost all men preferred receiving oral to other things, whereas for women it was split.  Women were more receptive to doggystyle and reverse cowgirl than I might have thought.

Again, here’s the poll.  There’s also a great chart of the data, broken down by men, women, and unknown, further split into which of their choices won or lost.  I made this using Ruby pulling from YAML into HighCharts, which is a great library online.