tags:

views:

350

answers:

2

I finished first year comp sci. And i want to spend some time working on the things they have taught us in the first year (lot of java and a bit of C)...

Anyways as a project, i wanted to do something i need, and what i need is a program to run through my movie folder and get the ratings and some basic info from IMDB...

I'm not sure where to start, i think i can handle the parts about reading the folder names, getting rid of the junk from the name to get the actual name and stuff.. Also i can handle the GUI but i don't know how i can talk to IMDB... what steps should i take to complete this project. I have about a month before school starts and i want to finish it before then...Thanks for all the input

EDIT: Also can you guys tell me what i should start with and then move on to what? As in should i start with the GUI first or have the code that reads in the folder names and filters the names... I only wrote one program as an assignment in school and it was basically outlined step by step so i just wanna know what i should start with

+3  A: 

You've made a very good start by decomposing the problem, identifying the kind of components you need and focusing on (an important) one that you don't know how to do.

The IMDB API is documented here and you can see that it amounts to sending simple HTTP requests with some paramters and getting back some formatted data, possibly as a JSON string.

You will find libraries to help with doing those two things. Even if there are public domain wrappers for accessing IMDB I'd recommend attempting to use general purpose HTTP and JSON libraries - that's probably a better educational exercise.

djna
thanks... that's a great link.... I'm gonna google HTTP Java or something see what i can find.. i have no idea how to do HTTP request at all in java
Wonder
also just realized, he limits to 30 requests every hour... that sucks lol, my folders gonna be like 300 movies... Any alternatives?
Wonder
well, how often does the information change? Get it as a background activity, cache it offline. Another great programming exercise :-)
djna
not often but i assume that taking like 10 hours on the first run to make the list wouldn't be very good
Wonder
Well, to some extent this is an exercise. Once you make this design work, then in the real world you negotiatie with the service provider (ie. offer money) to allow a better QOS, or you find another service provider. In your example, during development you could pre-fetch much of the data, so you start out with pre-populated local cache.
djna
haa that's a great idea to cache some info during development...
Wonder
+1  A: 

Hi,

I'm the author of the IMDB API you are dicussing ;) I limit requests to 30 per hour to stop people hammering. I have yet to have a legitimate reason to perform more requests than that. My suggestion to anyone is to write a batch script to perform 1 request every 2minutes and then leave it going for a few hours overnight. Then you only have to perform a request on demand whenever you add a new movie.

oh hi... yeah sounds reasonable enough.. anyways i'm prolly gonna be the only one using this software and maybe a couple friends... i think we can survive with 1 request every 2 minutes
Wonder