Rich's First Law of Internet Content: There is absolutely no application that you can think of that doesn't already exist on the internet.
Rich's Second Law of Internet Content: You will continually fall foul of the First Law. Time and energy will be wasted recreating something that already exists and is better than yours.
Rich's Third Law of Internet Content: I bet these Laws already exist somewhere on the internet, in a better format.
Determined to never again buy the same book twice due to a limited brain capacity for remembering titles, authors and plots, I decided to create a web-based database that would enable me to catalog all of the March House library, storing titles and authors. This would let me check whether I already own a book by accessing the database from mobile phone while stood with the potential purchase in my hands in the bookshop.
Initially this was going to be dead easy - a very basic no-frills php/mySQL setup with only three fields. But then I thought how tedious it would be to have to sit there typing in all this information. It needed to be more efficient, probably by stealing someone elses work.
The first refinement was to discover the online ISBN database. Version 2 of my application let me simply type in the ISBN of a book (and better yet, use my barcode scanner to capture the number) and it then queried the ISBN site, scraped title, author and publisher information from the search results page and inserted it automagically into my own database.
This was a bit clunky but after some sniffing around I discovered that the site has a useful API, which returns the data I was after as XML without any of the kludgey scraping needed at all.
However, I'm not very good at extracting the actual data from XML using PHP so I had to learn lots of new functions to do that. It ended up working after a fashion but had pages of code that didn't all look entirely necessary. Fortunately a little bit of further research - reading the PHP documentation - led me to a function someone else had written in the comments that did exactly what I wanted. I pasted this into my increasingly efficient application.
That was all well and good but then I discovered the age old problem of things with apostrophes in them causing grumpiness on the part of the constructed SQL insert statement. Fortunately, after an invaluable tip-off this gave me the ideal opportunity to learn all about prepare statements, with the added bonus of making my application slightly more secure than a Group 9 security van (anyone remember that incident?).
The next refinement came about as a result of wanting to do something a bit prettier. Wouldn't it be nice to show the front covers of all my books? Rather than having to scan them all in, the obvious method for achieving this seemed to be to steal someone elses work.
Amazon is a small comany that sells books. All I had to do was to get my application to send a search request to Amazon with the ISBN and to scrape the data from the returned results page, identifying a suitable image to automatically steal. As I started the chore of writing this I suddently decided to have a flash of inspiration and to learn from my ISBN database experience. Would Amazon would have an API to let me do exactly what I wanted without all the unpleasantness I was intending? Yes they would.
This API was way more complex, involving advertising or something. I wasn't entirely happy so I did a bit more googling during which I found the Library Thing and scrapped my project.