<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Fernando Sainz Herrero</title>
 <link href="http://fsainz.github.com/atom.xml" rel="self"/>
 <link href="http://fsainz.github.com/"/>
 <updated>2015-08-24T06:41:27+00:00</updated>
 <id>http://fsainz.github.com/atom.xml</id>
 <author>
   <name>Fernando Sainz Herrero</name>
   <email>info@fsainz.com</email>
 </author>

 
 <entry>
   <title>Simple Capistrano Backup</title>
   <link href="http://fsainz.github.com/2015/06/17/simple-capistrano-backup.html"/>
   <updated>2015-06-17T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2015/06/17/simple-capistrano-backup</id>
   <content type="html">&lt;h1&gt;Simple Capistrano Backup&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;June 17th, 2015 - Bonn&lt;/p&gt;


&lt;p&gt;I wanted to have a dead simple script to create a backup of the files and the database on the deployer home folder with a capistrano task.
It could use some refactor, and it could be made more flexible in many aspects, but it works and it&#39;s just a small bunch of lines.&lt;/p&gt;

&lt;p&gt;There are good backup libraries that you let you encrypt, split, upload to multiple places and be notified whether has been a problem or not. They also take care of automating the restoring process, and let you switch between different versions and remove old backups. Setting that up takes more time though, this script is only valid for simple situations, it doesn&#39;t compare to those libraries but it sure beats not having any script at all.&lt;/p&gt;

