<?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; loanmeter</title>
	<atom:link href="http://hcoder.org/tag/loanmeter/feed/" rel="self" type="application/rss+xml" />
	<link>http://hcoder.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 15 Apr 2012 21:43:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>More work on widgets</title>
		<link>http://hcoder.org/2009/06/30/more-work-on-widgets/</link>
		<comments>http://hcoder.org/2009/06/30/more-work-on-widgets/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 22:11:00 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[continuous]]></category>
		<category><![CDATA[cruisecontrol.rb]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[kiva]]></category>
		<category><![CDATA[loanmeter]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[As I had mentioned, I had been working on Opera widgets. Some time ago I had seen a great Javascript plotting library for jQuery called flot, and I really wanted to try it out in some &#8220;real world&#8221; project. As I was working on the World Loanmeter widget, which incidentally uses jQuery too, it was [...]]]></description>
			<content:encoded><![CDATA[<p>As I had mentioned, I had been working on Opera widgets. Some time ago I had seen a great Javascript plotting library for jQuery called <a href="http://code.google.com/p/flot/">flot</a>, and I really wanted to try it out in some &#8220;real world&#8221; project. As I was working on the <a href="http://widgets.opera.com/widget/12102/">World Loanmeter widget</a>, which incidentally uses jQuery too, it was very easy to figure out some way to use flot for something useful: I decided to add some simple graphs to the widget.</p>
<p>The initial idea of the loanmeter widget was to show where in the world Kiva was offering loans. However, as I used the widget myself, I realised that the location in the world was less important for me, and I was more interested in knowing <em>what</em> the person was going to use the money for. So, I added some options to filter by &#8220;sector&#8221; and I figured that having some graphs comparing how much money was requested and already funded, for each sector, would be a very quick and visual way to get the information I wanted. I started playing with flot, and I have to say that except for a couple of relatively minor problems, it was quite easy to use. I don&#8217;t have screenshots showing the graphs, but feel free to <a href="http://widgets.opera.com/widget/12102/">try the widget itself</a> and have a look (hint: you have two buttons at the bottom right corner to switch between &#8220;map view&#8221; and &#8220;graph view&#8221;).</p>
<p>The other widget I have been working on is a monitor widget for projects in <a href="http://cruisecontrolrb.thoughtworks.com/">CruiseControl.rb</a> (a really simple and neat continuous integration server we use at Opera). More than one year ago, my colleague <a href="http://my.opera.com/nicomen">Nico</a> had written a very quick &amp; dirty widget for monitoring the result of the test runs of the <a href="http://my.opera.com">My Opera</a> <a href="http://my.opera.com/operaqa/blog/2008/09/19/testing-my-opera">functional testsuite</a>. There were a couple of things I wanted to change, and I also wanted to monitor other projects, so I figured that I&#8217;d rewrite the widget to have a more maintainable codebase and then make it generic, so you could configure which CC.rb installation and which project to monitor. I&#8217;m moderately happy with the result of the refactoring, and happy enough with the final result. I know it has several issues, and I expect that once anyone outside our team starts using it, there will be things to improve and fix :-) If you use CruiseControl.rb, give it a try!</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=72&amp;md5=14e58995e6499306150cc4c1458375d3" 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/06/30/more-work-on-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2009%2F06%2F30%2Fmore-work-on-widgets%2F&amp;language=en_GB&amp;category=text&amp;title=More+work+on+widgets&amp;description=As+I+had+mentioned%2C+I+had+been+working+on+Opera+widgets.+Some+time+ago+I+had+seen+a+great+Javascript+plotting+library+for+jQuery+called+flot%2C+and+I+really+wanted...&amp;tags=continuous%2Ccruisecontrol.rb%2Cintegration%2Ckiva%2Cloanmeter%2Copera%2Cprojects%2Cwidgets%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Predictably irrational</title>
		<link>http://hcoder.org/2009/06/01/predictably-irrational/</link>
		<comments>http://hcoder.org/2009/06/01/predictably-irrational/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 21:28:00 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[kiva]]></category>
		<category><![CDATA[loanmeter]]></category>
		<category><![CDATA[migraine]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I haven&#8217;t written in some time, I know. I haven&#8217;t done much worth blogging about. Just a new release of the Kiva World Loanmeter widget, and also a couple of things at work that I&#8217;ll be releasing soon (including a small tool for managing database changes and some Perl module to parse Debian .changes files). [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t written in some time, I know. I haven&#8217;t done much worth blogging about. Just a new release of the <a href="http://widgets.opera.com/widget/12102/">Kiva World Loanmeter widget</a>, and also a couple of things at work that I&#8217;ll be releasing soon (including a small tool for managing database changes and some Perl module to parse Debian <code>.changes</code> files).</p>
<p>However, recently I watched a really funny and interesting talk at <a href="http://www.ted.com"><span class="caps">TED</span></a>, <a href="http://www.ted.com/index.php/talks/dan_ariely_asks_are_we_in_control_of_our_own_decisions.html">Are we in control of our own decisions?</a>, by <a href="http://www.ted.com/speakers/dan_ariely.html">Dan Ariely</a>. In the talk he mentions his book, <a href="http://www.predictablyirrational.com/">Predictably Irrational</a>, which funnily enough a friend had already mentioned to me.</p>
<p>Well, I just finished the book and I have to say it was very interesting and eye-opening. It&#8217;s interesting how it shows our minds are biased for certain kinds of decisions or behaviour, even though they are often not the best for us. Some of the experiments are truly brilliant and they show totally unexpected (at least before starting reading the book ;-P) outcomes. One of the experiments that got me thinking was this:</p>
<blockquote>
<p>Research on stereotypes shows [&#8230;] that stereotyped people themselves react differently when they are aware of the label that they are forced to wear [&#8230;] One stereotype of Asian-Americans, for instance, is that they are especially gifted in mathematics and science. A common stereotype of females is that they are weak in mathematics [&#8230;] In a remarkable experiment, [&#8230;] asked Asian-American women to take an objective math exam. But first they divided the women into two groups. The women in one group were asked questions related to their gender [&#8230;] The women in the second group were asked questions related to their race [&#8230;] The performance of the two groups differed in a way that matched the stereotypes of both women and Asian-Americans. Those who had been reminded that they were women performed worse than those who had been reminded that they were Asian-American.</p>
</blockquote>
<p>I can&#8217;t stop thinking about the implications this has to working conditions and productivity in different countries, and also to project management.</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=68&amp;md5=38385e5cf8c1aaa03c373b8b8d965f45" 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/06/01/predictably-irrational/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2009%2F06%2F01%2Fpredictably-irrational%2F&amp;language=en_GB&amp;category=text&amp;title=Predictably+irrational&amp;description=I+haven%26%238217%3Bt+written+in+some+time%2C+I+know.+I+haven%26%238217%3Bt+done+much+worth+blogging+about.+Just+a+new+release+of+the+Kiva+World+Loanmeter+widget%2C+and+also+a+couple+of...&amp;tags=books%2Ccpan%2Ckiva%2Cloanmeter%2Cmigraine%2Cperl%2Cwidgets%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Recent pet projects + Git + Github</title>
		<link>http://hcoder.org/2009/04/06/recent-pet-projects-git-github/</link>
		<comments>http://hcoder.org/2009/04/06/recent-pet-projects-git-github/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 22:21:00 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[darcs]]></category>
		<category><![CDATA[demisus]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[kiva]]></category>
		<category><![CDATA[loanmeter]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[sudoku]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I had mentioned that I was learning Javascript to write a Kiva Opera widget. Some time ago I released the first version of my World Loanmeter widget, and I have uploaded two more since. Not much has happened between the first and the third release from the user POV, but a couple of things were [...]]]></description>
			<content:encoded><![CDATA[<p>I had mentioned that I was <a href="http://hcoder.org/2009/02/26/kiva-api-javascript-git-and-my-first-widget-oh-my">learning Javascript to write a Kiva Opera widget</a>. Some time ago I released the first version of my <a href="http://widgets.opera.com/widget/12102/">World Loanmeter</a> widget, and I have uploaded two more since. Not much has happened between the first and the third release from the user <span class="caps">POV</span>, but a couple of things were interesting when developing it:</p>
<ul>
<li>I learned <a href="http://docs.jquery.com/QUnit">QUnit</a>, which I used to write <a href="http://github.com/emanchado/world-loanmeter/blob/31d34707728a1f7d5813a57de4d3b8caf10750ce/test/unittest.html">some really useful unit tests</a>. It&#8217;s quite nice to be able to write Javascript unit tests easily.</li>
<li>I made some <a href="http://github.com/emanchado/world-loanmeter/commit/425a4a854bc074c825b6f15546235958977da1d5">heavy refactoring</a> (see above) which made me learn some more Javascript <em>and</em> made the code much more flexible, so now the widget is not limited to a single Kiva <span class="caps">API</span> page of results, but to as many pages as needed to fetch whatever number of loans the user wants. Not to mention that the data source need not be a <span class="caps">URL</span>.</li>
<li>Now the widget actually has some configuration. Namely, the number of loans to show in the map. It also stores it persistently using the <a href="http://dev.opera.com/articles/view/opera-widgets-preference-store/">preference store</a>, which is quite nice.</li>
</ul>
<p>As I said, I used Git for it. I don&#8217;t &#8220;hate&#8221; it anymore, but I still find some things annoying, like the horrible, confusing names some options have (I&#8217;m thinking about &#8220;git checkout <file>&#8221; to revert the local changes, or &#8220;git diff &#8212;cached&#8221; to see the contents of the index/staging area; seriously guys, W-T-F?). I used to be skeptical about the &#8220;git add&#8221; for changes and then &#8220;git commit&#8221;, but I actually find it quite nice: it&#8217;s easier to plan a commit that way, and if you don&#8217;t want to plan it, you can always just &#8220;git commit <file>&#8221; directly. Also &#8220;git add -p&#8221; is really nice to commit just <em>parts</em> of a file (at last, someone copies some of the good stuff <a href="http://darcs.net/">Darcs</a> had had for ages!). Apart from Git itself, it&#8217;s cool that there is <a href="http://github.com">GitHub</a>, so it&#8217;s easy to share your repositories without having to <code>rsync</code> to some web server or similar&#8230; not to mention that your project is much more visible that way.</p>
<p>But the World Loanmeter wasn&#8217;t the only pet project I was working on these past weeks: I also wrote a simple sudoku solver, <a href="http://wiki.github.com/emanchado/demisus">demisus</a>, in Ruby. The reason? Writing a prototype of a sudoku solver in a language I&#8217;m fluent with, to play with the design and get something interesting and easy to maintain&#8230; to rewrite it in Haskell. I have been trying to learn some functional language for some years now, but I never find a &#8220;project&#8221; that is interesting enough to write some &#8220;real world program&#8221; in the language and I end up not learning anything. After starting reading <a href="http://book.realworldhaskell.org/">Real World Haskell</a>, I really felt like trying to learn the language once and for all, and I figured that a sudoku solver was easy enough to write, something I know enough about, and something math-y enough to be reasonably easy to implement in Haskell.</p>
<p>So, if you&#8217;re interested in any of them, you can have a look in Github and even contribute ;-)</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=65&amp;md5=e6722f7dfe9cd27244931593fc4215ed" 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/04/06/recent-pet-projects-git-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2009%2F04%2F06%2Frecent-pet-projects-git-github%2F&amp;language=en_GB&amp;category=text&amp;title=Recent+pet+projects+%2B+Git+%2B+Github&amp;description=I+had+mentioned+that+I+was+learning+Javascript+to+write+a+Kiva+Opera+widget.+Some+time+ago+I+released+the+first+version+of+my+World+Loanmeter+widget%2C+and+I+have...&amp;tags=darcs%2Cdemisus%2Cgit%2Cgithub%2Chaskell%2Cjavascript%2Ckiva%2Cloanmeter%2Copera%2CRuby%2Csudoku%2Cwidget%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

