7964

Currently Reading

Pietr Le Letton
Georges Simenon
Progress: 117/191 pages
Sherlock Holmes: The Definitive Collection
Arthur Conan Doyle, Stephen Fry
The Golden Age of Murder
Martin Edwards
Merlin Trilogy
Mary Stewart
Progress: 340/928 pages
She Walks These Hills
Sharyn McCrumb
The Adventures of Sherlock Holmes
Arthur Conan Doyle

Recently Added

The Redeemer - Jo Nesbø
Runaway - Peter  May
The Mistletoe Murder and Other Stories - P. D. James
"You only live once, but if you do it right, once is enough." ― Mae West


"The man who does not read has no advantage over the man who cannot read." ― Mark Twain


"Women and cats will do as they please, and men and dogs should relax and get used to the idea." ― Robert A. Heinlein


"Always be a first rate version of yourself and not a second rate version of someone else." ― Judy Garland
Find me elsewhere:
My Leafmarks Profile
Project Hamlet

Follower Comparison Tool

I’ve been using BookLikes for over 2 years now and somehow, in all this time, I failed to realize they offer an API to anybody who knows what to do with it.  I stumbled onto it a couple weeks ago, and I've wasted waaaayyyy too much time playing with it whenever I could scrape some spare time together.

 

For those of you who don’t know what an API is, I’ll explain it toward the end of this post.  I want to get to my main point quickly, before I lose the attention of all the people who think “API = programming = boring”. :)

 

The Main Point of this Post

Some people have said they like to follow back the people who follow them.  People have also said they miss follower notifications sometimes, because the online notifications blend in with their many “new comment” notifications. 

 

Some people handle this by manually comparing their followers/followings list. Other people periodically write a blog post asking anybody who’s following them, who they haven’t followed back, to let them know.  Still other people don’t really have time to deal with it.  So I thought, what better way to try out this API thing than to create a comparison tool that does it automatically? 

 

If you’d like to try it out, here’s what to do:

1. Go here: http://blfollowercomparison.azurewebsites.net

 

2. Input your BookLikes user ID. There are instructions at the link for finding your ID.

 

3. The web page will turn gray until it's done crunching the data. The results should be pretty self-explanatory. The people following you, who you aren’t following back, will sort to the top.  Next, you'll see the people you’re following who aren’t following you back. Mutual followers will sort last.

 

Disclaimers/Notes:

1. My day job involves programming, but it’s a completely different type of programming environment. Even at my job, I only have a couple years of experience. I've definitely never written any sort of web application before, so this was mainly intended as a learning experience. I had to learn about a lot of new things in order to write this, and I've barely scratched the surface. What I’m trying to say is that this probably won't be perfect!  I’ve tested it on everything I have access to: 3 computers, 1 tablet, 1 smartphone, Chrome, Firefox, and IE.

 

2. I published this using a free Azure account. It looks like it's being hosted on servers around the world, but I’d be interested to hear what other people experience in terms of speed. For me, with around 100 followers and followings, it runs in about 5 seconds.

 

3. I have no artistic skills whatsoever. If the web page looks really ugly, you'll know why. I’m apparently the only person in the whole world who thought Goodreads’ recent design changes looked fine, so that should tell you something about my eye for web design. :)

 

4. The results only show the user name, not the blog name. This will probably annoy you because we’re all used to identifying each other by our blog names. This choice was made to keep the speed decent. The current application only sends 3 requests to BL: one to look up the user ID you entered, one to get the list of followers, and one to get the list of followings. The lists I get back don’t include blog names. To get them, I'd have to request each person's user data one-by-one. Programmatically, that would be easy. Speed-wise, it would be bad. If you have 100 followers, the program would have to send 100 more requests to BL and process each response. I'm also not sure how it would impact BL’s servers to get that many requests in rapid succession. They have enough speed issues as it is; I don’t want to make it worse!

 

What’s an API?

API stands for Application Programming Interface. A programmer can tell their program to request information from another service (i.e. BookLikes) using their API. Their program can then use the info it sends back.  What kind of information you can request is determined by the API that’s made available.  Here’s the link to BookLikes’ API details if you’re interested:  http://booklikes.com/dev/docs. Goodreads has an API also, with some interesting data-crunching potential.

 

By the way, if you see the “GetUserInfo” method and notice it says it returns the “usr_email”, you can stop panicking.  I was worried about that, so I requested info on my User ID to see exactly what data was being retrieved.  I have my e-mail address hidden on my profile and the e-mail was not included in the results. Everything I got back was innocuous information that everybody has access to already. I think the API info may be a bit inaccurate in some cases. For example, the user ID is listed as optional when sending a GetUserInfo request. This would imply I could get info back on all the BookLikes users at once which seems excessive and perhaps dangerous. But the user ID is, in fact, required.  If I send the request without it, it returns an error for missing parameters.

Reblogged from YouKneeK