&lt;p&gt;I added explicitely the &lt;code&gt;PGPASSWORD&lt;/code&gt; to the dump command, but there are better ways, you can add a &lt;code&gt;.pgpass&lt;/code&gt; file to your home folder, and add a &lt;code&gt;--no-password&lt;/code&gt; flag (more info &lt;a href=&quot;http://www.postgresql.org/docs/current/static/libpq-pgpass.html&quot;&gt;here&lt;/a&gt;). You can also add it as an &lt;a href=&quot;http://www.postgresql.org/docs/current/static/libpq-pgpass.html&quot;&gt;environment variable&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another improvement is to make it run periodically using a cron job: &lt;a href=&quot;http://www.gotealeaf.com/blog/cron-jobs-and-rails&quot;&gt;cron-jobs-and-rails&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# lib/capistrano/tasks/simple_backup.rake&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:database_staging&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;    &lt;span class=&quot;s2&quot;&gt;&amp;quot;database_staging&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:database_production&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;database_production&amp;quot;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# IMPORTANT -&amp;gt; put a path to the folder, not the symlink, like &amp;quot;../shared/public/uploads&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:files_to_backup_relative_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;../shared/public/uploads&amp;quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;namespace&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:deploy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Dump the DB and tar the uploads to the deployer home&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:simple_backup&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;stage&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:stage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;database&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;database_&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stage&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sym&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;raise&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Missing database name&amp;quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;unless&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;database&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;scp_commands&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;time_stamp&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;strftime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;%F-%H-%M-%S&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;database_dump_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;dump_&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;time_stamp&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;database_dump_cmd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;PGPASSWORD=********* pg_dump &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; -U postgres -h localhost &amp;gt; &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;database_dump_name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;perform_files_backup&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:files_to_backup_relative_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;perform_files_backup&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;files_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;expand_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;release_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:files_to_backup_relative_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;files_parent_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;expand_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;../&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;files_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;files_path_basedir&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;basename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;files_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;files_backup_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;files_&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stage&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;time_stamp&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.tar.gz&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; ### STARTING BACKUP ON &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stage&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;upcase&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; AT &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;time_stamp&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;on&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;roles&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:app&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; ### DUMPING THE DATABASE&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;scp_base_cmd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;scp &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:~/&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;execute&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;database_dump_cmd&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;scp_commands&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scp_base_cmd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;database_dump_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot; .&amp;quot;&lt;/span&gt;

      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;perform_files_backup&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;files_compression_cmds&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;files_compression_cmds&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;cd &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;files_parent_path&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;files_compression_cmds&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;tar zczf &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;files_backup_name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;files_path_basedir&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;files_compression_cmds&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;mv &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;files_backup_name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; ~&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;files_compression_cmd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;files_compression_cmds&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot; &amp;amp;&amp;amp; &amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

        &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; ### COMPRESSING FILES AT &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;files_path&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;files_compression_cmd&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;execute&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;files_compression_cmd&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;scp_commands&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scp_base_cmd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;files_backup_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot; .&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

      &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; GET THE FILES WITH:&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;scp_commands&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After executing it, you get the lines needed to download the files&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bundle exec cap staging deploy:simple_backup&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;scp deployer@[IP]:~/files_production_2015-06-16-15-33-28.tar.gz .
scp deployer@[IP]:~/dump_database_production_2015-06-16-15-33-28 .
&lt;/code&gt;&lt;/pre&gt;
</content>
 </entry>
 
 <entry>
   <title>Uploading files with Electron</title>
   <link href="http://fsainz.github.com/2015/06/08/files-on-electron.html"/>
   <updated>2015-06-08T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2015/06/08/files-on-electron</id>
   <content type="html">&lt;h1&gt;Uploading files with Electron&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;June 8th, 2015 - Bonn&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/electron.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We are developing an app with  &lt;a href=&quot;http://electron.atom.io/&quot;&gt;electron&lt;/a&gt; in which we need to upload files directly from the filesystem (not through a form).&lt;/p&gt;

&lt;p&gt;We had some issues with it, first the file contents were getting munged on the remote end. We were extracting a blog with the file data using a conventional method:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;contents&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;readFileSync&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fileLocation&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;blob&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Blob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;contents&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then we transmitted this blob via every method we could think of, from basic ajax requests with &lt;code&gt;XMLHttpRequest&lt;/code&gt; and a &lt;code&gt;FormData&lt;/code&gt; object to specialised plugins like jQuery-File-Upload, always with the same result. For some reason we ended up with a file with invalid bytes.&lt;/p&gt;

&lt;p&gt;Out theory was the the &lt;code&gt;readFile&lt;/code&gt; function was transforming the original byte array into UTF-8 forcing some replacements due to invalid characters. We went through the other available encoding options (&quot;raw&quot;, &quot;binary&quot;, etc..) without too much success until we tried with base64&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;contents&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;readFileSync&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fileLocation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;base64&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;blob&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Blob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;contents&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After decoding it, we had the right contents, and we faced the second problem. The 20k test file had worked pretty well, but any file slightly larger than that would just crash electron when trying to turn it into a blob. If we didn&#39;t change the default encoding, we could get a blob of a several megabyte file without issues.&lt;/p&gt;

&lt;p&gt;After asking in the electron issues board, @zcbenz pointed us in the right direction. The way to go was to use Node&#39;s http module, since HTML5 didn&#39;t work well together with Node.js&#39;s Buffer.&lt;/p&gt;

&lt;p&gt;At the end we used the &lt;a href=&quot;https://github.com/request/request&quot;&gt;request module&lt;/a&gt; which makes writing the http post request a little nicer. These are the relevant lines from our Attachment model:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Inside attachment.coffee&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;nodeRequest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;request&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#&lt;/span&gt;
  &lt;span class=&quot;ss&quot;&gt;upload&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;vi&quot;&gt;@filePath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;then&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fileLocation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@name&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dockingApi&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;attachments&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;postUrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;vi&quot;&gt;@id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@attachable_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@attachable_type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;deferred&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;vg&quot;&gt;$q&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;defer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;formData&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
        &lt;span class=&quot;ss&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;ss&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;createReadStream&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fileLocation&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
          &lt;span class=&quot;ss&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;ss&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;nodeRequest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;post&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;ss&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;
        &lt;span class=&quot;ss&quot;&gt;formData&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;formData&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;httpResponse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;err&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;upload failed:&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;deferred&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;deferred&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;promise&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</content>
 </entry>
 
 <entry>
   <title>Issues with Active Model Serializers</title>
   <link href="http://fsainz.github.com/2015/05/21/rails-serializer.html"/>
   <updated>2015-05-21T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2015/05/21/rails-serializer</id>
   <content type="html">&lt;h1&gt;Issues with Active Model Serializers&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;May 21st, 2015 - Bonn&lt;/p&gt;


&lt;p&gt;The &lt;a href=&quot;https://github.com/rails-api/active_model_serializers&quot;&gt;ActiveModel::Serializer&lt;/a&gt; gives you a nice DSL to handle attributes and relationships when serializing objects.&lt;/p&gt;

&lt;p&gt;I had some issues when trying to embed those relationships, in some cases I would just get a hash with the object attributes (probably the same as calling &lt;code&gt;to_json&lt;/code&gt; directly) instead of going through the serializer of the associated model.&lt;/p&gt;

&lt;p&gt;I found related open issues:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;each_serializer options seems not to work (...) insead of specified serializer, it just returns serialised object.&lt;/em&gt;
&lt;a href=&quot;https://github.com/rails-api/active_model_serializers/issues/664&quot;&gt;https://github.com/rails-api/active_model_serializers/issues/664&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;No Matter What I do I only get a normal object hash&lt;/em&gt;
&lt;a href=&quot;https://github.com/rails-api/active_model_serializers/issues/706&quot;&gt;https://github.com/rails-api/active_model_serializers/issues/706&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I tried many things without success, at the end I got this pattern working at least for the version 0.10.0.pre. It&#39;s ugly but it can be easily replaced in the future when this is no longer an issue&lt;/p&gt;

&lt;p&gt;instead of a &lt;em&gt;has_many&lt;/em&gt; :attachments, I would add this method:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;attachments&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;attachments&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;attachments&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_a&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;attachments&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;empty?&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;serializer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ActiveModel&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Serializer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;ArraySerializer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;attachments&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;each_serializer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;AttachmentSerializer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;ActiveModel&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Serializer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Adapter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;JsonApi&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;serializer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;as_json&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:attachments&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;for a &lt;em&gt;belongs_to&lt;/em&gt; :category, I would do&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;category&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;category&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;serializer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;CategorySerializer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;category&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;no&quot;&gt;ActiveModel&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Serializer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Adapter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;JsonApi&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;serializer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;as_json&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:categories&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</content>
 </entry>
 
 <entry>
   <title>Talk Slides - Complains, tips &amp; hopes on css</title>
   <link href="http://fsainz.github.com/2015/05/16/css-talk.html"/>
   <updated>2015-05-16T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2015/05/16/css-talk</id>
   <content type="html">&lt;h1&gt;Talk Slides - Complains, tips &amp;amp; hopes on css&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;May 16th, 2015 - Bonn&lt;/p&gt;




&lt;p&gt;
  On January at our first &lt;a href=&quot;http://www.zeit.io&quot;&gt;Zeit.io&lt;/a&gt; trip I talked about different aspects on css, some old bugs and some recent developments and tips. It was quite improvised, I never got around finishing the slides until now
&lt;/p&gt;




&lt;script async class=&quot;speakerdeck-embed&quot; data-id=&quot;ce73f5ad4bb94c9cbd642f395a7666d1&quot; data-ratio=&quot;1.33333333333333&quot; src=&quot;//speakerdeck.com/assets/embed.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>Boostrap responsive resets and custom grids</title>
   <link href="http://fsainz.github.com/2015/04/26/grids.html"/>
   <updated>2015-04-26T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2015/04/26/grids</id>
   <content type="html">&lt;h1&gt;Boostrap responsive resets and custom grids&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;April 26th, 2015 - Bonn&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/grid-columns.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;
  I made a &lt;a href=&quot;http://codepen.io/fsainz/pen/zGxKde&quot; target=&quot;_blank&quot;&gt;pen&lt;/a&gt; to have an example of different approaches to deal with an unknown number of elements that have to be displayed in a specific number of columns depending on the available width.
&lt;/p&gt;




&lt;p&gt;
  Let&#39;s say that you are using the bootstrap grid of 12 columns, and you want to have rows with 2 elements for narrow screens and 4 for larger ones. You can try to add more content that what fits in a single row, and take advantage of the  &lt;code&gt;.col-&lt;/code&gt; classes to force it to wrap following both distributions.
&lt;/p&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-slim&quot; data-lang=&quot;slim&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.row&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3&lt;/span&gt;
    | lorem&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;p&gt;&lt;p&gt; This might work for some heights, but once one column is taller than the others, the following ones might just get stuck to its right instead of clearing the space and starting a new visual row. To avoid this, there&#39;s an example in the boostrap guides to apply utility classes to create &lt;a href=&quot;http://getbootstrap.com/css/#grid-responsive-resets&quot; target=&quot;_blank&quot;&gt;responsive column resets&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-slim&quot; data-lang=&quot;slim&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.row&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3&lt;/span&gt;
    | lorem ipsum dolor sit amet, consectetur adipisicing elit...
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.clearfix.visible-xs-block&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3&lt;/span&gt;
    | lorem&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&lt;p&gt;This is quite nice, but it get&#39;s harder to understand when you want to apply the same technique to add more steps. If you want to go from to 2 to 4 to six, you will end up having something like this:&lt;/p&gt;&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-slim&quot; data-lang=&quot;slim&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.row&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3.col-md-2&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3.col-md-2&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.clearfix.visible-xs-block&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3.col-md-2&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3.col-md-2&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.clearfix.visible-sm-block&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.clearfix.visible-xs-block&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3.col-md-2&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.col-xs-6.col-sm-3.col-md-2&lt;/span&gt;
    | lorem&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&lt;p&gt;In these cases, it might be easier to just roll a simple grid on your own, they require just a bunch of lines and you don&#39;t need to programatically insert those clear divs with some cumbersome rules if you are working with an unknown number of elements. If we start with a grid as follows:&lt;/p&gt;&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-slim&quot; data-lang=&quot;slim&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.grid-container&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.grid-element&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.grid-element&lt;/span&gt;
    | lorem
  &lt;span class=&quot;nc&quot;&gt;.grid-element&lt;/span&gt;
    | lorem
  &lt;span class=&quot;cp&quot;&gt;// ...&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&lt;p&gt;We can take care of clearing using &lt;code&gt;nth-child&lt;/code&gt; selectors&lt;/p&gt;&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-scss&quot; data-lang=&quot;scss&quot;&gt;&lt;span class=&quot;c1&quot;&gt;// http://bourbon.io/docs/#clearfix&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;@mixin&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt; clearfix&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;after&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;clear&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;both&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;nc&quot;&gt;.grid-container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;@include&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt; clearfix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;-15&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;margin-left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;-15&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;  &lt;span class=&quot;nc&quot;&gt;.grid-element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;min-height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:768px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:nth-child&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;2n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;clear&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;768px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:992px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:nth-child&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;4n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;clear&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;992px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:nth-child&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;6n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;clear&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&lt;p&gt;A cool alternative to have these &#39;cleared&#39; rows without using floats and the clear property if to &lt;a href=&quot;http://www.vanseodesign.com/css/inline-blocks/&quot; target=&quot;_blank&quot;&gt;turn every element into an inline-block&lt;/a&gt; inside those lines. This would even work with elements of random widths, besides the random heights that we had before.&lt;/p&gt;
&lt;p&gt;It feels a little hacky, since we need to eliminate the space between the elements using negative margins, or in this case settting the font size to cero in the container and restoring it to its former value inside the columns. But then again, we use all kinds of hacks to clear floats everywhere, this one doesn&#39;t seem too bad.&lt;/p&gt;&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-scss&quot; data-lang=&quot;scss&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.grid-container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;-15&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;margin-left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;-15&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;  &lt;span class=&quot;nc&quot;&gt;.grid-element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:inline-block&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;vertical-align&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;14px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;min-height&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;1px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;15px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;media&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:768px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;768px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:992px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;992px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&lt;p&gt;Lastly, we can rejoice in the flexbox layout to achieve the same effect, with the side benefit of getting columns of the same height&lt;/p&gt;&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-scss&quot; data-lang=&quot;scss&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.grid-container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;flex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;flex-wrap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;wrap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;flex-direction&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;-15&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;margin-left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;-15&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;.grid-element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;min-height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:768px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;768px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;992px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;To see all this in action:
&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;p data-height=&quot;440&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;zGxKde&quot; data-default-tab=&quot;result&quot; data-user=&quot;fsainz&quot; class=&#39;codepen&#39;&gt;See the Pen &lt;a href=&#39;http://codepen.io/fsainz/pen/zGxKde/&#39;&gt;Boostrap responsive resets + Custom grids&lt;/a&gt; by Fernando Sainz (&lt;a href=&#39;http://codepen.io/fsainz&#39;&gt;@fsainz&lt;/a&gt;) on &lt;a href=&#39;http://codepen.io&#39;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;script async src=&quot;//assets.codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>send versus &#39;__send__&#39;</title>
   <link href="http://fsainz.github.com/2014/08/03/send.html"/>
   <updated>2014-08-03T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2014/08/03/send</id>
   <content type="html">&lt;h1&gt;send versus &#39;&lt;strong&gt;send&lt;/strong&gt;&#39;&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;August 3rd, 2014 - Frankfurt&lt;/p&gt;




&lt;p&gt;
  I was wondering how they differed, and it turns out that is a good practive to use &lt;code&gt;__send__&lt;/code&gt; when you ignore whether the object receiving the message could have implemented a &lt;code&gt;send&lt;/code&gt; method on its own.
&lt;/p&gt;




&lt;p&gt;&lt;p&gt; Besides, they ruby interpreter will give you a warning if you try to override &lt;code&gt;&lt;strong&gt;send&lt;/strong&gt;&lt;/code&gt; and it won&#39;t complain if you do the same with &lt;code&gt;send&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;
warning: redefining `&lt;strong&gt;send&lt;/strong&gt;&#39; may cause serious problems
&lt;/pre&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Vagrant not updating Files</title>
   <link href="http://fsainz.github.com/2014/07/25/vagrant-not-updating-files.html"/>
   <updated>2014-07-25T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2014/07/25/vagrant-not-updating-files</id>
   <content type="html">&lt;h1&gt;Vagrant not updating Files&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;July 25th, 2014 - Göttingen&lt;/p&gt;


&lt;p&gt;This has been driving us nuts for almost a year. After switching from rsynced folders to NFS - which provides a more than noticeable speed boost -, we noticed that some files didn&#39;t update on the VM, even after a sequence of carefully executed attempts to load the new version of the file (such as reloading the page like a mad man while crying...).&lt;/p&gt;

&lt;p&gt;Some files appeared to be just cursed, and after using a fresh provisioned VM for some weeks things appeared to get worse. This is hard to verify since it could be a perception issue, and as a project grows with time the number of files naturally increases (which could be also playing a role). We now believe the origin of the problem to be an accumulation of corrupted cache files, which would be coherent with that observation.&lt;/p&gt;

&lt;p&gt;In our Rails code, models and controllers usually got updated with issues, but the css and js files - which are compiled along with multiple related files - were just a nightmare. We started adding lines like &lt;code&gt;console.log &quot;random-number-123-please-work&quot;&lt;/code&gt; and &lt;code&gt;* {background: green !important}&lt;/code&gt; just to quickly assert that the files were being reloaded, and this was so discouraging that we considered giving up on vagrant altogether.&lt;/p&gt;

&lt;p&gt;We have been looking for solutions without much success, I&#39;ll list them beneath just in case they might also help.&lt;/p&gt;

&lt;p&gt;For us this is the magic (and quite horrible) solution:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo su
sync; echo 3 &amp;gt; /proc/sys/vm/drop_caches
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We run &quot;sync&quot; first in order to make sure all cached objects are freed, the next command makes the kernel drop clean caches, dentries and inodes from memory (see this &lt;a href=&#39;http://unix.stackexchange.com/questions/81960/is-sync-before-drop-caches-necessary&#39;&gt;link&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;It is unclear for us what is going on with this cached files, but cleaning them up when we detect the error works like a charm. The &lt;em&gt;hardcore&lt;/em&gt; version of this command would be:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;watch -n1 &quot;sync; echo 3 &amp;gt; /proc/sys/vm/drop_caches&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Which basically flushes the cache every second. &lt;a href=&#39;http://superuser.com/questions/242928/disable-linux-read-and-write-file-cache-on-partition/464382&#39;&gt;Here&lt;/a&gt; there&#39;s a solution to disabled page caching for a given application, but I haven&#39;t tested it yet.&lt;/p&gt;

&lt;p&gt;The other two possible culprits that we read about were the atomic saves in Sublime and the Sendfile option in nginx. We did as they suggested but it wasn&#39;t enough in our case:&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h1&gt;Sublime Text Atomic Save&lt;/h1&gt;

&lt;p&gt;This seems to be related to the NFS not picking up on changes in files whose size stays the same.&lt;/p&gt;

&lt;p&gt;To disable it, go to &gt; Preferences &gt; Settings-User  and add:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{
    &quot;atomic_save&quot;: false
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;h1&gt;Nginx Sendfile&lt;/h1&gt;

&lt;p&gt;Nginx has a sendfile directive that allows to use the Linux kernel’s sendfile operation to read the requested file from disk. This is known to cause problems in VMs (is even listed in the nginx pitfalls section http://wiki.nginx.org/Pitfalls).&lt;/p&gt;

&lt;p&gt;To disabled it just set this line in your nginx.conf:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sendfile off;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;

&lt;p&gt;After a long time searching I couldn&#39;t come up with a better solution than dropping the caches, nor have we found a satisfactory explanation as to why this happen to us so often when updating js and css files (although we suspect that this is connected to the asset pipeline, and the multiple files concerned to update the application.js/css compiled file)&lt;/p&gt;

&lt;p&gt;Here are all the relevant links that I could find on this subject:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#39;https://github.com/mitchellh/vagrant/issues/2768&#39;&gt;https://github.com/mitchellh/vagrant/issues/2768&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#39;http://unix.stackexchange.com/questions/81960/is-sync-before-drop-caches-necessary&#39;&gt;http://unix.stackexchange.com/questions/81960/is-sync-before-drop-caches-necessary&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#39;http://www.linuxatemyram.com/play.html&#39;&gt;http://www.linuxatemyram.com/play.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#39;http://www.conroyp.com/2013/04/25/css-javascript-truncated-by-nginx-sendfile/&#39;&gt;http://www.conroyp.com/2013/04/25/css-javascript-truncated-by-nginx-sendfile/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#39;https://www.sumardi.net/clear-nginx-cache-in-vagrant/&#39;&gt;https://www.sumardi.net/clear-nginx-cache-in-vagrant/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#39;https://github.com/mitchellh/vagrant/issues/351#issuecomment-1339640&#39;&gt;https://github.com/mitchellh/vagrant/issues/351#issuecomment-1339640&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#39;http://serverfault.com/questions/30240/disable-all-disk-caching-for-apache2-on-linux&#39;&gt;http://serverfault.com/questions/30240/disable-all-disk-caching-for-apache2-on-linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#39;http://superuser.com/questions/242928/disable-linux-read-and-write-file-cache-on-partition&#39;&gt;http://superuser.com/questions/242928/disable-linux-read-and-write-file-cache-on-partition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#39;http://serverdown.ttwait.com/que/534507&#39;&gt;http://serverdown.ttwait.com/que/534507&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Faux Cropping with CSS, Jquery and Rails Helpers</title>
   <link href="http://fsainz.github.com/2014/05/10/faux-cropping.html"/>
   <updated>2014-05-10T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2014/05/10/faux-cropping</id>
   <content type="html">&lt;h1&gt;Faux Cropping with CSS, Jquery and Rails Helpers&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;May 10th, 2014 - Göttingen&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/crop_example.jpg&quot;&gt;&lt;/p&gt;

&lt;p&gt;We&#39;ve been using a CSS technique to resize and position an image inside a container as if it had been cropped. The goal was to provide an image to the user as quickly as possible, before the background image processors finished, and this let us make use of the original image for a couple of seconds.&lt;/p&gt;

&lt;p&gt;We are changing to another aproach, and as a way to remember this technique and play a little with gems &amp;amp; plugins, I extracted it to a Jquery Plugin (&lt;a href=&quot;/jquery_faux_crop.html&quot;&gt;Jquery Faux Crop&lt;/a&gt;) and a Rails gem (&lt;a href=&quot;/rails_helper_faux_crop.html&quot;&gt;Rails Helper Faux Crop&lt;/a&gt;).&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Sharing my favorite podcasts with Pagebox</title>
   <link href="http://fsainz.github.com/2014/04/18/sharing-my-favorite-podcasts-with-pagebox.html"/>
   <updated>2014-04-18T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2014/04/18/sharing-my-favorite-podcasts-with-pagebox</id>
   <content type="html">&lt;h1&gt;Sharing my favorite podcasts with Pagebox&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;April 18th, 2014 - Göttingen&lt;/p&gt;


&lt;p&gt;This is an example of what you can do with &lt;a href=&quot;http://www.pagebox.es&quot;&gt;Pagebox&lt;/a&gt;, the new startup we&#39;ve been working on. It&#39;s a SaaS CMS to create lists of posts, links and files which you can organize in multiple levels and embed in your site. It&#39;s not as customizable as other solutions but it&#39;s pretty fast to set up and the search is really smooth, &lt;a href=&quot;http://www.pagebox.es&quot;&gt;give it a try&lt;/a&gt; ;)&lt;/p&gt;

&lt;script type=&#39;text/javascript&#39;&gt;// &lt;![CDATA[
  (function(){
      var e = document.createElement(&#39;script&#39;); e.type = &#39;text/javascript&#39;; e.async = true;
      e.src = &quot;//www.pagebox.es/assets/embeds/parent.js&quot;;
      (document.getElementsByTagName(&#39;head&#39;)[0] || document.getElementsByTagName(&#39;body&#39;)[0]).appendChild(e);
  })();
// ]]&gt;&lt;/script&gt;


&lt;iframe src=&quot;//www.pagebox.es/embeds/f1cb06b6c2d8ef0e838be2c8e6ebb9bfd2207aa7&quot; data-pagebox-id=&#39;f1cb06b6c2d8ef0e838be2c8e6ebb9bfd2207aa7&#39; frameborder=&#39;0&#39; scrolling=&quot;no&quot; style=&quot;width:100%; overflow:hidden;&quot;&gt;&lt;/iframe&gt;

</content>
 </entry>
 
 <entry>
   <title>Detecting untranslated keys in Rails</title>
   <link href="http://fsainz.github.com/2014/02/08/i18n.html"/>
   <updated>2014-02-08T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2014/02/08/i18n</id>
   <content type="html">&lt;h1&gt;Detecting untranslated keys in Rails&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;February 8th, 2014 - Göttingen&lt;/p&gt;


&lt;p&gt;In our last project we are using multiple techniques to avoid deploying with untranslated keys.
Quite often we put off the translations to just before committing since it can get really cumbersome and break your flow.&lt;/p&gt;

&lt;p&gt;One approach is to start those strings with &lt;em&gt;i19&lt;/em&gt; in order to search the project folder for that key (&#39;i18&#39; proved quickly to be a bad idea), but this way you don&#39;t find strings that you forgot to translate to all the languages and those with a wrong scope/name.&lt;/p&gt;

&lt;p&gt;To make sure that you&#39;ve got a translation for every given language, the gem &lt;a href=&quot;https://github.com/tigrish/i18n-spec&quot; target=&quot;_blank&quot;&gt; i18n-spec&lt;/a&gt; it&#39;s pretty handy, it checks that your locale files define the same set of keys.&lt;/p&gt;

&lt;p&gt;For example, if I wanted to check that my locale files &lt;em&gt;preferences.es.yml&lt;/em&gt;, &lt;em&gt;frontpage.es.yml&lt;/em&gt; and &lt;em&gt;preferences.en.yml&lt;/em&gt;, &lt;em&gt;frontpage.en.yml&lt;/em&gt; are consistent between them, I could add this test:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;describe&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;i18n&amp;#39;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;preferences&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;frontpage&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file_prefix&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;describe&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;config/locales/&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file_prefix&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.en.yml&amp;quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;should&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;be_a_complete_translation_of&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;config/locales/&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file_prefix&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.es.yml&amp;quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;describe&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;config/locales/&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file_prefix&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.es.yml&amp;quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;should&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;be_a_complete_translation_of&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;config/locales/&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file_prefix&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.en.yml&amp;quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You could tell rails to raise an exception whenever a missing translation occurs (see &lt;a href=&quot;http://guides.rubyonrails.org/i18n.html#using-different-exception-handlers&quot; target=&quot;_blank&quot;&gt;http://guides.rubyonrails.org/i18n.html#using-different-exception-handlers&lt;/a&gt;), this can be good for testing but we don&#39;t use it in production (where we rather avoid showing a 500 for a missing key), not even in development since it could be really annoying (especially considering that the change in the locale files take sometime to &#39;reload&#39;, and sometimes you have to switch to another language in order to force it)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In development&lt;/strong&gt; we take advantage of our &lt;em&gt;dev bar&lt;/em&gt; (a fixed toolbar with shortcuts and useful info for development) to help the missing translations to stand out. We show a warning label, add an outline class to the html element and log the name of the missing key to the console.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/i18.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;in your view&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-haml&quot; data-lang=&quot;haml&quot;&gt;&lt;span class=&quot;nf&quot;&gt;#dev_tools&lt;/span&gt;
  &lt;span class=&quot;nf&quot;&gt;#translation_missing_warning&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;.alert-box.alert.hidden&lt;/span&gt;
    missing translations&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;em&gt;in your styles&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-sass&quot; data-lang=&quot;sass&quot;&gt;&lt;span class=&quot;nn&quot;&gt;#dev_tools&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;#DDD&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;border-top&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;#CCC&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;fixed&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;text-align&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;right&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;z-index&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9000&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;opacity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;.4&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:hover&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;opacity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;

  &lt;span class=&quot;nc&quot;&gt;.translation_missing_highlight&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;red&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;rgba&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;119&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;119&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;.4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;box-shadow&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;px&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;em&gt;in your javascript&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;.translation_missing&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;each&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;translation_missing_highlight&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Missing translation on&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;#translation_missing_warning&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In order to detect missing translation coming from ajax requests you can add these lines (it only works with modern browsers, which trigger Dom insertion events)&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;body&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;DOMNodeInserted &amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;.translation_missing&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;translation_missing_highlight&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Missing translation on&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;#translation_missing_warning&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;  
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The last thing that we have is an script &lt;strong&gt;in production&lt;/strong&gt; which silently sends an error to &lt;a href=&quot;https://rollbar.com/docs/notifier/rollbar.js/&quot;&gt;Rollbar&lt;/a&gt; if it detects a missing key:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;c1&quot;&gt;// (...) Rollbar app specific params&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;env&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;production&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;w&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;w&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;_rollbar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;_t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;uncaught&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;});};&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;script&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; 
    &lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementsByTagName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;script&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;//d37gvrvc0wt4s1.cloudfront.net/js/1/rollbar.min.js &amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;async&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=!&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;parentNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;insertBefore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);};&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;w&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;w&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;load&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);}&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;w&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attachEvent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;onload&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);}})(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;report_missing_translation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;_rollbar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;title&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot; - (&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;class&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;)&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;.translation_missing&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;each&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;report_missing_translation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;body&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;DOMNodeInserted &amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;.translation_missing&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;report_missing_translation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</content>
 </entry>
 
 <entry>
   <title>Managing CSS 4/4 - Box of Tricks</title>
   <link href="http://fsainz.github.com/2013/12/23/managing-css-tricks.html"/>
   <updated>2013-12-23T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2013/12/23/managing-css-tricks</id>
   <content type="html">&lt;h1&gt;Managing CSS 4/4 - Box of Tricks&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;December 23rd, 2013 - Bayern&lt;/p&gt;


&lt;p&gt;I&#39;ve been coding css for years and I couldn&#39;t explain properly what I&#39;ve been learning. It&#39;s not that I could just start writing on any other topic like if I&#39;ve had a well structured index on my mind to follow, but layouts with css feels specially messy. You learn how to find your way around problems rather than memorizing the specific cross-browser solutions, because that would be like learning by heart the list of bugs solved by a project during years.&lt;/p&gt;

&lt;p&gt;You can spend hours of trial and error till you find the right combination of markup and rules for a list of browsers, and the pros, cons and inconsistent behaviors of all those iterations are somehow lost, you remember which were the parameters to play with and watch out for(negative margins, overflow, position relative, an inner wrapper with max-width:100% ...) but you are likely to repeat that trial and error the next time that you find yourself on a similar situation. And this a language in which a technique to get a 2 columns layout working deserves the name of holy grail...&lt;/p&gt;

&lt;p&gt;Hopefully &lt;a href=&quot;http://philipwalton.github.io/solved-by-flexbox/&quot;&gt;flexbox&lt;/a&gt; will make most of these problems a thing of the past, but in the meantime I&#39;d like to start creating a small personal library of common patterns that work good enough, and that are easy to modify in order to expose the different issues across browsers.&lt;/p&gt;

&lt;p&gt;I started with these three:&lt;/p&gt;

&lt;p data-height=&quot;394&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;rEgzq&quot; data-user=&quot;fsainz&quot; data-default-tab=&quot;result&quot; class=&#39;codepen&#39;&gt;See the Pen &lt;a href=&#39;http://codepen.io/fsainz/pen/rEgzq&#39;&gt;Issue with negative margins &lt;/a&gt; by Fernando Sainz (&lt;a href=&#39;http://codepen.io/fsainz&#39;&gt;@fsainz&lt;/a&gt;) on &lt;a href=&#39;http://codepen.io&#39;&gt;CodePen&lt;/a&gt;&lt;/p&gt;


&lt;script async src=&quot;//codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;


&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p data-height=&quot;394&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;tEgrK&quot; data-user=&quot;fsainz&quot; data-default-tab=&quot;result&quot; class=&#39;codepen&#39;&gt;See the Pen &lt;a href=&#39;http://codepen.io/fsainz/pen/tEgrK&#39;&gt;Media Wrappers&lt;/a&gt; by Fernando Sainz (&lt;a href=&#39;http://codepen.io/fsainz&#39;&gt;@fsainz&lt;/a&gt;) on &lt;a href=&#39;http://codepen.io&#39;&gt;CodePen&lt;/a&gt;&lt;/p&gt;


&lt;script async src=&quot;//codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;


&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p data-height=&quot;394&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;IwcGE&quot; data-user=&quot;fsainz&quot; data-default-tab=&quot;result&quot; class=&#39;codepen&#39;&gt;See the Pen &lt;a href=&#39;http://codepen.io/fsainz/pen/IwcGE&#39;&gt;Floated Media + one line fields (with ellipsis)&lt;/a&gt; by Fernando Sainz (&lt;a href=&#39;http://codepen.io/fsainz&#39;&gt;@fsainz&lt;/a&gt;) on &lt;a href=&#39;http://codepen.io&#39;&gt;CodePen&lt;/a&gt;&lt;/p&gt;


&lt;script async src=&quot;//codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;


&lt;hr /&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;I read a comment on HN about &lt;em&gt;sysvinit&lt;/em&gt; which I think is a great (and sad) reply to those who think that css is pretty good as it is today:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;em&gt;css works only if you combine incredibly low expectations with a bad case of Stockholm syndrome.&lt;/em&gt;
&lt;/blockquote&gt;

</content>
 </entry>
 
 <entry>
   <title>Managing CSS 3/4 - Tools &amp; Tips</title>
   <link href="http://fsainz.github.com/2013/11/15/managing-css-tips.html"/>
   <updated>2013-11-15T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2013/11/15/managing-css-tips</id>
   <content type="html">&lt;h1&gt;Managing CSS 3/4 - Tools &amp;amp; Tips&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;November 15th, 2013 - Göttingen&lt;/p&gt;


&lt;h1&gt;Avoid using the controller name &amp;amp; action as cope&lt;/h1&gt;

&lt;p&gt;That should be a last resource solution. You start adding controller names and (worse) the list of actions to apply to those styles to when different actions belong to different layouts. Besides, from a css point of view, it&#39;s easier to understand what goes with .user_dashboard
than #home_controller.index&lt;/p&gt;

&lt;p&gt;In our rails app, we use &lt;strong&gt;nested layouts&lt;/strong&gt; to have as many layouts as the design requires&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-haml&quot; data-lang=&quot;haml&quot;&gt;# view/layouts/base.html.haml
body{:class=&amp;gt;controller.send(:_layout)}

# view/layouts/dashboard.html.haml
&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;layouts/base&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h1&gt;Use Compass or learn from it&lt;/h1&gt;

&lt;p&gt;Compass is a very well documented library of SASS mixings. Among other things, it&#39;s lets your define which level of legacy support you want before applying the convenient hacks and vendor prefixes. Even if you don&#39;t intend to use it, take a look at the source code to get ideas for your own mixins. A lighweight alternative is &lt;a href=&quot;http://bourbon.io/&quot;&gt;Bourbon&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;Modernizer&lt;/h1&gt;

&lt;p&gt;As state on the page, &quot;Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.&quot;. Instead of checking &lt;a href=&quot;http://caniuse.com/&quot;&gt;can i use&lt;/a&gt; and relying on conditional stylesheets and printing the broswer type and version into a class inside the dom, this library will tell you is the feature is supported (which makes sense, since broswer versions are losing their significance, except of course for...).&lt;/p&gt;

&lt;p&gt;To keep it as small as possible, you can &lt;a href=&quot;http://modernizr.com/download/&quot;&gt;download&lt;/a&gt; a compiled version with only the &quot;checks&quot; that you want to perform. For example, pick &lt;em&gt;background-size&lt;/em&gt; to check if there is support for &lt;code&gt;background-size: cover&lt;/code&gt;, and load a polyfill for this kind of backgrounds if &lt;code&gt;Modernizr.backgroundsize&lt;/code&gt; is false.&lt;/p&gt;

&lt;h1&gt;CSS properties order&lt;/h1&gt;

&lt;p&gt;It&#39;s a good practice to start with those properties affecting the layouts (position, width, padding, float...) and leave the &lt;em&gt;harmless&lt;/em&gt; at the end (color, background, border-radius..). After dealing with stunning IE quirks your paranoia gets to a point in which you start considering every property as a potential offender (good, keep on doing that), but there are rules worse than others. Opacity is absolutely harmless, isn&#39;t it? except if you use a filter for old IE&#39;s and &lt;a href=&quot;http://philipwalton.com/articles/what-no-one-told-you-about-z-index&quot;&gt; it changes the z-index stack order&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another practice that we follow is to &lt;em&gt;go with the flow&lt;/em&gt;, unless there is a good reason the rules add &lt;code&gt;margin-bottom&lt;/code&gt; and &lt;code&gt;margin-right&lt;/code&gt; (or left if the float to the right), but not up or right because that has lead in the past to elements fighting to get closer using negative margins.&lt;/p&gt;

&lt;h1&gt;Use the Chrome Developer Tools&lt;/h1&gt;

&lt;p&gt;Absurdly useful. If I couldn&#39;t use it anymore (or Firebug/Safari dev tools), I&#39;ll quit and go find another occupation. Recently they started allowing you to tweak the html/css while debugging javascript, which let&#39;s you do the neat trick of hovering over an element with your mouse and stopping the js execution calling debugger from the console (it&#39;s useful when your js makes you interface pop and fly away when you just want your DOM to stay still)&lt;/p&gt;

&lt;h1&gt;IE Splitter&lt;/h1&gt;

&lt;p&gt;Your IE has started to utterly ignore your declarations?  After clearing the cache for a thousandth time, may be you have reached the IE(&amp;lt;10) limit of 4095 selectors for file, in which case you should get a css splitter to divide that file in two (for rails we use &lt;a href=&quot;https://github.com/zweilove/css_splitter&quot;&gt;zweilove/css_splitter&lt;/a&gt;)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Managing CSS 2/4 - A GUI for your app</title>
   <link href="http://fsainz.github.com/2013/10/18/managing-css-gui.html"/>
   <updated>2013-10-18T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2013/10/18/managing-css-gui</id>
   <content type="html">&lt;h1&gt;Managing CSS 2/4 - A GUI for your app&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;October 18th, 2013 - Göttingen&lt;/p&gt;


&lt;p&gt;On our last project, we have taken the approach of treating our html/css as a set of visual modules derived from a common library of reusable components. This means that whenever we needed to style a page, we opened up our library showcase and picked the elements we needed. If we were looking for something that wasn&#39;t there, we had to implement it first as an application agnostic module before applying it elsewhere.&lt;/p&gt;

&lt;p&gt;The advantage of going through this step is that it helps think in terms of what the module visually does on its own (since you isolate it from its surroundings within the application), and what role it is going to have among the other components (may be it should be merged into another component, or may his function is already covered by a similar component and it doesn&#39;t make sense to add it)&lt;/p&gt;

&lt;p&gt;Having a library makes you style your pages faster since it gives you one place to look through all the available styles at hand, and leads to reusability. Another advantage is that it acts both as a playground and a test page, now you have one page to load in order to check that the core components of your site look good on IE.&lt;/p&gt;

&lt;p&gt;This is how our library looks:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/gui.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To get some guideance of how to organize and design your own components is useful to check &lt;a href=&quot;http://getbootstrap.com/&quot;&gt;Bootstrap&lt;/a&gt; and &lt;a href=&#39;http://foundation.zurb.com/docs/&#39;&gt;Foundation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Apart from this library there is going to be other styles related to layouts and very specific views. Reusable components can be tricky to design and your pricing table doesn&#39;t need to be one of them.&lt;/p&gt;

&lt;p&gt;Also, there will be plenty of times in which you need a quick hack or you don&#39;t have time (or mental energy..) to document the new component or transform it into a proper reusable element. Patterns are visible after defining half a dozen semi-unrelated classes, and refactor them takes effort.&lt;/p&gt;

&lt;p&gt;For those cases in which you want fix something fast, or you have no idea where to put those lines within the library, we have a &lt;strong&gt;misc.css&lt;/strong&gt; stylesheet. The idea is to condense all the &lt;em&gt;messiness&lt;/em&gt; in just one file instead of leaving them around. This junk draw can be cleaned up time to time much more easily and it makes us feel better.&lt;/p&gt;

&lt;p&gt;Recently I read about a more solid and well explained version of this concept ; ) &lt;a href=&quot;http://csswizardry.com/2013/04/shame-css/&quot; target=&quot;_blank&quot;&gt;shame.css&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think we&#39;ll rename it eventually, but &lt;em&gt;misc&lt;/em&gt; reminds me of this strip:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/home_organization.png&quot; /&gt;
&lt;a href=&quot;http://xkcd.com/1077/&quot;&gt;http://xkcd.com/1077/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our css bundle follows this order:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;sr&quot;&gt;/* COMPASS LIBRARIES */&lt;/span&gt;
&lt;span class=&quot;vg&quot;&gt;$experimental&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;support&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;svg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;compass/utilities/general/hacks&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;compass/css3/border-radius&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;compass/utilities/color/contrast&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;sr&quot;&gt;/* (....) */&lt;/span&gt;


&lt;span class=&quot;sr&quot;&gt;/* BOOTSTRAP, PLUGINS, VENDOR */&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/bootstrap_and_overrides&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;plugins/jquery.Jcrop&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;plugins/icomoon&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;sr&quot;&gt;/* (....) */&lt;/span&gt;


&lt;span class=&quot;sr&quot;&gt;/* OUR MIXINS AND GUI COMPONENTS*/&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/colors&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/utilities&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/typography&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/buttons&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/alerts&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/explains&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/icons&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/placeholders&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/dividers&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/lists&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/navs&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/forms&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/overlay&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/switch&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;gui/media&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;sr&quot;&gt;/* (....) */&lt;/span&gt;



&lt;span class=&quot;sr&quot;&gt;/* LAYOUTS */&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;layouts/frontpage&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;layouts/dashboard&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;layouts/single&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;layouts/web&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;sr&quot;&gt;/* (....) */&lt;/span&gt;



&lt;span class=&quot;sr&quot;&gt;/* SHARED VIEWS */&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;shared/global_header&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;shared/global_footer&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;shared/new_entry&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;shared/entries_editor&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;sr&quot;&gt;/* (....) */&lt;/span&gt;


&lt;span class=&quot;sr&quot;&gt;/* VIEW SPECIFICS */&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;layouts/dashboard/preferences&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;layouts/dashboard/collection_forms&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;layouts/dashboard/feed&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;sr&quot;&gt;/* (....) */&lt;/span&gt;


&lt;span class=&quot;sr&quot;&gt;/* MISC */&lt;/span&gt;
&lt;span class=&quot;sr&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;PUT&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;EVERYTHING&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;MESSY&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;HERE&lt;/span&gt; 
&lt;span class=&quot;sr&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Because&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;misc&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;better&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;than&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;having&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tiny&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;bits&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;all&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;around&lt;/span&gt;
&lt;span class=&quot;sr&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;//x&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kcd&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;com&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1077&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;
&lt;span class=&quot;vi&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;misc&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</content>
 </entry>
 
 <entry>
   <title>Managing CSS 1/4 - OOCS</title>
   <link href="http://fsainz.github.com/2013/09/22/managing-css.html"/>
   <updated>2013-09-22T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2013/09/22/managing-css</id>
   <content type="html">&lt;h1&gt;Managing CSS 1/4 - OOCS&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;September 22nd, 2013 - Göttingen&lt;/p&gt;


&lt;p&gt;CSS tends to chaos easily. As a large set of rules that extend and override each other its tempting just to write a few lines more somewhere that fixes the problem at hand without following a pattern or taking care of their scope and avoiding repetition.&lt;/p&gt;

&lt;p&gt;With code we try to limit the reach and responsibility of every object, we write tests, avoid duplication and surprises like monkey-patching, we split long methods into meaningful chunks and explain and document what it&#39;s needed. With css it seems that we can toss a couple more declarations somewhere, and though it sort of works, this leads to huge files hard to maintain, and hours wasted writing the some code, fighting other rules, and fixing visual bugs which are really tricky to detect.&lt;/p&gt;

&lt;p&gt;There are many ways to improve this. I like specially the ideas behind OOCSS - &lt;em&gt;Object Oriented CSS&lt;/em&gt;, mainly that we should think in terms of modular components and reuse code through mixins and class composition more than class inheritance (so the result is predictable).&lt;/p&gt;

&lt;p&gt;We shouldn&#39;t inherit styles and look like a dangerous clickable button because we are a link inside the last great-grand-child of someone &lt;code&gt;#projects .admin_panel ul li:last-child a&lt;/code&gt; but because we look and behave like a clickable button &lt;code&gt;class=&quot;btn&quot;&lt;/code&gt; and we have a danger &quot;skin&quot; &lt;code&gt;class&quot;btn btn-danger&quot;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Our selectors shouldn&#39;t go any deeper that the necessary to implement their concerns &lt;code&gt;.main-vertical-nav &gt; .active &gt; a&lt;/code&gt;, and we should avoid to overspecify our declarations and the use of &lt;code&gt;!important&lt;/code&gt;, with leads to a &lt;em&gt;specificity wars&lt;/em&gt; in which we desperately try to win over an almost identical rule written by us three months ago.&lt;/p&gt;

&lt;p&gt;When you think about components rather than about the semantically meaningful pieces of your application you tend to identify reusable patterns more easily. For example if you have different kinds of headers instead of naming and targeting them like h1.post-title, .profiles_list h1, #account-settings .main_header h1.title .. etc, define three styles of headers (h1, h1.primary, h1.secondary) that look the same no matter where they are. A sign that this leads to reuse is that you could take this concept to another project and keep the names and declarations and just change their properties.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;www.stubbornella.org/‎&quot;&gt;Stubbornella&lt;/a&gt; explains the advantages of thinking in components versus semantic classes and the core concepts of OOCSS in her talk &lt;strong&gt;&lt;a href=&quot;http://es.slideshare.net/stubbornella/our-best-practices-are-killing-us&quot; target=&quot;_blank&quot;&gt;Our Best Practices Are Killing Us&lt;/a&gt;&lt;/strong&gt; , and in this &lt;a href=&quot;https://github.com/stubbornella/oocss/wiki&quot;&gt;wiki&lt;/a&gt; she talks about the two main concepts of OOCSS:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Separate structure and skin&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This means to define repeating visual features (like background and border styles) as  separate “skins” that you can mix-and-match with your various objects to achieve a large  amount of visual variety without much code.&lt;/p&gt;

&lt;p&gt;Separating structure and skin can also mean using classes to name your objects and their &gt; components, rather than relying solely on the semantics of HTML. For example, the media  object is named with &lt;code&gt;class=&quot;media&quot;&lt;/code&gt;, and its components are named with &lt;code&gt;class=&quot;img&quot;&lt;/code&gt; (for the image/video component) and &lt;code&gt;class=&quot;bd&quot;&lt;/code&gt; (for the body/text component).&lt;/p&gt;

&lt;p&gt;By referencing these classes in your stylesheets (say, rather than directly styling the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; element), your HTML can be flexible. For instance, if a new media element were to  take off in the next few years (e.g. &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt;), it could be integrated into the HTML without  having to touch the CSS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Separate container and content&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Essentially, this means “rarely use location-dependent styles”. An object should look the  same no matter where you put it. So instead of styling a specific &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; with &lt;code&gt;.myObject h2 {...}&lt;/code&gt;, create and apply a class that describes the &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; in question, like &lt;code&gt;&amp;lt;h2 class=&quot;category&quot;&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This gives you the assurance that: (1) all unclassed &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt;s will look the same; (2) all elements with the category class (called a mixin) will look the same; and 3) you won’t need to create an override style for the case when you actually do want &lt;code&gt;.myObject h2&lt;/code&gt; to look like the normal &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;

&lt;iframe src=&quot;http://www.slideshare.net/slideshow/embed_code/7451831&quot; width=&quot;580&quot; height=&quot;480&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; scrolling=&quot;no&quot; style=&quot;border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px&quot; allowfullscreen webkitallowfullscreen mozallowfullscreen&gt; &lt;/iframe&gt;


&lt;p&gt; &lt;div style=&quot;margin-bottom:5px&quot;&gt; &lt;strong&gt; &lt;a href=&quot;https://es.slideshare.net/stubbornella/our-best-practices-are-killing-us&quot; title=&quot;Our Best Practices Are Killing Us&quot; target=&quot;_blank&quot;&gt;Our Best Practices Are Killing Us&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&quot;http://www.slideshare.net/stubbornella&quot; target=&quot;_blank&quot;&gt;Nicole Sullivan&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Using console group for better javascript debugging</title>
   <link href="http://fsainz.github.com/2013/09/21/using-console-group-for-better-debugging.html"/>
   <updated>2013-09-21T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2013/09/21/using-console-group-for-better-debugging</id>
   <content type="html">&lt;h1&gt;Using console group for better javascript debugging&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;September 21st, 2013 - Göttingen&lt;/p&gt;




&lt;iframe width=&quot;580&quot; height=&quot;360&quot; src=&quot;//www.youtube.com/embed/-WpDN2k7vbU?feature=player_detailpage&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;


&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Rebecca Murphey gave this talk at JSConfUS 2013 on Optimizing for Developer Delight and show how to use &lt;a href=&quot;https://developers.google.com/chrome-developer-tools/docs/console-api#consolegroupobject_object&quot;&gt;console.group&lt;/a&gt; to get a meaningful nested output of what&#39;s going on on your application, this combined with different logging levels is way better that what we are currently doing of a myriad of console.logs which get really hard to scan.&lt;/p&gt;

&lt;script async class=&quot;speakerdeck-embed&quot; data-slide=&quot;13&quot; data-id=&quot;df8c3220aad10130310a024791ff2675&quot; data-ratio=&quot;1.2994923857868&quot; src=&quot;//speakerdeck.com/assets/embed.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>Icomoon and other icon font tools</title>
   <link href="http://fsainz.github.com/2013/09/21/icomoon-and-other-icon-font-tools.html"/>
   <updated>2013-09-21T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2013/09/21/icomoon-and-other-icon-font-tools</id>
   <content type="html">&lt;h1&gt;Icomoon and other icon font tools&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;September 21st, 2013 - Göttingen&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/icomoon.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Icon fonts are our prefered way of dealing with icons since they became well supported, &lt;a href=&quot;http://css-tricks.com/examples/IconFont/&quot; target=&quot;_blank&quot;&gt;icon fonts are awesome&lt;/a&gt; in the way that you can scale them at will while remaining sharp, and change their color and shadows. They also have a small size that you can make smaller if you reduce them to only the glyphs you need, and provide a more convenient bundle than css sprites.&lt;/p&gt;

&lt;p&gt;If flat and basically monochrome icons fit with your site they are great solution, and there is also a little hacky trick to get three colors in one icon element combining the pseudo classes :before and :after and taking advantage of &lt;em&gt;Semantic Ligatures&lt;/em&gt; using this technique : &lt;a href=&quot;http://blogs.esri.com/esri/arcgis/2013/08/16/three-color-semantic-icon-fonts/&quot;&gt;http://blogs.esri.com/esri/arcgis/2013/08/16/three-color-semantic-icon-fonts&lt;/a&gt;.  A great example are the &lt;a href=&quot;http://nikolaswise.github.io/devicons/&quot;&gt;devicons&lt;/a&gt; by the same author (nikolaswise).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/dualicons.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The are some great sites to get free fonts (&lt;a href=&quot;http://fortawesome.github.io/Font-Awesome/&quot;&gt;FontAwesome&lt;/a&gt;, &lt;a href=&quot;http://fontello.com/&quot;&gt;Fontello&lt;/a&gt;, &lt;a href=&quot;http://icomoon.io/&quot;&gt;IcoMoon&lt;/a&gt;, &lt;a href=&quot;http://zurb.com/playground/foundation-icons&quot;&gt;Zurb&lt;/a&gt;, ...) and affordable ones (&lt;a href=&quot;http://symbolset.com/icons&quot;&gt;SymbolSet&lt;/a&gt; and &lt;a href=&quot;http://icomoon.io/&quot;&gt;IcoMoon&lt;/a&gt; too)&lt;/p&gt;

&lt;p&gt;Fontello and IcoMoon showcase mutiple fonts and let you pick the icons you want and combine them in a single font that you can download. Both tools are great but IcoMoon is just amazing.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;IcoMoon&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;IcoMoon lets you import the popular free fonts (such as fontawesome or entypo) into their &lt;a href=&quot;http://icomoon.io/app/&quot;&gt;app&lt;/a&gt; and purchase their own premium packs (they have a &lt;em&gt;Ultimate Package&lt;/em&gt; with 1266 dual tone icons for $59, not bad)&lt;/p&gt;

&lt;p&gt;What its create is that you can combine these fonts with your own icons (with you upload in svg format):&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/icomoon2.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can also perform basic editing like rotations, flips and scaling up and down&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/icomoon3.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And it download your package allow with the code, everything for free.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>to have and not_to have in capybara gotcha</title>
   <link href="http://fsainz.github.com/2013/06/08/to-have-and-not-to-have-in-capybara-gotcha.html"/>
   <updated>2013-06-08T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2013/06/08/to-have-and-not-to-have-in-capybara-gotcha</id>
   <content type="html">&lt;h1&gt;to have and not_to have in capybara gotcha&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;June 9th, 2013 - Göttingen&lt;/p&gt;


&lt;p&gt;We were writing some tests to make sure that same elemets were showed on the
page only under certain circunstances when we found a seemingly contradictory behaviour of the &lt;em&gt;have_content&lt;/em&gt; matcher.&lt;/p&gt;

&lt;p&gt;We had an scenario involving loading more content from an ajax request
similar to this:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# test.html.haml&lt;/span&gt;

&lt;span class=&quot;ss&quot;&gt;:javascript&lt;/span&gt;
  &lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
    &lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;#load_btn&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
     &lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;#foo&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;/dev/bar&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;button_tag&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;load&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:&amp;quot;load_btn&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;#foo&lt;/span&gt;


&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# dev_controller.rb&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;bar&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;new content&amp;quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;On our test we were checking that the response was showed on the page:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# test.rb&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;describe&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Capybara test&amp;quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;should be able to find an element&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;visit&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;/dev/test&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;#load_btn&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;expect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;have_content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;new content&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;To verify that we were indeed testing this we tried to fail the test matching the opposite:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;should be able to find an element&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;visit&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;/dev/test&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;#load_btn&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;expect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;have_content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;new content&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;but this test passes smoothly. Actually, you can put both opposite
expectations together and the test will pass:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;should be able to find an element&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;visit&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;/dev/test&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;#load_btn&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;expect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;have_content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;new content&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;expect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;have_content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;new content&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;What gave us the clue about what was happening is that changing the order
makes the test fail:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;should be able to find an element&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;visit&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;/dev/test&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;#load_btn&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;expect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;have_content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;new content&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;expect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;have_content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;new content&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;It seems that capybara waits for the request to finish when the
expectation fails but moves along happily if it passes.&lt;/p&gt;

&lt;p&gt;To actually test that the new content wasn&#39;t being loaded, we had to
force capybara to wait before evaluating the assertion:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# This test fails as intended:&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;should be able to find an element&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;visit&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;/dev/test&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;#load_btn&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;wait_until&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;evaluate_script&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;$.active&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;expect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;have_content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;new content&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</content>
 </entry>
 
 <entry>
   <title>6 months programming remotely</title>
   <link href="http://fsainz.github.com/2013/04/27/6-months-programming-remotely.html"/>
   <updated>2013-04-27T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2013/04/27/6-months-programming-remotely</id>
   <content type="html">&lt;h1&gt;6 months programming remotely&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;April 27th, 2013 - Göttingen&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/mi_setup.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We had been working remotely in several occasions over the last two years, but it wasn&#39;t until the last six months that we became full time remote workers. Overall, it&#39;s been a great experience and our productivity it&#39;s better than ever, but there are also some inconveniences and things to watch out for.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In regard to productivity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First of all, we have more solid hours. I used to spend two hours a day
commuting, now I take a look at my feeds while having breakfast and I&#39;m ready to go. Of course you spend some time talking about not work related things when your teammate logs in (which is something good), but I find that time needed just to start is significantly shorter compared to arriving at the office.&lt;/p&gt;

&lt;p&gt;And during these hours, I&#39;m much more focused on what i&#39;m doing. Our previous workplace was an opened
shared space in which really nice people came and go continuously and
talked to us, but even with fewer people I find it hard not to
overhear what they are working on and start thinking about it.&lt;/p&gt;

&lt;p&gt;I love that we can pair program and
discuss a topic in group and then immediately focus on a task alone without
distractions. It&#39;s like having a switch in a office to teleport you
between the meeting room and a private bureau.&lt;/p&gt;

&lt;p&gt;It also helps a lot to get the most out of those hours than i&#39;m well
rested: I don&#39;t have to struggle my way across subways, traffics jams and steep
streets, I can rest my head at lunch, and I can even have a 15 minutes nap
if i really need it - not being able to do this always struck me as something visibly
counterproductive. Now I can fit
some sport in the middle of the day to stretch out, clear my mind, have
a shower and start working again with energy.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt; about knowledge sharing &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Working remotely doesn&#39;t mean working isolated, there are multiple ways to share ideas and though it&#39;s true that you lose some of those which come through casual interactions, you have to consider how much you get out of plenty of erratic background conversations while trying to focus on a problem, compared to the fewer and intentional conversations that you have remotely while working without distractions.&lt;/p&gt;

&lt;p&gt;Having said that, you do have to pay attention to communicate through chats, mails, phone calls, screensharing.. there&#39;s going to be somethings that you don&#39;t say out loud, but there&#39;s also a good side on thinking about an issue first and then asking than saying the first thing that comes to your mind before putting some thought into it.&lt;/p&gt;

&lt;p&gt;I find it important to &lt;em&gt;keep the connection alive&lt;/em&gt;, It&#39;s nice to see the
green lights on the group chat even if we talk asynchronously. We check with each other early on the morning and quite often after lunch, and I tend to start working earlier and leave earlier but we share most of the work hours during the week.&lt;/p&gt;

&lt;p&gt;We wouldn&#39;t be able to do much without some good tools in place: we use tmux+vim and ichat screensharing for pair programming, hipchat for group chat, google talk for quick calls, google hangouts for group video calls, github for code, pivotal tracker for tasks, referema for the knowledgebase, google drive for documents that we want edit collaboratively, dropbox for the rest of them, and of course emails.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;  your home as your office &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;this can depend greatly on who you live with, but in any case the best thing its too have your own space in which it&#39;s clear for everyone that you are working. You are going to find yourself taking advantage of short breaks to do the laundry, wash the dishes or talk to your family, but since of the commons problems for remote workers is not doing enough breaks and getting up of the chair, this is actually not an issue.&lt;/p&gt;

&lt;p&gt;One of the inconveniences is that it&#39;s harder to stop working and disconnect, some tips
would be to have your office in a separate room or at least not in your
bedroom, and try to have a more or less fixed schedule or at least a fixed upper limit.
It&#39;s hard to have dinner while watching the code you were working
on on your laptop 3 meters away from the table, you have to make an
effort to leave it for the day, even when you are so engaged in the problem
you are doing that you want to &lt;em&gt;cheat&lt;/em&gt; and do a little more when
nobody is looking.&lt;/p&gt;

&lt;p&gt;On the bright side, you can have your office setup as you want, your
table will have just the right amount of free space, monitors, papers
and mugs as you feel comfortable with. No more cleaning service asking
you to leave your desk to clean while you are coding or fights about the
dirty cups in the sink and complains about a lousy internet
connection of a coworking place. Get the best connection you can find, a good router, put on some music, make your working space as
optimized and comfortable as you like it to be.&lt;/p&gt;

&lt;p&gt;This is a place in which you feel happily working on a sunday night, compare it to working almost alone on a sunday in an larger office space with your headphones knowing that you need an hour to get home afterwards.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt; no fixed hours &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This may sound like saying &quot;working anytime you want&quot;, where it is actually much closer to
mean &quot;working all the time&quot;. That&#39;s one of the things to watch out
for, if you enjoy what you do, if it leaves you hanging on a problem until you fix it, or if you just have a lot of time
pressure, you lack the time and location restrains that help you separate
work time from the rest of your life, and you can start getting burned-out without
noticing it.&lt;/p&gt;

&lt;p&gt;I find it useful to have a routine even if its a flexible one, which
includes shared team hours, an upper limit to disconnect on a regular
basis and doing intentionally less on weekends. The extra hours you get
everyday and the flexibility let&#39;s you go fit other activities like
learning languages or doing sports while getting enough sleep.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt; too few distractions and too much time on the chair &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I went from having a lot of distractions to almost none, and I realized that when
someone talked to me via chat or phone call for something not related to
work it felt like a horrible diversion. I changed my mind about this but I still see that I
don&#39;t check on how other friends are doing as often as i should.&lt;/p&gt;

&lt;p&gt;In regard to team work, there&#39;s a tendency to communicate more
asynchronously through chat and emails, if someone asks you to take a
look at something and you need a minute to finish what you were doing,
you say &#39;i&#39;ll be there in a minute&#39; more often than you would do in
person, which makes sense to me.&lt;/p&gt;

&lt;p&gt;What it&#39;s more problematic is the fact that you can be hours motionless in
your chair, not even moving your eyes off the screen. This is already bad in an
office but it can get worse when there isn&#39;t anyone around who makes
you get up and take a break. I&#39;m paying every time more attention to
working in a healthy way, since spending the whole day with a laptop it&#39;s
proving to be pretty unhealthy for my neck and back.&lt;/p&gt;

&lt;p&gt;I&#39;m using &lt;a href=&quot;https://itunes.apple.com/us/app/breaktime/id427475982?mt=12&quot; target=&quot;_blank&quot;&gt;BreakTime&lt;/a&gt; to schedule breaks and remind me to stretch out, go grab something to drink and move my legs around the house, and I go running on alternate days. Doing sport regularly seems to be in my case the most important thing to avoid position related pains, and i love that i can fit it easily on my daily schedule.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/salir_a_correr.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt; on motivation and teamwork &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;these have been some of our experiences:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You have to avoid working continously the whole week because this will slowly exhaust you.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You have to pay attention to your social life, and do other things that you love. This will make you more motivated in general, work included.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The goal of your daily work is to show something good and useful and get things done, nobody is going to watch over your shoulder and check the hours you were sitting on a chair &lt;a href=&quot;http://www.quora.com/Career-Advice/What-are-your-favorite-methods-for-looking-busy-at-work&quot; target=&quot;_blank&quot;&gt;looking busy&lt;/a&gt;. This doesn&#39;t mean that you only share completed tasks, you also need to share frustrations - the fact that something it&#39;s taking you a hard time - and explain and get feedback on
what you are doing. Working too many hours without checking with someone can make you feel lost or lead you to be too perfectionist on a task that might not be that important. Walking someone through your documents and code commits, and discussing what you are doing is a good way to avoid this.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It&#39;s good to notice the presence of the team throughout the day. Small things like the green lights and jokes on the group chat helps you to feel connected, hangouts and voice calls are really useful, and pair programming is the best thing that we do in terms of being engaged, sharing ideas and having fun.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;br /&gt;
&lt;strong&gt; working in person &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes you miss the personal contact, at least once a week i&#39;d like to be able to teleport to a shared workplace for some hours. If you
combine working remotely with working abroad, then you also miss meeting your close friends after work, but that&#39;s another story.&lt;/p&gt;

&lt;p&gt;Working in person helps you analyse a problem by sketching quickly a few things on a paper or whiteboard, but recently we&#39;ve been using &lt;a href=&quot;https://www.lucidchart.com/&quot; target=&quot;_blank&quot;&gt;LucidChart&lt;/a&gt; on google drive to draw some diagrams collaboratively, and though it&#39;s slower than pen and paper we end up with more detailed documents that are much easier to share and update.&lt;/p&gt;

&lt;p&gt;It&#39;s clear than seeing other people faces gives a you a better insight into how they are feeling. Voice calls and hangouts are a decent substitute but it&#39;s good to meet in person time to time (beers as emoticons are not the
same).&lt;/p&gt;

&lt;p&gt;People working in the same place share good moments but also some annoyances and friction. In an office sometimes you wish to have lunch alone watching an episode and disconnecting for a while, or just being able to focus without distractions. And at home you miss some days that were like small hackathons, with several persons around a table full of laptops working, swearing and laughing.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt; to sum it up &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Remote working it&#39;s not for every person or situation but in my case it gives me more hours of productive work while at the same time making it easier to be well rested and practice some sports.&lt;/p&gt;

&lt;p&gt;I could say that there is a 20% of the time in which sharing a physical place would
be more effective (sketching a problem on a whiteboard, asking and watching what they others do more often...), but the other 80% of the time in which you just need be productive tips the scale.&lt;/p&gt;

&lt;p&gt;You need a technique and habits to communicate properly while in an office it would be just a natural thing, and you do miss meeting in
people in person time to time. The ideal for me would be to have a shared space 15-30 min away to work there occasionally while working
remotely the rest of week.&lt;/p&gt;

&lt;p&gt;I have to get better at keeping in contact with the all the people who I can&#39;t meet as often, but I have wasted a huge amount of time commuting and being constantly distracted, and I&#39;m glad that i&#39;m not doing that anymore.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Edit:These are the resources that I&#39;ve been collecting on remote working &lt;/em&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;script type=&#39;text/javascript&#39;&gt;// &lt;![CDATA[
  (function(){
      var e = document.createElement(&#39;script&#39;); e.type = &#39;text/javascript&#39;; e.async = true;
      e.src = &quot;//www.pagebox.es/assets/embeds/parent.js&quot;;
      (document.getElementsByTagName(&#39;head&#39;)[0] || document.getElementsByTagName(&#39;body&#39;)[0]).appendChild(e);
  })();
// ]]&gt;&lt;/script&gt;


&lt;iframe src=&quot;//www.pagebox.es/embeds/c82bdafcfe7a97e00a3aee42160bc3c25c582ab5&quot; data-pagebox-id=&#39;c82bdafcfe7a97e00a3aee42160bc3c25c582ab5&#39; frameborder=&#39;0&#39; scrolling=&quot;no&quot; style=&quot;width:100%; overflow:hidden;&quot;&gt;&lt;/iframe&gt;

</content>
 </entry>
 
 <entry>
   <title>Readings on Pricing</title>
   <link href="http://fsainz.github.com/2013/01/15/readings-on-pricing.html"/>
   <updated>2013-01-15T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2013/01/15/readings-on-pricing</id>
   <content type="html">&lt;h1&gt;Readings on Pricing&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;January 15th, 2013 - Madrid&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/pricing.jpeg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;37signals published a small post about &quot;how to price something&quot; which contains just a couple of hints&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://37signals.com/svn/posts/3394-how-to-price-something&quot;&gt;http://37signals.com/svn/posts/3394-how-to-price-something&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;but it lead to a discussion on HN in which they referred to some more in-depth articles:&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt; Joel Spolsky : Camels and Rubber Duckies &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.joelonsoftware.com/articles/CamelsandRubberDuckies.html&quot;&gt;http://www.joelonsoftware.com/articles/CamelsandRubberDuckies.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt; Neil Davidson: Don&#39;t Just Roll The Dice &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://neildavidson.com/download/dont-just-roll-the-dice/&quot;&gt;http://neildavidson.com/download/dont-just-roll-the-dice/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;where you can &lt;a href=&quot;http://neildavidson.com/download/dont-just-roll-the-dice/dontjustrollthedice/&quot;&gt;download the pdf &lt;/a&gt; in a kindle/smartphone friendly format.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;this one is also very interesting:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt; Chaotic Flow: SaaS Sales Models - Strategic and Organizational Choices &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://chaotic-flow.com/saas-startup-strategy-three-saas-sales-models/&quot;&gt;http://chaotic-flow.com/saas-startup-strategy-three-saas-sales-models/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;they also have a &lt;a href=&quot;http://chaotic-flow.com/media/saas-sales-models.pdf&quot;&gt;pdf&lt;/a&gt;
&lt;br /&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Natural Ergonomic Keyboard 4000 on the mac with a twist</title>
   <link href="http://fsainz.github.com/2013/01/12/Natural-Ergonomic-Keyboard-on-the-mac-with-a-twist.html"/>
   <updated>2013-01-12T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2013/01/12/Natural-Ergonomic-Keyboard-on-the-mac-with-a-twist</id>
   <content type="html">&lt;h1&gt;Natural Ergonomic Keyboard 4000 on the mac with a twist&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;January 12th, 2012 - Madrid&lt;/p&gt;


&lt;p&gt;I got a &lt;a href=&quot;http://www.microsoft.com/hardware/en-us/p/natural-ergonomic-keyboard-4000/B2M-00012
&quot;&gt;Microsoft Keyboard 400&lt;/a&gt; three years ago, I wanted to start
resting my wrists while typing and learn to type properly for that
matter.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/keyboard4000.jpeg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I&#39;ve had a problem with this keyboard, there&#39;s not a
spanish version available and mapping the keys in my head for the UK layout while switching to a spanish keyboard and from macs to pcs was always a pain, I kept glancing over the keys time to time and never got over my old typing habits.&lt;/p&gt;

&lt;p&gt;The best solution that I could think of was to get rid of the misplaced key signs and find a way to remap the keys exactly as the spanish macbook&#39;s layout:&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt; Paint it Black &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I wanted a DIY version of &lt;a href=&quot;http://www.daskeyboard.com/model-s-ultimate/&quot;&gt;Das Keyboard Ultimate&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/das_keyboard.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I&#39;ve both a couple of cheap black nail polishes&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/P7273956.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;and applied a thin double layer. So far it&#39;s holding like a charm and it
feels pretty much the same while typing as the non-painted keys.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/P7273948.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt; Remmaping keys from PC to MAC and from UK to Spanish layout &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I tried the Microsoft IntelliType for the mac to make some adjustments but I couldn&#39;t get some keys to work as i wanted, then I found &lt;strong&gt;&lt;a href=&quot;http://pqrs.org/macosx/keyremap4macbook/&quot;&gt;KeyRemap4MacBook&lt;/a&gt;&lt;/strong&gt;, which let&#39;s you do anything you can imagine, it&#39;s free, it&#39;s on github and it has a great documentation and community.&lt;/p&gt;

&lt;p&gt;There&#39;s pleanty of keys to remap, but so far I&#39;m satisfied with these
two settings:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/KeyRemap4MacBook.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The &quot;Sawp Ordinal-indicator and Less-Than&quot; was working well with the 4000, but it was swapping the keys on
my macbook as well. It turns out that you can
&lt;a href=&quot;http://pqrs.org/macosx/keyremap4macbook/document-misc.html.en&quot;&gt; define
multiple configurations&lt;/a&gt; and change from one another from the MenuBar tab.&lt;/p&gt;

&lt;p&gt;But there&#39;s something even better, KeyRemap4MacBook let&#39;s you
&lt;a href=&quot;http://pqrs.org/macosx/keyremap4macbook/xml-devicedef.html.en
&quot;&gt;define a device specific setting&lt;/a&gt; and create a setting for your
keyboard&#39;s Vendor ID and Product ID.&lt;/p&gt;

&lt;p&gt;I put this into my private.xml, and then I discovered that they had it
already listed on their
&lt;a href=&quot;https://github.com/tekezo/KeyRemap4MacBook/blob/version_7.8.0/src/core/server/Resources/devicevendordef.xml&quot;&gt;Prepared Vendor IDs&lt;/a&gt;
and &lt;a href=&quot;https://github.com/tekezo/KeyRemap4MacBook/blob/version_7.8.0/src/core/server/Resources/deviceproductdef.xml&quot;&gt;Prepared Product IDs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
    &amp;lt;?xml version=&quot;1.0&quot;?&gt;
      &lt;root&gt;
        &lt;devicevendordef&gt;
          &lt;vendorname&gt;MICROSOFT_CORPORATION&lt;/vendorname&gt;
          &lt;vendorid&gt;0x045e&lt;/vendorid&gt;
        &lt;/devicevendordef&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    &amp;lt;deviceproductdef&amp;gt;
      &amp;lt;productname&amp;gt;KEYBOARD_4000&amp;lt;/productname&amp;gt;
      &amp;lt;productid&amp;gt;0x00db&amp;lt;/productid&amp;gt;
    &amp;lt;/deviceproductdef&amp;gt;

    &amp;lt;item&amp;gt;
      &amp;lt;name&amp;gt;Swap ordinal-indicator(º) and less-than(&amp;amp;lt;)&amp;lt;/name&amp;gt;
      &amp;lt;identifier&amp;gt;private.remap.spanish_swap_ordinal_indicator_lessthan&amp;lt;/identifier&amp;gt;
      &amp;lt;device_only&amp;gt;DeviceVendor::MICROSOFT_CORPORATION, DeviceProduct::KEYBOARD_4000&amp;lt;/device_only&amp;gt;
      &amp;lt;autogen&amp;gt;--KeyToKey-- KeyCode::SPANISH_ORDINAL_INDICATOR, KeyCode::SPANISH_LESS_THAN&amp;lt;/autogen&amp;gt;
      &amp;lt;autogen&amp;gt;--KeyToKey-- KeyCode::SPANISH_LESS_THAN, KeyCode::SPANISH_ORDINAL_INDICATOR&amp;lt;/autogen&amp;gt;
    &amp;lt;/item&amp;gt;
  &amp;lt;/root&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The explain you how to get those autogen codes, but since they already
had defined this key swap, I went directly to the repo for the  &lt;a href=&quot;https://raw.github.com/tekezo/KeyRemap4MacBook/master/src/core/server/Resources/include/checkbox/languages/spanish.xml&quot;&gt;spanish.xml&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;They seem to have change the &lt;code&gt;--KeyToKey--&lt;/code&gt; to &lt;code&gt;__KeyToKey__&lt;/code&gt; recently, I had to use dashes for the last released version.&lt;/p&gt;

&lt;p&gt;After reloading the private.xml, these are my settings:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/KeyRemap4MacBook2.png&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;Now I need some typing excercises, I trying these ones out:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt; update &lt;/strong&gt; This one is free, it has a ton of keyboard layouts, speed tests and games.&lt;br/&gt;
&lt;strong&gt;&lt;a href=&quot;http://www.typingstudy.com/&quot;&gt;typing-study&lt;/a&gt;&lt;/strong&gt;
&lt;img src=&quot;/images/typingstudy.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://typingclub.com&quot;&gt;typingclub.com&lt;/a&gt;&lt;/strong&gt;
&lt;img src=&quot;/images/typingclub.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://type-fu.com&quot;&gt;type-fu.com&lt;/a&gt;&lt;/strong&gt;
&lt;img src=&quot;/images/typefu.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://typing.io/&quot;&gt;typing-io&lt;/a&gt;&lt;/strong&gt;
&lt;img src=&quot;/images/typing-io.png&quot; /&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>2012 Improvements</title>
   <link href="http://fsainz.github.com/2012/12/21/2012-improvements.html"/>
   <updated>2012-12-21T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2012/12/21/2012-improvements</id>
   <content type="html">&lt;h1&gt;2012 Improvements&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;December 21th, 2012 - Madrid&lt;/p&gt;


&lt;p&gt;These are the most interesting that we incorporated to our development
tools this year:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compass&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/compass-logo.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://compass-style.org/&quot; target=&quot;_blank&quot;&gt;Compass&lt;/a&gt;, a set
of reusable patterns for Sass, is in conjunction with Sass the best
improvement that we&#39;ve ever had in order to maintain a css library that
makes sense. Even if you don&#39;t intend to use it, take a look at the
source code for its mixins in the
&lt;a href=&quot;http://compass-style.org/reference/compass/&quot; target=&quot;_blank&quot;&gt;reference&lt;/a&gt; to get ideas for your own mixins.&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;strong&gt;Twitter Bootstrap&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/bootstrap.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Saves you a ton of time and gives you a good base to build upon. There&#39;s
a second contender on this space which I&#39;ve heard it&#39;s pretty good,
specially handling responsiveness, it&#39;s in our New Year&#39;s resolutions to
check it out: &lt;a href=&quot;http://foundation.zurb.com/&quot; target=&quot;_blank&quot;&gt;Zurb
Foundation 3&lt;/a&gt;&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;strong&gt;Vagrant and Chef&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/vagrant2.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We have to struggle a little bit to get it up and running but now that
we got the hang of it we love it.
As they say on the website, Vagrant lets you
&lt;em&gt;Create and configure lightweight, reproducible, and portable development environments.&lt;/em&gt;, whereas Chef is responsible of handling your provisioning recipes.
It makes the &quot;works on my machine&quot; a thing of the past and it makes you
really easy to deploy and tinker first on your staging local server
before getting to production, which gives us a lot of peace of mind. We
also use Chef to provision a new production machine.&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;strong&gt; Coffeescript &amp;amp; Backbone &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/backbone.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Both frameworks have made our javascript more readable, organized and
far more complex and powerful that we&#39;ve never dared to try to develop.
Slow but steady, seems that all web apps are turning into javascript
apps.&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;strong&gt; Vim + tmux + iterm2 &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/vim-tmux-iterm.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It&#39;s great for remote pair programming, it gives you a real time
experience even with below average connections. The best script that
I&#39;ve seen to set it up is this one:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;brew install https://raw.github.com/adamv/homebrew-alt/master/other/tmux-iterm2.rb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Lately we&#39;ve been enjoying a connection good enough to use the screen share tool trough imessage, and you can actually forget which computer is yours except when neither of you can type nor click for a couple of seconds (it happens time to time).&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;strong&gt; Capybara &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/capybara.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It was about time that we started doing some browser testing, and though
we are still only covering some actions, it feels really good. We have
some timeout issues and our tests are pretty slow, but slow and
cumbersome tests are far better than no tests at all.&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;strong&gt; CodeSchool &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/codeschool_logo_final.png&quot; /&gt;
From Envy Labs, it has made into the top of the list of learning
resources, along with &lt;a href=&quot;http://railscasts.com/&quot; target=&quot;_blank&quot;&gt;railscasts&lt;/a&gt; and &lt;a href=&quot;https://peepcode.com/&quot;&gt;Peepcode&lt;/a&gt;. Really entertaining and practical tutorials, thanks to them we started digging into Backbone.&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;strong&gt; Dev Chrome Tools &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/Google-Developers-Logo.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It just gets better and better, we don&#39;t know how we did frontend
development before (that probably a little unfair to Firebug, which is
also great, but we ended up switching to Chrome for good..). There&#39;s
a great talk from igvita:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.igvita.com/2012/11/14/wait-chrome-devtools-could-do-that/&quot;&gt;Wait, Chrome DevTools could do THAT?&lt;/a&gt;&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;strong&gt; MongoDB &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/mongo-db.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We just finished the courses &quot;Mongo 101 for developers&quot; and &quot;Mongo 102
for DBAs&quot; that 10gen gave online for free on &lt;a href=&quot;https://education.10gen.com&quot;&gt;10genEducation&lt;/a&gt;. We are looking forwarding to taking advantage of this freedom for modeling DBs next year.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Rails https and non-standard ports in vagrant</title>
   <link href="http://fsainz.github.com/2012/10/21/rails-https-and-non-standard-ports-in-vagrant.html"/>
   <updated>2012-10-21T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2012/10/21/rails-https-and-non-standard-ports-in-vagrant</id>
   <content type="html">&lt;h1&gt;Rails https and non-standard ports in vagrant&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;October 21th, 2012 - Madrid&lt;/p&gt;


&lt;p&gt;Our way of dealing with http and https requests from a vagrant machine
was to forward from the guest machine to some higher ports such as 8080
and 8433 and then add some rules to the Mac OSX built-in firewall to
bind 80 to 8080 and 443 to 8443 on the host machine. Thus, the links and
redirects generated by our rails app didn&#39;t need to know anything about the ports
that we were using to connect from our outside world.&lt;/p&gt;

&lt;p&gt;We decided that we wanted to have as many machines and services
running simultaneously as we wanted without having to worry about
conflicting ports, so we adopted another strategy in which we specify
the forwarded ports in a configuration file in our rails app, and we
take care of them as transparently as possible.&lt;/p&gt;

&lt;p&gt;We also wanted rails to generate the proper urls for multiple domains,
so we set a &lt;em&gt;host&lt;/em&gt; header in our nginx directives along with the
&lt;em&gt; X-Forwarded-Proto $scheme&lt;/em&gt; that lets rails know that it&#39;s
dealing with a http or https request.&lt;/p&gt;

&lt;h1&gt;in our nginx server:&lt;/h1&gt;

&lt;pre&gt;&lt;code&gt;location / {
    proxy_pass  http://local_3000;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_redirect off;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To let our app know which are the ports we are using, we set them in a
application.yml file. This file is ignored in our repo so each developer
can set their own ports.&lt;/p&gt;

&lt;h1&gt;config/application.yml&lt;/h1&gt;

&lt;pre&gt;&lt;code&gt;development:
  http_port: 8080 #leave null for 80
  https_port: 8443 #leave null for 443
test:
  http_port: null #leave null for 80
  https_port: null #leave null for 443
production:
  http_port: 9080 #leave null for 80
  https_port: 9443 #leave null for 443
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We load this settings in our application.rb they way that Ryan proposes
in this &lt;a href=&quot;http://railscasts.com/episodes/85-yaml-configuration-revised&quot;&gt;railscast&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;config/application.rb&lt;/h1&gt;

&lt;pre&gt;&lt;code&gt; CONFIG = YAML.load(File.read(File.expand_path(&#39;../application.yml&#39;, __FILE__)))
 CONFIG.merge! CONFIG.fetch(Rails.env, {})
 CONFIG.symbolize_keys!
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Instead of using Rails.application.routes.default_url_options, we define
a method in our ApplicationController in order to have different
defaults depending on the current request scheme.&lt;/p&gt;

&lt;h1&gt;app/controllers/application_controller.rb&lt;/h1&gt;

&lt;pre&gt;&lt;code&gt;def default_url_options(options={})
   port = request.ssl? ? CONFIG[:https_port] : CONFIG[:http_port] 
   options = { :port=&amp;gt; port }
   options
 end

 def default_host_with_port
   &quot;#{url_options[:host]}#{&quot;:#{url_options[:port]}&quot; if url_options[:port]}&quot;
 end

helper_method :default_url_options, :default_host_with_port
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;the first method gives proper defaults for url routes when the kind of
request is preserved, when we want to change for example from a https
request to http we need to be specific:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; my_route_url(:protocol =&amp;gt; &#39;http&#39;, :port=&amp;gt;CONFIG[:http_port])
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;the helper &lt;code&gt;default_host_with_port&lt;/code&gt; replaces the &lt;code&gt;request.host_with_port&lt;/code&gt; that we were using to specify the path to some assets:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  image_tag(&quot;//#{default_host_with_port}/path_to_image&quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The trickiest part was to take care of the redirects. It was unclear for
us how rails was filling in the remaining part of the url every time we
used a &lt;em&gt;redirect_to&lt;/em&gt; to a path instead of a url, and worst of
all, we couldn&#39;t easily change the way other gems handled their redirects,
specially when devise relied on warden to handle the response.&lt;/p&gt;

&lt;p&gt;Fortunately, we could take advantage of the middleware to detect if
we were performing a redirect to another location in our server
and set the proper port before letting the response leave our app.&lt;/p&gt;

&lt;h1&gt;app/middlewate/set_special_ports.rb&lt;/h1&gt;

&lt;pre&gt;&lt;code&gt;class SetSpecialPorts
  def initialize(app)
    @app = app
  end

  def call(env)

   server_name = env[&quot;SERVER_NAME&quot;]

    # execute the request using our Rails app
   status, headers, body = @app.call(env)

    if internal_redirect?(status, headers, server_name)
      [status, {&quot;Location&quot; =&amp;gt; url_with_port(headers[&quot;Location&quot;])}, [&#39;Redirecting you to the new location...&#39;]]
    else
    # just send the response as it is
      [status, headers, body]
    end
  end

  def internal_redirect?(status, headers, server_name)
    uri = URI.parse(headers[&quot;Location&quot;]) if headers[&quot;Location&quot;]
    [300, 301, 302, 307].include?(status) &amp;amp;&amp;amp; uri.try(:host) == server_name
  end

  # add the ports for http and https defined in our CONFIG settings through application.yml
  def url_with_port(url)
    uri = URI.parse(url)
    uri.port = CONFIG[&quot;#{uri.scheme}_port&quot;.to_sym]
    uri.to_s
  end

end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h1&gt;config/application.rb&lt;/h1&gt;

&lt;pre&gt;&lt;code&gt;config.middleware.insert_before &quot;Warden::Manager&quot;, &quot;SetSpecialPorts&quot;
&lt;/code&gt;&lt;/pre&gt;
</content>
 </entry>
 
 <entry>
   <title>Vagrant Issues</title>
   <link href="http://fsainz.github.com/2012/09/16/vagrant-issues.html"/>
   <updated>2012-09-16T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2012/09/16/vagrant-issues</id>
   <content type="html">&lt;h1&gt;Vagrant Issues&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;September 16th, 2012 - Madrid&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/vagrant.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://vagrantup.com/&quot;&gt;Vagrant&lt;/a&gt; is a very useful tool to work develop within virtual environments, which let&#39;s you mimic more precisely your server in any development machine, share the exact same environment between developers and get a new machine ready for development in a faster and more predicatably way.&lt;/p&gt;

&lt;p&gt;We&#39;ve been using it for almost a year now and we&#39;ve compiled this list
of issues and solutions:&lt;/p&gt;

&lt;h3&gt;NFS Problems&lt;/h3&gt;

&lt;blockquote&gt;&lt;p&gt; &quot;Mounting NFS shared folders failed. This is most often caused by the NFS
 client software not being installed on the guest machine. Please verify
 that the NFS client software is properly installed, and consult any resources
 specific to the linux distro you&#39;re using for more information on how to
 do this.&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;In spite of that &quot;most often caused&quot;, that&#39;s never been our case, to
rule it out try this on your vagrant machine:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo apt-get install nfs-common -y
sudo shutdown -r now &amp;amp;&amp;amp; exit
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We had that error message after messing with several boxes at the same
time, and also after copying a vagrant folder from one project to the
other, see &lt;em&gt;wrong virtualbox - vagrant - project association&lt;/em&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;RAILS server behaving very slow, getting to extremely slow when offline&lt;/h3&gt;

&lt;p&gt;from the vagrant website: &quot;In order to keep SSH access speedy even when your host computer can&#39;t access the internet, be sure to set UseDNS to no in /etc/ssh/sshd_config. This will disable DNS lookup of clients connecting to the server, which speeds up SSH connection.&quot;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo bash -c &quot;echo &#39;UseDNS no&#39; &amp;gt;&amp;gt; /etc/ssh/sshd_config&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;to prevent webrick from doing this reverse dns lookup, locate the
webrick/config.rb of your webrick gem and change the line &lt;code&gt;:DoNotReverseLookup =&gt; nil,&lt;/code&gt;
to &lt;code&gt;true&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# sudo vi /usr/local/rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/webrick/config.rb

:DoNotReverseLookup =&amp;gt; true,
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;Interface flags error&lt;/h3&gt;

&lt;blockquote&gt;&lt;p&gt;   SIOCSIFADDR: No such device&lt;br /&gt;
   eth1: ERROR while getting interface flags: No such device&lt;br /&gt;
   SIOCSIFNETMASK: No such device&lt;br /&gt;
   eth1: ERROR while getting interface flags: No such device&lt;br /&gt;
   Failed to bring up eth1.&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;we had this problem some times after packaging. It&#39;s related to the way
ubuntu and debian cache the network interfaces configuration, the MAC of
one developer machine was being stored and causing trouble when other
developer tried to use the same box. To fix it just get ride of this file
&lt;code&gt;/etc/udev/rules.d/70-persistent-net.rules&lt;/code&gt; and restart the machine.
&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;Wrong virtualbox - vagrant - project association&lt;/h3&gt;

&lt;p&gt;Vagrant creates an association between his boxes and the Virtualbox images in vagrant/.vagrant (basically just a string identifying the machine for each environment), if you are unaware of this as we were and copy this file accidentally to other project very weird things can happen.
If your machines are driving you mad and you want to start all over
again, delete your &lt;code&gt;.vagrant&lt;/code&gt;, go to &lt;code&gt; ~/.vagrant.d/boxes &lt;/code&gt; and wipe out your boxes, go to &lt;code&gt;~/VirtualBox\ VMs/
&lt;/code&gt; and trash your images.&lt;/p&gt;

&lt;p&gt;If you don&#39;t want to be so drastic, these commands are useful for
troubleshooting and keeping an eye on orphan machines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;vagrant status&lt;/code&gt; to see the state of your machines and shut
them down if you plan to remove them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;vagrant destroy&lt;/code&gt; to remove the association in .vagrant and
the virtual image.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;vagrant box list&lt;/code&gt; shows your available boxes (those stored in ~/.vagrant.d/boxes)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;VBoxManage list vms&lt;/code&gt; shows the Virtual Box machines (in VirtualBox\ VMs/)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;vagrant destroy box &lt;em&gt;X&lt;/em&gt;&lt;/code&gt; to remove the box &lt;em&gt;X&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt; VBoxManage unregistervm   \&amp;lt;uuid&gt;|\&amp;lt;name&gt; [--delete]&lt;/code&gt; to delete a VM machine&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;For example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;vagrant git:(master) VBoxManage list vms

&quot;vagrant_1340547733&quot; {7cb51e25-9296-464c-8686-43c3c8b4e1a8}
&quot;vagrant_1343747935&quot; {e22b8a76-b0c4-42a9-87cf-68bbce78c804}
&quot;vagrant_1344073912&quot; {1987c417-1d94-4eac-81f8-d9cd89f3b9c8}
&quot;vagrant_1344074484&quot; {5a80d54a-aff9-4ed4-a077-54d6e7213b0b}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;let&#39;s say that the uuid {e22b8a76-b0c4-42a9-87cf-68bbce78c804} is the
one for production specified in your .vagrant:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#.vagrant
{&quot;active&quot;:{&quot;production&quot;:&quot;e22b8a76-b0c4-42a9-87cf-68bbce78c804&quot;,&quot;development&quot;:&quot;a447fdcf-b1ed-4a18-8801-fcb767df0a56&quot;}} 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;you could just type &lt;code&gt;vagrant destroy production&lt;/code&gt; to both the
machine and the key in .vagrant, but if you wanted to do it manually you
could type:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;VBoxManage unregistervm e22b8a76-b0c4-42a9-87cf-68bbce78c804 --delete
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;Vagrant user is being prompted for a sudo password&lt;/h3&gt;

&lt;blockquote&gt;&lt;p&gt;[default] -- v-root: /vagrant
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;You need to edit your sudoers table (see http://vagrantup.com/v1/docs/base_boxes.html, &quot;Setup Permissions&quot;), for example&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# sudo visudo  #edits /etc/sudoers

ALL ALL=(ALL) NOPASSWD: ALL
%staff ALL=(ALL) NOPASSWD: ALL
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;vagrant reload doesn&#39;t work&lt;/h3&gt;

&lt;p&gt;Sometimes is enough ssh&#39;ing your vagrant and restart after a
&lt;code&gt;sudo /etc/init.d/networking restart &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;File owner and permissions going nuts  (????:????)&lt;/h3&gt;

&lt;p&gt;That happenend to us quite often before switching to NFS (that&#39;s the
best solution), alternatively, a restart does also the trick.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;Port Forwarding doesn&#39;t work for certain port numbers&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;Vagrant::Config.run do |config|
  config.vm.define :dev do |dev_config|
    dev_config.vm.box = &quot;orlyboxdev&quot;

    # http://coderwall.com/p/zdnscw
    # this allows vagrant to forward ports between 1 and 1024
    if [&quot;up&quot;, &quot;resume&quot;].include? ARGV[0]
      system %{ sudo sysctl -w net.inet.ip.forwarding=1 } 
      system %{ sudo ipfw add fwd 127.0.0.1,8080 tcp from any to any 80  &quot;in&quot; }
      system %{ sudo ipfw add fwd 127.0.0.1,8443 tcp from any to any 443 &quot;in&quot; }
    end

    dev_config.vm.forward_port 3000, 3000 # web in development
    dev_config.vm.forward_port 443,  8443 # web in development through NGINX with SSL
    dev_config.vm.forward_port 80,   8080 # web in development through NGINX

    # (...) 
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;NS_ERROR_FAILURE&lt;/h3&gt;

&lt;p&gt;If you get this message:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Progress state:
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;try a&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo /Library/StartupItems/VirtualBox/VirtualBox restart
&lt;/code&gt;&lt;/pre&gt;
</content>
 </entry>
 
 <entry>
   <title>Wide Teams</title>
   <link href="http://fsainz.github.com/2012/09/13/wide-teams.html"/>
   <updated>2012-09-13T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2012/09/13/wide-teams</id>
   <content type="html">&lt;h1&gt;Wide Teams&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;September 13th, 2012 - Madrid&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/wideteams.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;This year we&#39;re going to do a lot more of remote work as before and I&#39;ve been trying to hear from other people&#39;s experiences about
their way of communicating and their setup. I found &lt;a
href=&quot;http://itunes.apple.com/us/podcast/wide-teams/id526426688?l=es&amp;mt=2&quot;&gt;this great podcast&lt;/a&gt; from Advi Grimm in which he interviews people
involved in dispersed teams on a weekly basis, and I made myself a few messy notes to talk about them with the people that I work with. It&#39;s far
from a transcript, and I discovered later that Advi is posting
show notes of every episode in his blog &lt;a href=&quot;http://www.wideteams.com/&quot;&gt;wideteams&lt;/a&gt;, but i&#39;ll still keep this as a sort of list of keywords that
remind me of what this people talked about.&lt;/p&gt;

&lt;p&gt;There&#39;s also a &lt;em&gt;Dispersed Team Kick-Start Guide&lt;/em&gt; that you can get &lt;a href=&quot;http://eepurl.com/eULiY&quot;&gt;signing up to the Wide Teams mailing list.&lt;/a&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt; #1 - Interview with Marty Haught&lt;/h3&gt;

&lt;p&gt;distributed teams, distributed works&lt;br /&gt;
standup in the morning&lt;br /&gt;
groupchat campfire, .. who is available, catch on chat that might’ve happen when I was not online&lt;br /&gt;
check with each other during the days&lt;br /&gt;
apple remote desktop&lt;br /&gt;
takes discipline to stay on task&lt;br /&gt;
efficient, people don’t interrupt you so often &lt;br /&gt;
skype&lt;br /&gt;
skype screen sharing is not interactive&lt;br /&gt;
interactive cloud editor..&lt;br /&gt;
trust in your teammates.. specially if you’re not pairing&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#2 - Interview with Anthony Eden&lt;/h3&gt;

&lt;p&gt;Freedom of being able to move from place to place&lt;br /&gt;
Pivotal tracker&lt;br /&gt;
Conscious effort to always be talking to each other&lt;br /&gt;
the biggest challenge is keeping up the task of keeping in touch, not to focus on one thing and forget that the others exits&lt;br /&gt;
email, google talk, phone&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#3 - Interview with Mike Zazaian, Part 1&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;there is business value in the fact that everyone is able to live more liberated lifestyles&lt;br /&gt;
you lose a touch of communication&lt;br /&gt;
the key is rigorous communication, assuming nothing, being on everybody all the time communicating actively, not just writing people&lt;br /&gt;
there are ideas that can be lost, assumed, not communicated&lt;br /&gt;
interpersonal communication&lt;br /&gt;
he thinks that environments are very crucial, it affects him and he likes the chance of choosing where he wants to work every time&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#4 - Interview with Mike Zazaian, Part 1&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;keep everyone in a irc channel&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#5 - Interviews with Hashrocket and Rhomobile&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;paid attention to your setup, they had audio problems and that killed the experience at first&lt;br /&gt;
coding in vim, screen session&lt;br /&gt;
you lose the body language, which is very beneficial (is bad to lose it)&lt;br /&gt;
real audio, microphone, headsets&lt;br /&gt;
you have to over communicate&lt;br /&gt;
they use yammer&lt;br /&gt;
the best internet you can get&lt;br /&gt;
daily standups&lt;br /&gt;
pivotal tracker&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#6 y #7- BohConf Roundtable &lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;in online meetings, everyone gets to their personal computer&lt;br /&gt;
google docs, github&lt;br /&gt;
campfire better than an im client (campfire never leaves somebody out)&lt;br /&gt;
pivotal&lt;br /&gt;
skype screen share&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#8 - Interview with Loren Johnson &lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;geographically isolated area&lt;br /&gt;
he’s the only distributed member of the team&lt;br /&gt;
he loves the mobility both financially and physically&lt;br /&gt;
he wanted to be on a country where he could go hiking everyday&lt;br /&gt;
he went to a rails conf and got a lot of remote work offers&lt;br /&gt;
in the last project he worked on he was rather isolated, he was doing rails and the others flash (it was a game), it would’ve been better if they could’ve meet in person a few times to build team culture&lt;br /&gt;
in another occasion he spent two days working in the same office talking about themselves and that helped a lot... he knows who is him, he has respect for him and interest for what he does&lt;br /&gt;
videochatting helps but its always a little awkward&lt;br /&gt;
when everybody is in the room and he was the only one out he felt his influence was smaller&lt;br /&gt;
the primary issue for him is not working in a distributed team but not having a group of developers on his area to bounce ideas off and hangout in a coffee shop and get that sort of resonance&lt;br /&gt;
the major advantage is quality of life&lt;br /&gt;
he uses basecamp&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#9 - Interview with Michael Bleigh &lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;50 devs, 4 at the office. Campfire. &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#10 - Interview with Aslak Hellesøy&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;standup in the night to discuss the stories that are on the board, spend a couples of weeks together, build trust and understanding. Pick tools to get maximum transparency on what everybody is doing at every time, travel, meet each other, do fun things together to build trust&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#11 - Interview with John McCaffrey&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;remote pair programming.. ping-pong: a guy writes a tests that fails, the other fixes it.. keeping each other engadget, pairing is sort of an exhausting thing, it’s difficult to communicate everything but it’s a better code, the rails community is very good at it&lt;br /&gt;
a day in his life: It might start out with everybody in Campfire, we check and see what we’re doing, posts -24, here’s the things that i did yesterday, the problems i worked on, plus 24, here’s the things that i’m gonna be working on the next 24 hours or so, any outstanding issues or blockers, things that you need somebody else to do, and then, there might be a calling standup to discuss where things are at and if there is a change in priorities, people might look in pivotal tracker to see what stories are available, which are closed, etc, check the build machine, check the app, pick which tasks you are going to work on, look for a pair to join you, may be he works with you on the morning and works in something else in the afternoon, then two people get together using google chat, google voice to start the conversation, and they hook up, may be using teamviewer or skype, sharing their desktop (..) make sure everybody has the latest code, all the tests pass, we are good to go, we know what we’re working on, etc, and then hopefully be able to finish things and deploy the code and go to the QA team, this feature is done ready to be tested...  &lt;br /&gt;
6 people, 4 office 2 remote, work from home friday&lt;br /&gt;
VPN, github, etc.&lt;br /&gt;
start small, start with one person remotely, doing work remotely requires you to be more of an expert, better at communication, better at follow through, better at being proactive and motivated&lt;br /&gt;
you get one week contract as part of your interview, you pair with them remotely on some tasks... figure out if you fit with us and we fit with you, if not, that was fun, moving on&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#12 - Interview with David Rogers&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;RoR, worked from home 90% of the time, now he works with other developers around and &lt;br /&gt;
some of them remote. Campfire. Daily Scrum. Feels more comfortable collocated. If you are starting it really helps to be local, if you have experience remote work has its benefits. Make sure you choose well the people that are working for you&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#13 - Interviews with Jody Alkema and Peter van Hardenburg&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;scrum, pivotal&lt;br /&gt;
positive experience&lt;br /&gt;
takes time to trust that you understand each other, that if you share something online you’re going to be understood&lt;br /&gt;
advantages: you get very talented developers&lt;br /&gt;
quick voice calls are really good&lt;br /&gt;
another heroku guy, after working remote two and a half years, he was happy to move back to an office to keep in touch with other professionals, he says that it would’ve been easier if in his place there had been a community to meet up&lt;br /&gt;
the biggest challenge is pushing away the distractions of home life&lt;br /&gt;
most conversations happen in the irc channel&lt;br /&gt;
advise : develop a good routine, separate your work life from your private life, you need to define well a space and time to work in, it helps if you have a real time collaboration environment with your coworkers&lt;br /&gt;
as an independent remote employee, establishing that space is key to survive&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#14 - Interview with Jim Weirich&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;three different locations: Columbus (16), Cincinnati (2), UK (2)&lt;br /&gt;
remote pairing&lt;br /&gt;
a lot of clients are also remote&lt;br /&gt;
at first very low tech.. emacs with screen in the same unix machine in which they logged in, local browsers, skype sessions.. and he found it to be very important, if he can see the guy he’s pairing with and the expressions on his face.. that gives him a lot of visual information.. if he likes/doesn’t like what you are doing, if he’s nodding, if he’s confused or just think it about it&lt;br /&gt;
lately, ichat for screen sharing, sharing same browser, the downside is the remote guy suffers a little of lag and thats a disadvantage, you have to switch so one is never always the remote&lt;br /&gt;
purchase “skype phones” (amazon), so they don’t have to run skype on their machines, he’s an advocate of having video up during the whole collaboration session.. he much prefers having video on&lt;br /&gt;
challenge: engagement: if you take a break, you go away from the computer and you come back and don’t now if the other guy is back, do you ping him? you don’t wanna annoy him, there is a little bit of social friction with getting started again, so that means that your breaks tend to be a little bit longer, you have to be conscious about it and work against it.. the video phones help in that regard... i come back and seat there and if he’s there we start pairing again&lt;br /&gt;
if he were in Columbus he would rather be collocated&lt;br /&gt;
they have daily video standups&lt;br /&gt;
advise: if its a new team and you haven’t worked together before, get together and do some in person time, with another company he went to california for a week to work with them in the office, to know the kind of interactions that are going on... expend a week together every couple months or so&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#15 - Intridea&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;45 people in the company, also close to 45 locations&lt;br /&gt;
they don’t have clumps of people working together&lt;br /&gt;
for the most part everybody is distributed&lt;br /&gt;
you go where the talent is&lt;br /&gt;
distributed from the beginning of the company, four years ago&lt;br /&gt;
the teams are from 2 to 13&lt;br /&gt;
campfire, teamspeak&lt;br /&gt;
they try to get together once in a while, have some dinner, go out&lt;br /&gt;
it’s working for them, surprisingly they had very few challenges, possible for the kind of people that they hired&lt;br /&gt;
the short commute is great, flexibility, no set hours&lt;br /&gt;
don’t force the communication method to use, allow people to work on the schedule that works for them ensuring some overlap&lt;br /&gt;
ensure that you have someone in the timezone of your client / overlapped&lt;br /&gt;
have trust in your team&lt;br /&gt;
you need to hire selfstarters, selfmotivaters, people that you can trust to be independent, is not for everyone.. you need to hire very motivated people who love what they do&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#16, #17, #18 - Ruby DCamp 2010&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;(several people)&lt;br /&gt;
pretty successful so far&lt;br /&gt;
IM, phone calls, virtual daily standup through email&lt;br /&gt;
skype, vnc&lt;br /&gt;
vpn for demos for the client&lt;br /&gt;
teams who didn’t have solid practices like TDD were a challenge&lt;br /&gt;
when connection fails is horrible&lt;br /&gt;
together is better for discussion, separated better for heads down&lt;br /&gt;
campfire&lt;br /&gt;
other doesn’t like the mail standup idea&lt;br /&gt;
another... I’ve seen emails trying to simulate standups and chatrooms.. but neither work as well in my experience if you have to be distributed as skype or phone or something like that, because I’ve seen people on the online chats who have been only paying attention when it was their turn, they were typing away on their code, that’s a bad thing, the whole point is to get people together&lt;br /&gt;
standups in second life&lt;br /&gt;
standups recorded in youtube for the others to pick up later&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
(several people)&lt;br /&gt;
most distributed teams are usually experienced people&lt;br /&gt;
you have to earn the experience and ability to work distributed the same way that when you’re new you eventually earn the ability to work without pairing 100% of the time, some new people, they just can’t work on their own, they need help every step of the way and eventually they start working away from you a little bit at a time until they work away from you most of the time&lt;br /&gt;
i’ve seen relative new developers tend to not ask questions, either because they think that they will solve it or because they think that they must solve it&lt;br /&gt;
sometimes that’s a good think (you’ve discovered ten wrong ways to do it, which ends up being more valuable that knowing the right way to do it)&lt;br /&gt;
some companies remote pair the whole time&lt;br /&gt;
the importance of having face to face time at the beginning, after you’ve been in proximity, you are “entangled”, the connection is still there, when you talk with them by email “you see their face”&lt;br /&gt;
have a week setting up and trying the collaborations tools that you’re gonna use&lt;br /&gt;
the wonderful thing of pairing is that you can start with it whatever level they are at&lt;br /&gt;
they made an study and the result was that people in different floors in the same building had far worse communication that even the teams spread among different countries, because remote teams made an effort to communicate&lt;br /&gt;
Even people in the same room use chat, campfire.. because of the asynchronicity of the system, not being immediately interrupted&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
(several people)&lt;br /&gt;
lack of productivity dispersion is an scapegoat easy to blame even though it might not be the problem, you have teams where everyone is really on board with being a disperse team, but if there is someone who isn’t on board, especially if he’s on management, he’ll probably exploit some of that and call it “disperse issues” when they are really organizational issues&lt;br /&gt;
customers are in some sense always dispersed &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#19 - Interview with Steven Willmott&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;startup&lt;br /&gt;
half german half english living in barcelona &lt;br /&gt;
people in barcelona, in california, in chicago, a guy living in the mountains, another guy was in galicia, then uk, then france&lt;br /&gt;
dispersed work within a small team pulling in the same direction is easier than being a working remotely as a partial time developer for another company&lt;br /&gt;
15minutes standup meeting about 10:30 in the morning&lt;br /&gt;
pivotal, skype, version control&lt;br /&gt;
weekly delivery cycle for the main product&lt;br /&gt;
generally they work independently&lt;br /&gt;
screen sharing through skype&lt;br /&gt;
customers primarily in US, part in UK, part in Spain&lt;br /&gt;
sales support in california, tech support in spain&lt;br /&gt;
they provide 24h support, they are pretty small so they rotate schedules so there’s always someone around, someone ends up going to be late and other waking up early&lt;br /&gt;
makes a huge different to put a name to a face, make sure people get together every few couples of months minimum&lt;br /&gt;
having more than one people in each location so can get together more often&lt;br /&gt;
a physical place to work together time to time&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#20 - Interview with Thomaz Leite&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;dispersed time, rails&lt;br /&gt;
usa, brazil, portugal&lt;br /&gt;
before he was freelancing, you kind of work dispersed with your client when you’re freelancing. now they work in a distributed team&lt;br /&gt;
http://mumble.sourceforge.net/ Mumble is an open source, low-latency, high quality voice chat software primarily intended for use while gaming.&lt;br /&gt;
they pair one or two hours a day, their goal is to get to pair 50% of the time&lt;br /&gt;
pair with the right persons&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#21 - Interview with Tony Amoyal&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;challenges of working in a distributed team when your product is not as well defined as it could be&lt;br /&gt;
on of the reasons he chose web development is the flexibility to work wherever you want&lt;br /&gt;
he’s a passionate traveler&lt;br /&gt;
different experiences: from three person startup team, to 50 person company where the entire engineer team is remote&lt;br /&gt;
the ability to cook my own food which is healthier &lt;br /&gt;
transportation&lt;br /&gt;
daily meetings to catch up and regroup and write it down in a todo list&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#22 y #23 - Rob Dempsey of LifeOfTheFreelancer.com&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;advi: as some time he realized that he wanted to spend more time at home with this family&lt;br /&gt;
agile practices&lt;br /&gt;
meet the team in person&lt;br /&gt;
have goals for the iteration&lt;br /&gt;
you have to be intentional about it, everything is going to be a little more effort, as long as all the members of team are aware of it and want to make it work, it works&lt;br /&gt;
make sure that the connections happen&lt;br /&gt;
working agreements, having an actual short written list of things like we will report status in the daily meeting everyday, update our IM tool at least once one hour... things to help you remember to keep those lines of communication opened&lt;br /&gt;
you’ve gotta be flexible.. you constantly improve by evaluating frequently the tools and the techniques that you are using and suggesting improvements... dispersed teams are more reliant on that tools and techniques to keep those lines of communication opened. You really have to have retrospectives every couple of weeks or at most every month to talk about what it’s working and what the annoyances are to modify those agreements and tools and try new things&lt;br /&gt;
optimize your processes&lt;br /&gt;
the biggest challenge is to get people feel involved and invested in the project when they are far away &lt;br /&gt;
people are sometimes having a hard time, a bad day, and you don’t know it .. you need other means to know how they feel, act on comments on twitter or facebook, if you have to cheer someone up&lt;br /&gt;
video or voice, you can infer emotions.. with text you can get it wrong, place a call&lt;br /&gt;
advi... with one of his teams he’s not spending enough video time, so he records a video at the end of the night as a status update and send it to them&lt;br /&gt;
skype phones&lt;br /&gt;
people turn off the video because it’s in the middle of their work space, with a dedicated phone you’re more likely to live it on&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#24 - Derek Wade&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;more abstract concerns about communication and cognitive science&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#25 - Jared Goralnick of AwayFind.com&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;distributed teams can succeed, but not startups.. today we talk with a man that doesn’t believe that&lt;br /&gt;
&lt;br /&gt;
different parts of australia, usa, buenos aires.. he works remotely too with his local team&lt;br /&gt;
quality and cost.. it was really hard to find folks for what they were doing (writing something of top of MS Office).. the also found good and less expensive developers&lt;br /&gt;
personal lifestyle of being on the go&lt;br /&gt;
In an startup situation things can get tense and things move quickly.. you need to have report, you need to have good relationships and feel like you are in a team.. people consider that outsourcing and distributed teams are more or less the same but the relationship between the members of the team is quite different.. in a relationship in which you ask someone to build something and then stop, that typically outsourcing and people don’t usually take ownership and usually they don’t take pride in it... in a relationship in which you build things continously and you are part of the team it really doesn’t matter where you are&lt;br /&gt;
you need to be able to treat your team wherever they are as if they were working aside.. you need to have vector, to need to able to assign them things in the same way that you would assign to someone that is local, so why is it that you would just tell someone who’s working in the same city “hey, i just need a bottom down, something that just works”, if that’s the kind of spec that you’d give someone who is local, that should be the same kind of spec that you would give to somebody else, and what often happens is that people find themselves overspec.. treated in a very different way... and i’m not saying that you should not write detailed specifications .. it just that whatever the balance you want to achieve with your communication, you should make sure that you achieve the same sort of balance with team that’s working further away.. and that’s harder, because you’re not talking to them while sitting aside at lunch&lt;br /&gt;
you need to work to achieve that &lt;br /&gt;
he looks for people with previous experience working remotely&lt;br /&gt;
the need to be able to speak up, to comment when they run into issues&lt;br /&gt;
besides their ability to communicate, is his ability to work independently, which is something that you can only judge from people who’ve done it in the past, the first time that someone tries to work from home, some people do it very poorly, they are not motivated enough if they are not in an office&lt;br /&gt;
you need to hire people and let go off people, if you hire someone and the relationship doesn’t grow, if it doesn’t work you have to stop&lt;br /&gt;
the feedback loop has to be a conscious  effort (if you like or don’t like what he’s doing) as opposed to passive “i’ll look at the next version” kind of thing, if you guys what to known if you are in the same page&lt;br /&gt;
being clear and realistic about the deadlines really does help to know whether there’s progress &lt;br /&gt;
constant feedback is the best card&lt;br /&gt;
when a remote team you don’t have the same exact time overlap as with office hours, you can’t expect them to be there exact hours, part of the point of being remote is having some flexibility, people go to lunch, etc&lt;br /&gt;
you need to rely a little bit more about scheduling a meeting with a colleague, you rely a little bit more on calendars and that kind of staff... you need to get better at scheduling things as opposed as just expecting them to be there... now, I would expect that if i’m trying to reach someone of my team, and i message them 9am, at noon, at... i hope that at least one/two of these times they are going to be at the computer&lt;br /&gt;
People shouldn’t specifically choose a remote team unless there is some reason, that can be financial, that kind be for quality, it can be for lifestyle, if there is not on of this reason and there is a challenge in being remote, then being together in the same place is good. A better model is to have a core location to create a culture and they want to work remotely, they can do it all the time, if they want to work at the office, they can do it all the time.. that core of people, face to face, is very useful&lt;br /&gt;
one of the advantages of remotes team is being able to work focused independently&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#26 - Sahil Parikh of DeskAway.com&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;located in Bombay, runs a company called Deskaway, his startups is a web collaboration tool for dispersed teams&lt;br /&gt;
He can hire and contract from everywhere&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#27 - Susan Tenby &amp;amp; Jessica Dally of TechSoup&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;Non-Profits, Second-Life virtual world meetings&lt;br /&gt;
no real faces or voices&lt;br /&gt;
something real, visceral on being able to have proximity to people, interactions when instead of talking to everybody at once you come closer to somebody, you can see where they are looking/paying attention&lt;br /&gt;
volunteers from different city working remotely&lt;br /&gt;
support group meetings&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#28 - Shane Pearlman of Shane &amp;amp; Peter&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;fully dispersed consulting company&lt;br /&gt;
started as freelancing collaboration&lt;br /&gt;
average team 4-5&lt;br /&gt;
he works at a coworking space to have some company, but he’s the exception of his team&lt;br /&gt;
each team have different personality&lt;br /&gt;
bad reviews of the skype beta multiperson video&lt;br /&gt;
most of daily communication goes in redmine&lt;br /&gt;
the build a plugin to “poke” on people - they assign a comment to someone one and this person is now the blocker of that comment until he pays attention&lt;br /&gt;
wiki, gdocs..&lt;br /&gt;
unless your systems fit into their existing work patterns, they are not going to use yours..&lt;br /&gt;
following each other in twitter, a public blog for internal use just of photos of family/funny things that everybody does..&lt;br /&gt;
the do a trip each year... they go all together for a week to somewhere warm, like ecuador, salvador... &lt;br /&gt;
you have to do it in a way that it’s fun rather than another project&lt;br /&gt;
you need accountability.. it’s not doing what you say that you are going to do, but to have the maturity of looking a little bit ahead and see where the possible roadblocks are coming and plan for it well&lt;br /&gt;
it’s wonderful that you can work whenever you want and it’s all results based, but that’s only functional if you’re available to figure out what you’re doing (In one occasion, two people started coding the same thing)&lt;br /&gt;
a problem is that people get busy and stop talking about stuff&lt;br /&gt;
people have to now what’s next, accountability usually fails when people are confused&lt;br /&gt;
careful to get into details and forget the big picture&lt;br /&gt;
the tendency to question is maybe a little less at a distance with people&lt;br /&gt;
some clients don’t now how to communicate and in those cases being face to face helps&lt;br /&gt;
they had a lunch and it was buggy, and they had told them that if was going to be buggy but they hadn’t internalized it, if they had gone out for a few beers may’ve helped.. sometimes when they can’t see it turns into a “us and them” situation.&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#29 - John Hawkins of 9Seeds LLC&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;Nevada&lt;br /&gt;
wordpress development, custom themes, custom plugins&lt;br /&gt;
LA, Minnesota, Florida&lt;br /&gt;
whatever time works best for you, go ahead and do it, as long you get the work done&lt;br /&gt;
scrum meetings with a client, about 9 minutes&lt;br /&gt;
2 hours mails, tickets, also accounting&lt;br /&gt;
IM all day long&lt;br /&gt;
skype for video and screensharing when needed&lt;br /&gt;
facetime&lt;br /&gt;
email&lt;br /&gt;
he works from home, he can’t imagine going to an office again, but he’s looking now for a coworking space to drop by a couple of days of the week in he wants to.. he’s looking for the best of both worlds&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#30 - Dan Menard of Macadamian&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;schedule flexibility, fit about 8 hours into your day, about 5 days a week&lt;br /&gt;
you need a little bit of personal connection with your roommates, chat about personal life, not only business, travel now and then to meet the others&lt;br /&gt;
advantages of a team broken across different timezones... the big one is the concept of a critical path, if you have a bunch of features that have to be done in sequence, so they can’t be done in parallel at all, then you now your project will take at least as long as those tasks will take, so if you have say, 3 tasks, each one takes one week, that have to be done in sequence, generally you know that your project will take at least three weeks, what you can do with the timezones is to play with that a little bit, because if we are working two completely different shifts and i have kind of a 8 hours shift here and another team if doing 8 hours in armenia, that we can actually fit closer to 16 hours in a day, so we can get projects done in about half the time, if we play the timezones in our advantage, which we don’t always do&lt;br /&gt;
We don’t wanna to do completely different shits, you wanna have some overlap to keep everyone in sync, you need to work out how much overlap you want to have, specially at the start and end of the project&lt;br /&gt;
skype, wiki for persistence, email, code review (we are very heavy on code review, and we often do that by email), internal newscript server&lt;br /&gt;
smartboard instead of whiteboards&lt;br /&gt;
Whiteboard with a projector hooked up to it, and the projector sort of works as a touchscreen, it tracks where you are and where you are touching of the board&lt;br /&gt;
the whole teams participates in code review, all code is always reviewed, we have a process called “patch a day”, every you’re a supposed to post of a patch for every changes you’ve made, and that get’s reviewed and committed to source, it’s very common that a patch will have a bit of discussion and a few replies to it before it actually goes through, the idea there if that it’s very hard to make code review in large patches, but if you do it in small one day size chunks becomes very easy, you get a lot of nice benefits out of doing this, you develop good patterns, you catch bugs earlier on when they’re cheaper to fix, and it’s actually a great way to train new teams members, they get to see the differents parts of the application, they gain a lot of experience from reading other people’s code. &lt;br /&gt;
So, who does the reviewing? pretty much everyone, when you upload one of your patches you assign it to someone else and that person will review it, it becomes their responsibility, and if there’s a bug that slips through the code review, they can be in charge of fixing it as well, there is a little bit of responsibility as well, you have to actually pay attention&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#31 - Joseph Moore of Pivotal Labs&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;transition from colocated to remote&lt;br /&gt;
he moved from san francisco to georgia with his wife&lt;br /&gt;
100% pair programming&lt;br /&gt;
standard equipment, everybody has the top-end imac available&lt;br /&gt;
skype for video and voice, built-in apple screensharing app&lt;br /&gt;
ichat can do full screen sharing but the quality is too variable&lt;br /&gt;
for pair programming, have people with a little more patience, that’s a good quality&lt;br /&gt;
you do lose a little bit of fidelity, even if you have video running and you can see their face and everything (which is very important in my opinion), you can be a little more distracted (maybe you have a laptop on the side running twitter), you have to be really self-aware and disciplent about that&lt;br /&gt;
It’s important to take breaks when you are pairing in general, when you are remote i think it may be even more important&lt;br /&gt;
some people use pomodoro, we let it happen naturally, like once an hour.. then we have lunch break in the middle of the day&lt;br /&gt;
do you ever find it difficult when you’re remote to get back from the break in a timely way? it hasn’t been too much of a problem, but there’s a little bit of that risk, and that’s one the criticism that i’ve heard of of remote pairing, you’re back at your computer and you don’t know if that person if around, maybe you get distracted by something and you don’t realize you’ve taken 10 minutes doing your laundry, feeding your cat or something.. i would say it hasn’t been that big of a deal, that’s another way in which video is important, like just having a running video, if you are doing the chores and you look into your machine and you see that person has come back and sat down, that kind of prompt you to come back.&lt;br /&gt;
Keyboard back and forth, voice cues “you mind if I finish this real quick”, “can i try something”... some people are better at it than others&lt;br /&gt;
that gets back to patience.. if you fly off the handle every time someone takes the mouse unexpectedly, then remote pairing might not be the best for you&lt;br /&gt;
builtin screen share on the mac has almost no lag&lt;br /&gt;
I have a personal laptop next to me.. now I have a 27” monitor, in my monitor i have a little corner for video, but I would recommend to offload the voice and video to another machine if you can.. &lt;br /&gt;
Sometimes i was “joe on the box“, they had an extra laptop with our video sessions and they “pick me up” and took into demos, meetings.. like a head in a jar, they treated the laptop as if it was a person&lt;br /&gt;
I would say the remote pairing is 95% as good as regular pairing&lt;br /&gt;
switch between pairs often so everybody knows the different parts of the system&lt;br /&gt;
daily standups&lt;br /&gt;
they have a snowball mic, so I can hear them very well&lt;br /&gt;
in those standups, they stand up but he stays seating XD he’d like to stand up as well if he finds a place for the laptop &lt;br /&gt;
(Avdi: he realizes that is he’s doing the standup remotely he’s tempted to check twitter or continue typing in whatever is he was working on, it would be better to stand up as well, he’s thinking of getting an external cam)&lt;br /&gt;
He is distractible as anyone else, he can be distracted during standups because people might not be able to tell if you’re doing something else, a trick to combat his own weakness: he logs in and screenshares into the machine that is running the standup and get’s into pivotal tracker (everyday in the standup they look at pivotal tracker to see what they’re going to do that they),  that kind of combats that distraction factor&lt;br /&gt;
about relationships -- for me personally the hardest thing about this entire experience if trying not to lose that deep connection that you have with the people back at home, friends, people that you work with.. yes, it is hard, it’s one of those things that i’m still figuring out, I went back a week to san francisco to work with my team, and that’s really important if you can make it happen&lt;br /&gt;
advises: many say discipline, specially if you’re working by yourself, I would say that for my personal situation, in which I don’t have as much as the accountability issues that other people do, because I have to work with someone for 8 hours a day, so daily I have 8 hours worth of work to do, and I’m accountable for it, for me personally, it would be patience.. don’t get too frustrated when the technology is finicky and isn’t working out so well, have patience with the person that you have to work remotely with, they might never had to work remotely, or maybe they had bad experiences.. being patience with them till they get used to the situation, some people will have a hard time with it at first.&lt;br /&gt;
I’m fascinated with how much “normal” work environment can be replicated with distributed teams, may be certain things should not even try to be replicated and certain things might even work better than in an office, i don’t know&lt;br /&gt;
I would admit that I had enjoyed the flexibility of being of have gotten three hours ahead of the west coast, for example, i can do things like talk to you at 10 in the morning.. then I work till 9, that’s the double edge sword&lt;br /&gt;
I’m contemplating the possibility of going to a coworking place to get more social interaction&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#32 - Louis Font of Zyncro&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;barcelona, argentina, startup, 1 years, 30 people, they speak with each other min. 3 times a day, in meetings they sometimes put a laptop with skype on a very tall chair to see the face of the person like if that person where there, at the end of the day it feels like if that person where there. The main challenge was at the beginning, try to meet the other people in person when they come to the city, set aside time to speak with the other people at least twice a day&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#33 - Keith Casey of Blue Parabola&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;we usually have a chat channel opened - skype&lt;br /&gt;
a couple of status calls in the week, every shows up, it’s mandatory, we see who’s doing what, problems, etc&lt;br /&gt;
different timezones&lt;br /&gt;
google docs is vital to edit simultaneously&lt;br /&gt;
he works from home: the best, no commuting times, he saves 2 hours a day&lt;br /&gt;
negative: stopping at the end of the day, being able to say i’m done&lt;br /&gt;
make decisions out in the open, better than private channels all over the place&lt;br /&gt;
people more suited to remote work... he would never have a junior guy doing remote work, they need to be involved and demonstrate some skills... in a company, completely new developers, never, for mentorship they need to be sitting next to somebody else..&lt;br /&gt;
he likes visiting offices but not “living there”&lt;br /&gt;
open up the channels of communication even before you become a dispersed team, get used to them even when you are still together&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#34 - Ron Evans of The Hybrid Group&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;Different languages, timezones, they work in english,  they use skype intensively, a skype chatroom for each client.. As a consultancy, transparency in fundamental... You get more focused, you bring together expertise from everywhere, sometimes you need collaboration, sometimes you need to eliminate distraction, sometimes you need to be more collaborative&lt;br /&gt;
https://www.kanbanpad.com/&lt;br /&gt;
Kanban is a japanese word for billboard, is also a philosophy of limiting the amount of work in progress, a sort of very lean version of scrum. &lt;br /&gt;
We had spent a lot of money in a office with cool furniture&lt;br /&gt;
Spend more time with your family, with your kids... find a personal space within your work&lt;br /&gt;
companies who do that they often recruit and retain better people&lt;br /&gt;
for people without kids, what about personal time or other interests? what about time to workout, or play music, or spend time to with love ones, or have time to reflect, or develop personal skills outside of work&lt;br /&gt;
avoiding commute times, being able of choose for your environment for productivity&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#35 - Harvey Losin&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;TeamViewer&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#36 - Ben Johnson of Merrill Corporation&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;instant messaging, conferencing, issue trackers, wikis..&lt;br /&gt;
it’s great the ability to focus, without distraction.. in the topic of value of knowledge sharing vs being able to get things done, he thinks is worth it compared to the decrease of knowledge share, he says that there are many ways to achieve that sharing but it’s really hard to get to that deep thought around a design or strategy direction in a office where you can be distracted any minute.&lt;br /&gt;
Depends on your personality type, introverts get “more energy” when being alone, they can get burned out with a continuous interaction.&lt;br /&gt;
I’m fine with trusting that people are doing what they are supposed to be, what bugs occasionally is to try to encourage some folks to come up and surface their problem sooner&lt;br /&gt;
sometimes it would help to speak up sooner, a frequent checking of “how you doing?”, daily standups (to let people list their blockers, know if they’re stucked)&lt;br /&gt;
he wishes he could do more code reviews&lt;br /&gt;
standardized tools... they got to standardized hardware, all team on OsX, ichat, screensharing...&lt;br /&gt;
they had some occasions when there was an imbalance with the people that were remote and the people who were collocate in the office, it actually went both ways, sometimes the people that were remote were better connected that the people that were in the office and viceversa, but the best example is standups, were a few people would gather in the room and for the first minutes they were all chatty about what happened yesterday, and those of us who were remote were “come on guys, down to business, let’s do it”.. it created enough of a disparity that we ended up moving standups to full conference call, everybody calling from their desks... that really level the playing field for the type of collaboration &lt;br /&gt;
advise: more use of real faces in avatars, it’s a lot easier to get snarky with a generic avatar that it is to a smiling mugshot&lt;br /&gt;
time to time you need visual context, to know if he’s sarcastic but smiling&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#37 -  Justin Searls of Test Double&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;the importance of the habits that stick&lt;br /&gt;
many experiences.. one bad:us vs them dichotomy, the had followed the path of least resistance when communicating… they had to place all developers under the same communications constrains (everybody at their desktop)&lt;br /&gt;
if you don’t communicate visually time to time, or if you have bad communication, you start imagining things like they don’t like what you’re doing or the give a crap or they’re doing may be something malicious.. try to communicate instead of making a bunch of assumptions..&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#38 - Vassilis Rizopoulos of Zühlke&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;Discipline, daily standups, chase people a little bit more just to keep in the loop, &lt;br /&gt;
advise: get a room with a door at home, his home it’s an open office, and everytime their kids come home afterschool he got to stop working..the boundary has to be clear, it has to be clear when it’s work time and you shouldn’t be interrupted&lt;br /&gt;
the positive: your working space is 5 meters from your bed , the negative: your working space is 5 meters from your place&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#39 - Interview with Luke Stokes and Brett Florio of Foxycart&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;foxycart distributed team, campfire chatrooms , ask when u think you misunderstood something, be clear in your relationships with the others   Weekly google plus hangout-- &lt;br /&gt;
google hangouts brings a lot of unity&lt;br /&gt;
they used also Heytell as a sort of asynchronous walkietalkie&lt;br /&gt;
also imessage&lt;br /&gt;
 A day in the life with Foxycart&lt;br /&gt;
&lt;br /&gt;
Wake up, check email&lt;br /&gt;
Read through Campfire logs&lt;br /&gt;
Read through forum posts&lt;br /&gt;
Read through support tickets&lt;br /&gt;
Jump into your individual focus&lt;br /&gt;
Work in blocks&lt;br /&gt;
usan http://letsfreckle.com/ para que todos puedan ver cuantas horas trabajan los otros y en qué, cada uno hace las cosas a su ritmo, si quieres ir a surfear por la mañana y luego con tus hijos por la tarde hazlo, algunos deciden que quieren trabajar solo 30 horas a la semana, algunos trabajan mucho más, es bueno para tener un poco de peer presure y como compañia saber en qué estás invirtiendo tu tiempo&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#40 - Interview with Mike Leone of Panoptic Development&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;daily standup meetings in IRC (old school :)&lt;br /&gt;
people work a different times, but at 6 the all say what they’ve working on, what they are going to do next&lt;br /&gt;
a company wide check in by phone/skype every monday, around an hour, focusing about the midterm (this week, this month..)&lt;br /&gt;
a bookclub, so to speak: every month they pick a book, article, podcast, presentation... and they discuss about it for about half an hour&lt;br /&gt;
code reviews - skype with screen sharing&lt;br /&gt;
get together (physically) with team when you have the chance (they live in different cities)&lt;br /&gt;
the office is for you want to be more sociable on a certain day, or you want to change of scenery, or you want a different kind of work/life separation.. that’s really the point, not having to be in the office for a face to face continuous meeting&lt;br /&gt;
occasionally the meet for client meetings&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#41 -  Jonathan Wallace of Highgroove Studios&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;empower your developers, let them work whenever they work&lt;br /&gt;
the can work together or at home.. for example, it’s raining and you don’t feel like it&lt;br /&gt;
just make sure you do the things you commit to&lt;br /&gt;
what do you measure is you don’t measure hours?&lt;br /&gt;
the metric to manage is, are you getting things done? are the clients happy? are the developers happy?&lt;br /&gt;
the use campfire as a chatroom for all the employees... they are constantly communication through it … he wakes up, types good morning if there is none that yet, he checks emails, goes to pivotal tracker, now that he has children he works better on the morning, but if he needs to do something else like taking his kids somewhere he goes with them and then works on the afternoon&lt;br /&gt;
You need discipline to sit and get the work done, in the beginning it’s was a little harder.. he’s being doing that for four years, now it’s getting away from the computer what it’s getting harder.. you have also to avoid working too much, that’s not maintainable, that leads to burnout&lt;br /&gt;
he visits the office to meet new employees when he’s got the chance&lt;br /&gt;
they have a monthly dinner and a monthly hack night&lt;br /&gt;
summarizing things.. any communication that occurs one on one, out of pivotal or the chat, a casual conversation in the office.. it’s very important to reduce the “bus factor” (if one of the team members is hit by a bus, what happens to the project), you want to summarize the most important things in a central location &lt;br /&gt;
for example, you find out with another guy that there is some bug.. or that the tests are suddenly failing on master, you talk with him but don’t have the time to fix it, you have some ideas but you don’t know what it is, then go on and post it on pivotal so people don’t find it next day and wonder why their tests are failing, that makes you lose trust on the project, it’s much better to read, ah, these guys found out this yesterday, these are the initial thoughts, etc.&lt;br /&gt;
complement people when they do something great, or that you respect&lt;br /&gt;
get some face to face time whenever possible&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#42 - Chad Fowler of LivingSocial&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;he was always travelling... india, japan, europe... &lt;br /&gt;
at first (for 6 years) he was in isolation... you have the psychological aspect of being a developer isolated from other developers &lt;br /&gt;
then he move to be part of distributed teams&lt;br /&gt;
in local teams, the ability of just being able to turn your chair around and interrupt them, as annoying as that might be, is an important part of daily interaction, you need some mechanism to collaborate in a kind of brain-stormy non-goal driven way to bond developers to each other.. it’s just to get that kind of camaraderie (being in the trenches with, gone to battle with...), a lot of it comes from dramatic work situations that they’ve been through together, also from giving birth to an idea together, and that’s something that you don’t do during a conference call with  an end time and a desired end result&lt;br /&gt;
distributed teams can work very well but you have to very explicitly work on it&lt;br /&gt;
you have to start getting into your head that every brainstorming session or hallway conversation is potentially excluding someone that should be part of it, whenever you share information you have to be think of a, b and timezones... that kind of staff it’s really hard,  the lazy choice is to do what is convenient for people that are local, and as an afterthought add remove people to it&lt;br /&gt;
technology is very important.. conference calls suck, it sucks to be on the call end specially if there’s a room full of people, it’s almost impossible to inject yourself in the conversation.. if you are in a situation in which you have a core location and the people who are distributed beyond that core location like we do, in all discussions you have to very explicitly allow time and ask for the people on the remote end of the conversation to talk... sometimes i ask people to go talk to the microphone everytime they want to say something, even if it’s weird and annoying it will raise awareness that not everybody is in the same room.. sometimes we have a dedicated person to attend to the chat just in case someone wants to talk and he’ll interrumpt the others in their behalf&lt;br /&gt;
... for important conversations don’t have a room ever with multiple people on it, have everyone be at their own desk, using the same mechanism to talk, to level the playfield.. it also helps with the audio quality..   (del  Avdi Grimm: we are kind of fighting evolution when we are trying to convince ourselves that the people on the other end of line are as real as the people in the room with us, there’s a lot of instinct that goes into kind of prioritazing the people around us..)&lt;br /&gt;
force people who work in that core location to work from home often so they understand better how the experience of the remote worker is&lt;br /&gt;
we were all kind of insensitive (EEUU-India) to the person on the other side of that email or skype call, we were always assuming that we were communicating clearly&lt;br /&gt;
why let people work from home? i don’t wanna be limited to just software developers in Washington DC / the lifestyle of working from home is something very appealing, and i think for a lot of people very healthy... I went from being quite severely obese to not severely obese, people ask me how i did it, the secret for me is that i had such flexibility because i didn’t have to go to an office everyday, I trained for a couple of marathons, I could go running whenever i felt like it, i could take a nap whenever i didn’t sleep well,.. that led to a happier more productive me.. I’ve also seen that it can go either way, some people are extremely productive at home and they frankly can work a whole lot since they wake up&lt;br /&gt;
(Advi Grimm: for me, I really value the flexibility of working from home and choosing my hours, of choosing where i live based on where my family wants to live)&lt;br /&gt;
I worked with people that just can’t do it, there’s some people whose personalities are never going to be ok with that, some people haven’t done it before and can’t imagine how it would be like, some people need to be surrounded to stay focus&lt;br /&gt;
(Advi Grimm: if you are not interested on the project, not inspired by it any more, is easier to start flaking out on it.. and i say that and i immediately think, on the other hand, I can think of some hours long conversations about nothing that I’ve had in hallways avoiding work)&lt;br /&gt;
I think it just become more apparent if you are remote, if you are not it will take longer for people to notice your desinterest (you just show up)&lt;br /&gt;
You have to very good at communicating, by text, email.. even by voice to be effective.. an online extrovert gives you a hint that this person will be able to be present remotely&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#43 - Greg Bell of Reverb Software&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;active admin&lt;br /&gt;
France, Vancouber&lt;br /&gt;
they have a shared office space, they are building an office to go there time to time if they wan to, he’s a big fan of face to face team time&lt;br /&gt;
at first they didn’t have to skills to do things quickly distributed, initially it didn’t work out, they didn’t have the technology in place, they had language barriers&lt;br /&gt;
they wanted to have top talent, they want to keep people around.. they saw that they had to look everywhere, they let people travel while working.. they had a natural transition... people wanted to experience life a little bit different and the organization was willing to let that happen..  at the time he wasn’t a huge proponent of it, &lt;br /&gt;
He tried to get in the same room as much people as possible, then to get people face time as much as possible, and as much as they can have the team connected and working together, they do so.&lt;br /&gt;
The use Google Hangouts to do their standups&lt;br /&gt;
They tried to have the right tools in place but at the end of they day it’s more about the process and having the right people&lt;br /&gt;
his ideal people actually enjoy writing doing what they are doing, documenting and making obvious what they are up to, persons who love to write detailed tickets and requirement, more a part of who they are as something that they are forced to do&lt;br /&gt;
daily standups at 8am &lt;br /&gt;
they try to have the other relevant conversations between team members right then&lt;br /&gt;
documenting as much as possible&lt;br /&gt;
https://www.hipchat.com/ all day&lt;br /&gt;
advi uses what the teams he’s working with uses, mostly campfire&lt;br /&gt;
strategies for when teams work with very different times zones to avoid that they have to wait for hours to get an answers --- one if having two very different things to work on, so if they got stuck with one they can work on the other, the other is making an effort to try to anticipate some of the future question that will arise (to be more forward looking)&lt;br /&gt;
for pair programming you need people willing to work at the same hour&lt;br /&gt;
One thing that you have to keep in mind: showing progress in a way that everybody can see it, everybody needs to have that sense that that progress is being made.. you can activity feeds, campfire, hipchat&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#44 -  Rob Park&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;remote pairing&lt;br /&gt;
with pair programming to get ideas to trasverse the team a lot faster, and for him is also fun to work that way&lt;br /&gt;
join.me&lt;br /&gt;
communication is everything&lt;br /&gt;
IM&lt;br /&gt;
headsets for standard meetings&lt;br /&gt;
lo de canvas otra vez, buscar link&lt;br /&gt;
wiki&lt;br /&gt;
a wireless headset to wander around a bit and not being distracted from what’s going on in your computer&lt;br /&gt;
some people start going crazy if they stay home for too long, but you can’t really do a good pair programming from a starbucks&lt;br /&gt;
as years go by it’s easier and easier work remotely, now things are much smoother&lt;br /&gt;
many large companies have already a vpn setup, things like fighting with a router are not longer the issue any more&lt;br /&gt;
have some patience, if the other person is not already there keep doing what you’re doing and don’t get too stressed about it&lt;br /&gt;
promiscuous pairing&lt;br /&gt;
i’ve got a doctor appointment, what should i do? just go, don’t worry about it&lt;br /&gt;
plan ahead a little bit, have some schedule&lt;br /&gt;
there is a shortage of developers, if you only search for them in one place or force them to be what you are you have more difficulties finding good people&lt;br /&gt;
some companies treat it as a privilege to work at home, but it’s not just that, they kind of need to do this to find good people and keep them for a longer period of time&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#45 - Mike Smith of Blitz.io&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;pivotal&lt;br /&gt;
campfire&lt;br /&gt;
the energy of knowing that you’re app is being used&lt;br /&gt;
complicated technical discussion escalate to skype.. sometimes that’s not enough and you miss the room with a whiteboard&lt;br /&gt;
google docs drawing module, for fancier diagraming lucid chart&lt;br /&gt;
highlight and element to direct people’s eyes to some path&lt;br /&gt;
sometimes is good to have the ability to talk spontaneously about some problem with someone who is sitting next to you, even if it’s a halfbaked idea&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#46 - Katie Cunningham of Cox Media Group&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;it works better when most of them are remote&lt;br /&gt;
she was working on a team in which she was only remote and she felt a little isolated, she was missing information, that was normally happening in desks sights. We would have a conversation about a feature, agree on how to do it, i’m doing it that way and two days later they ask why is she doing it like that, she says “that’s in the ticket” and they would say “ah, oh right, I was goona update that”.. missing conversations was wasting everybody’s team... with this new team, completely distributed, all conversations must happen in IRC, so they are keenly aware of what’s going on&lt;br /&gt;
she wakes up, takes the kids out the door to the babysitters, come back, make some coffee, and usually settle down to work right away, she used to wait an hour and do other stuff but then she decided that she was happier actually just starting to work so he could get off earlier.. she uses the pomodoro method, work for 25 min, 5 min break, this is very important working from home because you have distraction free environment and you tendency to not get up as much, just move to somewhere else for 5 minutes, walk.. when you are home your coffee is 3 steps away from your desk, your lunch is 12 steps away..&lt;br /&gt;
take some time to exercise, some yoga, 10 minutes of kinect... &lt;br /&gt;
meetings in IRC, a quick lunch&lt;br /&gt;
then she works on her books, she’s still very awake&lt;br /&gt;
one of the nice things about having this kind of schedule is that she doesn’t feel strained, at the office she was dying for lunch just to get out, she was running out of energy cause she was not as relaxed, you had to commmute&lt;br /&gt;
she works one hour in her books, then she goes back to the other work&lt;br /&gt;
she works better on the mornings, if she has something important to do, she sets the alarm clock at 4am and then takes a nap at 2&lt;br /&gt;
clean up your desk, move away your lunch plates&lt;br /&gt;
at 4pm i wind down, i leave my desk, she puts on her pants (she works in a sort of pyjamas XD), go pick up the kids&lt;br /&gt;
she’s been able to train her child as to how to deal with her while she’s working so it doesn’t affect the job, at first she thought she was going to be unable to work with her kids and after training them and teaching them what it mean “i am working”, that if something is on fire or you cut yourself please come to me but if not you are on your own until I have another break&lt;br /&gt;
advi - I think it’s cool when people find a middle ground where they can have their family around it&lt;br /&gt;
She didn’t feel it isolated, she thought “i’m a very social person, i’m gonna have to go work in some workspace, some public workspace” and she’s really not missing it all, she likes not having people interrupting me.. my problem is that my uptime if people’s downtime&lt;br /&gt;
evening people come in to work and they are not ready to roll, so they come and chat to you, and i’m like i’m really trying to work, this is my goodtime, and in the afternoon when they are busy they don’t wanna talk to me&lt;br /&gt;
She thought she would be lonelier but she’s not, she’s constantly talking to people at work but she can also ignore them (they are in IRC)&lt;br /&gt;
you are very focused working from home and at the same time less tired than when you are at an office&lt;br /&gt;
getting help from work is harder, when i have a question that can’t be answered by my group, trying to get people’s attention and saying I have an issue with this it’s more complicated because they are not looking at the irc, you don’t know who is at their desk&lt;br /&gt;
tip: don’t be shy to call your manager and ask him who’s around&lt;br /&gt;
you can set up bells for certain words in irc&lt;br /&gt;
make sure you can organize yourself, organize your day&lt;br /&gt;
writing skills, for the most part you’re going to communicate by writing&lt;br /&gt;
learn to communicate early&lt;br /&gt;
learn how to make your presence felt, for example get every morning in IRC and say hi everybody, ask them about their kids, their weekend&lt;br /&gt;
make your presence felt because you don’t wanna start feeling invisible, that’s a very distressing / depressing time, even though you are closing tickets, you are rockstart.. you feel like you don’t have any connection to the people there&lt;br /&gt;
chat with them in twitter, friend them in twitter..&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#47 - Will Farrington &amp;amp; Mike Skalnik of Github&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;guys from github, in a meeting to know in person other githubbers&lt;br /&gt;
Korea, Australia, New Zealand, US, England&lt;br /&gt;
two thirds of the company work remote right now&lt;br /&gt;
for the most part people work from their homes, there is a couple of small coworking spaces for 4 or 5 people in two cities&lt;br /&gt;
for the first year or two github didn’t even have an office, they work where they could&lt;br /&gt;
github tries to make everyone happy, if you want to relocate go ahead and do it&lt;br /&gt;
they focus on doing everything asynchronous, things don’t require immediate attention&lt;br /&gt;
teams are self-organized&lt;br /&gt;
only support and operations have hours which they have elected amongst themselves, they created their own rules for hours that didn’t exist anywhere else in the company, they did for certain things like answering support tickets in which you kind of have to put some syncronous behaviour&lt;br /&gt;
campfire for conversations... the have a room call the danger room, where basically everything not work related gets stuffed, it’s constantly packed with people talking about random things, it’s like the office watercooler for us&lt;br /&gt;
we also have an internal application called “team”, sort of an internal twitter, it’s a great tool to keep up to date with higher level things, you have a timeline with information about the different projects, you can comment on it, you can get involved if you want to, but you have to actively go in and read it, it’s not an information that it pushed to you filling your inbox&lt;br /&gt;
Hubot&lt;br /&gt;
make reasonable for everyone to participate.. he had work at places in which he could be remote but it still felt as if he had to be in the office for some reason.. github is always thinking how to stream everything they do&lt;br /&gt;
communicate constantly.. Im, campfire, doesn’t matter, keep talking, don’t leave on an island&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3&gt;#48 - Kevin Old of DicomGrid&lt;br /&gt;&lt;/h3&gt;

&lt;p&gt;5 years working remote&lt;br /&gt;
it gives him work life balance, and think time - when you need to take some time to think about something, the ability to slow down, walk away for a moment to think something out&lt;br /&gt;
you don’t schedule innovation 9 to 5&lt;br /&gt;
joy to work when it’s best for you&lt;br /&gt;
we almost have to force ourselves to take breaks&lt;br /&gt;
advi has a break between 7 and 10 pm and does another shift that ends at 2am because he’s a night owl&lt;br /&gt;
trello for the team&lt;br /&gt;
they have a huge asynchronous culture, they are not so much into standup meetings, the use skype and the phone when they need it&lt;br /&gt;
one thing that he really likes about the remote culture is the ability to figure out on your own before you take it to others.. in the office culture i just turned around and asked, it arrived at that place too soon, at the time i thought it was right but now looking back i see that i had to spend a little more time to fully flesh out the problem, think about the possible solution and then take it to someone else&lt;br /&gt;
with a remote team you have to know and trust each one on the team a little bit more of what you do in an office&lt;br /&gt;
in a remote team it takes a little longer to gain the trust as well&lt;br /&gt;
mentoring... you have to go through a “season”&lt;br /&gt;
two or three days of conversation in person, in the same room, to bring them up to speed&lt;br /&gt;
he has a standing desk &lt;br /&gt;
your employees can have a comfortable environment&lt;br /&gt;
if you are stuck with a problem on friday, revise it on monday, because you have the advantage to do that (the slow down mentality, walk away from the problem)&lt;br /&gt;
put that down and work on something else&lt;br /&gt;
take advantage of the work life balance and your employees will be a lot more dedicated and happier&lt;br /&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Search code and set email hooks in Github</title>
   <link href="http://fsainz.github.com/2012/08/02/search-code-and-set-email-hooks-in-github.html"/>
   <updated>2012-08-02T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2012/08/02/search-code-and-set-email-hooks-in-github</id>
   <content type="html">&lt;h1&gt;Search code and set email hooks in Github&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;August 2nd, 2012 - Madrid&lt;/p&gt;


&lt;p&gt;Two useful tricks that I didn&#39;t know I could do: The first if that you
can search code for a repo that doesn&#39;t belong to you (oddly enough, github features a
nice &lt;em&gt;search code&lt;/em&gt; box when you browse your own repositories but not
for the others (not even for the ones you forked)).&lt;/p&gt;

&lt;p&gt;It&#39;s not a secret
feature but it did go unnoticed for me until recently, in &lt;a href=&quot;https://github.com/search&quot;&gt;advanced search&lt;/a&gt; you can select to search for code and specify the search string and repo that interests you, for example. I wannted to &lt;a href=&quot;https://github.com/search?q=%2Ftmp%2Fvagrant-network-interfaces+repo%3Amitchellh%2Fvagrant&amp;repo=&amp;langOverride=&amp;start_value=1&amp;type=Code&amp;language=&quot;&gt; search &quot;/tmp/vagrant-network-interfaces&quot; in the mitchellh/vagrant repo
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
/tmp/vagrant-network-interfaces repo:mitchellh/vagrant
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/github-search.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
The other useful &lt;em&gt;trick&lt;/em&gt; is to set a email service hook in your
repository&#39;s admin settings to get an email everything someone pushes to
a branch (click on the &lt;em&gt;email&lt;/em&gt; service hook, setup the email address and
as silly as it sounds, don&#39;t forget to click on &quot;active&quot; ;)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Ted - Shawn Achor</title>
   <link href="http://fsainz.github.com/2012/02/05/ted-shawn-achor.html"/>
   <updated>2012-02-05T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2012/02/05/ted-shawn-achor</id>
   <content type="html">&lt;h1&gt;Ted - Shawn Achor&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;February 5th, 2012 - Madrid&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/ted - shawn achor.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I like the optimism of this video, I don&#39;t know how strong is the correlation between positive actitude and performance but it makes sense in many situations, and in any case is a nice way to live.
&lt;br /&gt;&lt;/p&gt;

&lt;blockquote&gt;
If I know everything about your external world, i can only predict 10% of your long term happiness. 90% of your long term happiness if predicted not by the external world but by the way your brain processes the world.
&lt;br /&gt;&lt;br/&gt;&lt;br/&gt;
Most companies and schools follow a formula for success which is this: &quot;if i work harder, i&#39;ll be more successful, an if i am more successful, then i&#39;ll be happier. That undergirds most of our parenting styles, our managing styles, the way that we motive our behaviour and the problem is, is scientifically broken and backwards for two reasons: first, every time your brain has a success,  you just change the goal post? of what a success look like: you have great grades, now you have to get better grades, you&#39;ve gone to a good school, now you have to get a better school, you&#39;ve got a good job, now you have to get a better job, you hit your sales target, now you have to change your sales target (...) we think that we have to be successful, then we&#39;ll be happier. The real problem ist that our brains work in the opposite order, if you can rise somebody&#39;s levels of positivity in the present, then their brains experience what we now call a &#39;happinness advantage&#39;, which is you brain in positive performs significantly better than it does in negative, neutral or stress. Your inteligence raises, your creative rises, your energy level rises.&quot;
&lt;/blockquote&gt;


&lt;p&gt;&lt;br /&gt;
I didn&#39;t know the word &lt;em&gt;undergird&lt;/em&gt;, I put it in a &lt;a href=&quot;http://www.wolty.com/fsainz/en/to-undergird&quot;&gt;note&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;br/&gt;&lt;br /&gt;&lt;/p&gt;

&lt;object width=&quot;640&quot; height=&quot;360&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/GXy__kBVq1M&amp;rel=0&amp;hl=en_US&amp;feature=player_embedded&amp;version=3&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/GXy__kBVq1M&amp;rel=0&amp;hl=en_US&amp;feature=player_embedded&amp;version=3&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; allowScriptAccess=&quot;always&quot; width=&quot;640&quot; height=&quot;360&quot;&gt;&lt;/embed&gt;&lt;/object&gt;



</content>
 </entry>
 
 <entry>
   <title>Backbone Resources</title>
   <link href="http://fsainz.github.com/2012/01/23/backbone-resources.html"/>
   <updated>2012-01-23T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2012/01/23/backbone-resources</id>
   <content type="html">&lt;h1&gt;Backbone Resources&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;January 23rd, 2011 - Madrid&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/backbone.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I&#39;ve been collecting some posts and videos about backbone js, and I wanted to share them before going to &lt;a href=&quot;https://twitter.com/#!/GermanDZ&quot;&gt;@GermanDZ&lt;/a&gt; talk on &lt;a href=&quot;https://madridrb.jottit.com/enero_2012&quot;&gt;Backbone + Rails + Handlebars&lt;/a&gt;, but I just realized that most of them have been already published in the repository wiki:&lt;br /&gt; &lt;strong&gt;&lt;a href=&quot;https://github.com/documentcloud/backbone/wiki/Tutorials%2C-blog-posts-and-example-sites&quot;&gt;Tutorials, blog posts and example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There we have a nicely structured list of tutotorials. Beside those listed there, these might be worth taking a look:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://ricostacruz.com/backbone-patterns&quot;&gt;Backbone Patterns&lt;/a&gt;   This is a document with best practices in Backbone.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/addyosmani/backbone-fundamentals&quot;&gt;Backbone Fundamentals&lt;/a&gt;       A creative-commons book on Backbone.js for beginners and advanced users alike&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://devblog.supportbee.com/2011/07/29/backbone-js-tips-lessons-from-the-trenches/&quot;&gt;Backbone JS tips - Lessons from the trenches&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://lostechies.com/derickbailey/2011/08/03/stop-using-backbone-as-if-it-were-a-stateless-web-server/&quot;&gt;Stop using backbone as if it were a stateless web server&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://weblog.bocoup.com/introducing-the-backbone-boilerplate&quot;&gt;Introducing the backbone boilerplate&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://lostechies.com/derickbailey/2011/08/30/dont-limit-your-backbone-apps-to-backbone-constructs/&quot;&gt;Don&#39;t limit your backbone apps to backbone constructs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/codebrew/backbone-rails&quot;&gt;Backbone Rails&lt;/a&gt; &lt;em&gt;Easily use backbone.js with rails 3.1&lt;/em&gt;, there&#39;s also a &lt;a href=&quot;http://vimeo.com/30705694&quot;&gt;video&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;talks &amp;amp; screencasts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://pivotallabs.com/talks/135-backbone-js&quot;&gt;Talk at Pivotal Labs&lt;/a&gt; &lt;em&gt;Pivot Jay Phillips shows how to get started with Backbone.js and demonstrates how he uses it on projects.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://bostonrb.org/presentations/backbonejs-and-rails&quot;&gt;Talk at Boston Ruby Group&lt;/a&gt;  &lt;em&gt;Learn how Backbone.js is put together, how to use it with Rails, and how to make building JavaScript-heavy web apps a pleasure.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://sdruby.org/podcast/98&quot;&gt;Talk at Sandiego Ruby Group&lt;/a&gt; &lt;em&gt;Ryan Weald gives a brief overview of Backbone.js and the advantages it has for your project.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Also, there are three three (not free) tutorials at Peepcode, which I bet are pretty good.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://peepcode.com/products/backbone-js&quot;&gt;Peepcode - BACKBONE.JS Basics&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://peepcode.com/products/backbone-ii&quot;&gt;Peepcode - BACKBONE.JS Interactivity&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://peepcode.com/products/backbone-iii&quot;&gt;Peepcode - BACKBONE.JS Persistence&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Our Tetuan Valley Posts</title>
   <link href="http://fsainz.github.com/2011/12/18/our-tetuan-valley-posts.html"/>
   <updated>2011-12-18T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2011/12/18/our-tetuan-valley-posts</id>
   <content type="html">&lt;h1&gt;Our Tetuan Valley Posts&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;December 18th, 2011 - Madrid&lt;/p&gt;


&lt;p&gt;We had a great experience participating in this last Tetuan Valley edition, there are many things I could say about it but for now I just want to link to the posts that alex and I wrote for the TVSS&#39;s blog:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/bordeaux.jpeg&quot; /&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://blog.tetuanvalley.com/2011/11/please-make-it-profitable.html&quot;&gt;Please make it profitable&lt;/a&gt;&lt;/h3&gt;


&lt;p&gt;It’s been already some years for us dreaming and struggling to build a good startup and over this time we’ve changed our minds about what a great business model implies.&lt;/p&gt;

&lt;p&gt;(&lt;a href=&quot;http://blog.tetuanvalley.com/2011/11/please-make-it-profitable.html&quot;&gt;more&lt;/a&gt;
)
&lt;br /&gt;&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;br /&gt;
&lt;img src=&quot;/images/spongebob.jpeg&quot; /&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://blog.tetuanvalley.com/2011/11/launching-a-startup-is-impossible-without-a-thermal-detonator.html&quot;&gt;Launching a startup is impossible (without a thermal detonator)&lt;/a&gt;&lt;/h3&gt;


&lt;p&gt;Lately, we’ve been laughing at the never ending pile of difficulties in order to run a startup. It’s the same kind of laughter that you have when you dive through a huge wave in the sea just to meet her bigger sister and the rest of the family upon emerging.&lt;/p&gt;

&lt;p&gt;(&lt;a href=&quot;http://blog.tetuanvalley.com/2011/11/launching-a-startup-is-impossible-without-a-thermal-detonator.html&quot;&gt;more&lt;/a&gt;
)&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/IT_Crowd_Updated_by_surlana_580.jpg&quot; /&gt;
source: &lt;a href=&quot;http://surlana.deviantart.com/art/IT-Crowd-Updated-155624319&quot;&gt;surlana.deviantart.com&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://blog.tetuanvalley.com/2011/12/developers-toolbox.html&quot;&gt;Developer&#39;s Toolbox&lt;/a&gt;&lt;/h3&gt;


&lt;p&gt;This is a matter of personal taste, but there are still a few recommendations that we wanted to share and that we would’ve wanted someone to tell us... (&lt;a href=&quot;http://blog.tetuanvalley.com/2011/12/developers-toolbox.html&quot;&gt;more&lt;/a&gt;
)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Cut &amp; Paste in Lion</title>
   <link href="http://fsainz.github.com/2011/12/18/cut-and-paste-in-lion.html"/>
   <updated>2011-12-18T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2011/12/18/cut-and-paste-in-lion</id>
   <content type="html">&lt;h1&gt;Cut &amp;amp; Paste in Lion&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;December 18th, 2011 - Madrid&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/move.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, for the love of god, we have a (pretty hidden by the way) cut and paste feature on the Mac OS X Lion:&lt;/p&gt;

&lt;p&gt;First: Copy  (&lt;strong&gt;⌘ + C&lt;/strong&gt;)
Second: Paste &lt;strong&gt;⌘ +⌥ + V&lt;/strong&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Steve Jobs</title>
   <link href="http://fsainz.github.com/2011/10/07/steve-jobs.html"/>
   <updated>2011-10-07T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2011/10/07/steve-jobs</id>
   <content type="html">&lt;h1&gt;Steve Jobs&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;7th October 2011 - Madrid&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/1984_steve_jobs.jpeg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Yesterday I read about the death of Steve Jobs right after waking up, and I thought about why it saddened me besides the fact that someone remarkable was gone. It got me thinking of two things, the moving speech that he gave at Stanford, and the fact that from my perspective this person was bringing us &quot;the future&quot; closer.&lt;/p&gt;

&lt;p&gt;One thing that I understand but which disappoints me is that our knowledge and technology is not so much limited by what we can get through our ingenuity but by economic constrains. We tend to advance towards short-time profits, we are not focused on racking our brains to solve every kind of problem, instead we go forward in some topics which receive resources for one reason or another. We have some independent research and we have different companies who develop and improve mostly what they need to compete. It&#39;s a great thing that the computer industry provides tools to scientists which would&#39;ve been completely unaffordable, but knowing that research will get you longer lasting batteries faster than curing the disease that will kill you it&#39;s a little annoying.&lt;/p&gt;

&lt;p&gt;To make things worse, enterprises don&#39;t have to do better products than the others to be successful. A company can try to do something innovative but something crappy with a lower price or a stronger marketing campaign is equally valid. I admire google for expanding mankind&#39;s intelligence (nothing less :) and i&#39;m furious with Telefonica for giving a damn about improving infrastructures (for example at my neighborhood) while reporting the &lt;a href=&quot;http://www.elpais.com/articulo/economia/Telefonica/supera/10000/millones/beneficio/plusvalias/Vivo/elpepieco/20110226elpepieco_7/Tes?print=1&quot; target=&quot;_blank&quot;&gt;highest profits&lt;/a&gt; of the country and attempting to &lt;a href=&quot;http://www.publico.es/dinero/334214/telefonica-planea-el-fin-de-la-tarifa-plana-ilimitada&quot; target=&quot;_blank&quot;&gt;charge the user for every action&lt;/a&gt; he makes on the Internet. I can not blame companies if they don&#39;t hurry to make innovative products because that&#39;s not their goal, but it&#39;s sad to know that they have the power to do it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;... And then it&#39;s when the ipod appeared...&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I may have been spoiled with futuristic objects from books and movies, but I see the computers we have and i feel like someone had taken me to the past. We&#39;ve not only been inspired, we&#39;ve seen realistic renderings in a thousand videos and somehow I feel that i&#39;m just waiting for the future to finally come.
It seems almost a matter of time. I&#39;m a few years I&#39;ve seen the first computer change from being regarded as a strange typewriter to something as fundamental as electricity. I&#39;ve seen the mass adoption of mobile phones and the rise of Internet, and in all this time it is like if it was written somewhere &quot;this is just the beginning&quot;&lt;/p&gt;

&lt;p&gt;We are waiting for our computers to stop being noisy overheated boxes of wires to ubiquitous instantaneous machines. We want every surface turned into a screen, we want perfect videoconferences, we want augmented reality, we want to be seamless connected everywhere, we want personal robots, solid virtual reality, affordable spaceships, we want our organs cloned, our genome understood and used to cure us, we want nanotechnology, powerful quantum computers and cold fusion. We want everything that we believe to be achievable through ingenuity. And we would like to have it soon.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;... And then a friend show me his iphone... &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And I didn&#39;t care about the phone part at all. It was a terminal. A futuristic portable terminal the way we had imagined it. I didn&#39;t think &quot;ah, that&#39;s great&quot;, i thought &quot;finally!&quot;. Phones had had already applications, small screen slow awkward applications prone to go accidentally online and which were as usable as browsing the Internet by sending sms&#39;s. For years every sloppy &lt;em&gt;improvement&lt;/em&gt; added to my phone made me wish that they could just keep it as it was.
What i wanted was a piece of Internet in a rectangular format. I wanted a responsive machine in an simplified interface given the size, and they just aced it. Four years later, Nokia CEO Stephen Elop &lt;a href=&quot;http://www.engadget.com/2011/02/08/nokia-ceo-stephen-elop-rallies-troops-in-brutally-honest-burnin/&quot;&gt;admitted&lt;/a&gt; that even then they didn&#39;t have a product close to their experience. For me it was a huge step towards being always connected, to the fact I could have a world of information in my hands.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;... And then three years later rumour had it that they were going to present a tablet...&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I was working with a couple of friends waiting for something &quot;revolutionary&quot; to be broadcasted. By that time steve jobs had already turned into some sort of legendary inventor, and we had the kind of the excitement that you had in your stomach when a movie you&#39;ve been waiting/anticipating for years is about to start. Technology makes progress steadily and someday your processor is 4 times better, but this man was on stage, directing our expectations like a magician and promising to deliver something exciting that we would soon have in our daily lives.&lt;/p&gt;

&lt;p&gt;He went out and presented the ipad we had the feeling as if we were watching a mobile phone or a laptop for the first time.&lt;/p&gt;

&lt;p&gt;Lost of people said that it would be useless, that they wanted a light laptop and not a large iphone. They mocked the idea and said that other companies had tried and failed because the market didn&#39;t like it. I was surprised for the avalanche of critics. Personally, I wished that it succeeded to proof that people wanted to bring computers to other parts of their lives. It was another step towards to screen tables, walls, mirrors, glasses.. anything we could imagine, to make the way we interact with computers more close to the way humans would naturally interact with objects.  A tablet, for it&#39;s size and simplified controls was ideal for a huge new range of scenarios, and they were brave enough to prove it.&lt;/p&gt;

&lt;p&gt;From that moment we were won over. Not that apple was perfect. Apple is a brilliant company that wants our money and to have us tied, which annoys their own developers many times and which for some reason believes that moving files with cut&amp;amp;paste is a bad day (it is not! change it dammit!)&lt;/p&gt;

&lt;p&gt;But we are willing to go through many things if that&#39;s what it takes to enjoy this little pieces of &quot;future&quot;. I command control over your music library in exchange for the ipod. I will decide which apps are worthy on the iphone and ipad. I&#39;ve just developed the robot EVA from WALLE while my competitors have talking toasters, but she will carry your wallet from this day on. Apple can set some unnerving conditions because their products are worth it.&lt;/p&gt;

&lt;p&gt;This is the first of the two reasons that will make me miss Steve Jobs. The second is &lt;strong&gt;&lt;a href=&quot;http://news.stanford.edu/news/2005/june15/jobs-061505.html&quot;&gt;this video&lt;/a&gt;&lt;/strong&gt;.I don&#39;t know how Steve Jobs was in person, but I believe that he meant every word he said:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;When I was 17, I read a quote that went something like: “If you live each day as if it was your last, someday you’ll most certainly be right.” It made an impression on me, and since then, for the past 33 years, I have looked in the mirror every morning and asked myself: “If today were the last day of my life, would I want to do what I am about to do today?” And whenever the answer has been “No” for too many days in a row, I know I need to change something.&lt;/p&gt;

&lt;p&gt;Remembering that I’ll be dead soon is the most important tool I’ve ever encountered to help me make the big choices in life. Because almost everything — all external expectations, all pride, all fear of embarrassment or failure – these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Steve Jobs managed to get everyone excited with his personality and the continuous innovations of his company. He presented products so appealing that their legion of fans almost fight to advertise them themselves, and I don&#39;t know if we&#39;ll see any other person capable of creating this enthusiasm for technology. I believe that he contributed to take us closer to a future full of possibilities. He was completely devoted to doing what he loved and he inspired us all. We we&#39;ll miss him.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;hr /&gt;


&lt;p&gt;&lt;br /&gt;
* This is a good &lt;a href=&quot; http://www.youtube.com/watch?feature=player_embedded&amp;v=XKk7HuL4rH8&quot;&gt;compilation of his keynotes&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Common questions at Techcrunch Disrupt SF 2011</title>
   <link href="http://fsainz.github.com/2011/09/25/common-questions-at-techcrunch-disrupt-sf-2011.html"/>
   <updated>2011-09-25T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2011/09/25/common-questions-at-techcrunch-disrupt-sf-2011</id>
   <content type="html">&lt;h1&gt;Common questions at Techcrunch Disrupt SF 2011&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;25th September 2011 - Madrid&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/techcrunch disrupt.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I took advantage of the weekend to watch the videos from the last Techcrunch Disrupt through their &lt;a href=”http://backlot.ooyala.com/syndication/podcast?id=40666c38-c233-4470-82c6-b62304f04683” &gt;itunes feed&lt;/a&gt;) and I made a compilation of the most common questions for the teams grouped by similarity:&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;market &amp;amp; user acquisition&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;who’s the user?
Which is the size of your market?
How do you accelerate the uptake in that market?&lt;br/&gt;
How do you get the attention of people? third party distribution strategy? tie-ins?
How do you get to this group?
Where would you initialize focus?
How are you gonna market it?
which are your verticals?
which are your partners?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;br/&gt;
&lt;strong&gt;value proposition &amp;amp; differentiation&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Why would I use this?
Do people already have that behaviour or how are you going to get them in that behaviour?
What’s the value proposition?
Who needs this and why? Why would someone use it? What’s the specific feature that you’re giving him?
How is different to &lt;em&gt;X&lt;/em&gt;?
What do you believe is the single most important thing for consumers that you solve better than &lt;em&gt;X&lt;/em&gt;?
What’s your position against your competitors? How are you going to compete against &lt;em&gt;X&lt;/em&gt;?
What’s the differentiator? / How do you get the differentiation?  What’s the new piece that you are bringing in?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;business model&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;How do you guys will charge? What’s the business model?
Which business model do you focus on first?
What would be your second business model?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;other interesting questions&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;What stops a second player from doing &lt;em&gt;X&lt;/em&gt;?&lt;br/&gt;
How will your product roadmap look like?
What locks you in to the artist?
How you will moderate user content?
When did you launch? Where does your traffic come from?&lt;/p&gt;&lt;/blockquote&gt;
</content>
 </entry>
 
 <entry>
   <title>Piling Up</title>
   <link href="http://fsainz.github.com/2011/08/29/piling-up.html"/>
   <updated>2011-08-29T00:00:00+00:00</updated>
   <id>http://fsainz.github.com/2011/08/29/piling-up</id>
   <content type="html">&lt;h1&gt;Piling Up&lt;/h1&gt;

&lt;p class=&quot;meta&quot;&gt;August 29th, 2011 - Madrid&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;/images/cds.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I&#39;m trying to tackle in a more systematic way how I gather information from multiple sources hoping to manage this overflow a little better. The goal is to make the most of the ever-increasing pile of new things knowing that in reality there is always very little time and that it is better to enjoy and learn a handful of things than staring at a huge tower of piled up papers feeling bad about yourself.&lt;/p&gt;

&lt;p&gt;The trickiest parts is forcing yourself to store less. Since we have almost limitless storage capacity for practical purposes, I tend to save anything that could potentially be interesting in the present or in the long distant future. But the shock of looking at a folder with thousands of files makes me back away and not even try to deal with one of them.&lt;/p&gt;

&lt;p&gt;Gradually I’m doing better at this and I want to write what it’s working for me. For now I&#39;ll just list the main contributors to my mess as a way of acknowledging my enemy :)&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mail&lt;/strong&gt; &lt;br /&gt; thank god for archiving in gmail, I was reluctant at first but now I encourage everyone to use it since taking the old ones out of sight gives you peace of mind. Deleting them might be as good, but this way I don’t have to think about it. I tend to clear the inbox folder each couple of days, and It&#39;s not so hard to empty out even after a fews weeks.
&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Social networks&lt;/strong&gt; &lt;br /&gt;  I&#39;m too adicted to google reader to put too much time into them :)  I use twitter time to time, I see facebook as a noisy agenda, and I like google+ but still have little traffic on it.
&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Downloads&lt;/strong&gt; &lt;br /&gt; this folder gets cluttered easily but it’s also straightforward to clear.
&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Podcasts&lt;/strong&gt; &lt;br /&gt; I’ve got 24 subscriptions but thanks to the iphone/itunes and the hours of commuting time I could even use a few more.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;br /&gt;
- &lt;strong&gt;Languages&lt;/strong&gt; &lt;br /&gt; I have hundreds of notes that I’ve written through the years on English, French and German. They are full of words that I wanted to learn along with questions and important things to remember, and they were completely unreachable. It was so frustrating to know that somewhere there was written three times a useful sentence that I wouldn&#39;t be able to remember when needed, that we ended up developing a whole website and community to publish notes and test them periodically (&lt;a href=&quot;http://www.wolty.com&quot;&gt;wolty.com&lt;/a&gt;).
&lt;br /&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Books&lt;/strong&gt; &lt;br /&gt;  I don’t buy books compulsevely, so even if some are covered in dust, it&#39;s not overwhelming.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;br /&gt;
- &lt;strong&gt;Music&lt;/strong&gt; &lt;br /&gt; My music folder is sort of a disaster but I can live with it. I’m waiting for a service such as iCloud to sort it out. Recently I threw away most of my cds since their main use was to weight down the shelf in case it decided to escape flying out of the window.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Photos&lt;/strong&gt; &lt;br /&gt; In September 2004 I started to save them in a more or less neatly way. The first three years are pretty good, the next two and a half are ok, but since Febrary 2009 it’s a chaotic disaster of numbered new folders. That’s about 35000 photos waiting for me to set them in order. So far my approach is taking care of the new ones and waiting for a (summer, may be? retirement?) when i’ll have more time. I hope that &lt;a href=&quot;http://www.dittit.com&quot;&gt;dittit.com&lt;/a&gt; launches soon, so I can make a goal out of it.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reader&lt;/strong&gt; &lt;br /&gt; I love feeds. I’m subscribed to about 150 feeds ranging from blogs which publish twice a year to massive ones as HN (I recommend the score filtered versions, check out &lt;a href=&quot;http://talkfast.org/2010/07/23/a-cure-for-hacker-news-overload&quot;&gt;talkfast.org/2010/07/23/a-cure-for-hacker-news-overload&lt;/a&gt;). I skim through them and “mark all as read” in a daily basis, but the real problem for me is that I save the links for &lt;em&gt;future&lt;/em&gt; reading.
&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt; &lt;br /&gt; This is the hardest for me. They are not just bookmarks to help me find the urls, most of them are things to read or to learn from. I’ve had enough to draw out some stats, and in average I save between 5 to 7 links each day, that’s about 200 a month. Twice a year I break the 1000 barrier and sweep away 90% of them. This is absurd, but lately I got it under control. If what I’m doing works i’ll post about it :)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 
</feed>