<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HCoder.org &#187; api</title>
	<atom:link href="http://hcoder.org/tag/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://hcoder.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 04 Feb 2012 11:06:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Kiva API, Javascript, Git and my first widget, oh my!</title>
		<link>http://hcoder.org/2009/02/26/kiva-api-javascript-git-and-my-first-widget-oh-my/</link>
		<comments>http://hcoder.org/2009/02/26/kiva-api-javascript-git-and-my-first-widget-oh-my/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 19:48:00 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Freedom]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[kiva]]></category>
		<category><![CDATA[microloans]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[About 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&#8217;t resist the temptation to have a look at the documentation and start [...]]]></description>
			<content:encoded><![CDATA[<p>About two weeks ago I wrote about <a href="http://www.kiva.org">Kiva</a>, a cool website that allows people to make microloans. Almost one month ago they had started a <a href="http://build.kiva.org">developer site</a>, including an easy to use <span class="caps">API</span> to access the data (loans, borrowers, lenders, etc).</p>
<p>I couldn&#8217;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 <a href="http://widgets.opera.com">Opera widget</a>. There were a couple of reasons for that:</p>
<ol>
<li>I had never written a widget, so it sounded like a good excuse to learn how to write them.</li>
<li>Widgets use Javascript, and that felt like a natural fit (as the <span class="caps">API</span> returns <a href="http://en.wikipedia.org/wiki/Json"><span class="caps">JSON</span></a>).</li>
<li>I didn&#8217;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 &#8220;properly&#8221;.</li>
<li>A widget in <a href="http://widgets.opera.com">http://widgets.opera.com</a> 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&#8217;s not that obscure in some sense; but you get the point).</li>
</ol>
<p>So I started by learning a bit of Javascript. After asking around, the best thing I found to learn quickly was a very <a href="http://video.yahoo.com/watch/111593/1710507">good</a> <a href="http://video.yahoo.com/watch/111594/1710553">series</a> <a href="http://video.yahoo.com/watch/111595/1710607">of</a> <a href="http://video.yahoo.com/watch/111596/1710658">videos</a> by <a href="http://en.wikipedia.org/wiki/Douglas_Crockford">Douglas Crockford</a> hosted in Yahoo! Video.</p>
<p>Then, I had a look at the excellent articles in <a href="http://dev.opera.com">Dev Opera</a> about <a href="http://dev.opera.com/articles/view/creating-your-first-opera-widget/">creating widgets</a> and started creating one. As I had the idea of creating something that would show loans around the world, I started looking for <span class="caps">HTML</span> and Javascript for building maps, and found a very good article in <a href="http://www.alistapart.com/">A List Apart</a> about <a href="http://www.alistapart.com/articles/cssmaps">accessible maps</a>. 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 <span class="caps">CSS</span> 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.</p>
<p>Finally, for Git, I had a look at the screencasts hosted in <a href="http://www.gitcasts.com/">GitCasts</a>. 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 <span class="caps">SHA</span> names and whatever, but clear enough to understand your way around it.</p>
<p>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.</p>
<p>So, if you want to give it a shot, just go to <a href="http://widgets.opera.com/author/zoso/">my widgets page</a> and download the <a href="http://widgets.opera.com/widget/12102/">World Loanmeter</a>! Enjoy it! :-D</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=59&amp;md5=4f11f8d8abce7359c919fed239667112" title="Flattr" target="_blank"><img src="http://hcoder.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://hcoder.org/2009/02/26/kiva-api-javascript-git-and-my-first-widget-oh-my/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="http://hcoder.org/?flattrss_redirect&amp;id=59&amp;md5=4f11f8d8abce7359c919fed239667112" type="text/html" />
	</item>
	</channel>
</rss>

