HCoder.org
Posts Tagged “microloans”
-
Kiva API, Javascript, Git and my first widget, oh my!
Feb 26, 2009 onAbout two weeks ago I wrote about Kiva, a cool website that allows people to make microloans. Almost one month ago they had started a developer site, including an easy to use API to access the data (loans, borrowers, lenders, etc).
I couldn’t resist the temptation to have a look at the documentation and start thinking about some application to use it. Soon after I started reading I came up with the idea of writing an Opera widget. There were a couple of reasons for that:
-
I had never written a widget, so it sounded like a good excuse to learn how to write them.
-
Widgets use Javascript, and that felt like a natural fit (as the API returns JSON).
-
I didn’t really know that much Javascript (just enough to write a couple of event handlers), and that seemed a good opportunity to start learning the language “properly”.
-
A widget in http://widgets.opera.com had more possibilities of actually being used than a random pet project of mine lying in some obscure repository of some obscure version control system (well, actually I ended up using Git for it, so it’s not that obscure in some sense; but you get the point).
So I started by learning a bit of Javascript. After asking around, the best thing I found to learn quickly was a very good series of videos by Douglas Crockford hosted in Yahoo! Video.
Then, I had a look at the excellent articles in Dev Opera about creating widgets and started creating one. As I had the idea of creating something that would show loans around the world, I started looking for HTML and Javascript for building maps, and found a very good article in A List Apart about accessible maps. The sad part is, once I understood how everything worked I destroyed the whole accessibility of the solution, but it was for a widget anyway (you have excellent support for CSS and Javascript in Opera, no need to have a fallback to show textual data in a widget) and my code ended up much much simpler and easier to maintain.
Finally, for Git, I had a look at the screencasts hosted in GitCasts. I already new some basic Git things, but I think I started to feel more comfortable with it after watching a couple of those videos. Still, too many references to the obscure objects and SHA names and whatever, but clear enough to understand your way around it.
In short, I have to say that creating the widget was easy enough, and it was lots of fun to write it. I had some frustrations debugging it, but things worked fairly well in general. When I finished it, I uploaded to widgets.opera.com and after a couple of days it was already approved and public for everyone.
So, if you want to give it a shot, just go to my widgets page and download the World Loanmeter! Enjoy it! :-D
-
-
Kiva.org
Feb 9, 2009 onSome weeks ago, Steve from Cranium Designs mentioned a website, Kiva.org. He linked to a very interesting video that showed how it works, and a couple of things really got me interested:
-
The whole lending-money-to-people-who-need-it (and to whom banks will probably not lend) really attracted me. You help communities develop, and you don’t even lose money, because it’s a loan.
-
It seems that they really know who you’re lending money to. They make complete profiles (including pictures) of all the people, they follow up on every change in the loan, etc.
So I started digging a bit, and said “what the hell”, and created an account. So far I have only lent money to one person, and I’m waiting to see how it goes and how much information you get. For now I know the person has received my money, and with that and the money from other people she has all she needs to buy a new oven for pastries for her shop :-)
I suggest you go and have a look at Kiva.org, and create an account and lend some money if you like the idea. I have added a banner to the sidebar just now to show my support :-)
-