<?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>Softcore software development &#187; ria</title>
	<atom:link href="http://tea.cesaroliveira.net/archives/tag/ria/feed" rel="self" type="application/rss+xml" />
	<link>http://tea.cesaroliveira.net</link>
	<description>It&#039;s all about the cycles</description>
	<lastBuildDate>Tue, 24 Jan 2012 04:31:50 +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>Now for something completely different</title>
		<link>http://tea.cesaroliveira.net/archives/42</link>
		<comments>http://tea.cesaroliveira.net/archives/42#comments</comments>
		<pubDate>Fri, 31 Oct 2008 05:41:31 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[hugs]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ria]]></category>

		<guid isPermaLink="false">http://www.cesaroliveira.net/?p=42</guid>
		<description><![CDATA[This post is a mashup of a few things I have been tinkering with over the last week that I think is fun to share. So if it seems I have been unfocused or whatever, this is pretty much why. The first project I started doing for fun was working on canvas. This was different [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a mashup of a few things I have been tinkering with over the last week that I think is fun to share. So if it seems I have been unfocused or whatever, this is pretty much why.</p>
<p>The first project I started doing for fun was working on canvas. This was different then some canvas stuff I have done <a href="http://www.cesaroliveira.net/tea/archives/37" onclick="pageTracker._trackPageview('/outgoing/www.cesaroliveira.net/tea/archives/37?referer=');">in the past</a>, The interesting people at <a href="http://www.nihilogic.dk/" onclick="pageTracker._trackPageview('/outgoing/www.nihilogic.dk/?referer=');">nihilogic</a> did a <a href="http://www.nihilogic.dk/labs/imagefx/" onclick="pageTracker._trackPageview('/outgoing/www.nihilogic.dk/labs/imagefx/?referer=');">sepia filter</a> using canvas. I wondered if it was possible to do filter so you can see an image with a red-green colour blindness. After some substandard research, I finally managed to do it. Though the quality is poor because it tends to be inaccurate. YMMV.</p>
<p>I wondered if you can do something like this for an entire webpage. So I moved the Javascript to an extension so I can use canvas&#8217; drawWindow() method and take a picture of the entire website. Though I noticed that doing this on large image was computationally expensive and locking up the UI for an unreasonable amount of time.</p>
<p>I then tried to move all the calculations out of the main thread into a <a href="http://www.whatwg.org/specs/web-workers/current-work/" onclick="pageTracker._trackPageview('/outgoing/www.whatwg.org/specs/web-workers/current-work/?referer=');">DOM worker thread</a>. It was an interesting experience. I noticed though that while the main thread (and therefore, the UI) did not lock up, it was still sluggish and impractical to use. So I decided not to develop the extension further.</p>
<p><img src="/files/2008-10-29/firefox-transfer.png" alt="Image under Deuteranopia colour-blindness" /><br />
You can see the full demo <a href="http://www.cesaroliveira.net/samples/blindness/" onclick="pageTracker._trackPageview('/outgoing/www.cesaroliveira.net/samples/blindness/?referer=');">here</a>.</p>
<p>I then thought about what this would look like on other browsers. I didn&#8217;t expect anything requiring DOM worker threads to work on Safari/Opera. And sure enough, it didn&#8217;t. But I found out that DOM worker threads was based off of <a href="http://code.google.com/apis/gears/api_summary.html" onclick="pageTracker._trackPageview('/outgoing/code.google.com/apis/gears/api_summary.html?referer=');">Google gears</a>! So I looked into that and made a separate webpage that uses gears. Unfortunately, I found out that my efforts were largely wasted, as it only increased support to Firefox 2 and Mac Safari (Gears isn&#8217;t compatible with Windows Safari or Opera, and IE doesn&#8217;t have canvas support).</p>
<p>Either way, I made the Gears version available <a href="http://www.cesaroliveira.net/samples/blindness-gears/" onclick="pageTracker._trackPageview('/outgoing/www.cesaroliveira.net/samples/blindness-gears/?referer=');">here</a>.</p>
<p>Going away from canvas, I spent most of another day working on <a href="http://code.google.com/apis/maps/documentation/introduction.html" onclick="pageTracker._trackPageview('/outgoing/code.google.com/apis/maps/documentation/introduction.html?referer=');">Google Maps API</a>. The problem I was trying to solve was to see if I can highlight a 1 square kilometre radius from a pinpoint. This was difficult, as points on a map had a latitude, longitude co-ordinate, and I had to blindly figure out how much to reposition for a half-kilometre. Finding the distance between two points was also helpful, but hard getting a <a href="http://www.movable-type.co.uk/scripts/latlong.html" onclick="pageTracker._trackPageview('/outgoing/www.movable-type.co.uk/scripts/latlong.html?referer=');">good formula</a> for.</p>
<p><iframe src="/samples/gmaps-distance/" width="600px" height="410px"></iframe><br />
Of course, I am highlighting all the accomplishments and not mentioning the frustrating obstacles. There were  several lessons learn on the way. Including a lot about incompatibility and how much I still don&#8217;t know how to do the kind of algorithmic research that you sometimes need. I&#8217;m starting to wonder if the BSD course taught me more than just to be a code monkey with a business touch, and made me wonder whether the theoretical/mathematical part will ever stop me doing something because “I just won&#8217;t get it”. Though, at the same time, I wasn&#8217;t willing to put the time and effort of research into pet projects. So this will probably be a problem for almost everyone, and not just me (honestly, mapping out longitude and latitude to distance is not something you learn anywhere).</p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/42/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

