<?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>Filipe Sabella</title>
	<atom:link href="http://www.filipesabella.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.filipesabella.com</link>
	<description></description>
	<lastBuildDate>Thu, 23 Feb 2012 23:14:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Improving music sheet reading</title>
		<link>http://www.filipesabella.com/2012/02/23/improving-music-sheet-reading/</link>
		<comments>http://www.filipesabella.com/2012/02/23/improving-music-sheet-reading/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 23:14:21 +0000</pubDate>
		<dc:creator>Filipe Sabella</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.filipesabella.com/?p=110</guid>
		<description><![CDATA[I made a new toy. I&#8217;ve been playing guitar for over ten years now, but always as an amateur. On the few occasions I tried to learn how to properly read music notation I was defeated by the boredom of trying to read songs that were designed to make learning easier, but were way too [...]]]></description>
			<content:encoded><![CDATA[<p>I made a new toy. I&#8217;ve been playing guitar for over ten years now, but always as an amateur.<br />
On the few occasions I tried to learn how to properly read music notation I was defeated by the boredom of trying to read songs that were designed to make learning easier, but were way too simple to hold my attention.</p>
<p>Following an ongoing trend, I decided to make a game out of it. So here it is:<br />
<a title="Play it!" href="http://filipesabella.github.com/Notes-practice" target="_blank">http://filipesabella.github.com/Notes-practice</a></p>
<p>I&#8217;m improving incredibly fast. Despite the game being simplistic, it&#8217;s fun enough to keep me &#8220;going for more points&#8221; on each level. The challenge is against myself and the previous score.</p>
<p>I hacked it together in a couple days and it doesn&#8217;t have anything particularly interesting about its development.</p>
<p>To draw the music sheet itself I used the incredibly good library built by Mohit Muthanna (not sure if it&#8217;s his/her real name), VexFlow:</p>
<p>http://vexflow.com</p>
<p>Playing the sounds was a lot trickier. My first instinct was to use MIDI to play the sounds through javascript. I found a library that promised so, but it didn&#8217;t work on modern browsers.<br />
Then I tried Flash, but wasn&#8217;t so excited about it.<br />
The final solution involved the following steps:<br />
- Fire up garage band<br />
- Play each sound (sixty of them) and record mp3 files<br />
- Use a small python script to transform each file in its base64 representation<br />
- Grab all those strings and punch them in a js file</p>
<p>And that&#8217;s why the page has over 3 megabytes. Sorry about that.<br />
Also, playing sound using HTML5 isn&#8217;t as platform and browser independent as one would think. Also sorry about that.</p>
<p>The game can be played fully on this link:<br />
<a title="Play it!" href="http://filipesabella.github.com/Notes-practice" target="_blank">http://filipesabella.github.com/Notes-practice</a></p>
<p>It contains all the files bundled into the HTML, so you can save it somewhere else and not leech up github&#8217;s bandwidth.</p>
<p>Terrible, testless source code can be found here:<br />
<a title="Source" href="https://github.com/filipesabella/Notes-practice" target="_blank">https://github.com/filipesabella/Notes-practice</a></p>
<p>Have fun.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.filipesabella.com/2012/02/23/improving-music-sheet-reading/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Working with a load of JavaScript</title>
		<link>http://www.filipesabella.com/2011/12/20/working-with-a-load-of-javascript/</link>
		<comments>http://www.filipesabella.com/2011/12/20/working-with-a-load-of-javascript/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 04:27:43 +0000</pubDate>
		<dc:creator>Filipe Sabella</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.filipesabella.com/?p=97</guid>
		<description><![CDATA[The last project I worked on revolved around a unique and feature rich screen. After three releases and one year of work, it ended with around twenty thousand lines of JavaScript for that screen alone, and another five thousand for the rest of the application. The line count for the C# backend stopped at nineteen [...]]]></description>
			<content:encoded><![CDATA[<p>The last project I worked on revolved around a unique and feature rich screen.</p>
<p>After three releases and one year of work, it ended with around twenty thousand lines of JavaScript for that screen alone, and another five thousand for the rest of the application. The line count for the C# backend stopped at nineteen thousand.</p>
<p>25k lines of js, 19k lines of c#.</p>
<p>Well, the title of this post if probably missing a word, but I&#8217;m trying to keep this thing curse free.</p>
<p>This screen has one interesting aspect: almost no ajax calls are needed, so all the logic and state have to be handled by js alone.</p>
<p>Most things and practices approached on this project probably wouldn&#8217;t fit js on a smaller scale. If fifty lines of script solves your screens problem, it doesn&#8217;t require a domain model &#8211; and be grateful for that, trust me.</p>
<p>The team learned a few things as the project progressed, and I&#8217;d like to share some of these with you.</p>
<h2>Don&#8217;t use global events</h2>
<p>This one was hard. We started with a very basic event hub for all the events on the screen. That seemed fine at the beginning, but as any desktop developer knows, when screen state dictates what events should be fired, things start to get out of control.<br />
In the end we favoured a simpler approach where the model itself fires high level events:</p>
<p><code>function Document() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return $.mix(observable(), {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addFile: function (file) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// logic ...<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.fire('fileAdded', file);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></p>
<p><code>function Sidebar(document) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;document.on('fileAdded').execute(function (file) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// rerender itself<br />
&nbsp;&nbsp;&nbsp;&nbsp;});<br />
&nbsp;&nbsp;&nbsp;&nbsp;return { … };<br />
}</code></p>
<h2>Use GUIDs wherever you can</h2>
<p>One aspect of the screen that led to very poor code was the problem with entity identifiers.<br />
When the user adds a new entity on the screen, we assign a negative unique integer ID to it so we can work with the object.<br />
However, when the user saves the screen state, the database assigns positive, real IDs to all the entities.<br />
On the way back to the screen we had to update all the stored state with the new IDs. Messy.<br />
If we worked with GUIDs for all the entities, we could generate the final IDs on the client side, since the logic to create them is can be easily written in js as well.</p>
<h2>Encapsulation will save you in the end</h2>
<p>Don&#8217;t use public properties, encapsulate every bit of exposed data through functions, and exposed data should only be used for displaying it:</p>
<p><code>function Image(id, name, file) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id: function () { return id; },<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: function () { return name; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></p>
<p>This is one of the many practices that we as software developers are used to, but for some reason forget them when writing client side js.</p>
<h2>Favor immutability</h2>
<p>Dealing with state stored on the client side can become very messy very fast, immutability will help you a great deal.<br />
If you have immutability you can do cool stuff like this:</p>
<p><code>_.prototype.get = function (v) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return function () {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return v;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></p>
<p><code>function Item(id, name) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id: _.get(id),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: _.get(name)<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></p>
<p>If your values are mutable this wouldn&#8217;t work.</p>
<h2>Bind when creating</h2>
<p>Avoid this:<br />
<code>images.each(function (image) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var li = $(' &lt;li&gt;&lt;/li&gt;').attr('data-id', this.id());<br />
&nbsp;&nbsp;&nbsp;&nbsp;container.append(li);<br />
});<br />
</code></p>
<p><code>$('li', container).click(function () {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var id = this.attr('data-id');<br />
&nbsp;&nbsp;&nbsp;&nbsp;view.dialogs.openImage(id);<br />
});</code></p>
<p>In favor of this:<br />
<code>images.each(function (image) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var li = $(' &lt;li&gt;&lt;/li&gt;')<br />
&nbsp;&nbsp;&nbsp;&nbsp;li.click(function () {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;view.dialog.openImage(image);<br />
&nbsp;&nbsp;&nbsp;&nbsp;});<br />
&nbsp;&nbsp;&nbsp;&nbsp;container.append(li);<br />
});</code></p>
<p>It looks obvious on this small example, but if you find yourself storing entity data on the markup, there&#8217;s a very good chance that your code isn&#8217;t being executed on the right scope.</p>
<p>An exception to this is when performance becomes an issue because of too many binds. $.delegate helps a bunch when this happens, but you&#8217;ll need to rely on data inside the markup.</p>
<h2>Inheritance can hurt</h2>
<p><code>function Entity(id, name) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;changeName: function(newName) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name = newName;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></p>
<p><code>function Document(id, name, file) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var api = {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extension: function () {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return file.split('\\.').last();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;render: function (renderer) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return renderer.render(id, name, file);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;return $.extend(api, new Entity(id, name));<br />
}</code></p>
<p><code>var doc = new Document(1, 'the document', 'file.pdf');<br />
doc.changeName('the new document');<br />
doc.render({<br />
&nbsp;&nbsp;&nbsp;&nbsp;render: function (id, name, file) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// BUG: receives the old name<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
});</code></p>
<p>When we call doc.changeName(), the parent function on Entity is executed.<br />
However, the Entity function changes its scoped &#8220;name&#8221; variable.<br />
When we call doc.render, its scoped &#8220;name&#8221; variable still contains the old value.</p>
<p>To fix this, we&#8217;d have to declare a getter for the name on the parent entity, and the &#8220;name&#8221; variable on Document is useless and dangerous.</p>
<h2>Avoid small tricks with element identifiers</h2>
<p><code>&lt;input id="field-id" /&gt;<br />
&lt;input id="field-name" /&gt;<br />
&lt;input id="field-email" /&gt;</code></p>
<p><code>function validate(field) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var val = $('#field-' + field).val();<br />
&nbsp;&nbsp;&nbsp;&nbsp;// ...<br />
}</code></p>
<p><code>validate('id');<br />
validate('name');<br />
validate('email');</code></p>
<p>That small concatenation of the inputs IDs is a very common example of programmers trying to avoid a bit of duplication.</p>
<p>Avoid small tricks.</p>
<p>On a large codebase a part of your day revolves around finding element identifiers on files.<br />
A common operation:<br />
1. Inspect element with firebug to find its id<br />
2. Go to IDE and search all .js files for given id to see who&#8217;s working with it</p>
<h2>Keep the DOM away from your domain</h2>
<p>Yep.</p>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.filipesabella.com/2011/12/20/working-with-a-load-of-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Does syntax affect readability?</title>
		<link>http://www.filipesabella.com/2011/05/02/does-syntax-affect-readability/</link>
		<comments>http://www.filipesabella.com/2011/05/02/does-syntax-affect-readability/#comments</comments>
		<pubDate>Tue, 03 May 2011 00:12:46 +0000</pubDate>
		<dc:creator>Filipe Sabella</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.filipesabella.com/?p=82</guid>
		<description><![CDATA[Sometime ago I had a quick discussion with a colleague about this line of code: errors.length == 0 &#38;&#38; submit(); In his view, this wasn&#8217;t readable &#8211; being readable code that which doesn&#8217;t need translation, or as little as possible. He argued that the code would be much better expressed like this: if (errors.length == [...]]]></description>
			<content:encoded><![CDATA[<p>Sometime ago I had a quick discussion with a colleague about this line of code:<br />
<code><br />
errors.length == 0 &amp;&amp; submit();<br />
</code></p>
<p>In his view, this wasn&#8217;t readable &#8211; being readable code that which doesn&#8217;t need translation, or as little as possible.<br />
He argued that the code would be much better expressed like this:<br />
<code><br />
if (errors.length == 0) {<br />
&nbsp;&nbsp;submit();<br />
}</code></p>
<p>Thinking about this discussion, my understanding of his point of view was that the JavaScript&#8217;s shortened syntax sacrificed readability, making the reader translate the first version into the second in order to understand the meaning of the code &#8211; which is, in this case, &#8220;submit if there are no errors&#8221;.</p>
<p>I agree with him that the code&#8217;s intention should be made clearer. We could achieve that by assigning a new name:<br />
<code><br />
var isFormValid = errors.length == 0;</code></p>
<p>&nbsp;<br />
And perhaps changing the other one:</p>
<p><code>submitLoginForm();</code></p>
<p>&nbsp;<br />
But I disagree completely that syntax alone may decrease code quality. My understanding is that such statement could be used to say that using the English contractions (do not &#8211; don&#8217;t), or even the spoken French liaisons also diminishes the understanding of the receiver.</p>
<p>Syntax is a matter of habit and understanding &#8211; and it also may provide shortcuts.<br />
Names, on the other hand, can define meaning to operations.</p>
<p>I would go for this code:</p>
<p><code>var formValid = errors.length == 0;</p>
<p>formValid &amp;&amp; submitLoginForm();</code></p>
<p>&nbsp;</p>
<p>And you?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.filipesabella.com/2011/05/02/does-syntax-affect-readability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One line ifs and literate programming</title>
		<link>http://www.filipesabella.com/2010/10/08/one-line-ifs-and-literate-programming/</link>
		<comments>http://www.filipesabella.com/2010/10/08/one-line-ifs-and-literate-programming/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 01:56:41 +0000</pubDate>
		<dc:creator>Filipe Sabella</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.filipesabella.com/?p=74</guid>
		<description><![CDATA[A collegue of mine, Vinicius Gomes, exposes in this blog post reasons to have one line if blocks. Following up with the discussion he started, I would like to show a technique to apply that concept in a more literate way in JavaScript. One way to enforce this pratice and end up having more readable [...]]]></description>
			<content:encoded><![CDATA[<p>A collegue of mine, Vinicius Gomes, exposes in <a href="http://viniciusv.wordpress.com/2010/10/06/one-line-if/">this blog post</a> reasons to have one line if blocks.</p>
<p>Following up with the discussion he started, I would like to show a technique to apply that concept in a more literate way in JavaScript.</p>
<p>One way to enforce this pratice and end up having more readable code is to extend the JS Function object, adding a behavior that is found in other languages, such as Ruby.</p>
<p>Paraphrasing his example:</p>
<pre>function died() {
	return tries > 10;
}

function gameOver() {
	alert("You lose :(");
}</pre>
<p>With these two functions, we would normally write something along the lines of:</p>
<pre>if (died()) gameOver();</pre>
<p>But we can expand the language and write something like:</p>
<pre>gameOver.if(died());</pre>
<p>Unfortunatelly &#8220;if&#8221; is a keyword in JS, so we have to improvise. We can search for suitable alternatives:</p>
<pre>gameOver.when(died());
gameOver.givenThat(died());</pre>
<p>I don&#8217;t really like the &#8220;when&#8221; word, since it could mean the scheduling of a task, but for now it&#8217;s the shortest implementation I could think of without recurring to &#8220;_if&#8221;.</p>
<p>Implementing this is quite simple:</p>
<pre>Function.prototype.when = function(bool) {
	if (bool) return this();
}</pre>
<p>Or the shorter way:</p>
<pre>Function.prototype.when = function(bool) {
	return bool ? this() : undefined;
}</pre>
<p>Following this line of thinking we can also easily implement &#8220;unless&#8221;:</p>
<pre>Function.prototype.unless = function(bool) {
	return !bool ? this() : undefined;
}</pre>
<p>But what if our function has parameters?<br />
We can do this:</p>
<pre>var validateContactForm = function() {
	return validate($('#contactForm'));
}
validateContactForm.when(validationIsEnabled);</pre>
<p>Or the shorter way using <a href="http://javascriptweblog.wordpress.com/2010/04/05/curry-cooking-up-tastier-functions/">function currying</a>:</p>
<pre>
var validateContactForm = validate.curry($('#contactForm'));
validateContactForm.when(validationIsEnabled);</pre>
<p>What are your thoughts about this?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.filipesabella.com/2010/10/08/one-line-ifs-and-literate-programming/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Mouse Cursors</title>
		<link>http://www.filipesabella.com/2010/02/24/new-mouse-cursors/</link>
		<comments>http://www.filipesabella.com/2010/02/24/new-mouse-cursors/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 00:21:49 +0000</pubDate>
		<dc:creator>Filipe Sabella</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cursors]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.filipesabella.com/?p=68</guid>
		<description><![CDATA[Inspiration This is something that you should read if you&#8217;re interested in usability: Mixing Games and Applications. The author states that the software developing world has much to learn from the world of games, and I agree wholeheartedly. For me the high point of the presentation is when the author shows the basic model for [...]]]></description>
			<content:encoded><![CDATA[<h2>Inspiration</h2>
<p>This is something that you should read if you&#8217;re interested in usability: <a href="http://lostgarden.com/2008/10/princess-rescuing-application-slides.html">Mixing Games and Applications</a>.
</p>
<p>
The author states that the software developing world has much to learn from the world of games, and I agree wholeheartedly.
</p>
<p>
For me the high point of the presentation is when the author shows the basic model for applying exploratory learning:
</p>
<p><bloquote>&#8220;You have a goal, skill in the user&#8217;s head, tools and actions they take in the application, rules that the application executes and stimulus that the application feeds back to the user.&#8221;<br />
</bloquote></p>
<h2>So what?</h2>
<p>
If you think about it, software in general doesn&#8217;t make much use of different mouse cursors. The most widely used ones are the resize and pointer &#8211; both being hugely effective and useful hints as to what to do with the element below the cursor.<br />
Since the web came to be, the little pointing hand became an universal symbol that indicates we can click on something.
</p>
<p>
For some time now I&#8217;ve been thinking of ways to apply the concept of exploratory learning to the softwares I help create. One such way is to explore the mouse cursor.
</p>
<h2>How?</h2>
<p>
Let&#8217;s say the user&#8217;s just filtered a list of clients, and his goal is to see more data about a particular record. He instinctively hovers his cursor over the desired record and the application changes the mouse cursor to this:<br />
<a href="http://www.filipesabella.com/wp-content/uploads/2010/02/double_click2.png"><img src="http://www.filipesabella.com/wp-content/uploads/2010/02/double_click2-e1267056163191.png" alt="double click" title="double click" width="74" height="88" class="alignnone size-full wp-image-44" /></a>
</p>
<p>
He has a goal: see more data.<br />
As he hovers the mouse over the record, the mouse cursor changes &#8211; he has a stimulus.<br />
He already now how the mouse operates, so he has the skills to relate to the stimulus.<br />
Now the user does something &#8211; probably click once at the record. And nothing happens. Absolutely nothing, he doesn&#8217;t get what he wants, but also doesn&#8217;t trigger anything bad. Those are the rules.<br />
If everything goes well, he&#8217;ll try again and, hopefully, succeed when double clicking the record.
</p>
<p>
The same spirt could be applied to these other two badly drawn cursors.<br />
One for right clicking:<br />
<div id="attachment_42" class="wp-caption alignnone" style="width: 84px"><a href="http://www.filipesabella.com/wp-content/uploads/2010/02/right_click1.png"><img src="http://www.filipesabella.com/wp-content/uploads/2010/02/right_click1-e1267056001621.png" alt="right click" title="right click" width="74" height="88" class="size-full wp-image-42" /></a><p class="wp-caption-text">I chose the pinky to signify a right click and not the middle finger</p></div>
</p>
<p>
And one for grabbing things:<br />
<div id="attachment_39" class="wp-caption alignnone" style="width: 84px"><a href="http://www.filipesabella.com/wp-content/uploads/2010/02/hand_grab.jpg"><img src="http://www.filipesabella.com/wp-content/uploads/2010/02/hand_grab-e1267055887236.jpg" alt="imagine really hard that this is a hand grabbing something" title="hand_grab" width="74" height="88" class="size-full wp-image-39" /></a><p class="wp-caption-text">imagine really hard that this is a hand grabbing something</p></div>
</p>
<p>
If more than one action is possible in the same area with the mouse, things start to get a little complicated. But providing multiple controls on the same object is prone to error and frustration: a square that can be clicked, double clicked and right clicked. We should avoid this kind of solution.
</p>
<p>
If you feel tempted about animated cursors, please don&#8217;t. Repeated animations are sources of irritation, they steal our attention and lose their use after the first time we understand what they mean.
</p>
<p>
What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.filipesabella.com/2010/02/24/new-mouse-cursors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing jQuery Silver</title>
		<link>http://www.filipesabella.com/2009/07/10/introducing-jquery-silver/</link>
		<comments>http://www.filipesabella.com/2009/07/10/introducing-jquery-silver/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 11:13:35 +0000</pubDate>
		<dc:creator>Filipe Sabella</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.filipesabella.com/?p=4</guid>
		<description><![CDATA[Adds quicksilver-like search features for links in webpages. Some web applications just have too many menus and sub-menus &#8211; instead of threading your way through them, just hit the (customizable) hotkey, type some of the letters of the target link and hit enter. Demo: http://www.filipesabella.com/jquerysilver/demo.htm Project page: http://code.google.com/p/jquerysilver/downloads/list Source code: http://github.com/filipesabella/jquery.silver/tree/master Features Works with any [...]]]></description>
			<content:encoded><![CDATA[<p>Adds quicksilver-like search features for links in webpages. Some web applications just have too many menus and sub-menus &#8211; instead of threading your way through them, just hit the (customizable) hotkey, type some of the letters of the target link and hit enter.</p>
<p>Demo: <a rel="nofollow" href="http://www.filipesabella.com/jquerysilver/demo.htm">http://www.filipesabella.com/jquerysilver/demo.htm</a><br />
Project page: <a rel="nofollow" href="http://code.google.com/p/jquerysilver/downloads/list">http://code.google.com/p/jquerysilver/downloads/list</a><br />
Source code: <a rel="nofollow" href="http://github.com/filipesabella/jquery.silver/tree/master">http://github.com/filipesabella/jquery.silver/tree/master</a></p>
<h1>Features</h1>
<ul>
<li>Works with any <tt>&lt;a&gt;</tt>, <tt>&lt;input type="button"/&gt;</tt> and <tt>&lt;input type="submit"/&gt;</tt></li>
<li>Camel case matching of links</li>
<li>Optional storing of last accessed items with jquery.cookie</li>
<li>Keyboard navigation: arrow keys, &lt;enter&gt; and number keys</li>
<li>Supports custom commands, see the demo</li>
</ul>
<h1>Usage</h1>
<ul>
<li>import jquery-1.3.2.js</li>
<li>import jquery.hotkeys-0.7.9-1.js</li>
<li>optionally import jquery.cookie.js to enable last opened items</li>
<li>import jquery.silver-1.0.js</li>
<li>import jquery.silver.css or custom css</li>
<li>include $().silver() or $(&#8216;#menu&#8217;).silver() at jquery startup to initialize</li>
<li>hit ctrl+shift+space (or shift+space in opera) to show the dialog</li>
</ul>
<h1>Shortcuts</h1>
<ul>
<li>&lt;ctrl&gt;+&lt;shift&gt;+&lt;space&gt; by default to show the dialog</li>
<li>&lt;esc&gt; to close it</li>
<li>Arrow keys for selecting items</li>
<li>&lt;enter&gt; to open selected item or first item if none selected</li>
<li>number keys to open the respective item</li>
<li>&#8216;:&#8217; to show available commands</li>
<li>&lt;tab&gt; to autocomplete commands</li>
</ul>
<h2>1.1 release notes</h2>
<ul>
<li>Added support for image links</li>
<li>Added support for commands autocomplete</li>
<li>Fixed bug when executing an invalid command</li>
</ul>
<h2>About</h2>
<p>I have now learned to hate keyboard events incompatibilities.</p>
<p>The first version for FireFox only took four hours of development. Making it work in Opera and Safari took another eight. Not pretty.</p>
<p>You can find the full source at <a href="http://github.com/filipesabella/jquery.silver/tree/master">GitHub</a>.</p>
<p>Suggestions and bugs are welcome.<em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.filipesabella.com/2009/07/10/introducing-jquery-silver/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

