<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0">

<channel>
	<title>Bernat Farrero</title>
	
	<link>http://blog.bernatfarrero.com</link>
	<description>on the software perspective</description>
	<lastBuildDate>Wed, 02 Feb 2011 09:34:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/bernatfarrero" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="bernatfarrero" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">bernatfarrero</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>In place editing with Javascript, jQuery and Rails 3</title>
		<link>http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/</link>
		<comments>http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 22:09:12 +0000</pubDate>
		<dc:creator>bernat</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[in-place-edit]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[rails 3]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://blog.bernatfarrero.com/?p=469</guid>
		<description><![CDATA[Introduction In the project I&#8217;m working on I had to create a script that would allow users to update their information directly from their (show) views. From a general perspective, I think it is useful to give users the option to edit-in-place contents by just clicking them, leaving forms for when there is no other [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<div>In the project I&#8217;m working on I had to create a script that would allow users to update their information directly from their (show) views.</div>
<div id="_mcePaste">From a general perspective, I think it is useful to give users the option to edit-in-place contents by just clicking them, leaving forms for when there is no other alternative (such as creating new objects). To me, an in-place editor feels more natural and usable and helps notably the user experience. The obvious fact is that most real world applications, such as Flickr or Facebox have implemented this feature in most of their interfaces.</div>
<p>To do that, I wanted to think of a general solution, one that could be applied to my other projects. Even a framework agnostic solution. I decided I would write it completely in Javascript and communicate with the server in a conventional RESTful way. Doing a bit of research before starting out, I ran across the project of Jan Varwig called <a href="https://github.com/janv/rest_in_place">Rest In Place</a> which did precisely the same thing. So I examined carefully his code, fixed some stuff and extended it to support all usage cases I wanted to cover, this is how <b>BestInPlace</b> is born.</p>
<p>Basically, BestInPlace makes possible to tag (via HTML classes and HTML5 data* attributes) any field that is going to be user-editable so that the script automatically converts it to an form input when the user clicks on it, with no further muss or fuss for the developer.  Of course, this field can take the form of a one-line text input, a textarea for longer texts, a select dropdown that will populate with your custom collection of options or boolean sort of data that works the same way a checkbox would, and allows value customization as well. Additionally, the script will trim and sanitize all user input, display server errors in case the format is not proper, it will also allow you to provide an external handler to activate the input.</p>
<p>Before getting into details.</p>
<p style="text-align: center;"><b><a href="http://bipapp.heroku.com/">SEE THE DEMO</a> | <a href="https://github.com/bernat/best_in_place">SEE THE CODE</a></b></p>
<p><span id="more-469"></span></p>
<h2>Installation</h2>
<p>Simply copy and load the files from the folder the following JS files in your application (in the same order):</p>
<ul>
<li><a href="http://docs.jquery.com/Downloading_jQuery">jquery-1.4.2.js</a></li>
<li><a href="https://github.com/bernat/best_in_place/raw/master/public/javascripts/jquery.purr.js">jquery.purr.js</a></li>
<li><a href="https://github.com/bernat/best_in_place/raw/master/public/javascripts/best_in_place.js"><b>best_in_place.js</b></a></li>
</ul>
<p>Add the following line to your onLoad block:</p>
<pre><code>$(document).ready(function() {
/* Activating Best In Place */
jQuery(".best_in_place").best_in_place()
});
</code></pre>
<h3>Installation of the Rails 3 Gem</h3>
<p>Only add the folloging line to your application&#8217;s Gemfile and run <em>bundle install</em>:</p>
<pre><code>gem "best_in_place"</code></pre>
<p>You still need to load the onLoad block, jQuery.js and jquery.purr.js in your application, but you can use the generator to copy (and update when necessary) the best_in_place.js script:</p>
<pre><code>rails g best_in_place:setup</code></pre>
<h2>Usage</h2>
<p>First of all, you should write your controllers in a RESTful way and make sure they respond properly to a json request. Here you can see an example of how a standard update action should look like in a Rails app:</p>
<pre><code>
  def update
    @user = User.find(params[:id])

    respond_to do |format|
      if @user.update_attributes(params[:user])
        format.html { redirect_to(@user, :notice =&gt; 'User was successfully updated.') }
        format.json { head :ok }
      else
        format.html { render :action =&gt; "edit" }
        format.json  { render :json =&gt; @user.errors, :status =&gt; :unprocessable_entity }
      end
    end
  end</code></pre>
<p>At the same time, if you want to perform server-side validations so that errors are displayed when users introduce invalid data, then the models should look something like this:</p>
<pre><code>
    class User &lt; ActiveRecord::Base
      validates :name,
        :length =&gt; { :minimum =&gt; 2, :maximum =&gt; 24, :message =&gt; "has invalid length"},
        :presence =&gt; {:message =&gt; "can't be blank"}
      validates :last_name,
        :length =&gt; { :minimum =&gt; 2, :maximum =&gt; 24, :message =&gt; "has invalid length"},
        :presence =&gt; {:message =&gt; "can't be blank"}
      validates :address,
        :length =&gt; { :minimum =&gt; 5, :message =&gt; "too short length"},
        :presence =&gt; {:message =&gt; "can't be blank"}
      validates :email,
        :presence =&gt; {:message =&gt; "can't be blank"},
        :format =&gt; {:with =&gt; /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i,
                                :message =&gt; "has wrong email format"}
      validates :zip, :numericality =&gt; true, :length =&gt; { :minimum =&gt; 5 }
    end
</code></pre>
<p>Now all defined messages will be shown to the user if he introduces invalid data and the field will remain unchanged. Notice that messages will be displayed in a jquery.purr pop up. Take time to style it the way you prefer.</p>
<h3>Options / Parameters</h3>
<p>Best in Place will be wrapped into an html object (<span style="text-decoration: underline;">div/span</span> preferred) with the following attributes:</p>
<ul>
<li>class = &#8220;best_in_place&#8221;</li>
<li>data-url = Object Path</li>
<li>data-object = Object name</li>
<li>data-attribute = Object field</li>
<li>data-type = &#8220;input&#8221;, &#8220;textarea&#8221;, &#8220;select&#8221;, &#8220;checkbox&#8221; (defaults to input)</li>
<li>data-collection = &#8220;[[key, 'value'], [key, 'value'],&#8230;]&#8221; (a structured JSON containing all possible values in the collection in case of the select or a couple of values in case of a checkbox ["falsevalue", "truevalue"].</li>
<li>data-activator = &#8220;#DOM-OBJECT&#8221;.Dom object that will convert the text into an input. In case it is not specified it will work by clicking on the text.</li>
</ul>
<p>Beware: All attributes are assigned underscore strings.</p>
<p style="font-weight: normal;">If you are using the <b>Rails 3 Gem</b>, you only need to tag user in-place editable fields like this:</p>
<p style="font-weight: bold;">
<h4>best_in_place object, field, OPTIONS</h4>
<h5>Params:</h5>
<ul>
<li><b>object</b> (Mandatory): The Object parameter represents the object itself you are about to modify</li>
<li><b>field</b> (Mandatory): The field (passed as symbol) is the attribute of the Object you are going to display/edit.</li>
</ul>
<h5>Options:</h5>
<ul>
<li>:<b>type</b> It can be only [:input, :textarea, :select, :checkbox] or if undefined it defaults to :input.</li>
<li>:<b>collection</b>: In case you are using the :select type then you must specify the collection of values it takes. In case you are using the :checkbox type you can specify the two values it can take, or otherwise they will default to Yes and No.</li>
<li>:<b>path</b>: URL to which the updating action will be sent. If not defined it defaults to the :object path.</li>
<li>:<b>nil</b>: The nil param defines the content displayed in case no value is defined for that field. It can be something like &#8220;click me to edit&#8221;. If not defined it will show &#8220;-&#8221;.</li>
<li>:<b>activator</b>: Is the DOM object that can activate the field. If not defined the user will making editable by clicking on it.</li>
<li>:<b>sanitize</b>: True by default. If set to false it will allow users to introduce html tags to the input/textarea.</li>
</ul>
<p style="font-weight: bold;"><span style="font-weight: normal;">Let&#8217;s  see now how to create user-editable fields by some examples. We&#8217;ll use a generic User show action, as I did in the <a href="https://github.com/bernat/best_in_place/tree/master/test_app">Test Application</a>.</span></p>
<h3>Inputs</h3>
<p>In regular HTML:</p>
<pre><code>&lt;span class='best_in_place' id='best_in_place_user_name' data-url='/users/4' data-object='user'
data-attribute='name' data-type='input'&gt;Dominic&lt;/span&gt;
</code></pre>
<p>Using the Rails 3 gem:</p>
<pre><code>&lt;%= best_in_place @user, :name, :type =&gt; :input %&gt;
&lt;%= best_in_place @user, :name, :type =&gt; :input, :nil =&gt; "Click me to add content!" %&gt;
&lt;%= best_in_place @user, :name, :activator =&gt; "#activator" %&gt;
</code></pre>
<h3>Textarea</h3>
<p>In regular HTML:</p>
<pre><code>&lt;span class='best_in_place' id='best_in_place_user_description' data-url='/users/4'
data-object='user'data-attribute='description' data-type='textarea'&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus a lectus et lacus
ultrices auctor. Morbi aliquet convallis tincidunt. Praesent enim libero, iaculis at
commodo nec, fermentum a dolor. Quisque eget eros id felis lacinia faucibus feugiat et ante.
&lt;/span&gt;
</code></pre>
<p>Using the Rails 3 gem:</p>
<pre><code>&lt;%= best_in_place @user, :description, :type =&gt; :textarea %&gt;
</code></pre>
<p>Allowing html tags:</p>
<pre><code>
&lt;%= best_in_place @user, :description, :type =&gt; :textarea, :sanitize =&gt; false %&gt;
</code></pre>
<h3>Select dropdowns</h3>
<p>In regular HTML:</p>
<pre><code>&lt;span class='best_in_place' id='best_in_place_user_country' data-url='/users/4'
data-object='user' data-collection='[[1,"Spain"],[2,"Italy"],[3,"Germany"],[4,"France"]]'
data-attribute='country' data-type='select'&gt;Germany&lt;/span&gt;</code></pre>
<p>Using the Rails 3 gem:</p>
<pre><code>&lt;%= best_in_place @user, :country, :type =&gt; :select, :collection =&gt; [[1, "Spain"], [2, "Italy"],
[3, "Germany"], [4, "France"]] %&gt;</code></pre>
<h3>Checkbox values</h3>
<p>In regular HTML:</p>
<pre><code>&lt;span class='best_in_place' id='best_in_place_user_receive_email' data-url='/users/4'
data-object='user' data-collection='["No thanks","Yes of course"]'
data-attribute='receive_email' data-type='checkbox'
&gt;Yes of course&lt;/span&gt;
</code></pre>
<p>Using the Rails 3 gem:</p>
<pre><code>&lt;%= best_in_place @user, :receive_emails, :type =&gt; :checkbox, :collection =&gt; ["No, thanks", "Yes, of course!"] %&gt;
</code></pre>
<h2>Wrapping up</h2>
<p>Best In Place will make easier your application interfaces by letting users modify in-line every content. At the same time, it will control user input and display errors. Let me know if there&#8217;s something you would do different or don&#8217;t hesitate to give me a pull request if you contribute anyhow.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>How I manage the WordPress theme with Git</title>
		<link>http://blog.bernatfarrero.com/how-t-manage-the-wordpress-theme-with-git/</link>
		<comments>http://blog.bernatfarrero.com/how-t-manage-the-wordpress-theme-with-git/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 00:05:29 +0000</pubDate>
		<dc:creator>bernat</dc:creator>
				<category><![CDATA[Web design]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[two remote repositories]]></category>
		<category><![CDATA[wordpres github]]></category>
		<category><![CDATA[wordpress theme]]></category>

		<guid isPermaLink="false">http://blog.bernatfarrero.com/?p=431</guid>
		<description><![CDATA[I thought it might help somebody the way I&#8217;m currently managing my WordPress theme. First of all, I have to say it would be better to have an actual WordPress installation in my localhost, so it would be easier trying out changes (on themes and plugins) before committing them. I&#8217;m just too lazy for that, [...]]]></description>
			<content:encoded><![CDATA[<p>I thought it might help somebody the way I&#8217;m currently managing my WordPress theme. First of all, I have to say it would be better to have an actual WordPress installation in my localhost, so it would be easier trying out changes (on themes and plugins) before committing them. I&#8217;m just too lazy for that, so I&#8217;d rather have only one running installation of WordPress on my server and a moving git repository for the theme alone. So this is how I do:</p>
<p>1. I have a Github public repository to share my theme (not like anyone is interested anyway)<br />
2. I have another private repository in my server to store all the changes of the theme and actually update it.<br />
3. I have a local repository in my computer for the theme.<br />
4. The theme is actually stored at <em>my_server_root</em>/<em>my_wordpress_path</em>/wp-content/themes/bernatfarrero/</p>
<p>Let&#8217;s start out creating the local repository in <strong>your local computer</strong>:</p>
<pre><code>
mkdir bftheme &#038;&#038; cd bftheme
scp -r my_server_root/my_wordpress_path/wp-content/themes/bftheme .
git init #We initialize the local repository
git commit -a -m "Initial commit" # And we make the first commit
</code></pre>
<p>We&#8217;ve just made a local copy of our theme and we&#8217;ve set up a local Git repository. Now let&#8217;s synchronize it with our server&#8217;s repository. In my server I have a special directory for all my repositories called repo. So, now I have to login via ssh <strong>to my server</strong> and do the following:</p>
<pre><code>
cd my_server_root/repo #this is were I store my repositories
mkdir bftheme.git &#038;&#038; cd bftheme.git
git init --bare
git config core.worktree my_server_root/my_wordpress_path/wp-content/themes/bftheme
git config core.bare false
git config receive.denycurrentbranch ignore
vim hooks/post-receive #Open this file with your favorite editor and write inside it:

#!/bin/sh
git checkout -f

#Save it and close it
chmod +x hooks/post-receive #Give it running permissions
</code></pre>
<p>The <em>denycurrentbranch</em> set to ignore (or warn) basically makes the server not complain for having uncommitted changes on the remote repository. Even so, as we only want it to mirror our local changes, we don&#8217;t care. We&#8217;ve set the post-receive hook so it resets our repository to the latest changes received by our last push. Now <strong>in our local computer</strong>, we have to tell our repository who will be the remote:</p>
<pre><code>
git remote add origin username@host.com:repo/bftheme.git
git push origin master
</code></pre>
<p>And that&#8217;s it. We&#8217;ve established the connection between our local repository and the actual changes made public in our blog. In order to deploy your changes just do:</p>
<pre><code>
git push
</code></pre>
<p>And you should see them right away. If you do not, there will be some problem with the paths, or make sure you don&#8217;t have any caching plugin (like <em>Super Cache</em>) activated at the moment. If you are like me and want to push every now and then the changes to Github, you can do (in your local computer):</p>
<pre><code>
git remote add public git@github.com:bernat/blog.bernatfarrero.git #In my case
git push public master
</code></pre>
<p>You can do that every once in a while. In case you don&#8217;t want to push all commits to Github because you are shy to show a zillion of irrellevant changes, what you can do is set the Github repository as origin and the other as, say, deploy. Every 10 commits or so, you can do (in your local computer):</p>
<pre><code>
git rebase -i master~10

pick A
pick B
pick C
pick D
</code></pre>
<p>replace all the pick by squash (except for the first one) and then give it a nice message name. This way you assemble one big commit with the changes of your last ten commits. Then, to push it to Github, you can do:</p>
<pre><code>git push origin master #In case you set Github remote as origin</code></pre>
<p> This way you will push a bigger and more controlled set of changes to Github and only after a while. In the meantime, to see your changes in your actual blog you would just go</p>
<pre><code>git push deploy master</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.bernatfarrero.com/how-t-manage-the-wordpress-theme-with-git/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Thunderbird crashing on start up</title>
		<link>http://blog.bernatfarrero.com/thunderbird-crash-on-start-up/</link>
		<comments>http://blog.bernatfarrero.com/thunderbird-crash-on-start-up/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 11:03:20 +0000</pubDate>
		<dc:creator>bernat</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[mozilla thunderbird bug]]></category>
		<category><![CDATA[thunderbird crash]]></category>

		<guid isPermaLink="false">http://blog.bernatfarrero.com/?p=394</guid>
		<description><![CDATA[Thunderbird has always been my favourite email reading program, though lately it seems like every time I upgrade to its new version something bad happens. This time the program would not start anymore. The icon shook for a while, the white light lingered some seconds, and then it faded away. Even if I rebooted my [...]]]></description>
			<content:encoded><![CDATA[<p>Thunderbird has always been my favourite email reading program, though lately it seems like every time I upgrade to its new version something bad happens. This time the program would not start anymore. The icon shook for a while, the white light lingered some seconds, and then it faded away. Even if I rebooted my computer it wouldn&#8217;t work, neither would if I regenerated the preferences file ~/Library/Preferences/org.mozilla.thunderbird.plist.</p>
<p>This is how I fixed it, in case it is useful to someone else. I&#8217;m running MacOS Snow Leopard 10.6.4 on a Macbook Pro:</p>
<p>First I created another profile for Thunderbird. The profile manager is launched by this command [you must type this in your terminal]:</p>
<pre><code>/Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin -profilemanager</code></pre>
<p>Now starting with the other profile it worked just fine, so I figured it must have been something on my profile that got corrupted in the upgrading process. What I did next was to copy all the files in my old profile folder to the new one. Remember that the profiles are stored in the folder <strong>~/Library/Thunderbird/Profiles/ </strong>[the ~means the home directory]. In this process I realised what was the problem: the file <strong>compreg.dat</strong>.</p>
<p>Usually this file regenerates itself with the new configuration, but for some reason this time did not. So all I did to fix the problem was to replace this file for the new one of the new profile. And that was it, it worked again! You can also copy all your folders and files of the old profile to the new one except for this single file. Be aware to make backups of the folders before trying anything, or you will loose all your mail data.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bernatfarrero.com/thunderbird-crash-on-start-up/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My idea of accessibility</title>
		<link>http://blog.bernatfarrero.com/my-idea-of-accessibility/</link>
		<comments>http://blog.bernatfarrero.com/my-idea-of-accessibility/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 11:23:01 +0000</pubDate>
		<dc:creator>bernat</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[read post]]></category>
		<category><![CDATA[screen readers]]></category>
		<category><![CDATA[wcag2]]></category>

		<guid isPermaLink="false">http://blog.bernatfarrero.com/?p=359</guid>
		<description><![CDATA[Make stuff accessible! This has become a general dogma in the web. Rightfully so. This is particularly true when working for public institutions, since they are bound by law to be accessible from as long as 2002. And yet, if you do a tour through the websites of councils (Ajuntaments), province administrations (Diputacions), ministries and so [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Make stuff accessible! This has become a general dogma in the web. Rightfully so. This is particularly true when working for public institutions, since they are bound by law to be accessible from as long as 2002. And yet, if you <a title="List of municipalities of Barcelona" href="http://www.diba.cat/municipis/ajweb.asp">do a tour</a> through the websites of councils (Ajuntaments), province administrations (Diputacions), ministries and so on, it will only make you laugh (or cry). It is a law no one knows how to enforce.</p>
<p style="text-align: justify;">Impaired/disabled people, users accessing through different architectures, platforms or reading software, machines trying to classify your webs, spiders, search bots, they are usually denied access to most websites content. I find it to be specially outraging for impaired people, since they are no less citizens nor content consumers than others and yet they&#8217;ve got no other alternative of access.</p>
<p style="text-align: justify;">Sadly enough, if you are just a normal content creator and try to understand what the <a title="WCAG Official Site" href="http://www.w3.org/TR/WCAG20/">WCAG2</a> regulations are about, <a title="To hell with WCAG" href="http://www.alistapart.com/articles/tohellwithwcag2">you will probably end up crazy</a>. In my real life, I try to tackle accessibility as a philosophy for doing stuff. Most of the principles are the same my parents told me when I was a kid: Tidy stuff up, be organized, be clear,&#8230; If I create some content, I&#8217;ll try first to express it clearly and organize it (index, sitemaps, categories, tags, clear titles, beautiful permalinks). When that&#8217;s done, I&#8217;ll try to give as many ways of access to it as possible (HTML Standards, RSS feed, MP3 reading, etc.). Of course, I&#8217;ll take it into account in all details I code, for example if I insert an image I&#8217;ll provide it with an alternative description (in case someone can&#8217;t see it, or it is not rendered). If I post a link, I&#8217;ll provide it with a title (so it displays a tooltip indicator of where I&#8217;m taking the user). If I insert a script, I&#8217;ll wonder and handle the usage-case in which the user can&#8217;t interpret it. All of this should not be considered once I finishing my work, but right away while I&#8217;m doing it. As my mother used to tell me, stuff is extremely easy and simple when you address it right away and you make it become a habit, if you leave it for later, it will pile up and be an unbearable burden.</p>
<p style="text-align: justify;">All this thoughts came to me today while I was thinking of the nice and clean design of Marcelino Llano&#8217;s <a title="Marcelino Llano Website" href="http://marcelinollano.com/">website</a> (he is a user experience engineer). Why not all blogs give the possibility to listen to the posts instead of reading them? After all, it takes nothing to read the post after writing it, you do it anyway to check your spelling&#8230; I&#8217;ll start with my own =)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bernatfarrero.com/my-idea-of-accessibility/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://blog.bernatfarrero.com/audio/my_idea_of_accessibility.mp3" length="1389213" type="audio/mpeg" />
		</item>
		<item>
		<title>Semàntic Podcast</title>
		<link>http://blog.bernatfarrero.com/semantic-podcast/</link>
		<comments>http://blog.bernatfarrero.com/semantic-podcast/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 21:56:49 +0000</pubDate>
		<dc:creator>bernat</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[catalan podcast]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[it news]]></category>
		<category><![CDATA[semàntic podcast]]></category>

		<guid isPermaLink="false">http://blog.bernatfarrero.com/?p=333</guid>
		<description><![CDATA[I haven&#8217;t been particularly active recently, I&#8217;m actually preparing myself for the last exams I (might) ever do in my university. Tough stuff! Nonetheless, I&#8217;ll be back on (working, learning and posting) next month! In the meantime, I&#8217;d like to present the new podcast in which I happen to participate. It is called Semàntic. Unfortunately for [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">I haven&#8217;t been particularly active recently, I&#8217;m actually preparing myself for the last exams I (might) ever do in my university. Tough stuff! Nonetheless, I&#8217;ll be back on (working, learning and posting) next month! In the meantime, I&#8217;d like to present the new podcast in which I happen to participate. It is called <strong>Semàntic</strong>. Unfortunately for the English reader, it&#8217;s only in <a href="http://en.wikipedia.org/wiki/Catalan_language">Catalan</a> (my native language) and can be found in <a href="http://semantic.cat">http://semantic.cat</a>.</p>
<p style="text-align: justify;">I had the idea of creating this podcast after being repeatedly disappointed by the little choice of podcasting we have in Catalunya. I&#8217;m kind of addicted to many American and British podcasts and I always thought I&#8217;d like to have some of those in my own language&#8230; so what the hell, I talked with some colleagues, Jordi and Masumi, and they (surprisingly) found the idea interesting, so that&#8217;s how Semàntic was born, in our uni&#8217;s bar. We&#8217;ve only recorded 4 episodes but it has already shown some success. People in and out of our university is subscribed and follows our episodes. We got our feet wet quite unprofessionally, but we&#8217;re improving over time, and we hope to do a lot more!</p>
<p style="text-align: justify;">Of course, we have a<a href="http://guides.rails.info/3_0_release_notes.html"> Rails3</a> website, a <a href="http://www.sinatrarb.com/">Sinatra</a> Wiki (ingeniously built by <a href="http://jrom.net">Jordi</a>), we coordinate ourselves through <a href="http://talkerapp.com/">Talke</a>r and record with the help of some <a href="http://www.amazon.com/Samson-Mic-Compact-USB-Microphone/dp/B001R76D42">Samson unexpensive condenser microphones</a>.  So if you&#8217;re interested in technology and computer science, and you understand Catalan of course, don&#8217;t hesitate to <a href="http://itunes.apple.com/podcast/id374246709">subscribe to Semàntic Podcast</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bernatfarrero.com/semantic-podcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple’s autosaving software</title>
		<link>http://blog.bernatfarrero.com/garageband-lost-file/</link>
		<comments>http://blog.bernatfarrero.com/garageband-lost-file/#comments</comments>
		<pubDate>Mon, 31 May 2010 08:38:43 +0000</pubDate>
		<dc:creator>bernat</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[apple software policy]]></category>
		<category><![CDATA[garage band lost file]]></category>
		<category><![CDATA[imovie lost project]]></category>

		<guid isPermaLink="false">http://blog.bernatfarrero.com/?p=325</guid>
		<description><![CDATA[One of the things I hate the most on software makers is when they treat all users as if they were dumb. This is the case of Apple software. Every time I use iMovie to make a recording I spend some time worrying about where the actual stuff is stored at every point. The program [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">One of the things I hate the most on software makers is when they treat all users as if they were dumb. This is the case of Apple software. Every time I use iMovie to make a recording I spend some time worrying about where the actual stuff is stored at every point. The program is supposed to be so &#8220;smart&#8221; that duplicates your videos to the local iMovie library and then it saves the project and your modifications automatically, &#8220;magically&#8221;. Theoretically without you having to worry about it whatsoever and only having to wow at every new beautiful feature you come across. However, the opposite is true, and factual evidence is easily noticed when searching for &#8220;imovie lost project&#8221; in Google and finding tons of frustrated folks (i.e: <a href="http://forums.macrumors.com/showthread.php?t=425551">this is one</a>, <a href="http://www.mac-forums.com/forums/movies-video/189337-helppppp-lost-imovie-project.html">this is another</a>, <a href="http://www.mac-forums.com/forums/os-x-applications-games/170416-imovie-09-all-projects-lost.html">and yet another</a>, &#8230;).</p>
<p style="text-align: justify;">Same stuff happens with GarageBand. Today we recorded a 40minutes podcast episode with GB and when we were done, happy and satisfied with the episode, preparing stuff to get back home, we happened to go &#8220;Save as&#8221; and, wow, all the &#8220;magic behind the scenes&#8221; of Apple slapped in our faces and the .aif file of the recording got deleted forever. Now, if there&#8217;s any notion any software engineering or user experience engineer should ever have clear from the start is interface metaphors are meant to be accurate. That is, when a user click &#8220;Save&#8221;, she is probably not looking forward to delete the whole damn thing. <a href="http://discussions.apple.com/thread.jspa?threadID=2287431&amp;tstart=0&amp;start=30">Have a look at the endless thread for this problem at Apple&#8217;s Garageband forum</a>.</p>
<p style="text-align: justify;">But it all comes from the same principle of Apple, the principle of they controlling everything and users just wowing at the company&#8217;s wonders and playing their sheep role, doing baby-like limited options and sticking to them forever. We developers are given a couple of more options and a thousand of more rules to follow but that&#8217;s it. This is <a href="http://techcrunch.com/2010/05/15/steve-jobs-spars-with-gawker-blogger-over-revolutions-freedom-and-porn/">Steve Job&#8217;s concept of freedom</a>.</p>
<p style="text-align: justify;">Well, it turns out I don&#8217;t need anyone to manage my work, I want to write my software and give it, or sell it the way I want. I want to use programs and save the stuff when and where I feel like. I&#8217;d rather stick to my old-looking but reliable interfaces.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bernatfarrero.com/garageband-lost-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://blog.bernatfarrero.com/audio/apples_autosaving_software.mp3" length="1389213" type="audio/mpeg" />
		</item>
		<item>
		<title>Don’t use Mozy!</title>
		<link>http://blog.bernatfarrero.com/dont-use-mozy/</link>
		<comments>http://blog.bernatfarrero.com/dont-use-mozy/#comments</comments>
		<pubDate>Sat, 22 May 2010 19:16:39 +0000</pubDate>
		<dc:creator>bernat</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[mozy problems]]></category>
		<category><![CDATA[online backup]]></category>

		<guid isPermaLink="false">http://blog.bernatfarrero.com/?p=317</guid>
		<description><![CDATA[Are you looking for an onlike backup system for your Mac computer? Well, let me give you a piece of advise: do not use Mozy! Yesterday I sent this email to their customer service after fighting for a week with their program and their support FAQ. Dear Madame/Sir I subscribed to your service of online [...]]]></description>
			<content:encoded><![CDATA[<p>Are you looking for an onlike backup system for your Mac computer? Well, let me give you a piece of advise: do not use Mozy! Yesterday I sent this email to their customer service after fighting for a week with their program and their support FAQ.</p>
<blockquote><p><span style="font-family: Verdana;"> </span></p>
<div id="_mcePaste">
<div id="_mcePaste">Dear Madame/Sir</div>
<div id="_mcePaste">I subscribed to your service of online backup approximately one week from now and since then I haven&#8217;t been able to perform a single backup yet. I have to say that the program you offer for MacOS is one of the worst pieces of software I&#8217;ve dealt with recently. It is not usable and it is not smart. It is painfully obtrusive, it slows down my computer, it eats up more than 9Gb of space from my disk leaving my system out of temporal and virtual memory. And it offers almost no options for customization&#8230; Instead of dealing with the files to backup in small quantities, and according to the bandwidth and the ability to send them to your servers, it tries to deal with them all from the start, encrypting the full stack and leaving the computer utterly KO.</div>
<div id="_mcePaste">I&#8217;ve used other online backup services before (such as Dropxbox), and they offer software way more efficient and smart for dealing with backups. Coming from EMC I thought Mozy would be trustworthy, it turns out I was wrong. I request the cancellation of my account and the refund of my payment. I hope that at least customer service proves satisfactory.</div>
<div id="_mcePaste">Yours faithfully,</div>
<div id="_mcePaste">Bernat Farrero.-</div>
</div>
</blockquote>
<p>The answer to this was: Go to your panel, complete the questionnaire and cancel your account. No word about the refund. So don&#8217;t be misled by their low prices, it will make you waste your time and money.</p>
<p><strong>Update</strong>: At the end, two weeks later, I did receive the refund. I lost 1,10€ in the transaction, but I&#8217;m satisfied enough =)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bernatfarrero.com/dont-use-mozy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://blog.bernatfarrero.com/audio/dont_use_mozy.mp3" length="audio/mpeg" type="" />
		</item>
		<item>
		<title>jQuery and Rails 3: A mini tutorial</title>
		<link>http://blog.bernatfarrero.com/jquery-and-rails-3-mini-tutorial/</link>
		<comments>http://blog.bernatfarrero.com/jquery-and-rails-3-mini-tutorial/#comments</comments>
		<pubDate>Fri, 07 May 2010 18:53:45 +0000</pubDate>
		<dc:creator>bernat</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[rails 3]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.bernatfarrero.com/?p=274</guid>
		<description><![CDATA[As most of Rails developers, recently I&#8217;ve been through a process of unlearning all concepts of older versions of Rails and learning again the new ones of 3. But hey! I must admit that so far it&#8217;s been more pleasure than pain as things only get simpler and more natural than they used to be! Here I&#8217;d [...]]]></description>
			<content:encoded><![CDATA[<p>As most of Rails developers, recently I&#8217;ve been through a process of unlearning all concepts of older versions of Rails and learning again the new ones of 3. But hey! I must admit that so far it&#8217;s been more pleasure than pain as things only get simpler and more natural than they used to be!</p>
<p>Here I&#8217;d like to talk about how simple it has become to integrate unobtrusive jQuery to a Rails app. Let&#8217;s use as an example a system of comments. I&#8217;ll create a simple app to create YouTube like comments:<br />
<a href="http://blog.bernatfarrero.com/wp-content/uploads/2010/05/mostra1.jpg"><img class="aligncenter size-full wp-image-290" title="Preview of Commenting App" src="http://blog.bernatfarrero.com/wp-content/uploads/2010/05/mostra1.jpg" alt="" width="628" height="696" /></a></p>
<p>Start typing in your teminal:</p>
<pre><code>rails myCommentsApp
rails g resource Comment name:string body:text
rake db:migrate</code></pre>
<p>Then we have to include the jQuery library and the <a href="http://github.com/rails/jquery-ujs/blob/master/src/rails.js">jQuery driver file</a> and place it inside /public/javascripts/ (or grab the <a href="http://github.com/CodeOfficer/jquery-helpers-for-rails3">helpers generator of Code Officer</a> and do it automatically if you wish).  Now remove the  <em>javascript_include_tag :defaults</em> in the layout and add the following includes:<br />
<em><span style="color: #888888;"><a href="http://github.com/bernat/myCommentsApp/blob/master/app/views/layouts/application.html.erb"><span style="color: #888888;">/app/views/layouts/application.html.erb</span></a></span></em></p>
<p><code> </code></p>
<pre><code>javascript_include_tag  "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
javascript_include_tag  "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"
javascript_include_tag "jquery-rails.js"</code></pre>
<p>Now let&#8217;s add some logic to our program.  We&#8217;ll start out with an index action that will get all the comments:<br />
<em><span style="color: #888888;"><a href="http://github.com/bernat/myCommentsApp/blob/master/app/controllers/comments_controller.rb"><span style="color: #888888;">/app/controllers/comments_controller.rb</span></a></span></em></p>
<pre><code>def index
    @comments = Comment.all
    respond_to do |format|
      format.html # index.html.erb
      format.rss
    end
  end</code></pre>
<p>And the views for the index will look like this:<br />
<em><span style="color: #888888;"><a href="http://github.com/bernat/myCommentsApp/blob/master/app/views/comments/index.html.erb"><span style="color: #888888;">/app/views/comments/index.html.erb</span></a></span></em></p>
<pre><code>&lt;span id="comments_count"&gt;&lt;%= pluralize(@comments.count, "Comment") %&gt;&lt;/span&gt;
&lt;div id="comments"&gt;
  &lt;%= render :partial =&gt; @comments, :locals =&gt; { :list =&gt; true } %&gt;
&lt;/div&gt;

&lt;hr /&gt;

&lt;div id="comment-notice"&gt;&lt;/div&gt;

&lt;h2&gt;Say something!&lt;/h2&gt;
&lt;% form_for Comment.new, :remote =&gt; true do |f| %&gt;
	&lt;%= f.label :name, "Your name" %&gt;&lt;br /&gt;
	&lt;%= f.text_field :name %&gt;&lt;br /&gt;
	&lt;%= f.label :body, "Comment" %&gt;&lt;br /&gt;
	&lt;%= f.text_area :body, :rows =&gt; 8 %&gt;&lt;br /&gt;
	&lt;%= f.submit "Add comment" %&gt;
&lt;% end %&gt;</code></pre>
<p>Notice that the new attribute <strong>remote</strong> is all we need to worry about when creating a form that will submit with Ajax. Rails 3 works with HTML5 attributes, so it only adds the attribute <em>data-remote=&#8221;true&#8221;</em> to the form and that&#8217;s it, the jQuery driver will handle the rest.<br />
We&#8217;ll create a partial for the comments:<br />
<em><span style="color: #888888;"><a href="http://github.com/bernat/myCommentsApp/blob/master/app/views/comments/_comment.html.erb"><span style="color: #888888;">/app/views/comments/_comment.html.erb</span></a></span></em></p>
<pre><code>&lt;%= div_for comment do %&gt;
  &lt;span class="dateandoptions"&gt;
    Posted &lt;%=time_ago_in_words(comment.created_at)%&gt; ago&lt;br /&gt;
    &lt;%= link_to 'Delete', comment_path(comment), :method =&gt; :delete, :class =&gt; "delete", :remote =&gt; true  %&gt;
  &lt;/span&gt;
	&lt;p&gt;&lt;b&gt;&lt;%= comment.name %&gt;&lt;/b&gt; wrote:&lt;/p&gt;
	&lt;br /&gt;
  &lt;%= content_tag(:p, comment.body, :class =&gt; "comment-body") %&gt;
&lt;% end %&gt;</code></pre>
<p>So now let&#8217;s add the fireworks! That is, the asynchronous creation and deletion of comments along with some trendy effects. We come back to the CommentsController and add the actions:<br />
<em><span style="color: #888888;"><a href="http://github.com/bernat/myCommentsApp/blob/master/app/controllers/comments_controller.rb"><span style="color: #888888;">/app/controllers/comments_controller.rb</span></a></span></em></p>
<pre><code> def create
    @comment = Comment.create!(params[:comment])
    flash[:notice] = "Thanks for commenting!"
    respond_to do |format|
      format.html { redirect_to comments_path }
      format.js
    end
  end

  def destroy
     @comment = Comment.find(params[:id])
     @comment.destroy
     respond_to do |format|
       format.html { redirect_to comments_path }
       format.js
     end
   end</code></pre>
<p>And we are done with the logic part! A few javascript lines will end the work:<br />
<em><span style="color: #888888;"><a href="http://github.com/bernat/myCommentsApp/blob/master/app/views/comments/create.js.erb"><span style="color: #888888;">/app/views/comments/create.js.erb</span></a></span></em></p>
<pre><code>/* Insert a notice between the last comment and the comment form */
$("#comment-notice").html('&lt;div class="flash notice"&gt;&lt;%= escape_javascript(flash.delete(:notice)) %&gt;&lt;/div&gt;');

/* Replace the count of comments */
$("#comments_count").html("&lt;%= pluralize(Comment.count, 'Comment') %&gt;");

/* Add the new comment to the bottom of the comments list */
$("#comments").append("&lt;%= escape_javascript(render(@comment)) %&gt;");

/* Highlight the new comment */
$("#comment_&lt;%= @comment.id %&gt;").effect("highlight", {}, 3000);

/* Reset the comment form */
$("#new_comment")[0].reset();</code></pre>
<p><em><span style="color: #888888;"><a href="http://github.com/bernat/myCommentsApp/blob/master/app/views/comments/destroy.js.erb"><span style="color: #888888;">/app/views/comments/destroy.js.erb</span></a></span></em></p>
<pre><code>/* Eliminate the comment by fading it out */
$('#comment_&lt;%= @comment.id %&gt;').fadeOut();
/* Replace the count of comments */
$("#comments_count").html("&lt;%= pluralize(Comment.count, 'Comentari') %&gt;");</code></pre>
<p><strong>Finish!</strong> That&#8217;s all the effort you need nowadays to a create a Web 2.0 fashionable feature such as this one. Of course, you need some styling with CSS, and you would need tons of more things in the real world (such as antispam, authentication, something to comment about&#8230;) but that&#8217;s the part I chose to talk about today!</p>
<p>I pushed <a href="http://github.com/bernat/myCommentsApp">myCommentsApp</a> to Github in case you want to have a closer look (or download the <a href="http://github.com/bernat/myCommentsApp/zipball/master">zip version</a>).</p>
<p>You might be interested in checking out <a href="http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/">my script for letting user in-place edit your application contents</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bernatfarrero.com/jquery-and-rails-3-mini-tutorial/feed/</wfw:commentRss>
		<slash:comments>60</slash:comments>
		</item>
		<item>
		<title>Empirical analysis of local search algorithms</title>
		<link>http://blog.bernatfarrero.com/empirical-analysis-of-local-search-algorithms/</link>
		<comments>http://blog.bernatfarrero.com/empirical-analysis-of-local-search-algorithms/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 17:31:07 +0000</pubDate>
		<dc:creator>bernat</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[fib]]></category>
		<category><![CDATA[hill climbing]]></category>
		<category><![CDATA[ia]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[local search algorithms]]></category>
		<category><![CDATA[simulated annealing]]></category>

		<guid isPermaLink="false">http://blog.bernatfarrero.com/?p=249</guid>
		<description><![CDATA[Last week in Artificial Intelligence (5th year&#8217;s subject in FIB, my university), we worked in a project analysing the empirical differences among some local search algorithms. We were given AIMA, an AI Java framework, and a problem to solve with those algorithms. The problem consisted basically of creating optimal K bus routes in a squared [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Last week in <a href="http://www.fib.upc.edu/fib/estudiar-enginyeria-informatica/enginyeries-pla-2003/assignatures/IA.html">Artificial Intelligence</a> (5th year&#8217;s subject in <a href="http://www.fib.upc.edu/fib/">FIB</a>, my university), we worked in a project analysing the empirical differences among some <a href="http://en.wikipedia.org/wiki/Local_search_(optimization)">local search algorithms</a>. We were given <a href="http://www.lsi.upc.es/~bejar/ia/material/laboratorio/progs/AIMA.src.zip">AIMA</a>, an AI Java framework, and a problem to solve with those algorithms. The problem consisted basically of creating optimal K bus routes in a squared city (called <em>SquareTown</em>) for a randomly generated set of P bus stops. By optimal they meant minimal cover distance including all stops and minimal difference between the distances of every two consecutive stops. The algorithms to be used were <a href="http://en.wikipedia.org/wiki/Hill_climbing">Hill Climbing</a> and <a href="http://en.wikipedia.org/wiki/Simulated_annealing">Simulated Annealing</a>. The full formulation of the problem can be found <a href="http://blog.bernatfarrero.com/wp-content/uploads/2010/04/busqueda09102q.pdf">here</a> (in Spanish).</p>
<p style="text-align: justify;">Our findings were quite interesting, and I will sum them up in the following points:</p>
<div id="_mcePaste" style="text-align: justify;">
<div id="_mcePaste">
<ul>
<li>The HC (Hill Climbing) algorithm <strong>is extremely fast</strong> (it gets to a solution almost instantly).</li>
<li>If HC starts from a <strong>smart initial solution it can get pretty good results</strong> (30-40% better than random initial solution).</li>
<li>SA (Simulated Annealing) is <strong>slower</strong> than the former (like 100x slower).</li>
<li>If well parametrized (by trial and error, of course), <strong>SA gets better results than HC</strong> (from 0.5x to 2.5x times better).</li>
<li><strong>SA doesn&#8217;t care about the initial solution</strong>, even using a smart one we got results only 3-5% better.</li>
<li>Using a completely indeterministic (random) initial solution, it improves the performance of SA even better than using the smart initial solution, conversely to what happens with HC.</li>
<li>If we run HC consecutively with an <strong>indeterministic initial solution each time</strong> (indeed for a unique problem), we get even <strong>better results than SA in its best conditions</strong>. The number of iterations is chosen to be equivalent to the time taken by SA. In our case, we were getting the same results of SA with half its elapsed time. This approach is called RRHC (<a href="http://en.wikipedia.org/wiki/Hill_climbing#Variants">Random Restart Hill Climbing</a>).</li>
<li>The bigger the problem gets (the space to search) the worse are the results for both approaches.</li>
</ul>
</div>
</div>
<p style="text-align: justify;"><a href="http://github.com/jrom/ia">Our code</a> (of <a href="http://jrom.net">Jordi</a> and I) is now public in Github and can be used by anyone (read the REAME). The important files are <a href="http://github.com/jrom/IA/blob/master/IA/SquareBoard.java">SquareTown.java</a>, where we implement the whole problem and <a href="http://github.com/jrom/IA/blob/master/IA/Main.java">Main.java</a>, where we execute the experimentation (pay no attention to the code of the Main,  due to the last-minute policy of coding projects for university, it is quite filthy). The project&#8217;s final documentation can be found <a href="http://blog.bernatfarrero.com/wp-content/uploads/2010/04/document.pdf">here</a> (in Catalan).</p>
<p style="text-align: justify;"><strong>Update</strong>: We got a 8/10 for the project.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bernatfarrero.com/empirical-analysis-of-local-search-algorithms/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://blog.bernatfarrero.com/audio/empirical_analysis_of_local_search_algorithms.mp3" length="audio/mpeg" type="" />
		</item>
		<item>
		<title>Thoughts on virtual value</title>
		<link>http://blog.bernatfarrero.com/thoughts-on-virtual-value/</link>
		<comments>http://blog.bernatfarrero.com/thoughts-on-virtual-value/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 17:18:00 +0000</pubDate>
		<dc:creator>bernat</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[free internet services]]></category>
		<category><![CDATA[it economics]]></category>
		<category><![CDATA[value creation]]></category>
		<category><![CDATA[virtual value]]></category>

		<guid isPermaLink="false">http://blog.bernatfarrero.com/?p=229</guid>
		<description><![CDATA[Over the time, the concept of value in our society has evolved in ways none of the pioneers (from Adam Smith / Ricardo to Karl Marx) would have possibly imagined. Conversely to what Marx argued, value keeps no longer proportion with labor [of production]. At the contrary, now value takes the form of all possible [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Over the time, the concept of value in our society has evolved in ways none of the pioneers (from <a href="http://en.wikipedia.org/wiki/Adam_Smith">Adam Smith</a> / <a href="http://en.wikipedia.org/wiki/David_Ricardo">Ricardo</a> to Karl Marx) would have possibly imagined. Conversely to what <a href="http://en.wikipedia.org/wiki/Karl_Marx">Marx</a> <a href="http://en.wikipedia.org/wiki/Das_Kapital">argued</a>, value keeps no longer proportion with labor [of production]. At the contrary, now value takes the form of all possible shapes but those related to production. Starting with banks who magically <a href="http://www.youtube.com/watch?v=vVkFb26u9g8">create money as loans</a>. We&#8217;ve seen how hedge funds and investment groups make money out of lots of NOTHING by just moving virtual debts around (as mortgages). Others make money just by <a href="http://en.wikipedia.org/wiki/Foreign_exchange_market">buying and selling huge amounts of currency</a> among different countries. No real economy here, no goods produced, no value added, and yet money seems to appear from the void.</p>
<p style="text-align: justify;">However, money does not appear from the void, there must always be a loosing part. And that&#8217;s the point of my article. As the ways of value creation change, society should change with it or at least understand what the change is all about if people do not want to be fooled. The current economic meltdown is nothing but us not understanding the model of value creation. Now as ever, our ignorance is their allowance to do it.</p>
<p style="text-align: justify;">IT is my field, and it is clear to me the role information is taking in value creation. Information is crucial for competition, and I&#8217;m not talking about market&#8217;s information (that is obvious), but also the information of every step of any firm&#8217;s <a href="http://en.wikipedia.org/wiki/Value_chain">value chain</a>. Take, for instance, logistics. The fact of controlling where your trucks are, how they move, organize the routes, the deliveries through information systems have improved dramatically the business efficiency and reduced final costs (See <a href="http://en.wikipedia.org/wiki/Virtual_Value_Chain">Virtual Value Chain</a>). To the point that it intrinsically determinates who takes the markets. It&#8217;s fun to see how the classic value chain model of a firm is getting covered by so many transversal layers that, at the end, it makes no sense whatsoever. Someone could just think of changing the model, though getting stuff simple and readable has never been the aim of Economics.</p>
<p style="text-align: justify;">Of course, in recent years this revolution of the way firms learned to use information took place, precisely, within the business sector, away from normal people. Business actors learned all ways to gather information of their own processes and activities and obtain value from it. Indeed, it couldn&#8217;t take long &#8217;til someone realized this same technique could be applied on people.</p>
<p style="text-align: justify;"><a href="http://blog.bernatfarrero.com/wp-content/uploads/2010/04/facebook-twitter2.jpg"><img class="alignleft size-full wp-image-236" style="padding-right: 5px; padding-bottom: 5px;" title="facebook-twitter" src="http://blog.bernatfarrero.com/wp-content/uploads/2010/04/facebook-twitter2.jpg" alt="money, facebook and twitter" width="200" height="200" /></a>Thus were born the &#8220;free&#8221; services delivered over the Internet. Basically, we&#8217;re given a new way to perform our normal activities, all through their services. <a href="http://finance.yahoo.com/q?s=Goog">Google</a> probably deserves the first place in this new ranking of  business, fully devoted on gathering huge amounts of personal data, studying and transforming it to valuable information. <a href="http://www.facebook.com">Facebook</a> is just another simple example (over $10 billion worth of stock value) of a company fully devoted to it. One could think these companies were a bit lost in the beginning, as Twitter has proved over the past years (though <a href="http://garyvaynerchuk.com/post/88324621/how-will-twitter-monetize">listen to Gary Vaynerchuck</a>), they knew all of this data would proof profitable and valuable somehow in the future but didn&#8217;t quite know how. Now they surely do.</p>
<p style="text-align: justify;">Marx couldn&#8217;t think of this new era of value creation, though his principles remain the same. Some people still take profit of others ignorance and &#8220;alienation&#8221; to make money out of it. Most people still don&#8217;t understand the value of information, and would fill out or answer any survey without knowing how valuable are those minutes to a company. At the same time, people use Internet services happily thinking everything is free and naively give up all their personal data that will be acquired after by all sorts of companies with all possible aims. In other words, privacy is no longer a fundamental personal right, but also a tradeable commodity that people is selling out for FREE.</p>
<p style="text-align: justify;">Information has already become the exchange unit of value nowadays. The specific description of the way we go to the toilet is worth money and if we make it public to one of these companies I promise they&#8217;ll find someone interested in buying it. If you are prepared to give out all this information for free, it&#8217;s up to you, though just be aware of it, and think businesses are out there to increase their profits, not give stuff for free.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bernatfarrero.com/thoughts-on-virtual-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://blog.bernatfarrero.com/audio/thoughts_on_virtual_value.mp3" length="audio/mpeg" type="" />
		</item>
	</channel>
</rss>

