CSCE 590: Problem Set 1
Due: Monday, 12 February 2006 at 2:30pm
Figure 1: ¿Quien es mas macho, Ricardo Montalban o Lorenzo Lamas?
¿Quien es mas macho? (Who is more macho?)
For this problem set we take our inspiration from the hotornot website and the old
Saturday Night Live sketch. You will implement a Java servlet
which shows visitors pairs of pictures and asks them to decide:
quies es mas macho? (do feel free to change the question if you
To do this you will need a bunch of pictures. The file picurls.txt contains 99 URLs to flickr
pictures. You can use these. Notice that you do not need to
download the pictures as they are already hosted at flickr. In
case you are interested, I created the list by running the
photos_for_pool.py script from the flickr.py
library. You can run it yourself if you want a different set of
pictures (these are from a "portrait" group) or use your own set
The specs are:
- Users do not log in. However, an account is automatically created for them when they first visit the site.
- A user is never shown a picture more than once. If the user has 1 or 0 pictures left to see then the program displays a message to the user telling him to go away.
- Each time the user is shown two pictures, chosen randomly from the ones he has not seen. He can pick either one as the "mas macho" or he can pick a third option: "no son macho".
- The program keeps track of how many votes each picture has received.
- Each user can see a special pages which shows him all the votes he has cast.
- A special "status" page shows the top 10 pictures ordered by the number of votes received.
You are not required to do these but I guarantee hours of giddy fun if you do:
- You have no doubt noticed that since we are doing pairwise comparisons that a better summary would take into account the transitivity. That is, if most people think that Ricardo is more macho than Lorenzo who is more macho than William Shatner then, clearly, Ricardo is should out-macho Shatner. You can can calculate true weights by using a dynamic programming approach. Call it, the MachoRank algorithm.
- Extend the program so that it dynamically loads new pictures
from flickr, or facebook, or your favorite website.
- Extend it the program to allow users to upload their own
(or, more likely, an unwary friend's) picture as they do in
You will hand in your source code using the department's dropbox. You will also need to give a short demo of your program to Kimberly, our grader.
José M. Vidal
Last modified: Wed Jan 24 20:24:51 EST 2007