<?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/"
	>

<channel>
	<title>Eric Wendelin's Blog &#187; Tools</title>
	<atom:link href="http://eriwen.com/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://eriwen.com</link>
	<description>Programming productively with open-source tools</description>
	<lastBuildDate>Tue, 13 Jul 2010 13:14:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Why I&#8217;m moving my projects to GitHub</title>
		<link>http://eriwen.com/tools/moving-to-github/</link>
		<comments>http://eriwen.com/tools/moving-to-github/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 11:00:19 +0000</pubDate>
		<dc:creator>Eric Wendelin</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://eriwen.com/?p=1069</guid>
		<description><![CDATA[<img src="http://eriwen.com/images/github-logo.png" alt="GitHub logo" style="float: left; margin: 0 4px 4px 0;"/>With the announcement of the <a href="http://blogs.sun.com/projectkenai/entry/the_future_of_kenai_com">closure of kenai.com</a>, I've decided to move my open-source projects to <a href="http://github.com" title="Social coding">GitHub</a>.

<blockquote>It's with a sad heart that we have to announce that the Kenai.com domain will be shutdown as part of the consolidation of project hosting sites now that Sun is a wholly owned subsidiary of Oracle.</blockquote>

This is sad because I thought Kenai had some really killer features like excellent JIRA and NetBeans integration. Nevertheless, it's not up to me to decide. 

<h2>Software is only as good as it's community</h2>
A great project cannot thrive without people to improve and maintain it. The reason I am choosing GitHub is the number of people (especially friends) already on it. The is it's main advantage over something like <a href="http://bitbucket.org/">bitbucket</a>. Git, in my opinion, has great momentum in the OSS community and is roughly equivalent to mercurial in functionality (with a few differences, obviously). Both <acronym title="Distributed Version Control Systems">DVCS</acronym> are far superior to their non-distributed counterparts. To sum up the biggest benefit in a phrase: "Local commits FTW!" 

Moving to GitHub has <em>already paid off</em> because my recent <a href="http://github.com/emwendelin/javascript-stacktrace" title="Micro-library for getting stack traces in all web browsers">javascript-stacktrace project</a> already has over 50 watchers and a couple forks. 


Related posts:<ol><li><a href='http://eriwen.com/groovy/introducing-groovyrtm/' rel='bookmark' title='Permanent Link: Introducing GroovyRTM: A Groovier way to Remember The Milk'>Introducing GroovyRTM: A Groovier way to Remember The Milk</a></li>
<li><a href='http://eriwen.com/opinion/follow-up-why-programmers-should-twitter/' rel='bookmark' title='Permanent Link: Follow-up: Why programmers should twitter'>Follow-up: Why programmers should twitter</a></li>
<li><a href='http://eriwen.com/interview/andres-almiray/' rel='bookmark' title='Permanent Link: Interview with Andres Almiray'>Interview with Andres Almiray</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://eriwen.com/images/github-logo.png" alt="GitHub logo" style="float: left; margin: 0 4px 4px 0;"/>With the announcement of the <a href="http://blogs.sun.com/projectkenai/entry/the_future_of_kenai_com">closure of kenai.com</a>, I&#8217;ve decided to move my open-source projects to <a href="http://github.com" title="Social coding">GitHub</a>.</p>
<blockquote><p>It&#8217;s with a sad heart that we have to announce that the Kenai.com domain will be shutdown as part of the consolidation of project hosting sites now that Sun is a wholly owned subsidiary of Oracle.</p></blockquote>
<p>This is sad because I thought Kenai had some really killer features like excellent JIRA and NetBeans integration. Nevertheless, it&#8217;s not up to me to decide. </p>
<h2>Software is only as good as it&#8217;s community</h2>
<p>A great project cannot thrive without people to improve and maintain it. The reason I am choosing GitHub is the number of people (especially friends) already on it. The is it&#8217;s main advantage over something like <a href="http://bitbucket.org/">bitbucket</a>. Git, in my opinion, has great momentum in the OSS community and is roughly equivalent to mercurial in functionality (with a few differences, obviously). Both <acronym title="Distributed Version Control Systems">DVCS</acronym> are far superior to their non-distributed counterparts. To sum up the biggest benefit in a phrase: &#8220;Local commits FTW!&#8221; </p>
<p>Moving to GitHub has <em>already paid off</em> because my recent <a href="http://github.com/emwendelin/javascript-stacktrace" title="Micro-library for getting stack traces in all web browsers">javascript-stacktrace project</a> already has over 50 watchers and a couple forks. </p>
<h2>Follow me</h2>
<p>You should <a href="http://github.com/emwendelin">follow me on GitHub</a> if you are interested in any of my projects, or if you think I might be interested in yours. Only good can come from reaching out. I look forward to seeing your <acronym title="Open Source Software">OSS</acronym> projects. </p>
<p>New links for my other projects (update your bookmarks or whatever):</p>
<ul>
<li><a href="http://github.com/emwendelin/cheqlist" title="JavaFX desktop application for Remember The Milk">Cheqlist</a> &#8211; JavaFX desktop application for Remember The Milk</li>
<li><a href="http://github.com/emwendelin/groovyrtm" title="Groovy API for Remember The Milk">GroovyRTM</a> &#8211; Groovy API for Remember The Milk</li>
</ul>
<p>Agree about GitHub? Chime in on the &#8220;preferred version control system&#8221; poll and tell me if I&#8217;m full of crap in the comments.</p>


<p>Related posts:<ol><li><a href='http://eriwen.com/groovy/introducing-groovyrtm/' rel='bookmark' title='Permanent Link: Introducing GroovyRTM: A Groovier way to Remember The Milk'>Introducing GroovyRTM: A Groovier way to Remember The Milk</a></li>
<li><a href='http://eriwen.com/opinion/follow-up-why-programmers-should-twitter/' rel='bookmark' title='Permanent Link: Follow-up: Why programmers should twitter'>Follow-up: Why programmers should twitter</a></li>
<li><a href='http://eriwen.com/interview/andres-almiray/' rel='bookmark' title='Permanent Link: Interview with Andres Almiray'>Interview with Andres Almiray</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://eriwen.com/tools/moving-to-github/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cheqlist: A free, open-source desktop app for Remember The Milk</title>
		<link>http://eriwen.com/tools/cheqlist-remember-the-milk-app/</link>
		<comments>http://eriwen.com/tools/cheqlist-remember-the-milk-app/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 11:00:34 +0000</pubDate>
		<dc:creator>Eric Wendelin</dc:creator>
				<category><![CDATA[Groovy]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Project]]></category>

		<guid isPermaLink="false">http://eriwen.com/?p=939</guid>
		<description><![CDATA[<img src="http://eriwen.com/cheqlist/cheqlist_logo_64.png" style="float: left; margin: 0 8px 0 0; border: 0px solid none;"/>Anyone looking to stay productive with their work, errands or chores keeps a to-do list. You need to have that to-do list available at all times and be easy to manage. 

With that in mind, I am introducing an application that I think will help you with that: <a href="http://eriwen.com/cheqlist/Cheqlist.jnlp">Cheqlist</a>. A desktop application powered by <a href="http://www.rememberthemilk.com/">Remember The Milk</a> that does 2 things very well: make <strong>managing tasks very efficient</strong> and <strong>look sweet</strong> on your desktop.

<h2>What makes Cheqlist awesome</h2>
I wanted to build an application that I, myself, would use everyday. There are a few key features that would make that happen:
<ul style="margin-left: 2em; list-style-type: upper-roman;"><li>Adding tasks quickly using RTM's new <a href="<a href="http://www.rememberthemilk.com/services/smartadd/">Smart Add feature</a></li>
<li>Visual appeal and lots of room for customization. Special thanks to Rakesh Menon for allowing me to use his <a href="http://blogs.sun.com/rakeshmenonp/entry/javafx_color_picker">JavaFX color picker</a></li>
<li>Easily search tasks and use RTM's <a href="http://www.rememberthemilk.com/help/answers/search/advanced.rtm">custom search keywords</a></li>
<li>Must work on all the OSes I use: Windows, Mac OS X, and Linux</li>
</ul>

On top of that, I think there are some things you'll come to appreciate:
<ul style="margin-left: 2em; list-style-type: upper-roman;"><li>Easy-update: Cheqlist checks for updates on startup, and if you want to upgrade, it takes just seconds!</li>
<li>Free and <a href="http://github.com/emwendelin/cheqlist" title="Cheqlist at GitHub">open-source</a></li>
<li>Lots of nice "easter egg" features for those of you who take time to find them ;)</li></ul>



Related posts:<ol><li><a href='http://eriwen.com/groovy/introducing-groovyrtm/' rel='bookmark' title='Permanent Link: Introducing GroovyRTM: A Groovier way to Remember The Milk'>Introducing GroovyRTM: A Groovier way to Remember The Milk</a></li>
<li><a href='http://eriwen.com/programming/the-tech-behind-cheqlist/' rel='bookmark' title='Permanent Link: What and why: the tech behind Cheqlist'>What and why: the tech behind Cheqlist</a></li>
<li><a href='http://eriwen.com/tools/moving-to-github/' rel='bookmark' title='Permanent Link: Why I&#8217;m moving my projects to GitHub'>Why I&#8217;m moving my projects to GitHub</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://eriwen.com/cheqlist/cheqlist_logo_64.png" style="float: left; margin: 0 8px 0 0; border: 0px solid none;"/>Anyone looking to stay productive with their work, errands or chores keeps a to-do list. You need to have that to-do list available at all times and be easy to manage. </p>
<p>With that in mind, I am introducing an application that I think will help you with that: <a href="http://eriwen.com/cheqlist/Cheqlist.jnlp">Cheqlist</a>. A desktop application powered by <a href="http://www.rememberthemilk.com/">Remember The Milk</a> that does 2 things very well: make <strong>managing tasks very efficient</strong> and <strong>look sweet</strong> on your desktop.</p>
<h2>What makes Cheqlist awesome</h2>
<p>I wanted to build an application that I, myself, would use everyday. There are a few key features that would make that happen:</p>
<ul style="margin-left: 2em; list-style-type: upper-roman;">
<li>Adding tasks quickly using RTM&#8217;s new <a href="<a href="http://www.rememberthemilk.com/services/smartadd/">Smart Add feature</a></li>
<li>Visual appeal and lots of room for customization. Special thanks to Rakesh Menon for allowing me to use his <a href="http://blogs.sun.com/rakeshmenonp/entry/javafx_color_picker">JavaFX color picker</a></li>
<li>Easily search tasks and use RTM&#8217;s <a href="http://www.rememberthemilk.com/help/answers/search/advanced.rtm">custom search keywords</a></li>
<li>Must work on all the OSes I use: Windows, Mac OS X, and Linux</li>
</ul>
<p>On top of that, I think there are some things you&#8217;ll come to appreciate:</p>
<ul style="margin-left: 2em; list-style-type: upper-roman;">
<li>Easy-update: Cheqlist checks for updates on startup, and if you want to upgrade, it takes just seconds!</li>
<li>Free and <a href="http://github.com/emwendelin/cheqlist" title="Cheqlist at GitHub">open-source</a></li>
<li>Lots of nice &#8220;easter egg&#8221; features for those of you who take time to find them ;)</li>
</ul>
<h2>A quick look</h2>
<p>I&#8217;ve created a short (3 minutes) introductory video to show you the main features. UPDATE: Apparently screenr videos don&#8217;t show up in RSS properly. View it <a href="http://screenr.com/vvH" title="Cheqlist intro video">here</a>.</p>
<p><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' width='560' height='345' style='margin-left: 10px;'><param name='movie' value='http://screenr.com/Content/assets/screenr_0817090731.swf' /><param name='flashvars' value='i=18211' /><param name='allowFullScreen' value='true' /><embed src='http://screenr.com/Content/assets/screenr_0817090731.swf' flashvars='i=18211' allowFullScreen='true' width='560' height='345' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object></p>
<p>Here are a few screenshots:<br />
<img src="http://eriwen.com/images/cheqlist_screen_1.png" alt="Cheqlist Splash Screen and Edit panes"/><br />
<img src="http://eriwen.com/images/cheqlist_screen_2.png" alt="Cheqlist Settings"/></p>
<p>You can find more on the <a href="http://wiki.github.com/emwendelin/cheqlist/">Cheqlist Wiki</a>.</p>
<h2>Try it out!</h2>
<p>What you need:</p>
<ul style="margin-left: 2em; list-style-type: upper-roman;">
<li>A marginally recent (6u11 or newer) version of <a href="http://www.java.com/en/download/index.jsp" title="Download Java">Java</a></li>
<li><a href="http://www.rememberthemilk.com/">Remember The Milk account</a></li>
<li><strong><a href="http://eriwen.com/cheqlist/Cheqlist.jnlp">Launch Cheqlist</a></strong></li>
</ul>
<h2>Other resources</h2>
<p>Something missing? Request a feature at the <a href="http://github.com/emwendelin/cheqlist/issues" title="Cheqlist issue tracker">issue tracker</a>. </p>
<p>Having trouble? <a href="http://eriwen.com/contact/">Let me know</a> directly. </p>
<p>For more information, you can hit the <a href="http://github.com/emwendelin/cheqlist">project page</a> and <a href="http://wiki.github.com/emwendelin/cheqlist/">Wiki</a> on GitHub. </p>
<p>Enjoy!</p>


<p>Related posts:<ol><li><a href='http://eriwen.com/groovy/introducing-groovyrtm/' rel='bookmark' title='Permanent Link: Introducing GroovyRTM: A Groovier way to Remember The Milk'>Introducing GroovyRTM: A Groovier way to Remember The Milk</a></li>
<li><a href='http://eriwen.com/programming/the-tech-behind-cheqlist/' rel='bookmark' title='Permanent Link: What and why: the tech behind Cheqlist'>What and why: the tech behind Cheqlist</a></li>
<li><a href='http://eriwen.com/tools/moving-to-github/' rel='bookmark' title='Permanent Link: Why I&#8217;m moving my projects to GitHub'>Why I&#8217;m moving my projects to GitHub</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://eriwen.com/tools/cheqlist-remember-the-milk-app/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Talking Selenium on Faceoff</title>
		<link>http://eriwen.com/tools/talking-selenium-on-faceoff/</link>
		<comments>http://eriwen.com/tools/talking-selenium-on-faceoff/#comments</comments>
		<pubDate>Tue, 12 May 2009 14:43:00 +0000</pubDate>
		<dc:creator>Eric Wendelin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://eriwen.com/?p=779</guid>
		<description><![CDATA[<img class="img-left" src="http://eriwen.com/images/faceoff.png" alt="Faceoff Show logo">I was interviewed by <a href="http://nixtutor.com">Mark Sanborn</a> and <a href="http://jaderobbins.com">Jade Robbins</a> on the <a href="http://faceoffshow.com">Faceoff Podcast</a>. 

Restrain yourself from making fun of my geeky voice and focus instead on the awesomeness of <a href="http://seleniumhq.org">Selenium</a>, a fantastic web-application testing tool. I talk about what Selenium is, some features and uses, and speculate on possible future extensions.

The interview starts at the 12th minute or so. That said, I have learned a lot from these guys and think you'd benefit from giving their podcast a listen.

<a href="http://faceoffshow.com/2009/05/12/episode-16-green-to-the-selenium-scene/">Check it out!</a>


Related posts:<ol><li><a href='http://eriwen.com/firefox/backup-firefox/' rel='bookmark' title='Permanent Link: A quick way to backup a Firefox extension or profile'>A quick way to backup a Firefox extension or profile</a></li>
<li><a href='http://eriwen.com/firefox/firecookie/' rel='bookmark' title='Permanent Link: Firefox extension to watch: Firecookie'>Firefox extension to watch: Firecookie</a></li>
<li><a href='http://eriwen.com/firefox/firefox-3-aboutconfig-hacks/' rel='bookmark' title='Permanent Link: Cutting Edge: Exclusive Firefox 3 about:config hacks'>Cutting Edge: Exclusive Firefox 3 about:config hacks</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="img-left" src="http://eriwen.com/images/faceoff.png" alt="Faceoff Show logo">I was interviewed by <a href="http://nixtutor.com">Mark Sanborn</a> and <a href="http://jaderobbins.com">Jade Robbins</a> on the <a href="http://faceoffshow.com">Faceoff Podcast</a>. </p>
<p>Restrain yourself from making fun of my geeky voice and focus instead on the awesomeness of <a href="http://seleniumhq.org">Selenium</a>, a fantastic web-application testing tool. I talk about what Selenium is, some features and uses, and speculate on possible future extensions.</p>
<p>The interview starts at the 12th minute or so. That said, I have learned a lot from these guys and think you&#8217;d benefit from giving their podcast a listen.</p>
<p><a href="http://faceoffshow.com/2009/05/12/episode-16-green-to-the-selenium-scene/">Check it out!</a></p>


<p>Related posts:<ol><li><a href='http://eriwen.com/firefox/backup-firefox/' rel='bookmark' title='Permanent Link: A quick way to backup a Firefox extension or profile'>A quick way to backup a Firefox extension or profile</a></li>
<li><a href='http://eriwen.com/firefox/firecookie/' rel='bookmark' title='Permanent Link: Firefox extension to watch: Firecookie'>Firefox extension to watch: Firecookie</a></li>
<li><a href='http://eriwen.com/firefox/firefox-3-aboutconfig-hacks/' rel='bookmark' title='Permanent Link: Cutting Edge: Exclusive Firefox 3 about:config hacks'>Cutting Edge: Exclusive Firefox 3 about:config hacks</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://eriwen.com/tools/talking-selenium-on-faceoff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guest post on caching and .htaccess</title>
		<link>http://eriwen.com/tools/guest-post-on-caching-and-htaccess/</link>
		<comments>http://eriwen.com/tools/guest-post-on-caching-and-htaccess/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 13:52:52 +0000</pubDate>
		<dc:creator>Eric Wendelin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://eriwen.com/?p=717</guid>
		<description><![CDATA[I've written a guest post titled <a href="http://davidwalsh.name/yslow-htaccess">Improve your YSlow grade using htaccess</a> over at the <a href="http://davidwalsh.name">David Walsh Blog</a>. 

In it, I explain a bit about how browser caching works, how setting headers can affect caching and what you can use in your .htaccess file (or Apache httpd.conf) to maximize it. 

<a href="http://davidwalsh.name/yslow-htaccess">Go check it out!</a>


Related posts:<ol><li><a href='http://eriwen.com/javascript/text-size-prefs/' rel='bookmark' title='Permanent Link: Guest Post: Save Text Size Preference Using MooTools and PHP'>Guest Post: Save Text Size Preference Using MooTools and PHP</a></li>
<li><a href='http://eriwen.com/javascript/change-text-size-onclick-with-javascript/' rel='bookmark' title='Permanent Link: Guest Post: change text size onclick with JavaScript'>Guest Post: change text size onclick with JavaScript</a></li>
<li><a href='http://eriwen.com/firefox/my-firefox-setup/' rel='bookmark' title='Permanent Link: 8 steps to my personal Firefox setup for productivity'>8 steps to my personal Firefox setup for productivity</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written a guest post titled <a href="http://davidwalsh.name/yslow-htaccess">Improve your YSlow grade using htaccess</a> over at the <a href="http://davidwalsh.name">David Walsh Blog</a>. </p>
<p>In it, I explain a bit about how browser caching works, how setting headers can affect caching and what you can use in your .htaccess file (or Apache httpd.conf) to maximize it. </p>
<p><a href="http://davidwalsh.name/yslow-htaccess">Go check it out!</a></p>


<p>Related posts:<ol><li><a href='http://eriwen.com/javascript/text-size-prefs/' rel='bookmark' title='Permanent Link: Guest Post: Save Text Size Preference Using MooTools and PHP'>Guest Post: Save Text Size Preference Using MooTools and PHP</a></li>
<li><a href='http://eriwen.com/javascript/change-text-size-onclick-with-javascript/' rel='bookmark' title='Permanent Link: Guest Post: change text size onclick with JavaScript'>Guest Post: change text size onclick with JavaScript</a></li>
<li><a href='http://eriwen.com/firefox/my-firefox-setup/' rel='bookmark' title='Permanent Link: 8 steps to my personal Firefox setup for productivity'>8 steps to my personal Firefox setup for productivity</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://eriwen.com/tools/guest-post-on-caching-and-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why every programmer should have a Tiddlywiki</title>
		<link>http://eriwen.com/tools/wikify-yourself/</link>
		<comments>http://eriwen.com/tools/wikify-yourself/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 14:00:42 +0000</pubDate>
		<dc:creator>Eric Wendelin</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://eriwen.com/?p=33</guid>
		<description><![CDATA[A year ago, my good friend <a href="http://casedogdesigns.com">Casey Watson</a> suggested that I try using a personal wiki to keep track of my programming knowledge. This turned out to be great advice, so I'll be sharing how I use one and how to start your own.

<h2>Why would a personal wiki make you productive?</h2>
In a phrase: to keep a your web of knowledge accessible from one place. You need a place to put your meeting agenda, important project/server links, and even a to-do or waiting-for list. Not only can you store a lot, you can tag it, search it and otherwise customize the crap out of <a href="http://www.tiddlywiki.com/">Tiddlywiki</a>.

<img src="http://eriwen.com/images/eriki.gif" alt="Eric's Tiddlywiki" style="float:left; margin: 0 12px 12px 0;"/>You are not going to be able to remember everything you need, <strong>keeping links and information in email folders just doesn't cut it</strong>. You can easily keep track of your meeting notes, DB schema diagrams, bug lists, blah blah blah...


Related posts:<ol><li><a href='http://eriwen.com/opinion/key-to-programmer-success/' rel='bookmark' title='Permanent Link: The unsung key to programmer success'>The unsung key to programmer success</a></li>
<li><a href='http://eriwen.com/opinion/what-i-wanted-to-know/' rel='bookmark' title='Permanent Link: What I wanted to know before I left college: A programmer reflects'>What I wanted to know before I left college: A programmer reflects</a></li>
<li><a href='http://eriwen.com/firefox/use-ubiquity-instead/' rel='bookmark' title='Permanent Link: 7 things you should do with Ubiquity instead'>7 things you should do with Ubiquity instead</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A year ago, my good friend <a href="http://casedogdesigns.com">Casey Watson</a> suggested that I try using a personal wiki to keep track of my programming knowledge. This turned out to be great advice, so I&#8217;ll be sharing how I use one and how to start your own.</p>
<h2>Why would a personal wiki make you productive?</h2>
<p>In a phrase: to keep a your web of knowledge accessible from one place. You need a place to put your meeting agenda, important project/server links, and even a to-do or waiting-for list. Not only can you store a lot, you can tag it, search it and otherwise customize the crap out of <a href="http://www.tiddlywiki.com/">Tiddlywiki</a>.</p>
<p><img src="http://eriwen.com/images/eriki.gif" alt="Eric's Tiddlywiki" style="float:left; margin: 0 12px 12px 0;"/>You are not going to be able to remember everything you need, <strong>keeping links and information in email folders just doesn&#8217;t cut it</strong>. You can easily keep track of your meeting notes, DB schema diagrams, bug lists, blah blah blah&#8230;</p>
<p>In other news, great programmers <a href="http://www.agiledeveloper.com/blog/">Venkat Subramaniam</a> and Mark Richards called Tiddlywiki their favorite technical tool. <strong>Favorite.</strong> As in more valuable than their IDE. </p>
<h2>Roll your own&#8230; now!</h2>
<p>It&#8217;s really stinkin&#8217; easy! Just grab my favorite flavor of Tiddlywiki, <a href="http://www.dcubed.ca/Welcome_to_d-cubed.html">d-cubed</a>, and save it somewhere you can access easily. The first time you use it your browser will ask you to confirm that you can edit your HTML file through it (standard security check). </p>
<p>You will probably want to theme it so it fits you, and I found a bunch of nice themes at <a href="http://tiddlythemes.com/" title="Themes for TiddlyWiki">TiddlyThemes</a>. It&#8217;s just CSS and JavaScript anyway, dowhatyouwant! whatyouwant!!</p>
<p>Once you have customized your wiki&#8217;s look-and-feel etc., it&#8217;s time to grab some slick plugins. Here are a few I use and recommend:</p>
<ul style="list-style-type: upper-roman; margin-left: 3em;">
<li><a href="http://www.tiddlytools.com/#CheckboxPlugin">Checkbox plugin</a> &#8211; So you can manage your tasks with checkbox style</li>
<li><a href="http://www.tiddlytools.com/#CalendarPlugin">Calendar plugin</a> and <a href="http://www.tiddlytools.com/#DatePlugin">Date plugin</a> &#8211; Manage your calendar in your wiki!</li>
<li><a href="http://tiddlywiki.abego-software.de/#YourSearchPlugin">Your Search plugin</a> &#8211; Really, really sweet search upgrade. A must-grab!</li>
</ul>
<p>To install a plugin, just make a new Tiddler (wiki page) with the same title, content, and tags. So easy!</p>
<h2>Next steps</h2>
<p>I recommend starting by creating tiddlers for all your projects and just putting links to other resources in there. After awhile, copy bits of emails you need to remember to relevant places so you can search it anytime. Baby steps, but <strong>stick to it</strong>. The setup cost will be returned in cases (as in the beer others will buy you for rocking)!</p>
<p>You&#8217;re now well on your way to wiki-fying yourself. Share your experiences and have fun!</p>


<p>Related posts:<ol><li><a href='http://eriwen.com/opinion/key-to-programmer-success/' rel='bookmark' title='Permanent Link: The unsung key to programmer success'>The unsung key to programmer success</a></li>
<li><a href='http://eriwen.com/opinion/what-i-wanted-to-know/' rel='bookmark' title='Permanent Link: What I wanted to know before I left college: A programmer reflects'>What I wanted to know before I left college: A programmer reflects</a></li>
<li><a href='http://eriwen.com/firefox/use-ubiquity-instead/' rel='bookmark' title='Permanent Link: 7 things you should do with Ubiquity instead'>7 things you should do with Ubiquity instead</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://eriwen.com/tools/wikify-yourself/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Vim is a beautiful tool</title>
		<link>http://eriwen.com/tools/vim-is-a-beautiful-tool/</link>
		<comments>http://eriwen.com/tools/vim-is-a-beautiful-tool/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 12:00:49 +0000</pubDate>
		<dc:creator>Eric Wendelin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://eriwen.com/?p=232</guid>
		<description><![CDATA[<p class="update" style="margin-right: 90px">This post was authored by guest author <a href="http://marksanborn.net">Mark Sanborn</a>. Find out more <a href="http://eriwen.com/tools/vim-is-a-beautiful-tool/#markbio">below</a>.</p>

When it comes to productivity I can't think of any application that has saved more time and frustration than Vim.  Vim is the ultimate productivity tool for programmers.  Most users of Vim that I know that have spent the time to learn it absolutely love it and couldn't imagine a world without it.  My only regret with Vim is not learning it sooner.

<h2>So what is Vim?</h2>

Vim is a modal text editor that is highly configurable, efficient, and lightweight.  Some people refer to it as the programmer's text editor because it has a plethora of features that make programming easier, although it could be used for other things like writing email and editing config files.

What makes Vim especially great is the shortcuts, commands, and the blistering speed at which you can edit text files since Vim has all the common editing tasks mapped to single keys on or near the home row on your keyboard.

Sounds great... but there is a catch:  <blockquote>Vim isn't an editor designed to hold its users' hands. It is a tool, the use of which must be learned.</blockquote>

<h2>Easing the learning curve</h2>

Vim is known for having a steep learning curve.  I think Vim has this reputation because people tend to want to learn all of the features right away and quickly become overwhelmed.

Vim is a lot like Adobe Photoshop, you can learn just a few simple techniques in Photoshop that can make a world of a difference in the images you can create and ways you can manipulate them.  Yet it may take you a lifetime to master all the functions Photoshop has to offer.  Vim is the same way.  You can learn only a few shortcuts and commands that will completely change the way you do text editing but may take years to learn them all (not that you would need to).

The great thing about Vim is everyone uses it differently.  I have my favorite shortcuts that I use every day.  Someone else might have a different set they use depending on what types of files they generally edit.  Once you learn a few basics and get comfortable with the shortcuts and commands that you use every day you can learn another to increase your productivity.

<h2>Getting Started</h2>

I suggest going through <strong>vimtutor</strong> once right now and again after you have played around with Vim for a while.  You can access vimtutor by typing in the command, 'vimtutor' for Linux users and by running vimtutor.bat in your Vim folder for Windows users.

Vimtutor has all the commands and how to use them as well as practice sections for all your basic editing needs.  Don't worry if you don't remember all the commands when going through the vimtutor for the first time; however, it is important to do the exercises at the end of each section so you can get used to the way Vim works.  It should only take about a half hour to make it through your first run through the tutorial.

You might consider bookmarking this article for your reference and checking out vimtutor now.

<h2>Making Vim Work for You</h2>

After using Vim for a while now I have a good idea which commands I use most often when doing web development, programming, and configuration editing.  We will use this experience to look at different ways Vim can improve your programming and make it faster while trying not to overwhelm you with too many new commands.  Grab a few of these, use them, and add more when you feel comfortable.



Related posts:<ol><li><a href='http://eriwen.com/tools/awk-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: awk is a beautiful tool'>awk is a beautiful tool</a></li>
<li><a href='http://eriwen.com/tools/grep-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: grep is a beautiful tool'>grep is a beautiful tool</a></li>
<li><a href='http://eriwen.com/productivity/find-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: Find is a beautiful tool'>Find is a beautiful tool</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p class="update" style="margin-right: 92px">This post was authored by guest author <a href="http://marksanborn.net">Mark Sanborn</a>. Find out more <a href="http://eriwen.com/tools/vim-is-a-beautiful-tool/#markbio">below</a>.</p>
<p>When it comes to productivity I can&#8217;t think of any application that has saved more time and frustration than Vim.  Vim is the ultimate productivity tool for programmers.  Most users of Vim that I know that have spent the time to learn it absolutely love it and couldn&#8217;t imagine a world without it.  My only regret with Vim is not learning it sooner.</p>
<h2>So what is Vim?</h2>
<p>Vim is a modal text editor that is highly configurable, efficient, and lightweight.  Some people refer to it as the programmer&#8217;s text editor because it has a plethora of features that make programming easier, although it could be used for other things like writing email and editing config files.</p>
<p>What makes Vim especially great is the shortcuts, commands, and the blistering speed at which you can edit text files since Vim has all the common editing tasks mapped to single keys on or near the home row on your keyboard.</p>
<p>Sounds great&#8230; but there is a catch:<br />
<blockquote>Vim isn&#8217;t an editor designed to hold its users&#8217; hands. It is a tool, the use of which must be learned.</p></blockquote>
<h2>Easing the learning curve</h2>
<p>Vim is known for having a steep learning curve.  I think Vim has this reputation because people tend to want to learn all of the features right away and quickly become overwhelmed.</p>
<p>Vim is a lot like Adobe Photoshop, you can learn just a few simple techniques in Photoshop that can make a world of a difference in the images you can create and ways you can manipulate them.  Yet it may take you a lifetime to master all the functions Photoshop has to offer.  Vim is the same way.  You can learn only a few shortcuts and commands that will completely change the way you do text editing but may take years to learn them all (not that you would need to).</p>
<p>The great thing about Vim is everyone uses it differently.  I have my favorite shortcuts that I use every day.  Someone else might have a different set they use depending on what types of files they generally edit.  Once you learn a few basics and get comfortable with the shortcuts and commands that you use every day you can learn another to increase your productivity.</p>
<h2>Getting Started</h2>
<p>I suggest going through <strong>vimtutor</strong> once right now and again after you have played around with Vim for a while.  You can access vimtutor by typing in the command, &#8216;vimtutor&#8217; for Linux users and by running vimtutor.bat in your Vim folder for Windows users.</p>
<p>Vimtutor has all the commands and how to use them as well as practice sections for all your basic editing needs.  Don&#8217;t worry if you don&#8217;t remember all the commands when going through the vimtutor for the first time; however, it is important to do the exercises at the end of each section so you can get used to the way Vim works.  It should only take about a half hour to make it through your first run through the tutorial.</p>
<p>You might consider bookmarking this article for your reference and checking out vimtutor now.</p>
<h2>Making Vim Work for You</h2>
<p>After using Vim for a while now I have a good idea which commands I use most often when doing web development, programming, and configuration editing.  We will use this experience to look at different ways Vim can improve your programming and make it faster while trying not to overwhelm you with too many new commands.  Grab a few of these, use them, and add more when you feel comfortable.</p>
<h2>Vim modes</h2>
<p>In Vim there are three major modes:</p>
<ul>
<li><strong>Insert mode</strong> is like the Windows &#8216;notepad&#8217;.  Simply type and text will output to the screen.</li>
<li><strong>Command mode</strong> is where Vim really shines.  This mode is usually called &quot;normal mode&quot; since you will be using this mode a lot.  To get into Command mode just hit &#8216;Esc&#8217;.  When in command mode almost all letters numbers and keys on the keyboard are now shortcuts.  The keys, &#8216;hjkl&#8217; in command mode are now your &quot;arrow keys&quot;.</li>
<li><strong>Visual mode</strong> is where you can highlight text.</li>
</ul>
<p>If you ever made a mistake and hit the wrong key you can use &#8216;<strong>Esc</strong>&#8216; to get back to normal mode.</p>
<h2>Commands by function</h2>
<p><strong>Note:</strong> As with other *nix tools, these commands are case sensitive.<br />
You can use these commands in conjunction with another command or repeated x number of times by adding a digit to the beginning. For example, &#8216;<strong>4dd</strong>&#8216; would delete 4 lines.  &#8216;<strong>dw</strong>&#8216; would delete a word.</p>
<p>Here are some of the most common vim commands and their meanings:  </p>
<h2>Open and save:</h2>
<p>&#8216;<strong>:e path/to/filename</strong>&#8216; – With Vim running, this will open the file you specify.  This command can also be used to open remote files over SSH.<br />
&#8216;<strong>:w</strong>&#8216; – Will save the current file<br />
&#8216;<strong>:q</strong>&#8216; – Exits Vim</p>
<p>You can also use these commands together:</p>
<p>&#8216;<strong>:wq</strong>&#8216; – Writes to the file and exits Vim</p>
<p>If you want to quit without saving your changes you can do</p>
<p>&#8216;<strong>:q!</strong>&#8216; – Quit without saving</p>
<h2>Moving Around:</h2>
<p>To move your cursor around with vim you will use:</p>
<p><strong>h</strong> – left<br />
<strong>j</strong> – down<br />
<strong>k</strong> – up<br />
<strong>l</strong> – right</p>
<p>These movement keys are all located on the home row.  It will take a little getting used to but you will thank yourself for not using arrows or the mouse when you realize much time is wasted moving your hands.  I even find myself trying to use these keys in other programs and get frustrated when they don&#8217;t work.  Sometimes I am pleasantly surprised when programs can be navigated with these keys.</p>
<h3>Undo and Redo:</h3>
<p>Of course you can&#8217;t have an editor without undo and redo.</p>
<p><strong>u</strong> &#8211; undo the last change<br />
<strong>U</strong> – undo all changes on that line.  This is very useful when programming.<br />
<strong>Ctrl + r</strong> – redo the last change</p>
<h2>Copy and Paste:</h2>
<p>You will probably find yourself wanting to copy and paste at some point.  I will first explain how to copy and paste lines of text in the way that you are used to and then describe a few alternative ways.</p>
<p>To highlight the text you want to copy you will need to put Vim into visual mode.  You can do this different ways.</p>
<p><strong>v</strong> – go into visual mode and highlight with the Vim movement keys.<br />
<strong>V</strong> – go into visual mode and highlight lines of text</p>
<p>Once you have the text highlighted you will then &quot;yank&quot; the text with the &#8216;y&#8217; key.</p>
<p><strong>y</strong> – yank (copy) text.</p>
<p>Once you have the text yanked (copied) you can &quot;put&quot; (paste) it with the &#8216;p&#8217; key.</p>
<p><strong>p</strong> – put/paste text.</p>
<p>So far Vim has failed to show any real improvements over the way you are probably used to copying and pasting text.  y/p probably isn&#8217;t much faster than ctrl+c ctrl+v other than the fact that you don&#8217;t have to stretch your fingers to do it.  Here are some improvements.</p>
<p><strong>yy</strong> – copy current line.  This is incredibly useful and fast when doing programming or any type of editing.  When using this command in conjunction with, &#8216;p&#8217; it will automatically add a line to make room.  For example you can go to the desired line, hit &#8216;yy&#8217; then &#8216;p&#8217; and it will copy the line paste it below and move your cursor to the newly created line.</p>
<h2>My most commonly used commands</h2>
<p>Like I have said earlier Vim has more shortcuts than you would ever even want to know about but here are the golden ones.  These are the commands that I use daily.</p>
<ul>
<li>&#8216;<strong>h,j,k,l</strong>&#8216; – The movement keys are essential</li>
<li>&#8216;<strong>w,b</strong>&#8216; – move forward &#8216;w&#8217; and backward &#8216;b&#8217; one whole word.</li>
<li>&#8216;<strong>dw</strong>&#8216; – delete a word</li>
<li>&#8216;<strong>u,ctrl+r</strong>&#8216; – Undo and Redo are a must</li>
<li>&#8216;<strong>dd</strong>&#8216; – This deletes the current line.  I am constantly using this.  It also puts the text into a buffer so you can put/paste it.</li>
<li>&#8216;<strong>0,$</strong>&#8216; – The &#8216;0&#8242; will put you at the beginning of the line and &#8216;$&#8217; will put you at the end.</li>
<li>&#8216;<strong>i,a</strong>&#8216; – The &#8216;i&#8217; will put you in insert mode at the cursor.  &#8216;a&#8217; will put you in insert mode after the cursor.  Think of it like append.</li>
<li>&#8216;<strong>:52</strong>&#8216; – This will put you at line 52.  When you have errors in your program on line X use this command.</li>
<li>&#8216;<strong>o,O</strong>&#8216; – The &#8216;o&#8217; will create a line below and put you in insert.  &#8216;O&#8217; does the opposite.  It creates a line above.  This doesn&#8217;t really seem all that useful because you can always hit the enter key if you are at the end of the line but you are not always in insert mode or at the end of the line when you decide to make another line.</li>
<li>&#8216;<strong>f,F</strong>&#8216; – This is one of my favorite commands.  &#8216;f&#8217; will search forward in the line for the next character you type and &#8216;F&#8217; will search backwards.</li>
</ul>
<p>For example, lets say you have the following line of code:</p>
<pre class="brush: bash;">
print LOG &quot;StateProvinceCode: $StateProvinceCode\n&quot;;
</pre>
<p>You could hit the &#8216;<strong>f</strong>&#8216; key then the &#8216;<strong>\</strong>&#8216; key and the cursor would be positioned right near the &#8216;n&#8217; so I could change this to a tab character instead of a newline character.</p>
<p>This doesn&#8217;t mean it will keep on searching, there is a different key for that.</p>
<p>&#8216;<strong>/</strong>&#8216; – Search.  This is the key to initiate a search.  You can use regular expressions or do a simple word search.</p>
<h2>Special commands for programmers</h2>
<p>Syntax highlighting &#8212; If for some reason Vim isn&#8217;t highlighting code by default you can turn it on by typing, &#8216;<strong>:syntax on</strong>&#8216; or add it to your .vimrc config file.<br />
&#8216;<strong>=%</strong>&#8216; – Will auto tab nested ifs/loops/functions.  Although Vim automatically tabs everything out for you, sometimes you will run into old code or poorly tabbed code where you want to fix it up real quick.  Just go to the first &#8216;{&#8216; in the code and hit this command and everything will be auto tabbed.<br />
&#8216;<strong>gd</strong>&#8216; &#8211; Jump to variable definition.  The g stands for go.  There are multiple ways you can use &#8216;<strong>g</strong>&#8216;, &#8216;<strong>gg</strong>&#8216; will go to the beginning of the file and &#8216;G&#8217; will go to the end.  In this case we are using &#8216;gd&#8217; to go to the variable definition.  For example, lets say you are about a mile down your code and you have a function that calls the variable, $someOldVariable.  To find out what is inside this variable or where it was first created you would move your cursor to that variable and hit, &#8216;gd&#8217; this would auto-magically move you to where that variable was first seen, AKA the variable definition.<br />
&#8216;<strong>%</strong>&#8216; &#8211;  Go to matching  () [] {}.  Sometimes you will have a very long loop and a bunch of nested functions.  If your tabbing isn&#8217;t the best it is sometimes tricky to find out which bracket belongs to which function.  The &#8216;<strong>%</strong>&#8216; will move your cursor to the start or end of the matching bracket.<br />
&#8216;<strong>&gt;&gt; and &gt;</strong>&#8216; – The double arrow, &#8216;<strong>&gt;&gt;</strong>&#8216; will shift the current line over one tab.  If you highlight a region of text you can shift the entire text over with &#8216;<strong>&gt;</strong>&#8216;.</p>
<h2>Conclusion</h2>
<p>Although there are literally hundreds of shortcuts and commands for Vim you will be far ahead of the regular text editor with just these few.  If you simply learned the commands in this article alone you would program/edit much faster and be more productive.</p>
<p>Remember: learn just the basics first.  Open a text file or project source file and move around and learn how to save it.  Learn how to undo-redo and basic editing in insert modes.  To really get the hang of Vim you will need to spend about 5 hours messing around in the editor. </p>
<p><a name="markbio"></a></p>
<div class="update">
<h3>About Mark Sanborn</h3>
<p><img style="float: right; margin: 0 0 8px 8px" src="http://eriwen.com/images/MarkSanborn.jpg"/></p>
<p>Hi, I am Mark Sanborn.  I am 22 and just graduated from the University of Montana.  I have had an interest in computers for as long as I can remember.  I still remember the DOS days and really started getting into computers when Windows 3.1 was around.  I made my first webpage in the 7th grade.  My passion for web design and computers has only progressed from there.</p>
<p><strong>How did I learn to program?</strong><br/>In college I was approached by a group that wanted a realty website created for the University business plan competition. I gladly took the job and forced myself to learn PHP/MySQL while working on the project.  By the time the project was complete I was fairly fluent in PHP and was confident I could build pretty much anything I set my mind to.  I later used these skills to create a corporate website with a custom e-commerce shopping cart for a client.</p>
<p><strong>Computer Related Education</strong><br/>I just received my B.S. in Business Administration Information Systems.  I scored nearly a perfect score on the MCP test allowing me to achieve the Microsoft Certifed Professional status.  While attending college I worked for the University as tech support for dorm students and faculty.  I have a lot of experience working with computers but there is still a lot I can learn from others.  I also believe that you learn the most by teaching it to others.  This is why I created my own blog.</p>
<p><strong>What Languages Do You Use?</strong><br/>HTML, CSS, MySQL, PHP, Java, XML, Bash. For some reason I want to learn python yet I don&#8217;t know what I would use it for. Some experience in: ASP, Visual Basic, ColdFusion.</p>
<p><strong>What Do You Do In Your Spare Time?</strong><br/>I spend a lot of time in front of the computer but I am not your typical programmer that loves Star Trek and converses with their friends about what to do in the event of zombie attacks.  All stereotypes aside, I love to play guitar I am interested in all types of music, mostly blues and classic rock.  I am an avid weight lifter and practice Judo.  I don&#8217;t consider myself a fan of team based sports; however, I love individual sports. Last summer I learned to paraglide and for the past two winters I have  been enjoying the fabulous sport of kiteboarding on snow.</p>
</div>


<p>Related posts:<ol><li><a href='http://eriwen.com/tools/awk-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: awk is a beautiful tool'>awk is a beautiful tool</a></li>
<li><a href='http://eriwen.com/tools/grep-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: grep is a beautiful tool'>grep is a beautiful tool</a></li>
<li><a href='http://eriwen.com/productivity/find-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: Find is a beautiful tool'>Find is a beautiful tool</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://eriwen.com/tools/vim-is-a-beautiful-tool/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>awk is a beautiful tool</title>
		<link>http://eriwen.com/tools/awk-is-a-beautiful-tool/</link>
		<comments>http://eriwen.com/tools/awk-is-a-beautiful-tool/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 15:00:44 +0000</pubDate>
		<dc:creator>Eric Wendelin</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://eriwen.com/?p=183</guid>
		<description><![CDATA[AWK is a very powerful programming language that we can use on the command-line for advanced text processing. I'd like to provide a guide so you can get started using it. I'll be covering the basics of AWK (named after Alfred <strong>A</strong>ho, Peter <strong>W</strong>einberger, and Brian <strong>K</strong>ernighan) and provide some useful examples. 

<h2>Tutorial</h2>

To best introduce <em>awk</em> I'd like to start with a practical example. Most of the applications for awk that I've dealt with involve formatting some output or data into something cleaner and more usable. This is certainly not the limit of awk, it is <strong>a full fledged language</strong> with all the power and responsibility to go with it.

Awk operates on one &#34;record&#34; at a time, which is each line by default. <strong>Each &#34;field&#34; in a record is separated by a space</strong> (by default) or another defined separator (using the -F option).



Related posts:<ol><li><a href='http://eriwen.com/tools/grep-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: grep is a beautiful tool'>grep is a beautiful tool</a></li>
<li><a href='http://eriwen.com/tools/vim-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: Vim is a beautiful tool'>Vim is a beautiful tool</a></li>
<li><a href='http://eriwen.com/productivity/find-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: Find is a beautiful tool'>Find is a beautiful tool</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>AWK is a very powerful programming language that we can use on the command-line for advanced text processing. I&#8217;d like to provide a guide so you can get started using it. I&#8217;ll be covering the basics of AWK (named after Alfred <strong>A</strong>ho, Peter <strong>W</strong>einberger, and Brian <strong>K</strong>ernighan) and provide some useful examples. </p>
<h2>Tutorial</h2>
<p>To best introduce <em>awk</em> I&#8217;d like to start with a practical example. Most of the applications for awk that I&#8217;ve dealt with involve formatting some output or data into something cleaner and more usable. This is certainly not the limit of awk, it is <strong>a full fledged language</strong> with all the power and responsibility to go with it.</p>
<p>Awk operates on one &quot;record&quot; at a time, which is each line by default. <strong>Each &quot;field&quot; in a record is separated by a space</strong> (by default) or another defined separator (using the -F option).</p>
<p>We&#8217;re going to print the file names, line-numbers, and function names of all duplicate functions so they&#8217;re super easy to find and remove. Suppose we have some output from grep with file names and line numbers using a command like this (pulled from my <a href="http://eriwen.com/tools/grep-is-a-beautiful-tool/">grep tutorial</a>):</p>
<pre class="brush: bash;">
# Prints javascript functions like this - &lt;file&gt;:&lt;line-num&gt;:&lt;line-content&gt;
grep -EnH &quot;^\s*function \w+&quot; *.js | sort
</pre>
<p>That&#8217;s all good and well, but this doesn&#8217;t quite give us what we want in a clear manner, it prints all functions and information in a kinda cludgy fashion. We can clean this up with a bit of awk. First let&#8217;s learn a basic awk command:</p>
<pre class="brush: bash;">
awk '/'^$'/ { print &quot;blank line&quot; }' myfile
</pre>
<p>This snippet will print &quot;blank line&quot; for line that matches the regex: ^$ (a blank line). The pattern (between the two slashes, inclusive) is optional and we&#8217;ll see in the next example:</p>
<pre class="brush: bash;">
awk 'BEGIN { print &quot;Hello, awk!&quot; } { print $2, $1 } END { print &quot;Goodbye, awk!&quot;}' myfile
</pre>
<p>How this reads is: Before processing (BEGIN), print &quot;Hello, awk!&quot; and then <em>print</em> the second field ($2) and then the first ($1) for each line of myfile, then after processing (END) print &quot;Goodbye, awk!&quot;. The BEGIN and END clauses are optional. </p>
<p>As explained above, a field is a sequence of non-whitespace characters. So if a line contained &quot;foo bar other stuff&quot;, awk would print &quot;bar foo&quot;. </p>
<p>One more thing before continuing: awk scripts can get ugly so it is useful to know you can read a file for awk commands:</p>
<pre class="brush: bash;">
#My awk file: foo.awk
BEGIN { print &quot;Hello, awk!&quot; }
{
    print $2, $1
    # This is an awk comment
}
END { print &quot;Goodbye, awk!&quot; }

#Invoke foo.awk
awk -f foo.awk myfile
</pre>
<p>OK, let&#8217;s add some power to that old grep command. We can use the <em>-F</em> option to specify our delimiter so let&#8217;s add to our grep command like so:</p>
<pre class="brush: bash;">
grep -Eoni &quot;^\s*function \w+&quot; *.js | awk -F ':' '{print $3,&quot; &quot;,$1,$2}' | sort
</pre>
<p>Now we have a sorted list of function names followed by their filename and line number by spaces. We needed to print $3 first so that we could easily sort by the function name and look for duplicates, but we&#8217;re not going to do that manually&#8230; oh noooooo way. </p>
<p>Let&#8217;s make it a bit prettier and <em>uniq</em>-ify our list of functions by function:</p>
<pre class="brush: bash;">
# New part of our command
awk '{print $3,&quot;line&quot;,$4,$2}' | uniq -f 3 -D

# Full command
grep -Eoni &quot;^\s*function \w+&quot; *.js | awk -F ':' '{print $3,&quot; &quot;,$1,$2}' | sort | awk '{print $3,&quot;line&quot;,$4,$2}' | uniq -f 3 -D
</pre>
<p>Here we pipe our last command back into <em>awk</em> printing &lt;filename&gt; line &lt;line-num&gt; &lt;function-name&gt; and then use uniq on the 3rd field (-f 3) showing only the duplicates (-D). </p>
<h2>Other awk examples</h2>
<pre class="brush: bash;">
#Backup all JavaScript files with a .bak extension -- replace 'bash' with your shell
 ls *.js | awk '{print &quot;cp &quot;$0&quot; &quot;$0&quot;.bak&quot;}' | bash
#Print the number of lines that contain &quot;function&quot;
awk '/'function'/ {i = i + 1} END {print i}' myfile.js
</pre>
<h2>Conclusion</h2>
<p>AWK is admittedly a ten ton gorilla of a tool, so there is no way I could cover everything that it can do in one post. If there is enough demand I can write about some of the more advanced features like conditionals, variables, and formatting. <a href="http://eriwen.com/feed/" title="Subscribe to Eric's Blog">Stay tuned</a>!</p>
<h2>Further Reading</h2>
<p>To see how far this rabbit hole goes, you should check out a couple of my favorite references:</p>
<ul>
<li><a href="http://www.catonmat.net/blog/awk-nawk-and-gawk-cheat-sheet/">awk, nawk, and gawk cheat sheet</a></li>
<li><a href="http://en.wikipedia.org/wiki/Awk" title="AWK wikipedia entry">AWK &#8211; Wikipedia</a></li>
<li><a href="http://sparky.rice.edu/~hartigan/awk.html">Hartigan&#8217;s AWK reference</a></li>
</ul>
<p>Hope you found this informative and want to know more. I know you all probably have some awk gems to share, let&#8217;s see them!</p>


<p>Related posts:<ol><li><a href='http://eriwen.com/tools/grep-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: grep is a beautiful tool'>grep is a beautiful tool</a></li>
<li><a href='http://eriwen.com/tools/vim-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: Vim is a beautiful tool'>Vim is a beautiful tool</a></li>
<li><a href='http://eriwen.com/productivity/find-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: Find is a beautiful tool'>Find is a beautiful tool</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://eriwen.com/tools/awk-is-a-beautiful-tool/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Get sed savvy &#8211; part 3</title>
		<link>http://eriwen.com/tools/get-sed-savvy-3/</link>
		<comments>http://eriwen.com/tools/get-sed-savvy-3/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 11:30:57 +0000</pubDate>
		<dc:creator>Eric Wendelin</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://eriwen.com/?p=68</guid>
		<description><![CDATA[We will learn about the <em>sed</em> delete (d), read (r) and write (w) commands today to round out your sed toolbox. Obviously, I won't be covering everything about sed. I literally have a book on <em>sed</em> that I keep handy because there is so much to it. The major parts I am covering should help you through 99% of the cases where sed is your best option. 

Soon we'll be looking at awk and other tools to continue the quest for command-line fluency. If you haven't already, install <a href="http://cygwin.com" title="Cygnus + Windows">Cygwin</a> and check out <a href="http://eriwen.com/tools/get-sed-savvy-1/">part 1</a> and <a href="http://eriwen.com/tools/get-sed-savvy-2/">part 2</a>.

<h2>Tutorial</h2>

One of the best ways to crank out code quickly is by using templates. Using the Stream EDitor, you can streamline the use of templates.



Related posts:<ol><li><a href='http://eriwen.com/tools/get-sed-savvy-2/' rel='bookmark' title='Permanent Link: Get sed savvy &#8211; part 2'>Get sed savvy &#8211; part 2</a></li>
<li><a href='http://eriwen.com/tools/get-sed-savvy-1/' rel='bookmark' title='Permanent Link: Get sed savvy &#8211; part 1'>Get sed savvy &#8211; part 1</a></li>
<li><a href='http://eriwen.com/tools/awk-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: awk is a beautiful tool'>awk is a beautiful tool</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>We will learn about the <em>sed</em> delete (d), read (r) and write (w) commands today to round out your sed toolbox. The major parts I am covering should help you through 99% of the cases where sed is your best option. </p>
<p><img src="http://eriwen.com/images/terminal.png" style="float: right; margin: 8px 0 8px 8px" /> Soon we&#8217;ll be looking at awk and other tools to continue the quest for command-line fluency. If you haven&#8217;t already, install <a href="http://cygwin.com" title="Cygnus + Windows">Cygwin</a> and check out <a href="http://eriwen.com/tools/get-sed-savvy-1/">part 1</a> and <a href="http://eriwen.com/tools/get-sed-savvy-2/">part 2</a>.</p>
<h2>Tutorial</h2>
<p>One of the best ways to crank out code quickly is by using templates. Using the Stream EDitor, you can streamline the use of templates.</p>
<p>Suppose we have a template <abbr title="HyperText Markup Language">HTML</abbr> file that we want to reuse often. Maybe it looks like this:</p>
<pre class="brush: xml;">
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;template.html&lt;/title&gt;
     &lt;/head&gt;
    &lt;body&gt;
        &lt;div id=&quot;nav&quot;&gt;Navigation here&lt;/div&gt;
        &lt;div id=&quot;content&quot;&gt;
%%CONTENT%%
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Now we want to replace <em>&quot;%%CONTENT%%&quot;</em> with the contents of an HTML Fragment file. The syntax is simple: &#8216;/&lt;pattern&gt;/r&#8217;:</p>
<pre class="brush: bash; light: true;">
sed '/^%%CONTENT%%/r fragment.htmlf' template.html
</pre>
<p>The above script will append the contents of <em>fragment.htmlf</em> <strong>immediately after</strong> <em>&quot;%%CONTENT%%&quot;</em>. So we can use the delete command to fix that:</p>
<pre class="brush: bash; light: true;">
sed -e '/^%%CONTENT%%/r fragment.htmlf' -e '/^%%CONTENT%%/d' template.html &gt; whole.html
</pre>
<p>This might seem slightly useless, but the power here is in the simplicity. Many times I&#8217;m generating bits of Wiki code or HTML, and this has been invaluable. </p>
<p>OK, now for one more command: <em>write (w)</em>. Suppose we have a <abbr title="Comma Separated Values">CSV</abbr> file that we want to split into several files depending on the value in the last cell. We could do this with <a href="http://eriwen.com/tools/grep-is-a-beautiful-tool/" title="grep tutorial">grep</a>, or awk (coming soon), but with sed we can do it with more efficiently:</p>
<pre class="brush: bash; light: true;">
#sedscript file
/,[0-9]+$/w numbers.csv
/,[A-Za-z]+/w letters.csv
/,[^A-Za-z0-9]+/w symbols.csv

sed -r -f sedscript original.csv
</pre>
<p>Now numbers.csv will contain all rows that the last cell containing numbers, and so on for letters.csv and symbols.csv. A neat application for this might be sorting your giant contacts list into different files based on some criteria. This is a simple example, but you can probably think of a more useful scenario where you&#8217;d want to filter and split a file. </p>
<h3>Other Examples</h3>
<pre class="brush: bash;">
#Print everything outside the &lt;html&gt; tag (check DOCTYPES)
sed '/&lt;html&gt;/,/&lt;/html&gt;/d' myfile.html

#Convert rn (DOS) to UNIX n
sed 's/$//' myfile        #Windows
sed 's/.$//' myfile       #Linux/UNIX
</pre>
<h2>Conclusion</h2>
<p>You have now learned several <em>sed</em> commands and patterns you can use to make editing files and some searching tasks much more efficient, and <strong>even better, scriptable</strong> so they can be automated in a process. One cool application would be to get comments from a set of files and post them to a wiki. It would sure make collaboration slick, right?</p>
<p>Obviously, you can bookmark this stuff but you&#8217;ll really get good at it only if you just try it out. Keep sharing your experiences and command lists, they&#8217;re great! </p>


<p>Related posts:<ol><li><a href='http://eriwen.com/tools/get-sed-savvy-2/' rel='bookmark' title='Permanent Link: Get sed savvy &#8211; part 2'>Get sed savvy &#8211; part 2</a></li>
<li><a href='http://eriwen.com/tools/get-sed-savvy-1/' rel='bookmark' title='Permanent Link: Get sed savvy &#8211; part 1'>Get sed savvy &#8211; part 1</a></li>
<li><a href='http://eriwen.com/tools/awk-is-a-beautiful-tool/' rel='bookmark' title='Permanent Link: awk is a beautiful tool'>awk is a beautiful tool</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://eriwen.com/tools/get-sed-savvy-3/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
