<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Saari Development</title>
	<atom:link href="http://saaridev.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://saaridev.wordpress.com</link>
	<description>Ali Rizvi&#039;s Technical Blog as a Professional Software Development Engineer</description>
	<lastBuildDate>Fri, 13 Jan 2012 21:05:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='saaridev.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Saari Development</title>
		<link>http://saaridev.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://saaridev.wordpress.com/osd.xml" title="Saari Development" />
	<atom:link rel='hub' href='http://saaridev.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Converting space separated output to one per line</title>
		<link>http://saaridev.wordpress.com/2012/01/13/converting-words-to-lines/</link>
		<comments>http://saaridev.wordpress.com/2012/01/13/converting-words-to-lines/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 21:04:21 +0000</pubDate>
		<dc:creator>imsaar</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://saaridev.wordpress.com/?p=186</guid>
		<description><![CDATA[Here is the problem I was faced with. I wanted to check if I was part of a particular group and I did the shell groups command to find out. Unbeknownst to me I was part of a tone of groups that included some complicated long names with backslashes (\) in them. I thought it would [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=186&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is the problem I was faced with. I wanted to check if I was part of a particular group and I did the shell <em>groups </em>command to find out.</p>
<p>Unbeknownst to me I was part of a tone of groups that included some complicated long names with backslashes (\) in them.</p>
<p>I thought it would be quick to <em>grep</em> for the particular group name if all the output was on separate lines instead of space separated on one line.</p>
<p>First I thought I can use <em>cut</em> command to do that but it turns out <em>cut</em> is not idea for this. It is more suitable if you have multiple lines of data and wanted to get the same column out of each of these. Something like output from <em>ps</em>.</p>
<p>Finally I achieved it really easily with with <em>tr</em> command. Here is how the solution looks like:</p>
<p><pre class="brush: bash;">

groups | tr ' ' '\n' | grep group_i_was_looking_for

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saaridev.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saaridev.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saaridev.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saaridev.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saaridev.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saaridev.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saaridev.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saaridev.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saaridev.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saaridev.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saaridev.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saaridev.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saaridev.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saaridev.wordpress.com/186/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=186&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saaridev.wordpress.com/2012/01/13/converting-words-to-lines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e573fc095c18600261ded575d07bb523?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">imsaar</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows: Printing Date and Time on Command Line</title>
		<link>http://saaridev.wordpress.com/2011/07/21/windows-printing-date-and-time-on-command-line/</link>
		<comments>http://saaridev.wordpress.com/2011/07/21/windows-printing-date-and-time-on-command-line/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 20:44:01 +0000</pubDate>
		<dc:creator>imsaar</dc:creator>
				<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://saaridev.wordpress.com/?p=167</guid>
		<description><![CDATA[I am more of a *nix (unix, linux etc) command line person but I still use windows from time to time (in this case because my macbook pro crashed). I often want to see the progress of output to a file over time using the following linux command line: On windows date does not print [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=167&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am more of a *nix (unix, linux etc) command line person but I still use windows from time to time (in this case because my macbook pro crashed).</p>
<p>I often want to see the progress of output to a file over time using the following linux command line:</p>
<p><pre class="brush: bash;">
$ date; wc -l output.txt
</pre></p>
<p>On windows date does not print time (you have to do &#8216;date \t&#8217; to get output from it otherwise it used for changing the system date).</p>
<p>I finally found what I was looking for:</p>
<p><pre class="brush: bash;">&gt; echo %DATE% &amp; echo %TIME% &amp; wc -l output.txt</pre></p>
<p>Output:</p>
<pre>Thu 07/21/2011
13:44:55.70
375 output.txt</pre>
<p>&nbsp;</p>
<p>The wc command and bunch of other unix commands come from the free <a title="Unix Utilities for Windows" href="http://sourceforge.net/projects/unxutils/">UnixUtils</a> opensource package for windows. I consider UnixUtils a must have for windows and among the first thing I install on my windows machine.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saaridev.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saaridev.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saaridev.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saaridev.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saaridev.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saaridev.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saaridev.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saaridev.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saaridev.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saaridev.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saaridev.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saaridev.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saaridev.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saaridev.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=167&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saaridev.wordpress.com/2011/07/21/windows-printing-date-and-time-on-command-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e573fc095c18600261ded575d07bb523?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">imsaar</media:title>
		</media:content>
	</item>
		<item>
		<title>Collaboration and Software Development (Part 1 of 2)</title>
		<link>http://saaridev.wordpress.com/2010/12/28/collaboration-and-software-development-part-1-of-2/</link>
		<comments>http://saaridev.wordpress.com/2010/12/28/collaboration-and-software-development-part-1-of-2/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 02:40:40 +0000</pubDate>
		<dc:creator>imsaar</dc:creator>
				<category><![CDATA[software-development]]></category>

		<guid isPermaLink="false">http://saaridev.wordpress.com/?p=163</guid>
		<description><![CDATA[I believe quality software development is a collaborative process and I personally consider myself a collaborative person (there could be some cognitive bias here)  I am happy to be working in an organization in which being Collaborative is a recognized as a core value. The above assertion raises some questions: What is collaboration? Collaboration is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=163&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I believe quality software development is a collaborative process and I personally consider myself a collaborative person (there could be some cognitive bias here)  I am happy to be working in an organization in which being Collaborative is a recognized as a core value.</p>
<p>The above assertion raises some questions:</p>
<p><strong>What is collaboration?<br />
</strong></p>
<p>Collaboration is the act of working together, caring about the common product and each other. <strong></strong>Collaboration is often confused with cooperation which is different. I found the distinction cited <a title="Collaboration vs Cooperation" href="http://performancepyramid.muohio.edu/pyramid/shared-best-practices/Collaberation-Strategies/mainColumnParagraphs/0/document/Collaboration%20Strategies.pdf" target="_blank">here</a> very well done:</p>
<blockquote><p>Dillenbourg et al. (1995) make a distinction between cooperation and collaboration.</p>
<p>They define cooperative work as &#8220;.<em>.. accomplished by the division of labor</em><br />
<em>among participants, as an activity where each person is responsible for a</em><br />
<em>portion of the problem solving..</em>.&#8221; They define collaboration as &#8220;<strong><em>&#8230;mutual</em></strong><br />
<strong><em>engagement of participants in a coordinated effort to solve the problem</em></strong><br />
<strong><em>together</em>&#8220;</strong>. They further note that work often is split also in<br />
collaboration. But the difference is that in cooperation the task is split<br />
(hierarchically) into independent subtasks, and in collaboration the<br />
cognitive processes may be (heterarchically) divided into intertwined<br />
layers.</p></blockquote>
<p>Another concept that is similar and confusable is contribution. Which is doing your part towards the goal but not necessarily as part of a team or together.</p>
<p><strong>What is the opposite of collaboration?</strong></p>
<p>Sometimes helps to identify and understand the opposite of a concept to appreciate the concept itself. So what is the opposite of collaboration. Some would say Coercion but I think it is <strong>Competition</strong>.</p>
<p>I have seen it many times in my 10+ years of software development experience where individuals would get in a competitive mode due to internal reason like personality types or external reason like management&#8217;s scarcity mentality where people are stack ranked on basis of individual contributions.</p>
<p><strong>How does competition looks like in a Software team?</strong></p>
<ul>
<li>My code is better than yours.  There should be a joint ownership of all of the code in team.</li>
<li>I don&#8217;t have time for your problem. If this is a team they should be working towards a common goal hence any problem is our problem.</li>
<li>Common use of hand waving help where you don&#8217;t really get engaged in the problem solving just try to give an idea to try to get back to &#8220;your&#8221; project/piece.</li>
<li>Rubber stamp code reviews</li>
<li>No passionate disagreement or challenging of individual assumption. This is passive competition or lack of care.</li>
<li>Criticism without owning the problem or offering a solution.</li>
</ul>
<p><span id="more-163"></span>I will address the next two question in a follow up post soon:</p>
<p><strong>What does collaboration look like in a software development team?</strong></p>
<p><strong>If collaborative is a personality type then what are some other types of personalities?</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saaridev.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saaridev.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saaridev.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saaridev.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saaridev.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saaridev.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saaridev.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saaridev.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saaridev.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saaridev.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saaridev.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saaridev.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saaridev.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saaridev.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=163&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saaridev.wordpress.com/2010/12/28/collaboration-and-software-development-part-1-of-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e573fc095c18600261ded575d07bb523?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">imsaar</media:title>
		</media:content>
	</item>
		<item>
		<title>Vim: Set vim filetype to ruby in a Treetop grammar file</title>
		<link>http://saaridev.wordpress.com/2010/06/07/vim-in-file-vim-configuration/</link>
		<comments>http://saaridev.wordpress.com/2010/06/07/vim-in-file-vim-configuration/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 00:21:59 +0000</pubDate>
		<dc:creator>imsaar</dc:creator>
				<category><![CDATA[editor]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://saaridev.wordpress.com/?p=156</guid>
		<description><![CDATA[While writing a syntax parser using ruby treetop library for a work project I discovered the need to use ruby filetype for syntax highlighting etc a file ending in .treetop (treetop uses polyglot to look for and compile the grammar on runtime but the grammar file has to end in .treetop). Here is a nice [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=156&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While writing a syntax parser using ruby <a href="http://treetop.rubyforge.org/index.html">treetop</a> library for a work project I discovered the need to use ruby filetype for syntax highlighting etc a file ending in .treetop (treetop uses polyglot to look for and compile the grammar on runtime but the grammar file has to end in .treetop).</p>
<p>Here is a nice getting started tutorial for treetop: <a href="http://po-ru.com/diary/getting-started-with-treetop/">http://po-ru.com/diary/getting-started-with-treetop/<br />
</a><br />
I could have used some configuration in my .vimrc file to associate this file extension with ruby filetype but I want to try the embedded configuration which I have seen other used but never used myself. </p>
<p>After some search I found the reference article below and was by just adding the following file in the .treetop file I was able to desired functionality:</p>
<p><code># vim:filetype=ruby</code></p>
<p>Ref:<a href="http://ubergibson.com/article/embedding-vim-settings-in-the-file-youre-editing">Embedding vim Settings in the File You&#8217;re Editing</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saaridev.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saaridev.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saaridev.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saaridev.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saaridev.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saaridev.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saaridev.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saaridev.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saaridev.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saaridev.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saaridev.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saaridev.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saaridev.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saaridev.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=156&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saaridev.wordpress.com/2010/06/07/vim-in-file-vim-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e573fc095c18600261ded575d07bb523?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">imsaar</media:title>
		</media:content>
	</item>
		<item>
		<title>Config: .gitconfig</title>
		<link>http://saaridev.wordpress.com/2010/03/31/config-gitconfig/</link>
		<comments>http://saaridev.wordpress.com/2010/03/31/config-gitconfig/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 22:47:14 +0000</pubDate>
		<dc:creator>imsaar</dc:creator>
				<category><![CDATA[configuration]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://saaridev.wordpress.com/?p=150</guid>
		<description><![CDATA[[color] ui = auto [alias] co = checkout br = branch st = status lol = log --format=\"%h (%aE %ar) -&#62; %s\" --graph --decorate Thanks to Arnab Deka<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=150&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>
[color]
        ui = auto
[alias]
  co = checkout
  br = branch
  st = status
  lol = log --format=\"%h (%aE %ar) -&gt; %s\" --graph --decorate
</pre>
<p>Thanks to Arnab Deka                                                                                                                                      </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saaridev.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saaridev.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saaridev.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saaridev.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saaridev.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saaridev.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saaridev.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saaridev.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saaridev.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saaridev.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saaridev.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saaridev.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saaridev.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saaridev.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=150&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saaridev.wordpress.com/2010/03/31/config-gitconfig/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e573fc095c18600261ded575d07bb523?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">imsaar</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby: Add a prefix to all files in a directory</title>
		<link>http://saaridev.wordpress.com/2010/02/07/ruby-add-a-prefix-to-all-files-in-a-directory/</link>
		<comments>http://saaridev.wordpress.com/2010/02/07/ruby-add-a-prefix-to-all-files-in-a-directory/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 02:11:58 +0000</pubDate>
		<dc:creator>imsaar</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://saaridev.wordpress.com/?p=142</guid>
		<description><![CDATA[I found myself looking for a way to rename all files in a directory by appending a prefix and couldn&#8217;t find a utility to do such a renaming after quick search so I wrote my own.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=142&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I found myself looking for a way to rename all files in a directory by appending a prefix and couldn&#8217;t find a utility to do such a renaming after quick search so I wrote my own.</p>
<p><pre class="brush: ruby;">

# Quick script to bulk prepend prefix to filenames to all files in a directory
# Also strips any spaces in the filename
# Example usage : ruby prepend_rename.rb Disc1_ C:\AudioBook\Disc1\

raise &quot;Prefix and Directory are required&quot; if ARGV.size &lt; 2

prefix = ARGV[0]
dir = ARGV[1]

raise &quot;Non-word character prefix #{prefix}&quot; unless prefix =~ /^\w+$/
raise &quot;No such directory: #{dir}&quot; unless Dir.exists?(dir)

Dir.chdir(dir)
Dir.entries(dir).each do |file|
 next if File.directory?(file)
 new_name = prefix + file.gsub(/\s+/, '')
 File.rename(file, new_name)
end

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saaridev.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saaridev.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saaridev.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saaridev.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saaridev.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saaridev.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saaridev.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saaridev.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saaridev.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saaridev.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saaridev.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saaridev.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saaridev.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saaridev.wordpress.com/142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=142&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saaridev.wordpress.com/2010/02/07/ruby-add-a-prefix-to-all-files-in-a-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e573fc095c18600261ded575d07bb523?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">imsaar</media:title>
		</media:content>
	</item>
		<item>
		<title>Config: .vimrc (v2)</title>
		<link>http://saaridev.wordpress.com/2010/02/06/config-vimrc-v2/</link>
		<comments>http://saaridev.wordpress.com/2010/02/06/config-vimrc-v2/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 06:19:55 +0000</pubDate>
		<dc:creator>imsaar</dc:creator>
				<category><![CDATA[configuration]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://saaridev.wordpress.com/?p=136</guid>
		<description><![CDATA[&#8221; Plugins &#8221; FuzzyFinder &#8221; http://www.vim.org/scripts/script.php?script_id=1984 " FufFileRecursive " http://intraspirit.net/scratchpad/a-simple-fuzzyfinder-improvement/ " MatchIt for multi-character match on % (def and end) &#8220;  REF: http://awesomeful.net/posts/57-small-collection-of-useful-vim-tricks &#8220;  http://www.vim.org/scripts/script.php?script_id=39 &#8221; Rails.vim &#8221; http://www.vim.org/scripts/script.php?script_id=1567 " Ali Rizvi's Vim Settings set number set shiftwidth=4 set incsearch set hlsearch set textwidth=80 &#8221; from lindes: syntax on hi Comment term=bold ctermfg=Cyan guifg=Cyan set [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=136&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#8221; Plugins</p>
<p>&#8221; FuzzyFinder<br />
&#8221; http://www.vim.org/scripts/script.php?script_id=1984</p>
<p><code>" FufFileRecursive<br />
" </code>http://intraspirit.net/scratchpad/a-simple-fuzzyfinder-improvement/</p>
<p><code>" MatchIt for multi-character match on %</code> (def and end)<br />
&#8220;  REF: http://awesomeful.net/posts/57-small-collection-of-useful-vim-tricks<br />
&#8220;  http://www.vim.org/scripts/script.php?script_id=39</p>
<p>&#8221; Rails.vim<br />
&#8221; http://www.vim.org/scripts/script.php?script_id=1567</p>
<p><code> " Ali Rizvi's Vim Settings</code></p>
<p>set number<br />
set shiftwidth=4</p>
<p>set incsearch<br />
set hlsearch<br />
set textwidth=80</p>
<p>&#8221; from lindes:<br />
syntax on<br />
hi Comment term=bold ctermfg=Cyan guifg=Cyan<br />
set autoindent</p>
<p>&#8221; from benji fisher to turn on the matchit plugin automatically and more<br />
filetype plugin on</p>
<p>&#8221; explicity map file extension .t to perl syntax instead of tads<br />
&#8221; which is autodetected by filetype plugin on<br />
&#8221; This line should always be after filetype plugin<br />
autocmd BufNewFile,BufRead *.t set syntax=perl</p>
<p>&#8221; to show real tabs and spaces in file<br />
set list<br />
set listchars=tab:&gt;-,trail:^,eol:$<br />
&#8220;set listchars=tab:&gt;-,trail:-</p>
<p>&#8220;to add spaces instead of tabs<br />
set expandtab</p>
<p>&#8221; evil, bad! &#8212; hard tabs should be 8 chars&#8230; &#8211;lindes<br />
&#8221; set tabstop=4<br />
&#8221; _but_ we can use this:<br />
set smarttab</p>
<p>&#8220;make the background light<br />
set background=light</p>
<p>&#8220;show matching parens<br />
set showmatch</p>
<p>&#8220;show row and column number<br />
set ruler</p>
<p>&#8221; allow backspacing over everything in insert mode<br />
set backspace=indent,eol,start</p>
<p>filetype plugin indent on</p>
<p>&#8220;set shiftwidth to 2 for ruby only<br />
autocmd FileType ruby setlocal  sw=2</p>
<p>&#8220;shortcuts inspired by http://weblog.jamisbuck.org/2008/11/17/vim-follow-up</p>
<p>let g:fuzzy_ignore = &#8220;*.log&#8221;<br />
let g:fuzzy_matching_limit = 70<br />
map fb :FufBuffer<br />
map fd :FufDir&lt;CR&gt;<br />
map ff :FufFile&lt;CR&gt;<br />
&#8221; addition based on http://intraspirit.net/scratchpad/a-simple-fuzzyfinder-improvement/<br />
map ff :FufFileRecursive&lt;CR&gt;<br />
map fm :FufMruFile&lt;CR&gt;</p>
<pre><code>silent execute '!mkdir -p ~/.vim_backups'
set backupdir=~/.vim_backups//
set directory=~/.vim_backups//
</code>
map &lt;F2&gt; :mksession! ~/vim_session &lt;cr&gt; " Quick write session with F2
<code>map &lt;F3&gt; :source ~/vim_session &lt;cr&gt;     " And load session with F3</code>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saaridev.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saaridev.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saaridev.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saaridev.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saaridev.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saaridev.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saaridev.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saaridev.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saaridev.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saaridev.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saaridev.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saaridev.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saaridev.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saaridev.wordpress.com/136/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=136&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saaridev.wordpress.com/2010/02/06/config-vimrc-v2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e573fc095c18600261ded575d07bb523?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">imsaar</media:title>
		</media:content>
	</item>
		<item>
		<title>Config: .vimrc</title>
		<link>http://saaridev.wordpress.com/2009/11/24/conf-vimrc/</link>
		<comments>http://saaridev.wordpress.com/2009/11/24/conf-vimrc/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 06:19:35 +0000</pubDate>
		<dc:creator>imsaar</dc:creator>
				<category><![CDATA[configuration]]></category>

		<guid isPermaLink="false">http://saaridev.wordpress.com/?p=132</guid>
		<description><![CDATA[" Ali Rizvi's Vim Settings set number set shiftwidth=4 set incsearch set hlsearch set textwidth=80 " from lindes: syntax on hi Comment term=bold ctermfg=Cyan guifg=Cyan set autoindent " from benji fisher to turn on the matchit plugin automatically and more filetype plugin on " explicity map file extension .t to perl syntax instead of tads [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=132&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>
" Ali Rizvi's Vim Settings

set number
set shiftwidth=4

set incsearch
set hlsearch
set textwidth=80

" from lindes:
syntax on
hi Comment term=bold ctermfg=Cyan guifg=Cyan
set autoindent

" from benji fisher to turn on the matchit plugin automatically and more
filetype plugin on

" explicity map file extension .t to perl syntax instead of tads
" which is autodetected by filetype plugin on
" This line should always be after filetype plugin
autocmd BufNewFile,BufRead *.t set syntax=perl

" to show real tabs and spaces in file
set list
set listchars=tab:&gt;-,trail:^,eol:$
"set listchars=tab:&gt;-,trail:-

"to add spaces instead of tabs
set expandtab

" evil, bad! -- hard tabs should be 8 chars... --lindes
" set tabstop=4
" _but_ we can use this:
set smarttab

"use arrow keys to move to previous and next buffers
nnoremap  :bn
nnoremap  :bp

"make the background light
set background=light

"show matching parens
set showmatch

"show row and column number
set ruler

" allow backspacing over everything in insert mode
set backspace=indent,eol,start

filetype plugin indent on

"set shiftwidth to 2 for ruby only
autocmd FileType ruby setlocal  sw=2

"shortcuts inspired by http://weblog.jamisbuck.org/2008/11/17/vim-follow-up
let mapleader = " "
map n :execute 'NERDTreeToggle ' . getcwd()

let g:fuzzy_ignore = "*.log"
let g:fuzzy_matching_limit = 70
map ft :FuzzyFinderTextMate
map fb :FuzzyFinderBuffer
map ff :FuzzyFinderFile =fnamemodify('**/x', ':p')
map fm :FuzzyFinderMruFile

command Ped :exec '!p4 edit %'
command Pad :exec '!p4 add %'

set backupdir=~/.vim-tmp
set directory=~/.vim-tmp
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saaridev.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saaridev.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saaridev.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saaridev.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saaridev.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saaridev.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saaridev.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saaridev.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saaridev.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saaridev.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saaridev.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saaridev.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saaridev.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saaridev.wordpress.com/132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=132&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saaridev.wordpress.com/2009/11/24/conf-vimrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e573fc095c18600261ded575d07bb523?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">imsaar</media:title>
		</media:content>
	</item>
		<item>
		<title>Config: .screenrc</title>
		<link>http://saaridev.wordpress.com/2009/11/24/conf-screenrc/</link>
		<comments>http://saaridev.wordpress.com/2009/11/24/conf-screenrc/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 06:10:37 +0000</pubDate>
		<dc:creator>imsaar</dc:creator>
				<category><![CDATA[configuration]]></category>

		<guid isPermaLink="false">http://saaridev.wordpress.com/?p=129</guid>
		<description><![CDATA[# # Example of a user's .screenrc file # # This is how one can set a reattach password: # password ODSJQf.4IJN7E # "1234" # no annoying audible bell, please vbell on # detach on hangup autodetach on # don't display the copyright page startup_message off # emulate .logout message pow_detach_msg "Screen session of \$LOGNAME [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=129&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>
#
# Example of a user's .screenrc file
#

# This is how one can set a reattach password:
# password ODSJQf.4IJN7E    # "1234"

# no annoying audible bell, please
vbell on

# detach on hangup
autodetach on

# don't display the copyright page
startup_message off

# emulate .logout message
pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."

# advertise hardstatus support to $TERMCAP
# termcapinfo  * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\'

# make the shell in every window a login shell
#shell -$SHELL

# autoaka testing
# shellaka '&gt; |tcsh'
# shellaka '$ |sh'

# set every new windows hardstatus line to somenthing descriptive
# defhstatus "screen: ^En (^Et)"

defscrollback 10000

# don't kill window after the process died
# zombie "^["
################
#
# xterm tweaks
#

#xterm understands both im/ic and doesn't have a status line.
#Note: Do not specify im and ic in the real termcap/info file as
#some programs (e.g. vi) will not work anymore.
termcap  xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l
terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l

#80/132 column switching must be enabled for ^AW to work
#change init sequence to not switch width
termcapinfo  xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l

# Make the output buffer large for (fast) xterms.
termcapinfo xterm* OL=10000

# tell screen that xterm can switch to dark background and has function
# keys.
termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l'
termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
termcapinfo xterm 'kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:kP=\E[H:kN=\E[6~'

# special xterm hardstatus: use the window title.
termcapinfo xterm 'hs:ts=\E]2;:fs=07:ds=\E]2;screen07'

#terminfo xterm 'vb=\E[?5h$\E[?5l'
termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l'

# emulate part of the 'K' charset
termcapinfo   xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337'
# xterm-52 tweaks:
# - uses background color for delete operations
termcapinfo xterm be

################
#
# wyse terminals
#

#wyse-75-42 must have flow control (xo = "terminal uses xon/xoff")
#essential to have it here, as this is a slow terminal.
termcapinfo wy75-42 xo:hs@

# New termcap sequences for cursor application mode.
termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J

################
#
# other terminals
#

#make hp700 termcap/info better
termcapinfo  hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@'

# Extend the vt100 desciption by some sequences.
termcap  vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC
terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC

################
#
# keybindings
#

#remove some stupid / dangerous key bindings
bind k
bind ^k
bind .
bind ^\
bind \\
bind ^h
bind h
#make them better
bind 'K' kill
bind 'I' login on
bind 'O' login off
bind '}' history

# Yet another hack:
# Prepend/append register [/] to the paste if ^a^] is pressed.
# This lets me have autoindent mode in vi.
register [ "33:se noai15a"
register ] "33:se ai15a"
bind ^] paste [.]

################
#
# default windows
#

# screen -t local 0
# screen -t mail 1 elm
# screen -t 40 2 rlogin faui40
# caption always "%3n %t%? @%u%?%? [%h]%?"
# hardstatus alwaysignore
# hardstatus alwayslastline "%w"

# bind = resize =
# bind + resize +1
# bind - resize -1
# bind _ resize max
#
# attrcolor u "-u b"
# attrcolor b "R"

# fix delayed vi/vim startup in screen
altscreen on

# something that would reload the .screenrc file on reattach
bind R source $HOME/.screenrc

# http://www.ibm.com/developerworks/aix/library/au-gnu_screen/index.html
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saaridev.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saaridev.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saaridev.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saaridev.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saaridev.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saaridev.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saaridev.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saaridev.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saaridev.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saaridev.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saaridev.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saaridev.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saaridev.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saaridev.wordpress.com/129/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=129&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saaridev.wordpress.com/2009/11/24/conf-screenrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e573fc095c18600261ded575d07bb523?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">imsaar</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby: String += vs &lt;&lt;</title>
		<link>http://saaridev.wordpress.com/2009/11/20/ruby-string-vs/</link>
		<comments>http://saaridev.wordpress.com/2009/11/20/ruby-string-vs/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 20:44:05 +0000</pubDate>
		<dc:creator>imsaar</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://saaridev.wordpress.com/?p=123</guid>
		<description><![CDATA[Learned this interesting tidbit on Seattle.rb mailing list that appending a string with &#60;&#60; is 10 times more efficient than +=. This would matter if you are doing a lot of string concatenation. From: Joe Van Dyk Date: Fri, Nov 20, 2009 at 10:20 AM Subject: Re: [Ruby] += vs &#60;&#60; To: Seattle Ruby Brigade! [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=123&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Learned this interesting tidbit on Seattle.rb mailing list that appending a string with &lt;&lt; is 10 times more efficient than +=. This would matter if you are doing a lot of string concatenation.</p>
<blockquote><p>
From: Joe Van Dyk<br />
Date: Fri, Nov 20, 2009 at 10:20 AM<br />
Subject: Re: [Ruby] += vs &lt;&lt;<br />
To: Seattle Ruby Brigade!</p>
<p>$ cat t.rb<br />
require &#39;benchmark&#39;</p>
<p>long_string = &#39;s&#39; * 100000000<br />
another_long_string = &#39;y &#39; * 1000</p>
<p>Benchmark.bm do |b|<br />
 b.report(&quot;&lt;&lt;&quot;) { long_string &lt;&lt; another_long_string  }<br />
 b.report(&quot;+=&quot;) { long_string += another_long_string }<br />
end</p>
<p>$ ruby t.rb<br />
     user     system      total        real<br />
&lt;&lt;  0.000000   0.020000   0.020000 (  0.022544)<br />
+=  0.110000   0.130000   0.240000 (  0.250046)
</p></blockquote>
<p><em>Update</em>: Later in this thread mentioned a comprehensive blog entry about this topic : <a href="http://doblock.com/articles/the-fastest-way-to-concatenate-strings-and-arrays-in-ruby">The Fastest Way to Concatenate Strings and Arrays in Ruby</a> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saaridev.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saaridev.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saaridev.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saaridev.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saaridev.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saaridev.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saaridev.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saaridev.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saaridev.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saaridev.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saaridev.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saaridev.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saaridev.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saaridev.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saaridev.wordpress.com&amp;blog=2451925&amp;post=123&amp;subd=saaridev&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saaridev.wordpress.com/2009/11/20/ruby-string-vs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e573fc095c18600261ded575d07bb523?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">imsaar</media:title>
		</media:content>
	</item>
	</channel>
</rss>
