<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>We also do cookies posts</title>
    <link>http://www.wealsodocookies.com/rss</link>
    <description>Blog posts from Nicolas and Nathalie, wealsodocookies.com</description>
    <item>
      <title>Want to increase your productivity? Just take your time</title>
      <link>http://www.wealsodocookies.com/posts/want-to-increase-your-productivity-so-just-take-your-time</link>
      <description>&lt;p&gt;&lt;em&gt;As a freelance, or small business, especially in the world of web development, the amount of work done in a day/week is deeply linked to your productivity. It&#8217;s easy to say: &lt;strong&gt;just do it!&lt;/strong&gt; but it&#8217;s often hard to get started.&lt;/em&gt;&lt;/p&gt;&lt;h2 id="productivity-tools"&gt;Productivity tools?&lt;/h2&gt;&lt;p&gt;I&#8217;ve tried so many tools supposed to increase my productivity that I could make a love/hate list of every single service or notebook available out there. But for the past year, I&#8217;ve limited my tool set to &lt;a href="http://www.rememberthemilk.com/"&gt;Remember the milk&lt;/a&gt; when I&#8217;m out, and the excellent &lt;a href="http://davidseah.com/blog/node/the-emergent-task-planner/"&gt;emergent task planner&lt;/a&gt; as a paper pen tool, which I always have with me.&lt;/p&gt;&lt;p&gt;When I need to make sure that I spend enough time on a daunting task, I use a kitchen timer for a fake &lt;a href="http://www.pomodorotechnique.com/"&gt;Pormodoro&lt;/a&gt; style.&lt;/p&gt;&lt;p&gt;&lt;em&gt;I didn&#8217;t want to make a review of my tools, but here we go I couldn&#8217;t avoid it&#8230;&lt;/em&gt;&lt;/p&gt;&lt;h2 id="take-your-time-to-be-productive-really"&gt;Take your time to be productive. Really?&lt;/h2&gt;&lt;p&gt;I know it sounds crazy, but whatever the tools, methodologies, trends you use, now or in the future, there are 3 very important steps that you can&#8217;t avoid taking.&lt;/p&gt;&lt;p&gt;And unfortunately many people do, usually the kind of people that would inflict you with the &lt;strong&gt;Hoo, just do it!&lt;/strong&gt; kind of answer when you talk about ways of improving your day to day task management.&lt;/p&gt;&lt;h2 id="step1-take-your-time-to-plan-and-review"&gt;Step1: Take your time to plan and review&lt;/h2&gt;&lt;p&gt;This one is &lt;strong&gt;so important&lt;/strong&gt;! &lt;/p&gt;&lt;p&gt;Every Sunday, I take 30 minutes to plan my week in terms of objectives, appointments, meetings and tasks.You also need to take some time every month &lt;strong&gt;to plan the &#8216;big picture&#8217;&lt;/strong&gt;. There is a chance that your final (almost inconceivable) objective can be broken into small chunks of work that you can over several months.&lt;/p&gt;&lt;p&gt;I also &lt;strong&gt;take my time to review&lt;/strong&gt; what I&#8217;ve done the past week, what I&#8217;ve missed, what I need to follow up. It makes your day to day work real!&lt;/p&gt;&lt;p&gt;On a daily basis, first thing in the morning, take your time to plan your day. That way you start your day with a fresh mind. The good news is that it actually takes less than 5 minutes to select the tasks from your to-do list / calendar.&lt;/p&gt;&lt;p&gt;On a daily basis as well, as a last thing in the afternoon, take your time for a mini review, tidy your desk and make a list of the remaining things for the following day. Again, this only takes 5 minutes.&lt;/p&gt;&lt;p&gt;&lt;em&gt;Planning is the key to success, but also key to a healthy life. You&#8217;ll feel less stressed if you know what tomorrow is made of.&lt;/em&gt;&lt;em&gt;Reviewing is the key to motivation. By doing weekly and monthly reviews you&#8217;ll acknowledge what needs to be done next and you&#8217;ll be proud of what you achieved.&lt;/em&gt;&lt;/p&gt;&lt;h2 id="step-2-take-your-time-to-breathe"&gt;Step 2: Take your time to breathe&lt;/h2&gt;&lt;p&gt;Sounds zen hu! But actually it&#8217;s the second step to your success.&lt;/p&gt;&lt;p&gt;Before starting the Pomodoro timer, or before clicking start on the Pivotal Tracker or Trello card, &lt;strong&gt;just take your time, breath&lt;/strong&gt;!The end of the world is planned for the end of 2012 anyway :)&lt;/p&gt;&lt;p&gt;Take your time &lt;strong&gt;to close all the non necessary tabs&lt;/strong&gt; in your browser, &lt;strong&gt;stop your notifications&lt;/strong&gt;, &lt;strong&gt;just keep what&#8217;s needed to be 10% focused on the next task&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;Now that it&#8217;s done, take a deep breath in and pause for 30 seconds. Think about the way you&#8217;re going to tackle this task. How do you want to start, what do you want to achieve, visualise all this.&lt;/p&gt;&lt;p&gt;Now you&#8217;re ready, press the start button and &lt;strong&gt;do stuff!&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;I know it sounds super cheesy, but it really works! It puts your mind in the right direction and prevents you from losing focus too quickly.&lt;/em&gt;&lt;/p&gt;&lt;h2 id="step3-take-time-for-yourself"&gt;Step3: Take time for yourself&lt;/h2&gt;&lt;p&gt;You can&#8217;t spend your day jumping from one task to another, or even work on the same task for 8 hours. This is ridiculous and counter-productive!So take some time for yourself today. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Take your time to exercise, it will sharpen your mind and help you to get in the zone more quickly.  &lt;/li&gt;  &lt;li&gt;Take your time to enjoy social networks, RSS &#8230; and stop using them as an procrastination tool.&lt;/li&gt;  &lt;li&gt;Take your time to drink this glass of water sitting on your desk.&lt;/li&gt;  &lt;li&gt;Take your time to enjoy your lunch.&lt;/li&gt;  &lt;li&gt;Take your time to enjoy the fact that you&#8217;ve achieved a lot today.&lt;/li&gt;  &lt;li&gt;Take your time to enjoy your small step, they will lead to your big picture.&lt;/li&gt;&lt;/ul&gt;&lt;h2 id="so"&gt;So?&lt;/h2&gt;&lt;p&gt;I know most of these ideas sound really cheesy, a copy-paste from a bad American self-help book, but the fact is that they work. They worked for me, for us as a team, and for many other people.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;So, did I gave you the urge to try?&lt;/strong&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 17 May 2012 09:17:14 +0000</pubDate>
      <author>nicolas@wealsodocookies.com</author>
      <guid>http://www.wealsodocookies.com/posts/want-to-increase-your-productivity-so-just-take-your-time</guid>
    </item>
    <item>
      <title>Cleaning parameters from string url in Ruby</title>
      <link>http://www.wealsodocookies.com/posts/cleaning-parameters-from-string-url-in-ruby</link>
      <description>&lt;p&gt;&lt;em&gt;Today I had to make sure that a url wasn&#8217;t containing a certain parameter, and if it was I needed to clean it form the params&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Let&#8217;s assume a resource like&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;RESOURCE&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When saving that resource I need to make sure that the a param &#8216;user_ref&#8217; is not present from the url. This param can or cannot have values.&lt;/p&gt;&lt;p&gt;So we start with a simple test&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'spec_helper'&lt;/span&gt;&lt;span class="n"&gt;describe&lt;/span&gt; &lt;span class="no"&gt;Resource&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;  &lt;span class="n"&gt;describe&lt;/span&gt; &lt;span class="s1"&gt;'cleaning user_ref param'&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;     &lt;span class="n"&gt;before&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;         &lt;span class="vi"&gt;@empty_param&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;FactoryGirl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:resource&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:url&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"http://google.com?param1=1&amp;amp;clickref=&amp;amp;param3"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;        &lt;span class="vi"&gt;@full_param&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;FactoryGirl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:resource&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:url&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"http://google.com?param1=1&amp;amp;clickref=remove-me&amp;amp;param3"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;        &lt;span class="vi"&gt;@clean_url&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;FactoryGirl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:resource&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:url&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"http://google.com?param1=1"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;     &lt;span class="k"&gt;end&lt;/span&gt;    &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s2"&gt;"should remove empty click ref params and keep other params"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;       &lt;span class="vi"&gt;@empty_param&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;eql&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"http://google.com?param1=1&amp;amp;param3"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="k"&gt;end&lt;/span&gt;    &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s2"&gt;"should remove full click ref params and keep other params"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;       &lt;span class="vi"&gt;@full_param&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;eql&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"http://google.com?param1=1&amp;amp;param3"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="k"&gt;end&lt;/span&gt;    &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s2"&gt;"should still save url without click ref params and keep other params"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;       &lt;span class="vi"&gt;@clean_url&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;eql&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"http://google.com?param1=1"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="k"&gt;end&lt;/span&gt;  &lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After testing different Regexps (and I have to admin I&#8217;m not a master of them, so maybe the solution is somewhere else), I finally found &lt;a href="https://github.com/sporkmonger/addressable/tree/"&gt;Addressable Gem&lt;/a&gt; and everything became easy again.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;EDIT: &lt;a href="https://github.com/theozaurus"&gt;Theo Cushion&lt;/a&gt; sent me a better cleaner solution via email, please check the bottom of the post&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;In the Resource model I have&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Resource&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="n"&gt;before_save&lt;/span&gt; &lt;span class="ss"&gt;:clean_clickref&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="kp"&gt;protected&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;clean_clickref&lt;/span&gt;  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;      &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'addressable/uri'&lt;/span&gt;      &lt;span class="n"&gt;uri&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Addressable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;URI&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="n"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;query_values&lt;/span&gt;      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;        &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;query_values&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;except&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'clickref'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;        &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_s&lt;/span&gt;      &lt;span class="k"&gt;end&lt;/span&gt;    &lt;span class="k"&gt;end&lt;/span&gt;  &lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;EDIT: This is  &lt;a href="https://github.com/theozaurus"&gt;Theo Cushion&lt;/a&gt;&#8217;s solution, using the url setter. Way nicer, and we don&#8217;t need the :before_save&lt;/strong&gt;&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Resource&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;  &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'addressable/uri'&lt;/span&gt;    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;is_a?&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;      &lt;span class="n"&gt;uri&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Addressable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;URI&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;      &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;query_values&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;query_values&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;except&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'clickref'&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;query_values&lt;/span&gt;      &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_s&lt;/span&gt;    &lt;span class="k"&gt;else&lt;/span&gt;      &lt;span class="kp"&gt;nil&lt;/span&gt;    &lt;span class="k"&gt;end&lt;/span&gt;    &lt;span class="n"&gt;write_attribute&lt;/span&gt; &lt;span class="ss"&gt;:url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;  &lt;span class="k"&gt;end&lt;/span&gt;  &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is easy enough and readable enough and make the tests pass, time for the next feature!&lt;/p&gt;</description>
      <pubDate>Thu, 10 May 2012 05:28:54 +0000</pubDate>
      <author>nicolas@wealsodocookies.com</author>
      <guid>http://www.wealsodocookies.com/posts/cleaning-parameters-from-string-url-in-ruby</guid>
    </item>
    <item>
      <title>BritRuby, British Ruby Conference</title>
      <link>http://www.wealsodocookies.com/posts/britruby-british-ruby-conference</link>
      <description>&lt;p&gt;&lt;a href="http://signup.britruby.com/?lrRef=i148i" title="BritRuby"&gt;&lt;img src="/system/images/37/original/britruby.png?1336159692" alt="BritRuby"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I don&#8217;t know (yet) who&#8217;s behind it, neither what it will include, but it&#8217;s always good to have a Ruby conference in Britain.&lt;/p&gt;&lt;p&gt;Looks like it&#8217;s gonna be next year in Manchester. Wait and see!&lt;/p&gt;&lt;p&gt;You can sign up for more info on their &lt;a href="http://signup.britruby.com/?lrRef=i148i"&gt;BritRuby page&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Wed, 09 May 2012 05:22:56 +0000</pubDate>
      <author>nicolas@wealsodocookies.com</author>
      <guid>http://www.wealsodocookies.com/posts/britruby-british-ruby-conference</guid>
    </item>
    <item>
      <title>Bristol IT Megameet on Saturday 19th of May, we'll be talking about Ruby</title>
      <link>http://www.wealsodocookies.com/posts/bristol-it-megameet-on-saturday-19th-of-may-well-be-talking-about-ruby</link>
      <description>&lt;p&gt;&lt;a href="http://www.itmegameet.co.uk" title="It Mega Meet"&gt;&lt;img src="/system/images/36/original/it-megameet.png?1336054215" alt="It Mega Meet"&gt;&lt;/a&gt;&lt;/p&gt;&lt;blockquote&gt;  &lt;p&gt;All of the major IT &amp;amp; Developer community groups in and around Bristol are coming together for an event at the UWE. Essentially the event is one big meet up, open to the public. Each group will be doing a presentation on themselves, what they are about, and what they offer the local community. Several groups will be putting on a technical presentation in their chosen area. How-to workshops will be running alongside the main presentations. The event concludes with 5 minute lightning talks on a variety of subjects.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Being one of the &lt;a href="http://www.meetup.com/bristol-ruby-user-group"&gt;Bristol Ruby User Group&lt;/a&gt; organiser, I&#8217;ll give a talk about Ruby on Rails.&lt;/p&gt;&lt;p&gt;Talks are limited to 20 minutes and I would love to do a &#8220;Create a blog in 20 minutes&#8221; kind of talk, but I&#8217;m hesitating at the moment. As most of the attendance will be new to Rails, I might just do a presentation of the Rails goodness, with good old slides.&lt;/p&gt;&lt;p&gt;Will we see you there? &lt;a href="http://www.itmegameet.co.uk/register.html"&gt;Don&#8217;t forget to register&lt;/a&gt; as entries are closing this Saturday. &lt;/p&gt;</description>
      <pubDate>Thu, 03 May 2012 14:11:24 +0000</pubDate>
      <author>nicolas@wealsodocookies.com</author>
      <guid>http://www.wealsodocookies.com/posts/bristol-it-megameet-on-saturday-19th-of-may-well-be-talking-about-ruby</guid>
    </item>
    <item>
      <title>Rails 3 CSV upload and tested with Capybara</title>
      <link>http://www.wealsodocookies.com/posts/rails-3-csv-upload-and-tested-with-capybara</link>
      <description>&lt;p&gt;I was writting yesterday about &lt;a href="http://wealsodocookies.com/posts/tested-csv-export-using-rails-3"&gt;how to write and test a CSV export in Rails 3&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Now let see the other side of the scope, where we would like to import a CSV file that will change our data structure.&lt;/p&gt;&lt;p&gt;Let says we have&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="no"&gt;Author&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;bio&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We want to create a CSV updload that will update a couple email - first_name/last_name/bio.&lt;/p&gt;&lt;p&gt;Well, let&#8217;s write our acceptance test first&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;  &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'acceptance/acceptance_helper'&lt;/span&gt;  &lt;span class="n"&gt;feature&lt;/span&gt; &lt;span class="s2"&gt;"Uploading a CSV file"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;    &lt;span class="n"&gt;background&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;      &lt;span class="vi"&gt;@post&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;FactoryGirl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:author&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                                  &lt;span class="ss"&gt;:email&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"nicolas@wealsodocookies.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                                 &lt;span class="ss"&gt;:first_name&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"nicholas"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                                 &lt;span class="ss"&gt;:last_name&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"Alpi"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                                 &lt;span class="ss"&gt;:bio&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="k"&gt;end&lt;/span&gt;    &lt;span class="n"&gt;scenario&lt;/span&gt; &lt;span class="s2"&gt;"update the couple id-first_name/last_name/bio"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;      &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'csv'&lt;/span&gt;      &lt;span class="n"&gt;visit&lt;/span&gt; &lt;span class="n"&gt;new_upload_url&lt;/span&gt;      &lt;span class="n"&gt;file_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Rails&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;"spec/fixtures/upload.csv"&lt;/span&gt;      &lt;span class="n"&gt;attach_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'file'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="n"&gt;click_button&lt;/span&gt; &lt;span class="s2"&gt;"Upload"&lt;/span&gt;      &lt;span class="vi"&gt;@post&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reload&lt;/span&gt;      &lt;span class="vi"&gt;@post&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;equal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"nicolas@wealsodocookies.com"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="vi"&gt;@post&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;equal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"nicolas"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="vi"&gt;@post&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;equal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Alpi"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="vi"&gt;@post&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;equal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Sincerely believes sheep will dominate the world one day."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="k"&gt;end&lt;/span&gt;    &lt;span class="n"&gt;scenario&lt;/span&gt; &lt;span class="s2"&gt;"File missing on upload"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;      &lt;span class="n"&gt;visit&lt;/span&gt; &lt;span class="n"&gt;new_upload_url&lt;/span&gt;      &lt;span class="n"&gt;click_button&lt;/span&gt; &lt;span class="s2"&gt;"Upload"&lt;/span&gt;      &lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;have_content&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'File Missing'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="k"&gt;end&lt;/span&gt;  &lt;span class="k"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Create a file in your spec/fixtures/upload.csv containing&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;Email, First Name, Last Name, Bionicolas@wealsodocookies.com, nicolas, Alpi, Sincerely believes sheep will dominate the world one day.&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And we now have a simple test simulating the CSV upload. What&#8217;s next is the easy part, we can do to our upload method in Author controller&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;upload&lt;/span&gt;        &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'csv'&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:file&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;blank?&lt;/span&gt;      &lt;span class="n"&gt;flash&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:notice&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"File missing"&lt;/span&gt;      &lt;span class="n"&gt;redirect_to&lt;/span&gt; &lt;span class="n"&gt;upload_path&lt;/span&gt;    &lt;span class="k"&gt;else&lt;/span&gt;      &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:file&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;read&lt;/span&gt;      &lt;span class="no"&gt;CSV&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;header_converters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="ss"&gt;:symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;each&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;          &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bio&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;          &lt;span class="no"&gt;Author&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;update_all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"first_name = '&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;', last_name = '&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;', bio = '&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;bio&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;'"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"email = '&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;'"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="k"&gt;end&lt;/span&gt;      &lt;span class="n"&gt;redirect_to&lt;/span&gt; &lt;span class="n"&gt;new_upload_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:notice&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"Upload successful"&lt;/span&gt;    &lt;span class="k"&gt;end&lt;/span&gt;  &lt;span class="k"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And voila, we should have our test passing now.&lt;/p&gt;</description>
      <pubDate>Thu, 03 May 2012 08:18:41 +0000</pubDate>
      <author>nicolas@wealsodocookies.com</author>
      <guid>http://www.wealsodocookies.com/posts/rails-3-csv-upload-and-tested-with-capybara</guid>
    </item>
    <item>
      <title>Tested CSV export using Rails 3</title>
      <link>http://www.wealsodocookies.com/posts/tested-csv-export-using-rails-3</link>
      <description>&lt;p&gt;Right, let say that we have some models with this structure&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="no"&gt;Post&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;Title&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;Body&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;Created_at&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="ss"&gt;:author&lt;/span&gt;&lt;span class="no"&gt;Author&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;First_name&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;Last_name&lt;/span&gt;  &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;Email&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And our client wants to be able to download a CSV file containing all Posts information, with it&#8217;s author data.&lt;/p&gt;&lt;p&gt;First, let&#8217;s start by creating the Post model spec, which would be something like:&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'spec_helper'&lt;/span&gt;&lt;span class="n"&gt;describe&lt;/span&gt; &lt;span class="no"&gt;Post&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;  &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;  &lt;span class="no"&gt;Describe&lt;/span&gt; &lt;span class="s2"&gt;"exporting a post .to_csv"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;         &lt;span class="n"&gt;before&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;         &lt;span class="vi"&gt;@author&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;author&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;        &lt;span class="vi"&gt;@post&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;factory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;with&lt;/span&gt; &lt;span class="n"&gt;author&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;     &lt;span class="k"&gt;end&lt;/span&gt;         &lt;span class="n"&gt;subject&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="vi"&gt;@post&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_csv&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;          &lt;span class="n"&gt;its&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;equal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;     &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:created_at&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:author_id&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;each&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;field&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;       &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="kp"&gt;include&lt;/span&gt; &lt;span class="vi"&gt;@post&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;field&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;     &lt;span class="k"&gt;end&lt;/span&gt;     &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:last_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:email&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;each&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;field&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;       &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="kp"&gt;include&lt;/span&gt; &lt;span class="vi"&gt;@author&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;field&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;     &lt;span class="k"&gt;end&lt;/span&gt;  &lt;span class="k"&gt;end&lt;/span&gt;  &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Right that should gives us enough to start coding now. Let&#8217;s go to the Post model&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Post&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;  &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;to_csv&lt;/span&gt;    &lt;span class="n"&gt;csv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[]&lt;/span&gt;    &lt;span class="n"&gt;csv&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:created_at&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;    &lt;span class="n"&gt;csv&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:last_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:email&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;author&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;  &lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This should makes our previous test pass. Now it&#8217;s time to export the CSV in the browser.&lt;/p&gt;&lt;p&gt;First, let&#8217;s write some acceptance tests that will look like:&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'acceptance/acceptance_helper'&lt;/span&gt;&lt;span class="n"&gt;feature&lt;/span&gt; &lt;span class="s2"&gt;"Downloading a post CSV export"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;  &lt;span class="n"&gt;background&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;    &lt;span class="vi"&gt;@post&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;FactoryGirl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:post_with_author&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;end&lt;/span&gt;  &lt;span class="n"&gt;scenario&lt;/span&gt; &lt;span class="s2"&gt;"Downloading CSV file"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;    &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'csv'&lt;/span&gt;    &lt;span class="n"&gt;visit&lt;/span&gt; &lt;span class="n"&gt;export_to_csv_posts_path&lt;/span&gt;    &lt;span class="n"&gt;csv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;CSV&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Title"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Body"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Created_at"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"First name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"Last Name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Email"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;    &lt;span class="n"&gt;post_line&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;CSV&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="vi"&gt;@post&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_csv&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;','&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;    &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="kp"&gt;include&lt;/span&gt; &lt;span class="n"&gt;post_line&lt;/span&gt;  &lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Easy enough, we are using Capybara page.text to receive the content of the page and parsing it using the same CSV parser as in our controller, and we are testing that we have our Headers in place, and that our post line exist.&lt;/p&gt;&lt;p&gt;Now let&#8217;s create our export_to_csv method in the Post controller&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre&gt;  &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PostsController&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ApplicationController&lt;/span&gt;      &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;.&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;export_to_csv&lt;/span&gt;      &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'csv'&lt;/span&gt;      &lt;span class="vi"&gt;@posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Post&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:author&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="n"&gt;csv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;CSV&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:force_quotes&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;        &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;[&lt;/span&gt;&lt;span class="s2"&gt;"Title"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Body"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Created_at"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"First name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"Last Name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Email"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;        &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="vi"&gt;@posts&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_csv&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;flatten&lt;/span&gt;      &lt;span class="k"&gt;end&lt;/span&gt;      &lt;span class="n"&gt;send_data&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="ss"&gt;:type&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'text/csv; charset=iso-8859-1; header=present'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="ss"&gt;:disposition&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"attachment; filename=post-&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;Time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strftime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'%d-%m-%y--%H-%M'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.csv"&lt;/span&gt;      &lt;span class="k"&gt;end&lt;/span&gt;  &lt;span class="k"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And that should make our acceptance test pass as well, and &lt;strong&gt;you now have an easy and expandable CSV generation&lt;/strong&gt;. &lt;/p&gt;</description>
      <pubDate>Tue, 01 May 2012 07:36:00 +0000</pubDate>
      <author>nicolas@wealsodocookies.com</author>
      <guid>http://www.wealsodocookies.com/posts/tested-csv-export-using-rails-3</guid>
    </item>
    <item>
      <title>Vim engraved reference card</title>
      <link>http://www.wealsodocookies.com/posts/vim-engraved-reference-card</link>
      <description>&lt;p&gt;I love VIM, it&#8217;s on my opinion the best text editor available out there, and the community around it is awesome. So awesome that someone went to the extend of creating a wood engraved VIM card.&lt;/p&gt;&lt;p&gt;&lt;img src="http://wealsodocookies.com/system/images/35/medium/il_fullxfull.299951837.jpg?1334586746" alt="vim engraved reference card" title="vim engraved reference card"&gt;&lt;/p&gt;&lt;p&gt;If you want to buy it, it&#8217;s available on Etsy for 20$ &lt;a href="http://www.etsy.com/listing/89726383/vim-reference-wood-card-vi-editor-laser"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I&#8217;m sure that would make a nice addition into the office.&lt;/p&gt;</description>
      <pubDate>Mon, 16 Apr 2012 14:37:11 +0000</pubDate>
      <author>nicolas@wealsodocookies.com</author>
      <guid>http://www.wealsodocookies.com/posts/vim-engraved-reference-card</guid>
    </item>
    <item>
      <title>Yank Ring, a super easy vim Yank Register</title>
      <link>http://www.wealsodocookies.com/posts/yank-ring-a-super-easy-vim-yank-register</link>
      <description>&lt;p&gt;&lt;em&gt;It&#8217;s a secret for no one, I love VIM. But one of the most annoying moment is when you copy a line somewhere (yy) then you delete a line somewhere else (dd) and finally you want to paste the previously yanked line somewhere else. Well, we&#8217;ve all been there haven&#8217;t we?&lt;/em&gt;&lt;/p&gt;&lt;h2 id="where-is-the-problem"&gt;Where is the problem?&lt;/h2&gt;&lt;p&gt;The problem is that when you either yank or delete a line/char/multiple lines, vim copy what you&#8217;ve just done in a global register, and overrides the previous content.&lt;/p&gt;&lt;p&gt;One of the solution is to use &#8220; (double quotes) to set your register before doing the overriding action.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;For example&lt;/strong&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;"ayy&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Will copy your line in you register a&lt;/p&gt;&lt;p&gt;&lt;strong&gt;and&lt;/strong&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;"ap&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Will paste the content of the a register&lt;/p&gt;&lt;p&gt;But let&#8217;s be fair, we all make mistakes, and there are times when you forget to yank your stuff in a specific register, and this is where the problem occurs, because you usually end up in a serie of undo to retrieve your text back.&lt;/p&gt;&lt;h2 id="yank-ring-as-a-solution"&gt;Yank Ring as a solution&lt;/h2&gt;&lt;p&gt;While helping a friend today who is starting with Vim, it was pretty clear that the register wasn&#8217;t a good solution, and we found &lt;a href="https://github.com/vim-scripts/YankRing.vim"&gt;Yank Rink&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;It&#8217;s a pretty cool solution that will allocate different registers to your copy/delete operation, so every time you copy/delete something, it&#8217;s won&#8217;t override the previous one.&lt;/p&gt;&lt;p&gt;You can then use &lt;em&gt;Ctrl-P&lt;/em&gt; to swap between the allocated registers, making finding the right one a breeze.&lt;/p&gt;&lt;p&gt;Finally it offers you &lt;em&gt;:YRShow&lt;/em&gt; and &lt;em&gt;YRSearch&lt;/em&gt; to respectively show and search the content of you registers.&lt;/p&gt;&lt;p&gt;&lt;a href="/system/images/34/original/%5BYankRing%5D%20-%20(~-tmp)%20-%20VIM_027.png?1327511205" rel="fancybox" title="Yank Ring"&gt;&lt;img src="/system/images/34/medium/%5BYankRing%5D%20-%20(~-tmp)%20-%20VIM_027.png?1327511205" alt="Yank Ring"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;So if you&#8217;re stuck in a yank hell, I would definitively recommend looking at this plugin &lt;a href="https://github.com/vim-scripts/YankRing.vim"&gt;Yank Rink&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Wed, 25 Jan 2012 17:09:53 +0000</pubDate>
      <author>nicolas@wealsodocookies.com</author>
      <guid>http://www.wealsodocookies.com/posts/yank-ring-a-super-easy-vim-yank-register</guid>
    </item>
    <item>
      <title>The new FreelanceAround.com has been released</title>
      <link>http://www.wealsodocookies.com/posts/the-new-freelancearoundcom-has-been-released</link>
      <description>&lt;p&gt;Yesterday, we released a new version of &lt;a href="http://www.freelancearound.com"&gt;FreelanceAround&lt;/a&gt;. The first version was an attempt of MVP to see if freelancers were interested in meeting each other during working hours. Our answer is that, &lt;strong&gt;yes people are interested, but our product wasn&#8217;t the right answer!&lt;/strong&gt;&lt;/p&gt;&lt;h2 id="whats-new-in-this-version"&gt;What&#8217;s new in this version?&lt;/h2&gt;&lt;p&gt;Well, first of all we&#8217;ve made a massive redesign on the application. The first version had been coded in less than 5 working days, so the design had been neglected.&lt;/p&gt;&lt;p&gt;Now the homepage shows you a nice map, where you can see the upcoming &#8220;get-togethers&#8221;. On the right hand-side, there is a list of freelancers who have visited the page recently, as well as a &#8220;Create a get-together&#8221; call-to-action.&lt;/p&gt;&lt;p&gt;&lt;a href="/system/images/31/original/freelancearound_homepage.png?1323698063" rel="fancybox" title="FreelanceAround homepage"&gt;&lt;img src="/system/images/31/medium/freelancearound_homepage.png?1323698063" alt="FreelanceAround homepage"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The second big change is that we removed the ability to check in.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;In the V1, users were invited to check in to let people know where they were at a certain point in time, with the hope that someone might join them to work in the same cafe. The truth is, it would be a nice addition when we reach a critical mass, but at the moment, it doesn&#8217;t fit the role as we don&#8217;t have enough users engaging with the site.&lt;/p&gt;&lt;p&gt;So we&#8217;ve decided to create what we call &#8220;Get-togethers&#8221;, which are mini informal meetups. You just say where and when you&#8217;re going to work outside and people will be able to express their interest via the &lt;a href="http://www.freelancearound.com"&gt;FreelanceAround&lt;/a&gt; website.&lt;/p&gt;&lt;p&gt;This is the page to set up a get-together:&lt;/p&gt;&lt;p&gt;&lt;a href="/system/images/32/original/new_get_together.png?1323698111" rel="fancybox" title="Create a get-together"&gt;&lt;img src="/system/images/32/medium/new_get_together.png?1323698111" alt="Create a get-together"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;And this is the page where you can show your interest for a get-together:&lt;/p&gt;&lt;p&gt;&lt;a href="/system/images/33/original/interest_get_together.png?1323698157" rel="fancybox" title="Interest get-together freelancearound"&gt;&lt;img src="/system/images/33/medium/interest_get_together.png?1323698157" alt="Interest get-together freelancearound"&gt;&lt;/a&gt;&lt;/p&gt;&lt;h2 id="no-excuses-now-if-you-feel-lonely-in-your-home-office"&gt;No excuses now if you feel lonely in your home office!&lt;/h2&gt;&lt;p&gt;You can now setup as many get-togethers as you want for free. To do so, just head to &lt;a href="http://www.freelancearound.com"&gt;FreelanceAround&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;We&#8217;ve got plenty of improvements to do next year, but I would love to see if people use this get-together feature first.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We hope that you like the app / concept, and that you&#8217;ll let us know it in the comments or even better give it a try and set up a get-together!&lt;/strong&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 13 Dec 2011 13:02:02 +0000</pubDate>
      <author>nicolas@wealsodocookies.com</author>
      <guid>http://www.wealsodocookies.com/posts/the-new-freelancearoundcom-has-been-released</guid>
    </item>
    <item>
      <title>As a developer, I start to really like Unity desktop, light review</title>
      <link>http://www.wealsodocookies.com/posts/after-one-release-unity-is-finally-starting-to-get-really-good</link>
      <description>&lt;p&gt;&lt;em&gt;Last week I wrote a post about &lt;a href="http://wealsodocookies.com/posts/openbox-a-windows-environment-for-hackers"&gt;installing and configuring Openbox on Ubuntu&lt;/a&gt;. As I said, I&#8217;ve been playing around with window managers for quite a while now, and Unity, wasn&#8217;t to my taste. But I recently installed Ubuntu 11.10, and here are my thoughts.&lt;/em&gt;&lt;/p&gt;&lt;h2 id="forget-what-i-was-saying-unity-is-really-good"&gt;Forget what I was saying, Unity is really good&lt;/h2&gt;&lt;p&gt;Ho boy, what a change since 10.04, where Unity was half baked, slow as hell and full of bugs. Today, even if there are some remaining glitches, it became more mature, focused on the user experience of the computer, and I have to admit I start to like it.&lt;/p&gt;&lt;p&gt;It&#8217;s packed with features that makes my development life a lot easier (I&#8217;ll detail the ones I really like just after). I&#8217;m not sure that my mum would notice them, but as a dev, I can tell you that they came with something really interesting.&lt;/p&gt;&lt;p&gt;So I admit I was wrong. Unity is good, and it&#8217;s now replacing my Openbox setup on my machine. Let me explain why.&lt;/p&gt;&lt;h2 id="the-mac-user-test"&gt;The Mac user test&lt;/h2&gt;&lt;p&gt;&lt;em&gt;Note: this is not a full review, I&#8217;m only talking about the changes that I noticed and that I&#8217;m going to use everyday. If you&#8217;re looking for a full Ubuntu 11.10 review, I&#8217;m sure Google will help you.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Yesterday was &lt;a href="http://www.meetup.com/bristol-ruby-user-group/"&gt;Bristol Hack Night&lt;/a&gt;. A friend of mine, Theo, was there. He usually likes to wind me up on the Linux vs Mac os flame war. And I&#8217;m a good client.&lt;/p&gt;&lt;p&gt;But yesterday was a bit different, I boot up the computer, and the first thing he noticed was the login screen:&lt;/p&gt;&lt;blockquote&gt;  &lt;p&gt;Ho, that&#8217;s a nice login screen!&lt;/p&gt;&lt;/blockquote&gt;&lt;iframe width="420" height="315" src="http://www.youtube.com/embed/Vxy4imb9O8c" frameborder="0" style="margin:10px auto"&gt;&lt;/iframe&gt;&lt;p&gt;This is the new LighDM login screen, and it does look really nice.&lt;/p&gt;&lt;p&gt;So after this positive note I continued to show him the latest improvements made on Unity, that are going to make our developers life easier.&lt;/p&gt;&lt;p&gt;The first one is the new Alt-Tab feature, which include screenshots of applications, grouped by type from all the virtual desktops. With 3 terminals open for instance, it looks like that (&lt;strong&gt;ALT-TAB + down key&lt;/strong&gt;)&lt;/p&gt;&lt;p&gt;&lt;a href="/system/images/22/original/tabonly.png?1318590069" rel="fancybox" title="Alt Tab"&gt;&lt;img src="/system/images/22/medium/tabonly.png?1318590069" alt="Alt Tab"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="/system/images/23/original/multitab.png?1318590124" rel="fancybox" title="multitab"&gt;&lt;img src="/system/images/23/medium/multitab.png?1318590124" alt="multitab"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Second improvement is on the Unity Dash itself. It is a lot quicker than before and typing the first letters of the app&#8217;s name + pressing enter starts the app immediately.&lt;/p&gt;&lt;p&gt;&lt;a href="/system/images/24/original/Workspace%201_015.png?1318590240" rel="fancybox" title="ubuntu dash"&gt;&lt;img src="/system/images/24/medium/Workspace%201_015.png?1318590240" alt="ubuntu dash"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Lenses on the dash are accessible with the &lt;strong&gt;ALT&lt;/strong&gt; key, and give you access respectively to Applications, Files, Music and Supports filters (see on the right).&lt;/p&gt;&lt;p&gt;&lt;a href="/system/images/25/original/Workspace%201_018.png?1318590389" rel="fancybox" title="ubuntu lenses"&gt;&lt;img src="/system/images/25/medium/Workspace%201_018.png?1318590389" alt="ubuntu lenses"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Compiz grid system (look in compiz manager) gives you a pseudo tiling function. Not as good as Pytyles but good enough to be noticed.&lt;/p&gt;&lt;p&gt;The Ubuntu branded software centre got a revamp and now looks lush. It also has got a sync option, which lets you sync your apps between different computers.&lt;/p&gt;&lt;p&gt;&lt;a href="/system/images/26/original/Ubuntu%20Software%20Centre_019.png?1318590552" rel="fancybox" title="Ubuntu software center"&gt;&lt;img src="/system/images/26/medium/Ubuntu%20Software%20Centre_019.png?1318590552" alt="Ubuntu software center"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The Ubuntu One integration is now slick and fast, and gives 5GB for free.&lt;/p&gt;&lt;p&gt;&lt;a href="/system/images/27/original/.fonts_021.png?1318590712" rel="fancybox" title="Ubuntu one"&gt;&lt;img src="/system/images/27/medium/.fonts_021.png?1318590712" alt="Ubuntu one"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;I use it to store my important files like configs, fonts and docs. So I know that if I reinstall the computer, they will all be in the same place.&lt;/strong&gt;&lt;/p&gt;&lt;h2 id="downsideregressions"&gt;Downside/Regressions?&lt;/h2&gt;&lt;p&gt;There are some downsides on the customization side of Unity. From what I understood it&#8217;s because of the gnome-shell integration/GTK3, the amount of themes compatible is not big for the moment, but I&#8217;m sure this is something that will be corrected over time.&lt;/p&gt;&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;&lt;p&gt;Those features, plus a massive performance improvement completely sold me on Unity. I&#8217;ve been using it for a week now, and it works really well on my 13&#8221; laptop screen or on my big widescreen monitor.&lt;/p&gt;&lt;p&gt;I found the new &lt;strong&gt;ALT-TAB&lt;/strong&gt; and grouping search very useful, and helping me a lot on daily basis.&lt;/p&gt;&lt;p&gt;If you add things like &lt;strong&gt;multi arch system&lt;/strong&gt;, &lt;strong&gt;online accounts setup&lt;/strong&gt;, &lt;strong&gt;the easy setting menu&lt;/strong&gt;, you have a very powerful setup.&lt;/p&gt;&lt;p&gt;What about you, do you like the new Unity?&lt;/p&gt;</description>
      <pubDate>Fri, 14 Oct 2011 12:03:34 +0000</pubDate>
      <author>nicolas@wealsodocookies.com</author>
      <guid>http://www.wealsodocookies.com/posts/after-one-release-unity-is-finally-starting-to-get-really-good</guid>
    </item>
  </channel>
</rss>

