User:Aperfectring/Random image page

From Geohashing
< User:Aperfectring
Revision as of 16:36, 17 February 2010 by imported>Aperfectring (+info about random image page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

First off, the most important part, a link: http://aperfectring.dyndns.org/. Be aware that this is currently running on my home computer, and the page often takes a few seconds to load.

What it is

This page currently displays 2 random expeditions photo from the geohashing wiki. An expedition photo is one which is in [[Category:Meetup in LAT LON]]. I have been slowly categorizing photos which have no categories, and I also have been adding the [[Category:Meetup in LAT LON]] to expedition images which should have it, but don't. Photos which have [[Category:GPS receivers]] are not displayed.

Usage instructions

"Report this image as a GPS receiver" buttons

In order to make these images a bit more interesting, I filter out [[Category:GPS receivers]], since there are a whole lot of photos of those on the wiki. These buttons flag the image as potentially being a GPS receiver. I will review the flagged images, and have AperfectBot add the category, if it is appropriate.

What qualifies as a GPS receiver?

A photo of a handheld GPS unit, car GPS unit, cell phone with GPS, or screenshots from any of the above. Basically anything which shows lat-lon, and could be carried by a geohasher to the hashpoint. These are generally photos of proof, and not very interesting to look at. The GPS unit should be a main focus of the image.

What if both images are GPS receivers?

There is a button below the images to report them both.

Future plans

I plan to make this page into a voting thing, in the vain of http://thefairest.info. In the meantime, just enjoy the images. I know that we geohashers aren't, in general, professional photographers, but I figure a little friendly competition will only encourage people to take some pretty photos when out and about exploring our world. This will require a lot of ranking effort by people, because we have over 20,000 images on the wiki, so in order to get meaningful results, we will need a lot of visits.

Suggestions for improvement

Could you display a link to the image, or better yet, the expedition it came from?

Yes I could. Once I get the voting thing up and running, I will display links to the images that were on the last page. The photos should be anonymous until the vote has been cast, to help keep personal bias out of it. The links will be to the images, and there should be a link to the expedition on that page.

Could you do xyz with this? Something doesn't appear to be working correctly, how do I tell you?

The best place, for now, is to tell me (aperfectring) in #geohashing on irc.foonetic.net However, you can also use the talk page here to tell me about stuff as well.

Current TODO list

The whole setup is very spaghetti code, and uses a lot of flat files. I would like to switch that up, and put all of this information into a database, but that will require some significant refactoring of the code, and a lot of relearning SQL on my part. I am up to the challenge, and I see this as a requirement before I can start in on the voting code.

How it currently works

  1. There is a cron job to download the list of all images on the wiki every night at midnight Pacific time.
  2. You visit the page, which is substantially written in PHP.
  3. A random image is picked from the list.
  4. The cache of thumbnailed images is checked for a copy of that image.
  5. If the image is not cached, download it, thumbnail it, and put it in the cache.
  6. If that step fails at any point, return to step 3.
  7. Get the category list for the image.
  8. If it is in "GPS receivers" return to step 3.
  9. If it is not in "Meetup in LAT LON", but is in "Meetup on YYYY-MM-DD", save the image name in a flat file noting that it need the LAT LON cat, and return to step 3.
  10. If it is in "Meetup in LAT LON" display the image.
  11. Repeat steps 3-10 to get a second image displayed.
  12. If a user clicks a "Report as GPS receiver" button, save the image name in a flat file noting that it could be a GPS receiver, and start over again.