<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[now from home]]></title>
  <link href="http://nowfromhome.com/atom.xml" rel="self"/>
  <link href="http://nowfromhome.com/"/>
  <updated>2012-05-16T17:34:53+02:00</updated>
  <id>http://nowfromhome.com/</id>
  <author>
    <name><![CDATA[Jose Gonzalvo]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Ruby: working with non-English strings]]></title>
    <link href="http://nowfromhome.com/ruby-working-with-non-english-strings/"/>
    <updated>2012-05-16T17:13:00+02:00</updated>
    <id>http://nowfromhome.com/ruby-working-with-non-english-strings</id>
    <content type="html"><![CDATA[<p>I&#8217;m working on several Ruby on Rails web applications that supports English but it&#8217;s not the default locale. The localization
support in Rails is very good in my opinion. I&#8217;m following <a href="http://guides.rubyonrails.org/i18n.html">this guide</a> and everything works as expected so far.</p>

<p>However I have detected a weird behaviour in one of my sites, accentuated vocals and the Spanish &#8216;ñ&#8217; are not properly upcased.</p>

<figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="mi">1</span><span class="o">.</span><span class="mi">9</span><span class="o">.</span><span class="mi">3</span><span class="n">p0</span> <span class="p">:</span><span class="mo">004</span> <span class="o">&gt;</span> <span class="nb">name</span> <span class="o">=</span> <span class="s2">&quot;Martínez&quot;</span>
</span><span class='line'><span class="o">=&gt;</span> <span class="s2">&quot;Martínez&quot;</span>
</span><span class='line'><span class="mi">1</span><span class="o">.</span><span class="mi">9</span><span class="o">.</span><span class="mi">3</span><span class="n">p0</span> <span class="p">:</span><span class="mo">005</span> <span class="o">&gt;</span> <span class="nb">name</span><span class="o">.</span><span class="n">upcase</span>
</span><span class='line'><span class="o">=&gt;</span> <span class="s2">&quot;MARTíNEZ&quot;</span>
</span><span class='line'><span class="mi">1</span><span class="o">.</span><span class="mi">9</span><span class="o">.</span><span class="mi">3</span><span class="n">p0</span> <span class="p">:</span><span class="mo">006</span> <span class="o">&gt;</span> <span class="n">country</span> <span class="o">=</span> <span class="s2">&quot;España&quot;</span>
</span><span class='line'><span class="o">=&gt;</span> <span class="s2">&quot;España&quot;</span>
</span><span class='line'><span class="mi">1</span><span class="o">.</span><span class="mi">9</span><span class="o">.</span><span class="mi">3</span><span class="n">p0</span> <span class="p">:</span><span class="mo">007</span> <span class="o">&gt;</span> <span class="n">country</span><span class="o">.</span><span class="n">upcase</span>
</span><span class='line'><span class="o">=&gt;</span> <span class="s2">&quot;ESPAñA&quot;</span>
</span></code></pre></td></tr></table></div></figure>


<p>In order to fix this I installed the <a href="http://unicode-utils.rubyforge.org/">UnicodeUtils gem</a> that does exactly what I want (among many other Unicode string manipulations).</p>

<figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="mi">1</span><span class="o">.</span><span class="mi">9</span><span class="o">.</span><span class="mi">3</span><span class="n">p0</span> <span class="p">:</span><span class="mo">00</span><span class="mi">8</span> <span class="o">&gt;</span> <span class="no">UnicodeUtils</span><span class="o">.</span><span class="n">upcase</span> <span class="n">country</span>
</span><span class='line'> <span class="o">=&gt;</span> <span class="s2">&quot;ESPAÑA&quot;</span>
</span><span class='line'> <span class="mi">1</span><span class="o">.</span><span class="mi">9</span><span class="o">.</span><span class="mi">3</span><span class="n">p0</span> <span class="p">:</span><span class="mo">00</span><span class="mi">9</span> <span class="o">&gt;</span> <span class="no">UnicodeUtils</span><span class="o">.</span><span class="n">upcase</span> <span class="nb">name</span>
</span><span class='line'><span class="o">=&gt;</span> <span class="s2">&quot;MARTÍNEZ&quot;</span>
</span></code></pre></td></tr></table></div></figure>



]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Freelance pros and cons]]></title>
    <link href="http://nowfromhome.com/freelance-pros-and-cons/"/>
    <updated>2012-05-11T16:58:00+02:00</updated>
    <id>http://nowfromhome.com/freelance-pros-and-cons</id>
    <content type="html"><![CDATA[<p>How many times I&#8217;ve had this conversation? At least now I know how to end it ;)</p>

<p><a href="http://hordeofneurons.com/2012/05/02/freelance/"><img src="http://nowfromhome.com/images/HoN47-Freelance-984.png"></a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[WinForms OutOfMemoryException when disabling a menu item]]></title>
    <link href="http://nowfromhome.com/winforms-outofmemoryexception-when-disabling-a-menu-item/"/>
    <updated>2012-05-09T19:41:00+02:00</updated>
    <id>http://nowfromhome.com/winforms-outofmemoryexception-when-disabling-a-menu-item</id>
    <content type="html"><![CDATA[<p>One of my customers sent me an error report pretty strange. Mostly because the same application is used by hundreds
of users and none of them have experienced this problem.</p>

<p>This is the full stack trace:</p>

<figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
</pre></td><td class='code'><pre><code class='csharp'><span class='line'><span class="n">System</span><span class="p">.</span><span class="n">OutOfMemoryException</span><span class="p">:</span> <span class="n">Out</span> <span class="n">of</span> <span class="n">memory</span><span class="p">.</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Drawing</span><span class="p">.</span><span class="n">Graphics</span><span class="p">.</span><span class="n">CheckErrorStatus</span><span class="p">(</span><span class="n">Int32</span> <span class="n">status</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Drawing</span><span class="p">.</span><span class="n">Graphics</span><span class="p">.</span><span class="n">DrawImage</span><span class="p">(</span><span class="n">Image</span> <span class="n">image</span><span class="p">,</span> <span class="n">Rectangle</span> <span class="n">destRect</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcX</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcY</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcWidth</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcHeight</span><span class="p">,</span> <span class="n">GraphicsUnit</span> <span class="n">srcUnit</span><span class="p">,</span> <span class="n">ImageAttributes</span> <span class="n">imageAttrs</span><span class="p">,</span> <span class="n">DrawImageAbort</span> <span class="n">callback</span><span class="p">,</span> <span class="n">IntPtr</span> <span class="n">callbackData</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Drawing</span><span class="p">.</span><span class="n">Graphics</span><span class="p">.</span><span class="n">DrawImage</span><span class="p">(</span><span class="n">Image</span> <span class="n">image</span><span class="p">,</span> <span class="n">Rectangle</span> <span class="n">destRect</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcX</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcY</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcWidth</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcHeight</span><span class="p">,</span> <span class="n">GraphicsUnit</span> <span class="n">srcUnit</span><span class="p">,</span> <span class="n">ImageAttributes</span> <span class="n">imageAttr</span><span class="p">,</span> <span class="n">DrawImageAbort</span> <span class="n">callback</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Drawing</span><span class="p">.</span><span class="n">Graphics</span><span class="p">.</span><span class="n">DrawImage</span><span class="p">(</span><span class="n">Image</span> <span class="n">image</span><span class="p">,</span> <span class="n">Rectangle</span> <span class="n">destRect</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcX</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcY</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcWidth</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">srcHeight</span><span class="p">,</span> <span class="n">GraphicsUnit</span> <span class="n">srcUnit</span><span class="p">,</span> <span class="n">ImageAttributes</span> <span class="n">imageAttr</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">ToolStripRenderer</span><span class="p">.</span><span class="n">CreateDisabledImage</span><span class="p">(</span><span class="n">Image</span> <span class="n">normalImage</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">ToolStripRenderer</span><span class="p">.</span><span class="n">OnRenderItemImage</span><span class="p">(</span><span class="n">ToolStripItemImageRenderEventArgs</span> <span class="n">e</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">ToolStripProfessionalRenderer</span><span class="p">.</span><span class="n">OnRenderItemImage</span><span class="p">(</span><span class="n">ToolStripItemImageRenderEventArgs</span> <span class="n">e</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">ToolStripRenderer</span><span class="p">.</span><span class="n">DrawItemImage</span><span class="p">(</span><span class="n">ToolStripItemImageRenderEventArgs</span> <span class="n">e</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">ToolStripMenuItem</span><span class="p">.</span><span class="n">OnPaint</span><span class="p">(</span><span class="n">PaintEventArgs</span> <span class="n">e</span><span class="p">)</span>
</span><span class='line'><span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">ToolStripItem</span><span class="p">.</span><span class="n">FireEvent</span><span class="p">(</span><span class="n">EventArgs</span> <span class="n">e</span><span class="p">,</span> <span class="n">ToolStripItemEventType</span> <span class="n">met</span><span class="p">)</span>
</span><span class='line'><span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">ToolStrip</span><span class="p">.</span><span class="n">OnPaint</span><span class="p">(</span><span class="n">PaintEventArgs</span> <span class="n">e</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">Control</span><span class="p">.</span><span class="n">PaintWithErrorHandling</span><span class="p">(</span><span class="n">PaintEventArgs</span> <span class="n">e</span><span class="p">,</span> <span class="n">Int16</span> <span class="n">layer</span><span class="p">,</span> <span class="n">Boolean</span> <span class="n">disposeEventArgs</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">Control</span><span class="p">.</span><span class="n">WmPaint</span><span class="p">(</span><span class="n">Message</span><span class="p">&amp;</span> <span class="n">m</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">Control</span><span class="p">.</span><span class="n">WndProc</span><span class="p">(</span><span class="n">Message</span><span class="p">&amp;</span> <span class="n">m</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">ScrollableControl</span><span class="p">.</span><span class="n">WndProc</span><span class="p">(</span><span class="n">Message</span><span class="p">&amp;</span> <span class="n">m</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">ToolStrip</span><span class="p">.</span><span class="n">WndProc</span><span class="p">(</span><span class="n">Message</span><span class="p">&amp;</span> <span class="n">m</span><span class="p">)</span>
</span><span class='line'><span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">ToolStripDropDown</span><span class="p">.</span><span class="n">WndProc</span><span class="p">(</span><span class="n">Message</span><span class="p">&amp;</span> <span class="n">m</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">Control</span><span class="p">.</span><span class="n">ControlNativeWindow</span><span class="p">.</span><span class="n">OnMessage</span><span class="p">(</span><span class="n">Message</span><span class="p">&amp;</span> <span class="n">m</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">Control</span><span class="p">.</span><span class="n">ControlNativeWindow</span><span class="p">.</span><span class="n">WndProc</span><span class="p">(</span><span class="n">Message</span><span class="p">&amp;</span> <span class="n">m</span><span class="p">)</span>
</span><span class='line'>    <span class="n">at</span> <span class="n">System</span><span class="p">.</span><span class="n">Windows</span><span class="p">.</span><span class="n">Forms</span><span class="p">.</span><span class="n">NativeWindow</span><span class="p">.</span><span class="n">Callback</span><span class="p">(</span><span class="n">IntPtr</span> <span class="n">hWnd</span><span class="p">,</span> <span class="n">Int32</span> <span class="n">msg</span><span class="p">,</span> <span class="n">IntPtr</span> <span class="n">wparam</span><span class="p">,</span> <span class="n">IntPtr</span> <span class="n">lparam</span><span class="p">)</span>
</span></code></pre></td></tr></table></div></figure>


<p>This exception is thrown when trying to open a context menu with disabled items.</p>

<p>As usual, getting a repro was not easy. This was happening only on some computers of this client.  They were Windows XP SP2 computers, so I launched
a VM and finally got a repro.</p>

<p>After some debugging and searching on the interwebs, I discovered that, for some reason (a bug in a .NET library!?), if you assign an image to a <em>menu item</em> that comes
from a assembly resource and then you disable that menu, the exception is thrown. I&#8217;ve been unable to reproduce the problem in Windows 7 or Windows Vista, but it happens
on Windows XP.</p>

<p>Anyway, some post in a forum point out the following solution, which consists in making a copy of the image and assign that copy instead.</p>

<figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='csharp'><span class='line'><span class="n">Bitmap</span> <span class="n">bmp</span> <span class="p">=</span> <span class="k">new</span> <span class="n">Bitmap</span><span class="p">(</span><span class="n">imageFromAssemblyResource</span><span class="p">);</span>
</span><span class='line'><span class="n">mnuItem</span> <span class="p">=</span> <span class="k">new</span> <span class="n">ToolStripMenuItem</span><span class="p">(</span><span class="s">&quot;My menu&quot;</span><span class="p">,</span> <span class="n">bmp</span><span class="p">);</span>
</span></code></pre></td></tr></table></div></figure>


<p>It didn&#8217;t work for me. I also tried to clone the image:</p>

<figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='csharp'><span class='line'><span class="n">mnuItem</span> <span class="p">=</span> <span class="k">new</span> <span class="n">ToolStripMenuItem</span><span class="p">(</span><span class="s">&quot;My menu&quot;</span><span class="p">,</span> <span class="p">(</span><span class="n">Image</span><span class="p">)</span><span class="n">imageFromAssemblyResource</span><span class="p">.</span><span class="n">Clone</span><span class="p">());</span>
</span></code></pre></td></tr></table></div></figure>


<p>No luck. Finally I was able to workaround the bug using this code:</p>

<figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class='csharp'><span class='line'><span class="n">Bitmap</span> <span class="n">bmp</span> <span class="p">=</span> <span class="k">new</span> <span class="n">Bitmap</span><span class="p">(</span><span class="n">imageFromAssemblyResource</span><span class="p">.</span><span class="n">Width</span><span class="p">,</span> <span class="n">imageFromAssemblyResource</span><span class="p">.</span><span class="n">Height</span><span class="p">);</span>
</span><span class='line'><span class="n">using</span><span class="p">(</span><span class="n">Graphics</span> <span class="n">g</span> <span class="p">=</span> <span class="n">Graphics</span><span class="p">.</span><span class="n">FromImage</span><span class="p">(</span><span class="n">bmp</span><span class="p">))</span>
</span><span class='line'><span class="p">{</span>
</span><span class='line'>    <span class="n">g</span><span class="p">.</span><span class="n">DrawImage</span><span class="p">(</span><span class="n">imageFromAssemblyResource</span><span class="p">,</span> <span class="m">0</span><span class="p">,</span> <span class="m">0</span><span class="p">);</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="n">mnuItem</span> <span class="p">=</span> <span class="k">new</span> <span class="n">ToolStripMenuItem</span><span class="p">(</span><span class="s">&quot;My menu&quot;</span><span class="p">,</span> <span class="n">bmp</span><span class="p">);</span>
</span></code></pre></td></tr></table></div></figure>


<p>It&#8217;s ugly but it worked. If you know other workaround or fix, please let me know.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[flash[:notice] not working? Check the obvious]]></title>
    <link href="http://nowfromhome.com/flash-notice-not-working-check-the-obvious/"/>
    <updated>2012-04-30T11:52:00+02:00</updated>
    <id>http://nowfromhome.com/flash-notice-not-working-check-the-obvious</id>
    <content type="html"><![CDATA[<p>I&#8217;ve just wasted twenty minutes debugging something that should have been obvious. For some reason
a <em>flash</em> message was not showing in my rails app.</p>

<p>The html template that renders the flash is ok because it renders other messages. The code that sets
the flash message in the controller seems right too. Then, why?</p>

<p>Flash messages are kept just for one request, after that, the <em>flash hash</em> is cleared. So the problem
was that I was redirecting to the <em>root_url</em> and then automatically redirected again to the <em>login_url</em> because
the user was not logged in. So the flash got lost in the second redirect. Obvious, right? That&#8217;s what I think.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[VirtualBox: slow network from Windows host to linux guest]]></title>
    <link href="http://nowfromhome.com/virtualbox-slow-network-from-windows-host-to-linux-guest/"/>
    <updated>2012-02-08T16:43:00+01:00</updated>
    <id>http://nowfromhome.com/virtualbox-slow-network-from-windows-host-to-linux-guest</id>
    <content type="html"><![CDATA[<p>I develop my Rails apps in Ubuntu. I run Ubuntu as a <a href="https://www.virtualbox.org/">Virtual Box</a> VM using Windows 7 as a host. For a long time I&#8217;ve had the problem that when accessing my rails apps from Windows, say to http://192.168.1.25:3000 the response was extremely slow.</p>

<p>Changing the network settings in VirtualBox had no effect (bridged, host only, NAT&#8230; no luck). It turns out that the problem wasn&#8217;t on Windows nor Ubuntu network configuration.</p>

<p>In order to fix the problem you have to change the following parameter in the Webrick config file:</p>

<figure class='code'><figcaption><span>~/.rvm/rubies/lib/ruby-1.9.3-p0/ruby/webrick/config.rb  </span></figcaption>
 <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="c1"># :DoNotReverseLookUp =&gt; nil,</span>
</span><span class='line'><span class="ss">:DoNotReverseLookUp</span> <span class="o">=&gt;</span> <span class="kp">true</span><span class="p">,</span>
</span></code></pre></td></tr></table></div></figure>


<p>Now it works as expected.</p>

<p>That said, this slowness has come handy a couple of times when I wanted to test how my apps behave when the network is slow.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Got a Transcend 32GB USB 3.0 Flash Drive]]></title>
    <link href="http://nowfromhome.com/got-a-transcend-32gb-usb-3-dot-0-flash-drive/"/>
    <updated>2012-01-16T18:00:00+01:00</updated>
    <id>http://nowfromhome.com/got-a-transcend-32gb-usb-3-dot-0-flash-drive</id>
    <content type="html"><![CDATA[<p>I&#8217;m preparing a small trip to Seville to visit a couple of customers. One of them has a 12 GB SQL Server database so my current 8 GB USB flash drive is not going to make it. My current 8 GB pen drive is only 6 months old and I payed for it almost the same than for this one that has 4x times the capacity.</p>

<p><a href="http://www.amazon.com/gp/product/B004HXHIOM/ref=as_li_tf_il?ie=UTF8&tag=nowfromhomeco-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=B004HXHIOM"><img border="0" src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&Format=_SL110_&ASIN=B004HXHIOM&MarketPlace=US&ID=AsinImage&WS=1&tag=nowfromhomeco-20&ServiceVersion=20070822" ></a><img src="http://www.assoc-amazon.com/e/ir?t=nowfromhomeco-20&l=as2&o=1&a=B004HXHIOM" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
<a href="http://www.amazon.com/gp/product/B004HXHIOM/ref=as_li_tf_tl?ie=UTF8&tag=nowfromhomeco-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=B004HXHIOM">Transcend 32GB USB 3.0</a><img src="http://www.assoc-amazon.com/e/ir?t=nowfromhomeco-20&l=as2&o=1&a=B004HXHIOM" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>

<p>Of course the first thing I did with the drive was to <a href="http://www.nowfromhome.com/easily-protect-your-usb-pen-drive-data/">protect it</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[GITT: Git In The Trenches]]></title>
    <link href="http://nowfromhome.com/gitt-git-in-the-trenches/"/>
    <updated>2012-01-11T08:43:00+01:00</updated>
    <id>http://nowfromhome.com/gitt-git-in-the-trenches</id>
    <content type="html"><![CDATA[<p>My journey using SCMs has taken me through SourceSafe (ouch!), <a href="http://nowfromhome.com/moving-from-subversion-to-mercurial/">Subversion</a>, <a href="http://nowfromhome.com/moving-from-subversion-to-mercurial/">Mercurial</a> and finally <a href="http://nowfromhome.com/migrate-repository-from-mercurial-to-git/">Git</a>.</p>

<p>Despite all that experience, when I started using git I felt a bit lost. Beeing most of the time a sole developer, I really never used the most advanced features of those tools, only the basic stuff. Even with Mercurial, my branching model was based on cloning a full repository in another folder and pulling/pushing as needed.</p>

<p>Now I&#8217;m using git for most of my repositories and every day I learn something new. I really like git.</p>

<p>The best resource I&#8217;ve found to really grasp git is <a href="http://cbx33.github.com/gitt/">Git In The Trenches</a> by Peter Savage. Thanks to this book I moved from a &#8220;branch/merge&#8221; level of understanding, to use &#8220;rebase&#8221; confident about what is going to happen.</p>

<p>I like the style of the book because is based on scenarios you&#8217;ll likely face sooner or later. For example:</p>

<ul>
<li>Have you ever wanted to edit a commit message?</li>
<li>Wanted to merge two different commits into one?</li>
<li>Wanted to recreate a branch that was deleted by mistake?</li>
<li>Search where a change (a bug) was introduced, even automatically?</li>
<li>Discovered you have sensitive data (secrete keys) in your repository and want to remove it?</li>
</ul>


<p>It&#8217;s all there. It&#8217;s a really good book. Even though I read it cover to cover, I&#8217;m sure I&#8217;ll get back to it as a reference.</p>

<p>Oh! I almost forgot, it&#8217;s free, even the PDF  / e-book versions.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Migrate a repository from Mercurial to git]]></title>
    <link href="http://nowfromhome.com/migrate-repository-from-mercurial-to-git/"/>
    <updated>2012-01-05T12:31:00+01:00</updated>
    <id>http://nowfromhome.com/migrate-repository-from-mercurial-to-git</id>
    <content type="html"><![CDATA[<p>I&#8217;m using Linux more and more and I&#8217;m using git with my Linux projects. Now that I used both Mercurial and git, I feel more productive using git, basically for the branching. So I decided to move my Windows projects to git too, and get the same experience on both OS.</p>

<p>I&#8217;m hosting my projects on <a href="http://www.bitbucket.org">BitBucket</a> as they offer free private repositories.</p>

<p>There&#8217;s a lot of blogs covering how to migrate a repos from Mercurial to git, I&#8217;m posting the method that worked for me as a reference.</p>

<p>On Linux:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>git clone git://repo.or.cz/fast-export.git
</span><span class='line'>mkdir new_git_repo
</span><span class='line'>cd new_git_repo
</span><span class='line'>git init
</span><span class='line'>/path/to/hg-fast-export.sh -r /path/to/hg_repo
</span><span class='line'>git add remote origin git@bitbucket.org:USER/repository_name.git
</span><span class='line'>git push origin master</span></code></pre></td></tr></table></div></figure>



]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Ubuntu server for Rails 3.1 and PostgreSQL 9.1]]></title>
    <link href="http://nowfromhome.com/setting-up-a-fresh-ubuntu-server-for-rails-3-dot-1-and-postgresql-9-dot-1/"/>
    <updated>2011-12-27T10:48:00+01:00</updated>
    <id>http://nowfromhome.com/setting-up-a-fresh-ubuntu-server-for-rails-3-dot-1-and-postgresql-9-dot-1</id>
    <content type="html"><![CDATA[<p>This is the second time I have to setup a VPS for a Rails/PostgreSQL so I&#8217;m documenting the steps in a customized guide to hopefully save me/you sometime in the future. These steps are collected from different sources, mostly from the <a href="http://library.linode.com/">Linode Library</a>.</p>

<p>The guide is on its <a href="http://nowfromhome.com/setting-up-a-vps-with-postgresql-9.1-and-rails.html">own page</a> because I hope to keep it updated.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Enjoying the simplicity of Octopress & Jekyll]]></title>
    <link href="http://nowfromhome.com/enjoying-the-simplicity-of-octopress-and-jekyll/"/>
    <updated>2011-12-23T14:48:00+01:00</updated>
    <id>http://nowfromhome.com/enjoying-the-simplicity-of-octopress-and-jekyll</id>
    <content type="html"><![CDATA[<p>As I spend more and more time on Linux, I&#8217;ve begun to enjoy the simplicity of the tools I use.</p>

<p>When I read about Jekyll and static site generators I fell in love with the idea.</p>

<p>I maintain a couple of blogs including this one and I&#8217;ve always used Wordpress because it is a one-click install in Dreamhost. Although extremly powerful it has some things that I don&#8217;t really like.</p>

<p>For instance, my posts are stored in a database (MySQL), which I have to backup. And then, there&#8217;s the blog template, which I tweaked a lot back then but now I don&#8217;t really know how to backup. I&#8217;d rather use git as I do with most of my documents and projects.</p>

<p>Anyway, I gave Jekyll a try on my Ubuntu box and I liked it a lot. Then I discovered Octopress which is just a framework on top of Jekyll and makes it really easy to work with Jekyll.</p>

<p>I&#8217;ve moved this blog from Wordpress to Octopress in a couple of hours, including setting up the comments (Disqus), the deployment (rsync) and the source control (git repository). Loving it!</p>

<p><a href="https://github.com/mojombo/jekyll" title="Jekyll on github">Jekyll</a></p>

<p><a href="http://octopress.org/" title="Octopess site">Octopress</a></p>

<p><a href="http://vitobotta.com/how-to-migrate-from-wordpress-to-jekyll/">Migrating from Wordpress to Jekyll</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Rails, multi-tenant applications]]></title>
    <link href="http://nowfromhome.com/rails-multi-tenant-applications/"/>
    <updated>2011-09-15T00:00:00+02:00</updated>
    <id>http://nowfromhome.com/rails-multi-tenant-applications</id>
    <content type="html"><![CDATA[<p>I&#8217;m facing my second Rails project that has to manage multiple tenants. In both projects each customer gets its own subdomain and it&#8217;s own data . There&#8217;s three common approaches to solve this:</p>

<ul>
    <li>Share nothing (each tenant gets its own database)</li>
    <li>Share everything (a single database holds the data of all the tenants; table must include a tenant_id column)</li>
    <li>PostgreSQL schemas or namespaces (single database but a new schema is created per tenant with all the tables)</li>
</ul>


<p>I strongly recommend to check out this video &#8221;<a href="http://aac2009.confreaks.com/06-feb-2009-14-30-writing-multi-tenant-applications-in-rails-guy-naor.html">Writing Multi-Tenant Applications in Rails</a>&#8221;. It explains all these three options in detail.</p>


<p>For my first project I was a little paranoid about depending on just one column to select the correct data for each customer. If just one query misses to filter by that field you&#8217;ll be exposing private data to other customers. And what about backups? First option ruled out.</p>


<p>Even though the third option sounded appealing, I was just starting with Rails, Linux, etc. So I choose the &#8220;share nothing&#8221; approach using MySQL. It&#8217;s not trivial to make it work, and you have to add code to switch between databases per request. Migrations requires you to write some custom tasks too (future post?). That said, it&#8217;s working just fine. Backups are easy too as they are just different DBs.</p>


<p>For my new project I&#8217;m going to try PostgreSQL and the multiple schemas solution. One of the showstoppers for me to use this solution was that I didn&#8217;t know how to handle the hypothetical case that a customer needs to restore its data from a backup. In my mind there was no solution, but to restore the full database. I was wrong.</p>


<p>It&#8217;s as simple as dumping the database &#8220;per schema&#8221; using the PostgreSQL tool pg_dump which allows you to specify the schema.</p>


<p>Time to play with PostgreSQL and Rails 3. I&#8217;m using <a href="http://blog.jerodsanto.net/2011/07/building-multi-tenant-rails-apps-with-postgresql-schemas/">this post</a> as starting point.</p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Windows 7 USB/DVD download tool unable to copy files]]></title>
    <link href="http://nowfromhome.com/windows-7-usbdvd-download-tool-unable-to-copy-files/"/>
    <updated>2011-09-14T00:00:00+02:00</updated>
    <id>http://nowfromhome.com/windows-7-usbdvd-download-tool-unable-to-copy-files</id>
    <content type="html"><![CDATA[<p>As everyone, I downloaded the <a href="http://msdn.microsoft.com/en-us/windows/apps/br229516" target="_blank">Windows 8 Developer Preview</a> to start playing with what it looks like a big step forward from Microsoft.</p>

<p>I downloaded the <a href="http://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool" target="_blank">Windows 7 USB/DVD Download tool</a> to create a bootable USB pendrive and it failed with the error message &#8220;Unable to copy files&#8230;&#8221;</p>

<p>I used this very same pendrive to install Ubuntu, so I guess that, even though I formatted the disk, something was still there, on the boot sector or MBR.</p>

<p>I found the solution in <a href="http://4sysops.com/archives/windows-7-usbdvd-download-tool-wudt-is-unable-to-copy-files/" target="_blank">this article</a>:</p>

<ul>
    <li>Run &#8220;diskpart&#8221; from a command prompt with admin rights</li>
    <li>list disk</li>
    <li>select disk # (the number of your USB)</li>
    <li>clean</li>
    <li>create partition primary</li>
    <li>select partition 1</li>
    <li>active</li>
    <li>format quick fs=fat32</li>
    <li>assign</li>
</ul>


<div>Run again the tool, it will work without problems now.</div>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[When your assets doesn't get an asset_id...]]></title>
    <link href="http://nowfromhome.com/when-your-assets-doesnt-get-an-asset_id/"/>
    <updated>2011-06-14T00:00:00+02:00</updated>
    <id>http://nowfromhome.com/when-your-assets-doesnt-get-an-asset_id</id>
    <content type="html"><![CDATA[<p>&#8230; check that the asset does exist.</p>

<p>I had the following code in my application layout template:</p>

<figure class='code'><figcaption><span>application.html.erb  </span></figcaption>
 <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="o">&lt;!</span><span class="no">DOCTYPE</span> <span class="n">html</span><span class="o">&gt;</span>
</span><span class='line'><span class="o">&lt;</span><span class="n">html</span><span class="o">&gt;</span>
</span><span class='line'><span class="o">&lt;</span><span class="n">head</span><span class="o">&gt;</span>
</span><span class='line'>  <span class="o">&lt;</span><span class="n">title</span><span class="o">&gt;</span><span class="no">My</span> <span class="n">webpage</span> <span class="n">title</span><span class="o">&lt;</span><span class="sr">/title&gt;</span>
</span><span class='line'><span class="sr">  &lt;%= stylesheet_link_tag &#39;default&#39; %&gt;</span>
</span><span class='line'><span class="sr">  &lt;%= stylesheet_link_tag @current_subdomain %&gt;</span>
</span><span class='line'><span class="sr">  &lt;%= javascript_include_tag :defaults %&gt;</span>
</span><span class='line'><span class="sr">  &lt;%= csrf_meta_tag %&gt;</span>
</span><span class='line'><span class="sr">&lt;/</span><span class="n">head</span><span class="o">&gt;</span>
</span></code></pre></td></tr></table></div></figure>


<p>It works great to load a custom stylesheet depending on the current subdomain, however I noticed that for some subdomains Rails was not adding the asset_id:</p>

<figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='html'><span class='line'><span class="nt">&lt;link</span> <span class="na">type=</span><span class="s">&quot;text/css&quot;</span> <span class="na">rel=</span><span class="s">&quot;stylesheet&quot;</span> <span class="na">media=</span><span class="s">&quot;screen&quot;</span> <span class="na">href=</span><span class="s">&quot;/stylesheets/default.css?1307960871&quot;</span><span class="nt">&gt;</span>
</span><span class='line'><span class="nt">&lt;link</span> <span class="na">type=</span><span class="s">&quot;text/css&quot;</span> <span class="na">rel=</span><span class="s">&quot;stylesheet&quot;</span> <span class="na">media=</span><span class="s">&quot;screen&quot;</span> <span class="na">href=</span><span class="s">&quot;/stylesheets/sample.css&quot;</span><span class="nt">&gt;</span>
</span></code></pre></td></tr></table></div></figure>


<p>It is because sample.css must exist. <em>stylesheet_link_tag </em> does not check for the existence of the asset, and if it doesn&#8217;t exists it doesn&#8217;t add the asset timestamp.</p>

<p>Hope it saves you some time.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Program does not contain a static 'Main' method suitable for an entry point]]></title>
    <link href="http://nowfromhome.com/program-does-not-contain-a-static-main-method-suitable-for-an-entry-point/"/>
    <updated>2010-09-07T00:00:00+02:00</updated>
    <id>http://nowfromhome.com/program-does-not-contain-a-static-main-method-suitable-for-an-entry-point</id>
    <content type="html"><![CDATA[<p>I usually create projects in Visual Studio using the <em>Empty project</em> template, even if they are going to be a WPF application. As the code evolves I keep adding the appropriate references (<em>System.Xaml, PresentationCore</em> and so on).</p>

<p>At some point I’m ready to launch the application and I receive the mentioned error:</p>

<blockquote>Program XXXX does not contain a static &#8216;Main&#8217; method suitable for an entry point</blockquote>


<p>Invariably I keep forgetting where the problem is. So I start inspecting the project properties, the App class, etc. After some minutes, frustrated, I launch Google and I find the answer. It has happened way too many times, so I’m writing it here. Now I’m sure I will never forget it.</p>

<p>The file <em>App.xaml</em> is set to some other thing instead of <em>ApplicationDefinition</em>!!</p>

<p><img class="alignnone size-full wp-image-279" title="appxaml" src="http://nowfromhome.com/images/appxaml.jpg" alt="" width="260" height="174" /></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[If you get stucked with a RoR error, restart script/server]]></title>
    <link href="http://nowfromhome.com/if-you-are-stucked-with-a-ror-error-restart-scriptserver/"/>
    <updated>2010-05-21T00:00:00+02:00</updated>
    <id>http://nowfromhome.com/if-you-are-stucked-with-a-ror-error-restart-scriptserver</id>
    <content type="html"><![CDATA[<p>Yesterday I had an idea for a web app (again!). I decided to sketch it out using Ruby On Rails as a way to experiment what’s outside the .NET ecosystem. Besides, if the idea finally crystallizes, it will fit much better in a Linux box than on a Windows server mostly because I think it will be hard to find a good revenue model.</p>


<p>  <p>This post is just a note to myself. I have to admin than I’m totally lost with RoR for now. I’m following several screencasts and reading every beginner’s tutorial I can find. </p>  <p>Following one of those tutorials I got stucked. I checked my config files, checked that I had not misspelled anything but nothing came out. </p>  <p>Finally I saw an error on the server log:</p>  <blockquote>   <p>Rendering rescues/layout (internal server error)</p> </blockquote>  <p>That error message was logged 55 minutes ago!! Just restarting the ruby server made my error go away. This is the second time this happens, so I’m writing this post as a reminder. Depending of what files you touch, you could need to restart your app.</p></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Moving from Subversion to Mercurial]]></title>
    <link href="http://nowfromhome.com/moving-from-subversion-to-mercurial/"/>
    <updated>2010-03-25T00:00:00+01:00</updated>
    <id>http://nowfromhome.com/moving-from-subversion-to-mercurial</id>
    <content type="html"><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="mercurial" border="0" alt="mercurial" align="right" src="http://nowfromhome.com/images/mercurial1.png" width="204" height="244" /> I’ve been using Subversion for the last 5 years and it has served me well. I can’t conceive writing any meaningful code without using it. Using a source control tool is the definitive backup tool for your code and you should be using one no matter what.</p>


<p>  <p>Because I work mostly alone, merging has never been a real issue for me. Mainly because I rarely branched my code to work on different branches in parallel. </p>  <p>I used to have just a main branch (trunk) where I add new code. When the code it’s ready to release, I tag it and branch it. Then I continue to add code to the trunk. The branch is used only for maintenance of the shipped code. </p>  <p>When I touch code in the maintenance branch I can merge with the trunk or usually just fix the code in the trunk manually.</p>  <p>That’s it. No branches per feature, usually no experimental branches, life was easy.</p>  <p>However, as some of my projects begun to get momentum (read ‘get real paying customers’), my needs started to grow. </p>  <p>Now I have to have more than one active maintenance branch. I also need branches to develop some custom modules for some customers, and as my time to develop a single feature grows I also need branches to develop features that need a long time to complete.</p>  <blockquote>   <p>If you branch a lot you have to merge a lot.</p> </blockquote>  <p>This implies that if you have problems merging you’ll try to avoid branching, and if you can’t branch as needed your source control tool is failing you.</p>  <p>I’ve been avoiding branching in subversion because the merging is sometimes complicated. More than once I end up applying changes manually or overwriting files from folder to folder. Not fun.</p>  <p>I started paying attention to all the buzz about <a href="http://git-scm.com/" target="_blank">git</a> and its branching/merging model. I installed it and played with it. I saw the benefits but I find some concepts difficult to grasp, so I continued to use subversion while playing with git. Then I found <a href="http://hginit.com/" target="_blank">hgInit</a>, a <a href="http://mercurial.selenic.com/" target="_blank">Mercurial</a> tutorial by <a href="http://www.joelonsoftware.com/" target="_blank">Joel Spolsky</a>. Turns out that Mercurial it’s pretty much like git, but simpler.</p>  <p>There are some differences that I’m not going to describe here, but they are not as important as their similarities. The key here is that merging code works great!</p>  <p>If you are using subversion please take a look at Mercurial or git. They are a really a big step forward. They have a different model than subversion so it takes a while to grasp the difference between a centralized and distributed source control system, but it’s worth it.</p>  <p>Here are some links that helped me see light:</p>  <p><a title="http://hginit.com/" href="http://hginit.com/">http://hginit.com/</a></p>  <p><a href="http://www.youtube.com/watch?v=4XpnKHJAok8" target="_blank">Linus Torvals on git</a></p></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Upgrading my network: Linksys WRT320n]]></title>
    <link href="http://nowfromhome.com/upgrading-my-network-linksys-wrt320n/"/>
    <updated>2010-02-16T00:00:00+01:00</updated>
    <id>http://nowfromhome.com/upgrading-my-network-linksys-wrt320n</id>
    <content type="html"><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="Linksyssm" border="0" alt="Linksyssm" align="right" src="http://nowfromhome.com/images/Linksyssm.jpg" width="190" height="190" /></p>

<p>I <a href="http://www.nowfromhome.com/windows-7-x64-and-intel-82562v-2-dont-work-well-together/" target="_blank">wrote</a> some time ago that I was having problems with my Windows Home Server and my main PC, mainly because the transfer speeds from my WHS to my PC were ridiculous. Uploads were fine though.</p>

<p>After looking into it for a long time, the problem was that my router/switch, an SMC Barricade, was not handling the traffic from the WHS properly. Every other PC was working right.</p>

<p>Anyway, I’ve changed the router by a <a href="http://www.linksysbycisco.com/US/en/products/WRT320N" target="_blank">Linksys WRT320n</a>. This means that I’ve upgraded my LAN from 100 Mbps to 1 Gbps.</p>

<p>Transfer speeds are now ok, getting 60 MB/s out of the box. Also, the wireless speed has improved dramatically, specially when using my iPhone 3Gs. Using my old router I was unable to watch YouTube videos and now they are loaded in no time.</p>

<p>I’ve been using this router only for a couple of days, but I’m already very happy with the upgrade.</p>

<p>I have had only one minor problem setting up the wireless connection. For some reason none of my WIFI devices were able to connect to the router. I needed to manually change the &#8216;WIFI channel’ from <em>Auto</em> to <em>channel 11</em> in order to get it to work.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Shell extensions, the root of a lot of problems]]></title>
    <link href="http://nowfromhome.com/shell-extensions-the-root-of-a-lot-of-problems/"/>
    <updated>2010-02-16T00:00:00+01:00</updated>
    <id>http://nowfromhome.com/shell-extensions-the-root-of-a-lot-of-problems</id>
    <content type="html"><![CDATA[<p>In one of my computers, the simple action of creating a new folder or renaming a file was taking a lot of time. Windows Explorer seemed to freeze for a variable amount of time. Sometimes a few seconds sometimes as long a one minute!</p>

<p>Obviously some shell extension was the culprit, but which one? The idea of uninstalling one by one was discouraging, so I lived for a while with the problem until I found this little tool:</p>

<p><a href="http://www.nirsoft.net/utils/shexview.html">ShellExView</a></p>

<p><img class="alignnone" title="ShellExView" src="http://www.nirsoft.net/utils/shexview.gif" alt="" width="610" height="285" /></p>

<blockquote>The ShellExView utility displays the details of shell extensions installed on your computer, and allows you to easily disable and enable each shell extension.</blockquote>


<p>It literally save me a lot of time. You need to run this tool as an Administrator if you want to disable any shell extension.</p>

<p>It turns out that the shell extension that was causing the slow down was TortoiseSVN. For some reason it doesn&#8217;t seem to work well on my Windows 7 x64 computer. It does work ok on my laptop (W7 x86).</p>

<p>Time to update to the lastest version and review my settings.</p>

<p><em>Note: Installing TortoiseSVN&#8217;s latest version solved the problem, but I needed to run ShellExView again to enable it again.</em></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Can't modify my Visual Studio 2008 installation]]></title>
    <link href="http://nowfromhome.com/cant-modify-my-visual-studio-2008-installation/"/>
    <updated>2009-11-23T00:00:00+01:00</updated>
    <id>http://nowfromhome.com/cant-modify-my-visual-studio-2008-installation</id>
    <content type="html"><![CDATA[<p>I run setup to add the Web developer extensions to Visual Studio 2008 from the DVD and it complaint with the following message:</p>

<p> <blockquote> <br/>
A problem has been encountered while loading the setup components. Cancelling Setup
</blockquote></p>

<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://nowfromhome.com/images/vs2008_error.png" width="497" height="171" /></p>

<p>What!!!</p>

<p>Ok, I know what’s going on. The DVD has Microsoft Visual Studio 2008 installation program, but I have Visual Studio 2008 <strong>Service Pack 1</strong> installed.</p>

<p>So, I need to modify the installation using <em>Add/Remove programs </em>and select <em>Uninstall/Change. </em>Then I got this:</p>

<blockquote>   
A selected drive is no longer valid. Please review your installation path settings before continuing with setup.
</blockquote>


<p></p>

<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://nowfromhome.com/images/vs2008_error2.png" width="492" height="171" /></p>

<p>Oh, great!</p>

<p>After wasting some time through the internets, the solution was to uninstall the Service Pack 1, add or remove the features you want and reinstall Service Pack 1.</p>

<p>Hope this saves you some time.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[V 2009: I've been in some of the buildings inside Anna's mothership]]></title>
    <link href="http://nowfromhome.com/v-2009-ive-been-in-some-of-the-buildings-inside-annas-mothership/"/>
    <updated>2009-11-11T00:00:00+01:00</updated>
    <id>http://nowfromhome.com/v-2009-ive-been-in-some-of-the-buildings-inside-annas-mothership</id>
    <content type="html"><![CDATA[<p>I’ve managed to see the <a href="http://www.imdb.com/title/tt1307824/" target="_blank">V’s pilot episode</a>, the 2009 remake anyway. And there’s a scene where we see a panoramic view of the spaceship’s guts above New York. Instantly I recognized some buildings because they exist for real and in fact they are in my city, Valencia.</p>


<p>  <p>Take a look at the pictures. Next time I visit <a href="http://images.google.com/images?hl=en&amp;client=firefox-a&amp;rls=org.mozilla:en-US:official&amp;hs=cUc&amp;q=ciudad%20de%20las%20artes%20y%20las%20ciencias&amp;um=1&amp;ie=UTF-8&amp;sa=N&amp;tab=wi" target="_blank">La Ciudad de Las Artes y Las Ciencias</a> I’ll look at those buildings with suspicious eyes ;)</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="v_inside_mothership" border="0" alt="v_inside_mothership" src="http://nowfromhome.com/images/v_inside_mothership.jpg" width="500" height="327" /> </p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="valencia_ciudad_artes1" border="0" alt="valencia_ciudad_artes1" src="http://nowfromhome.com/images/valencia_ciudad_artes1.jpg" width="500" height="360" />&#160;</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="valencia_ciudad_artes2" border="0" alt="valencia_ciudad_artes2" src="http://nowfromhome.com/images/valencia_ciudad_artes2.jpg" width="500" height="375" /> </p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="valencia_ciudad_artes3" border="0" alt="valencia_ciudad_artes3" src="http://nowfromhome.com/images/valencia_ciudad_artes3.jpg" width="500" height="317" /></p></p>
]]></content>
  </entry>
  
</feed>

