<?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>SIGTTOU &#187; Tools</title>
	<atom:link href="http://sigttou.com/category/tools/feed" rel="self" type="application/rss+xml" />
	<link>http://sigttou.com</link>
	<description>Just another background process...</description>
	<lastBuildDate>Sun, 04 Jul 2010 02:08:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Awesome regex test tool</title>
		<link>http://sigttou.com/regex-test-tool</link>
		<comments>http://sigttou.com/regex-test-tool#comments</comments>
		<pubDate>Sat, 05 Sep 2009 06:27:44 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=113</guid>
		<description><![CDATA[So I&#8217;m working with a friend to develop a regex that matches something out of an API response, when we really wish we could quickly prototype a regex. Now, there are plenty of tools to do this, some are even &#8230; <a href="http://sigttou.com/regex-test-tool">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m working with a friend to develop a regex that matches something out of an API response, when we really wish we could quickly prototype a regex. Now, there are plenty of tools to do this, some are even freeware, but all them need to be downloaded and installed. I realize it sounds pathetic to say that I was too lazy to download and install a tool, but to be honest I really don&#8217;t need more tiny, rarely-used apps cluttering up my system. There&#8217;s <em>got</em> to be a web-based tool to do this, I thought.</p>
<p>Google did not disappoint. I found this <strong>awesome</strong> web-based regex test tool built on Adobe Flex called <a href="http://gskinner.com/RegExr/">RegExr</a>. If you&#8217;ve got Flash installed, it runs right in your browser.</p>
<p>Not only does it show you what it&#8217;s matching live as you type, what your match groups contain, what each chunk of your regex means, etc., but it&#8217;s also got a phenomenal quick-reference sidebar for all those handy meta-characters. You can even save your favorite regexs and browse other people&#8217;s favorite submissions.</p>
<p>We need more tools like this. I was able to quickly and easily prototype a regex in no time at all, and the app took about 10 seconds to figure out how to use.</p>
<p>Thanks, <a href="http://gskinner.com">gskinner.com</a>! You guys are awesome!</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/regex-test-tool/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Know your text editor</title>
		<link>http://sigttou.com/know-your-text-editor</link>
		<comments>http://sigttou.com/know-your-text-editor#comments</comments>
		<pubDate>Thu, 23 Jul 2009 02:41:36 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=81</guid>
		<description><![CDATA[Let&#8217;s examine why it&#8217;s important as a programmer to really know your text editor, but in a different light that usual. Traditionally programmers are concerned with knowing all the tricks of their editor so that they can make use of &#8230; <a href="http://sigttou.com/know-your-text-editor">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s examine why it&#8217;s important as a programmer to really know your text editor, but in a different light that usual. Traditionally programmers are concerned with knowing all the tricks of their editor so that they can make use of them. Instead, let&#8217;s look at an example of why you should know what your editor does so it doesn&#8217;t screw you over.</p>
<p>Today at work a coworker received a large volume of joke emails telling them how bad their coding style was, with links to example code telling them to &#8220;learn how to program&#8221;. This was in response to what he thought was a simple 6-line change, but was actually a 22,000-line &#8220;oops&#8221;.</p>
<p>He opened up a file that&#8217;s roughly 25,000 lines (let&#8217;s not get into why it&#8217;s that long&#8230;) to make a simple change. After adding about 6 lines, he saved, quit, and committed the change to the repository. His editor of choice is vim (as is mine).</p>
<p>For those of you unfamiliar with vim, it&#8217;s a text-based editor that has a fairly steep learning curve. It takes years to truly master, but the power it offers you is incredible. In vim you start in command mode, which let you enter vim commands much like you would on a command line. You can switch to insert mode to actually insert text into your document, or other modes for formatting and whatnot.</p>
<p>Well in this case, the programmer accidentally brushed the escape key while he was typing, which brought him out of insert mode and into command mode. What he thought was being typed into a comment in his code was actually being typed into the vim command line. He must have brushed some other keys as well, because here&#8217;s the unfortunate key sequence that he ended up entering:</p>
<pre>:% &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</pre>
<p>For those of you not well-versed in vim commands, here&#8217;s an explanation. The colon starts a command, and the % symbol is like a wildcard for the command, applying it to the entire file instead of the current selection. Each <code>&lt;</code> character shifts the current selection one tab stop to the left. Similarly, the <code>&gt;</code> character shifts the current selection one tab stop to the right. It&#8217;s phenomenally handy for quickly adjusting the level that a block of code is indented.</p>
<p>However, what that above command will do is basically crush every level of indention against the left margin, and then apply that to the entire file. What you end up with is having every line of your beautifully indented code smashed down to column 0. No indention. None.</p>
<p>As vim was updating this change to the swap file (remember, there were 25,000 lines) he saved and quit. The file had been updated, but his screen had not, so he had no idea he&#8217;d accidentally just nuked the indention of the entire file.</p>
<p>It was his commit to the repository that threw up the red flag. This was supposed to be a small bug fix. However, the commit email, sent out to the entire mailing list, contained a 22,000 line diff. Woops.</p>
<p>After looking at the changes and chuckling over the fact that the file was completely unreadable now, many people on the coding team sent him joke emails about &#8220;what crappy coding style&#8221; he had, with links to &#8220;learn how to program&#8221;.</p>
<p>Now, naturally this took only about 2 seconds to fix, since the code was under source control. But the point still stands. Not only learn your editor, but watch it with a careful eye when you&#8217;re working with it, lest all those features that are there to increase productivity turn against you.</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/know-your-text-editor/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
