<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0">
    <title>Software Trenches</title>
    
    <link rel="alternate" type="text/html" href="http://www.softwaretrenches.com/" />
    <id>tag:typepad.com,2003:weblog-1696434</id>
    <updated>2008-10-16T15:37:24-04:00</updated>
    
    <generator uri="http://www.typepad.com/">TypePad</generator>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SoftwareTrenches" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="softwaretrenches" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
        <title>Using staging servers in Capistrano and Rails</title>
        <link rel="alternate" type="text/html" href="http://www.softwaretrenches.com/2008/10/using-staging-s.html" />
        <link rel="replies" type="text/html" href="http://www.softwaretrenches.com/2008/10/using-staging-s.html" thr:count="1" thr:updated="2009-01-09T10:25:32-05:00" />
        <id>tag:typepad.com,2003:post-57099009</id>
        <published>2008-10-16T15:37:24-04:00</published>
        <updated>2008-10-16T15:37:24-04:00</updated>
        <summary>I was looking for a way to deploy our website to different servers and [this snippet](http://snippets.dzone.com/posts/show/3094) did it very well. The idea is very simple: in `config/deploy.rb` create a couple of new tasks to set the deployment variables: task :production...</summary>
        <author>
            <name>admin</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-US" xml:base="http://www.softwaretrenches.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>I was looking for a way to deploy our website to different servers and <a href="http://snippets.dzone.com/posts/show/3094">this snippet</a> did it very well.</p>

<p>The idea is very simple: in <code>config/deploy.rb</code> create a couple of new tasks to set the deployment variables:</p>

<pre>
task :production do
  role :web, "production.server.com"
  role :app, "production.server.com"
  role :db,  "production.server.com", :primary=&gt;true
end

task :staging do
  role :web, "staging.server.com"
  role :app, "staging.server.com"
  role :db,  "staging.server.com", :primary=&gt;true
end
</pre>

<p>After these tasks were added you can deploy using <code>cap staging deploy</code> or <code>cap production deploy</code>.</p>
</div>
</content>



    </entry>
    <entry>
        <title>Converting Subversion repositories to Git</title>
        <link rel="alternate" type="text/html" href="http://www.softwaretrenches.com/2008/08/converting-su-1.html" />
        <link rel="replies" type="text/html" href="http://www.softwaretrenches.com/2008/08/converting-su-1.html" />
        <id>tag:typepad.com,2003:post-54808982</id>
        <published>2008-08-28T11:20:06-04:00</published>
        <updated>2008-08-28T11:20:06-04:00</updated>
        <summary>Today I converted our last [subversion](http://subversion.tigris.org/) repository to [git](http://git.or.cz/). I do not want to repeat all the praise given to git and tell how smaller, faster and more powerful it is, you can [google it yourself](http://www.google.com/search?q=compare%20git%20svn). Linux Torvalds gives a...</summary>
        <author>
            <name>admin</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-US" xml:base="http://www.softwaretrenches.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>Today I converted our last <a href="http://subversion.tigris.org/">subversion</a> repository to <a href="http://git.or.cz/">git</a>.</p>

<p>I do not want to repeat all the praise given to git and tell how smaller, faster and more powerful it is, you can <a href="http://www.google.com/search?q=compare%20git%20svn">google it yourself</a>. </p>

<p>Linux Torvalds gives a <a href="http://www.youtube.com/watch?v=4XpnKHJAok8">great video introduction</a> and <a href="http://peepcode.com/products/git">Peepcode screencast</a> will get you up and running on git in no time.</p>

<p>Here is a few simple repository conversion steps:</p>

<h4>1. clone the svn repository</h4>

<p><code>git-svn clone svn+ssh://username@servername.com/var/svn/Project</code></p>

<h4>2. make it bare</h4>

<p><code>git clone --bare Project Project.git</code></p>

<h4>3. setup Git user on server</h4>

<p><code>useradd git --create-home --shell /usr/bin/git-shell</code></p>

<p><code>su -s /bin/bash git</code></p>

<p><code>cd; mkdir .ssh; chmod og-rwx .ssh</code></p>

<p><code>vi .ssh/authorized_keys</code></p>

<p>Paste developer public keys and save...</p>

<p><code>chmod og-rwx .ssh/authorized_keys; exit</code></p>

<p>Add developer public keys to /home/git/.ssh/authorized_keys</p>

<h4>4. upload the repository to server</h4>

<p>upload to /home/git/Project.git</p>

<h4>5. start using the new repository</h4>

<p><code>git clone git@servername.com:Project.git</code></p>

<p>Goodbye, subversion and thanks.</p>
</div>
</content>



    </entry>
    <entry>
        <title>Code Cuts</title>
        <link rel="alternate" type="text/html" href="http://www.softwaretrenches.com/2008/07/code-cuts.html" />
        <link rel="replies" type="text/html" href="http://www.softwaretrenches.com/2008/07/code-cuts.html" />
        <id>tag:typepad.com,2003:post-53010888</id>
        <published>2008-07-13T19:14:21-04:00</published>
        <updated>2008-07-13T19:14:21-04:00</updated>
        <summary>Code Cuts — this is what Thsrs came up with when I tried to shorten Software Trenches. Thsrs is special kind of thesaurus that suggests shorter words. Might be very useful when you try to cram your full message into...</summary>
        <author>
            <name>admin</name>
        </author>
        
        
<content type="html" xml:lang="en-US" xml:base="http://www.softwaretrenches.com/">
&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;Code Cuts &amp;mdash; this is what &lt;strong&gt;&lt;a href="http://www.ironicsans.com/thsrs"&gt;Thsrs&lt;/a&gt;&lt;/strong&gt; came up with when I tried to shorten Software Trenches.&lt;/p&gt;

&lt;p&gt;Thsrs is special kind of thesaurus that suggests shorter words. Might be very useful when you try to cram your full message into a &lt;a href="http://twitter.com/roustem"&gt;Twitter&lt;/a&gt; post.&lt;/p&gt;

&lt;p&gt;Via &lt;a href="http://daringfireball.net/"&gt;Daring Fireball&lt;/a&gt;.&lt;/div&gt;
</content>



    </entry>
    <entry>
        <title>localhost.com annoyance</title>
        <link rel="alternate" type="text/html" href="http://www.softwaretrenches.com/2008/07/localhostcom-an.html" />
        <link rel="replies" type="text/html" href="http://www.softwaretrenches.com/2008/07/localhostcom-an.html" />
        <id>tag:typepad.com,2003:post-53010886</id>
        <published>2008-07-13T15:46:58-04:00</published>
        <updated>2008-07-13T15:46:58-04:00</updated>
        <summary>If you are developing with Ruby on Rails then I am sure you had this happened more than once — type http://localhost:3000 in your browser and after a short delay it goes to http://www.localhost.com because your local server didn't start...</summary>
        <author>
            <name>admin</name>
        </author>
        
        
<content type="html" xml:lang="en-US" xml:base="http://www.softwaretrenches.com/">
&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;If you are developing with Ruby on Rails then I am sure you had this happened more than once &amp;mdash; type &lt;code&gt;http://localhost:3000&lt;/code&gt; in your browser and after a short delay it goes to http://www.localhost.com because your local server didn't start successfully.&lt;/p&gt;

&lt;p&gt;To get rid of this annoyance, change &lt;code&gt;/etc/hosts&lt;/code&gt; file and add 
&lt;blockquote&gt;
&lt;code&gt;127.0.0.1 localhost.com&lt;/code&gt;
&lt;/blockquote&gt;&lt;/div&gt;
</content>



    </entry>
    <entry>
        <title>Cocoa: Converting from nib to xib</title>
        <link rel="alternate" type="text/html" href="http://www.softwaretrenches.com/2008/06/cocoa-convertin.html" />
        <link rel="replies" type="text/html" href="http://www.softwaretrenches.com/2008/06/cocoa-convertin.html" thr:count="1" thr:updated="2009-08-21T20:16:58-04:00" />
        <id>tag:typepad.com,2003:post-53010884</id>
        <published>2008-06-05T21:09:25-04:00</published>
        <updated>2008-06-05T21:09:25-04:00</updated>
        <summary>Apple introduced new resource file format in Xcode 3.0: **.xib**. Xib files are used during development time only and are will be converted to deployment format (compressed .nib) at build time. The main benefit of .xib is that it is...</summary>
        <author>
            <name>admin</name>
        </author>
        <category scheme="http://www.sixapart.com/ns/types#category" term="Mac" />
        
        
<content type="xhtml" xml:lang="en-US" xml:base="http://www.softwaretrenches.com/">
<div xmlns="http://www.w3.org/1999/xhtml">Apple introduced new resource file format in Xcode 3.0: **.xib**.

Xib files are used during development time only and are will be converted to deployment format (compressed .nib) at build time.

The main benefit of .xib is that it is text-based. Text makes it easier to work with .xib files stored in a source control system.

Here is quick way to convert all old .nib files to .xib format:

`ls | grep nib | xargs -L1 ibtool --upgrade`</div>
</content>



    </entry>
    <entry>
        <title>ack - a better grep</title>
        <link rel="alternate" type="text/html" href="http://www.softwaretrenches.com/2008/03/ack---a-better.html" />
        <link rel="replies" type="text/html" href="http://www.softwaretrenches.com/2008/03/ack---a-better.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-53010882</id>
        <published>2008-03-29T01:37:54-04:00</published>
        <updated>2008-03-29T01:37:54-04:00</updated>
        <summary>I was searching through with [WebKit](http://webkit.org/) sources today and was struggling with [grep](http://www.gnu.org/software/grep/). The main problem was that, as any other [SVN](http://subversion.tigris.org/) checkout, WebKit directory had a bunch of hidden .svn subfolders and grep included them in the search results...</summary>
        <author>
            <name>admin</name>
        </author>
        
        
<content type="html" xml:lang="en-US" xml:base="http://www.softwaretrenches.com/">
&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;I was searching through with [WebKit](http://webkit.org/) sources today and was struggling with [grep](http://www.gnu.org/software/grep/).

The main problem was that, as any other [SVN](http://subversion.tigris.org/) checkout, WebKit directory had a bunch of hidden .svn subfolders and grep included them in the search results making the output completely unreadable and full of junk:

&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/roustem/etcm/grep-vs-ack"&gt;&lt;img src="http://img.skitch.com/20080329-1xy6r53yjr6nghnimjitk16hkw.preview.jpg" alt="grep_vs_ack" /&gt;&lt;/a&gt;

I started playing with grep and [find](http://en.wikipedia.org/wiki/Find) options to try to filter out the unwanted .svn results. 

The much better solution however is to simply switch to [**ack**](http://petdance.com/ack/). Not only ack ignores .svn directories, it also produces a much more readable output:

&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/roustem/etcq/ack-vs-grep"&gt;&lt;img src="http://img.skitch.com/20080329-gts5w2acd2exwjw2ig767f93je.preview.jpg" alt="ack_vs_grep" /&gt;&lt;/a&gt;

Kudos to [Andy Lester](http://petdance.livejournal.com/) for creating this great utility!&lt;/div&gt;
</content>



    </entry>
    <entry>
        <title>Quote of the Life</title>
        <link rel="alternate" type="text/html" href="http://www.softwaretrenches.com/2008/02/quote-of-the-li.html" />
        <link rel="replies" type="text/html" href="http://www.softwaretrenches.com/2008/02/quote-of-the-li.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-53010880</id>
        <published>2008-02-01T16:34:32-05:00</published>
        <updated>2008-02-01T16:34:32-05:00</updated>
        <summary>&gt; Your time is limited, so don't waste it living someone else's life. Don't be trapped by dogma — which is living with the results of other people's thinking. Don't let the noise of others' opinions drown out your own...</summary>
        <author>
            <name>admin</name>
        </author>
        <category scheme="http://www.sixapart.com/ns/types#category" term="Personal" />
        
        
<content type="html" xml:lang="en-US" xml:base="http://www.softwaretrenches.com/">
&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&gt; Your time is limited, so don't waste it living someone else's life. Don't be trapped by dogma — which is living with the results of other people's thinking. Don't let the noise of others' opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.

 – Steve Jobs

### Steve Jobs Stanford Commencement Speech


&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-204609026222503944&amp;hl=en-CA" flashvars=""&gt; &lt;/embed&gt;


&lt;a href="http://news-service.stanford.edu/news/2005/june15/jobs-061505.html"&gt;Commencement Speech Text&lt;/a&gt;&lt;/div&gt;
</content>



    </entry>
    <entry>
        <title>Quicksilver and Customer Support</title>
        <link rel="alternate" type="text/html" href="http://www.softwaretrenches.com/2007/12/quicksilver-and.html" />
        <link rel="replies" type="text/html" href="http://www.softwaretrenches.com/2007/12/quicksilver-and.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-53010878</id>
        <published>2007-12-17T14:13:41-05:00</published>
        <updated>2007-12-17T14:13:41-05:00</updated>
        <summary>Providing customer support for your products can be a lot of fun and a great source of motivation for every developer. Unfortunately it can also be a lot of pain and it appears that pain is killing one of my...</summary>
        <author>
            <name>admin</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-US" xml:base="http://www.softwaretrenches.com/">
<div xmlns="http://www.w3.org/1999/xhtml">Providing customer support for your products can be a lot of fun and a great source of motivation for every developer. Unfortunately it can also be a lot of pain and it appears that pain is killing one of my favourite Mac applications - [QuickSilver](http://www.blacktree.com/).

In his [recent interview with Lifehacker](http://www.tuaw.com/2007/12/06/lifehacker-interview-on-the-future-of-quicksilver/), Nicholas Jitkoff mentions that 

&gt;**Jitkoff**: I'm inclined to encourage users to move over to the more stable and well supported alternatives like [LaunchBar](http://www.obdev.at/products/launchbar/). Right now QS 54 (ed: the current build) accomplishes everything that I really need, the problem is stability, which for some reason most people seem to be ignoring.

The conversation continues...

&gt;**Lifehacker**: Right. I guess from my standpoint, the fact that Quicksilver is free (as well as open source, now) is a major part of why it's so beloved.

&gt;**Jitkoff**: But also why it is so poorly supported. I have to do any work in off-time.

It is very sad that with so many loyal users willing to pay for support and future development this project is going to slowly die. I am not sure if [making it open source](http://code.google.com/p/blacktree-alchemy/) will help.</div>
</content>



    </entry>
    <entry>
        <title>Compiling libIDL on Leopard</title>
        <link rel="alternate" type="text/html" href="http://www.softwaretrenches.com/2007/11/compiling-libid.html" />
        <link rel="replies" type="text/html" href="http://www.softwaretrenches.com/2007/11/compiling-libid.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-53010876</id>
        <published>2007-11-10T17:54:00-05:00</published>
        <updated>2007-11-10T17:54:00-05:00</updated>
        <summary>It appears that [libIDL](http://andrewtv.org/libIDL/) is packaged with old `config.guess` file and when you try to build it on Mac OS X 10.5 (Leopard) you will end up with this error: `configure: error: can not guess host type; you must specify...</summary>
        <author>
            <name>admin</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-US" xml:base="http://www.softwaretrenches.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>It appears that <a href="http://andrewtv.org/libIDL/">libIDL</a> is packaged with old <code>config.guess</code> file and when you try to build it on Mac OS X 10.5 (Leopard) you will end up with this error:</p>

<p><code>configure: error: can not guess host type; you must specify one</code></p>

<p>An easy fix is to replace the <code>config.guess</code> and <code>config.sub</code> files before running <code>./configure</code>:</p>

<p><code>cp /usr/share/automake-1.10/config.* ./</code></p>
</div>
</content>



    </entry>
    <entry>
        <title>Bitstream Vera Sans Mono</title>
        <link rel="alternate" type="text/html" href="http://www.softwaretrenches.com/2007/11/bitstream-vera.html" />
        <link rel="replies" type="text/html" href="http://www.softwaretrenches.com/2007/11/bitstream-vera.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-53010874</id>
        <published>2007-11-07T22:18:10-05:00</published>
        <updated>2007-11-07T22:18:10-05:00</updated>
        <summary>James Duncan Davidson recently wrote [an article about monospaced fonts on Mac OS X](http://duncandavidson.com/archives/654). He mentioned Bitstream Vera Sans Mono as a great replacement for Monaco — the standard monospaced font packaged with OS X. The blog readers quickly added...</summary>
        <author>
            <name>admin</name>
        </author>
        
        
<content type="html" xml:lang="en-US" xml:base="http://www.softwaretrenches.com/">
&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;James Duncan Davidson recently wrote [an article about monospaced fonts on Mac OS X](http://duncandavidson.com/archives/654).

He mentioned Bitstream Vera Sans Mono as a great replacement for Monaco &amp;mdash; the standard monospaced font packaged with OS X. The blog readers quickly added more fonts: [Inconsolata](http://www.levien.com/type/myfonts/inconsolata.html) (my favourite now), DejaVu, Panic Sans, [Envy Code R](http://damieng.com/blog/2007/08/19/envy-code-r-preview-6-released-with-visual-studio-italics) and more.&lt;/div&gt;
</content>



    </entry>
 
</feed><!-- ph=1 -->
