<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Swig505.com</title>
 <link href="http://swig505.com/atom.xml" rel="self"/>
 <link href="http://swig505.com/"/>
 <updated>2011-11-03T14:53:08-07:00</updated>
 <id>http://swig505.com/</id>
 <author>
   <name>Brian Smith</name>
   <email>bsmith@swig505.com</email>
 </author>
 
 
 <entry>
   <title>[QuickTip] Mac OS X Terminal: Moving the Cursor Intelligently</title>
   <link href="http://swig505.com/2010/12/28/command-line-navigation.html"/>
   <updated>2010-12-28T00:00:00-08:00</updated>
   <id>http://swig505.com/2010/12/28/command-line-navigation</id>
   <content type="html">&lt;h2&gt;[QuickTip] Mac OS X Terminal: Moving the Cursor Intelligently&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/images/drawings/terminal.png&quot; alt=&quot;Term-nom-nom&quot; class=&quot;inline-left&quot; /&gt;
If you've spent much time in a terminal, you probably already know the key bindings &lt;code&gt;Ctrl-A&lt;/code&gt; and &lt;code&gt;Ctrl-E&lt;/code&gt;
to move the cursor to the beginning and end of the line. While this is nice, it just doesn't jive well with
the OS X standard key movements (and arrows are just more consistent to my easily confused mind). Also, sometimes I catch myself typing
foolishly long commands and I'll find a typo in the middle &amp;mdash;
and suddenly pressing the left arrow 25 times seems unnecessarily tedious. &lt;em&gt;sigh&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's rectify this nonsense!&lt;/p&gt;

&lt;p&gt;Open up a Terminal window and go to &lt;code&gt;Terminal -&amp;gt; Preferences -&amp;gt; Settings -&amp;gt; Keyboard&lt;/code&gt;. We're going to add the following
keyboard shortcuts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Ctrl →&lt;/code&gt; will map to &lt;code&gt;\001&lt;/code&gt; (equivalent to &lt;code&gt;Ctrl-A&lt;/code&gt;) and will move the cursor to the beginning of the line
(&lt;a href=&quot;/images/screenshots/terminal-ctrl-left.png&quot; rel=&quot;facebox&quot;&gt;screenshot&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl ←&lt;/code&gt; will map to &lt;code&gt;\005&lt;/code&gt; (equivalent to &lt;code&gt;Ctrl-E&lt;/code&gt;) and will move the cursor to the end of the line
(&lt;a href=&quot;/images/screenshots/terminal-ctrl-right.png&quot; rel=&quot;facebox&quot;&gt;screenshot&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Option →&lt;/code&gt; will map to &lt;code&gt;\033b&lt;/code&gt; and will move the cursor to the next word
(&lt;a href=&quot;/images/screenshots/terminal-option-left.png&quot; rel=&quot;facebox&quot;&gt;screenshot&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Option ←&lt;/code&gt; will map to &lt;code&gt;\033f&lt;/code&gt; and will move the cursor to the previous word
(&lt;a href=&quot;/images/screenshots/terminal-option-right.png&quot; rel=&quot;facebox&quot;&gt;screenshot&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Ahhhh, this pleases my irrationally OCD self. Sure, I may be taking my hands off the home row (shit, I'd have &lt;a href=&quot;http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-sheet/&quot;&gt;bash in vi mode&lt;/a&gt; if I cared about that), but there's happiness in my fingers while using arrow keys for cursor movement.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>TIL: When Everything Is A Priority, Nothing Is A Priority</title>
   <link href="http://swig505.com/2010/12/07/nothing-is-a-priority.html"/>
   <updated>2010-12-07T00:00:00-08:00</updated>
   <id>http://swig505.com/2010/12/07/nothing-is-a-priority</id>
   <content type="html">&lt;h2&gt;TIL: When Everything Is A Priority, Nothing Is A Priority&lt;/h2&gt;

&lt;p&gt;Priority, severity, importance and urgency only work insofar as their relativity to things that are less important, less severe and less urgent. Asking your team to &lt;em&gt;sprint&lt;/em&gt; only works if your regular pace is a jog. A team that is always sprinting quickly slows to a walk &amp;mdash; and often remains there indefinitely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Please don't read too much into the term &lt;em&gt;sprint&lt;/em&gt; here. I'm not taking any shots at agile methodologies that use this term, it just seemed like an apt analogy.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>TIL: A 90% Solution Today Is Better Than a 100% Solution That Never Happens</title>
   <link href="http://swig505.com/2010/12/03/ninety-percent.html"/>
   <updated>2010-12-03T00:00:00-08:00</updated>
   <id>http://swig505.com/2010/12/03/ninety-percent</id>
   <content type="html">&lt;h2&gt;TIL: A 90% Solution Today Is Better Than a 100% Solution That Never Happens&lt;/h2&gt;

&lt;p&gt;I've been working on a Markdown-based Notes app for Mac, and I've hit a few tough spots lately. Specifically, I've been pondering different ways to do the syntax-highlighting and a few other grammar-based actions and rules to make editing easier. As far as I saw it, I had two alternatives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create (or alter an existing) Markdown parser that would create a parse tree from a formal grammar&lt;/li&gt;
&lt;li&gt;Use pattern matching via a series of regular expressions&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The computer scientist in me took the reigns and decided to start writing a recursive descent parser for Markdown a few days ago. And then today, I was discussing the project with my friend and colleague, &lt;a href=&quot;http://www.jayswain.com&quot;&gt;Jay Swain&lt;/a&gt;, and he started prodding me about when I would release it, what I had left to do, etc. As I started explaining how I'm working on this &quot;awesome Markdown parser&quot; and how it will take a little while longer, I could see the excitement start to fade. I realized that as a potential user, Jay didn't care whether the app used a beautiful parser with a formal grammar or whether it used a bunch of hacked-together regex's &amp;mdash; he would rather have a version that worked &lt;strong&gt;pretty darn well tomorrow&lt;/strong&gt; than a version that worked &lt;strong&gt;really well in a few weeks&lt;/strong&gt;. So I've stashed my backtracing recursive descent parser (sounds fun, right?) into a branch, and tomorrow I'll be implementing syntax highlighting with pattern matching (and thus releasing much sooner). I have to thank Jay for reminding me:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A 90% Solution Today Is Better Than a 100% Solution That Never Happens&lt;/strong&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>TIL: The Y-Combinator (not the VC firm)</title>
   <link href="http://swig505.com/2010/12/02/y-combinator.html"/>
   <updated>2010-12-02T00:00:00-08:00</updated>
   <id>http://swig505.com/2010/12/02/y-combinator</id>
   <content type="html">&lt;h2&gt;TIL: The Y-Combinator (not the VC firm)&lt;/h2&gt;

&lt;p&gt;As a &lt;a href=&quot;http://news.ycombinator.com/&quot;&gt;Hacker News&lt;/a&gt; reader and start-up scene follower, I come across the term &lt;strong&gt;Y Combinator&lt;/strong&gt; quite often in reference to the &lt;a href=&quot;http://www.ycombinator.com/&quot;&gt;startup funding firm&lt;/a&gt;. Most geeks know the term refers to a functional programming construct, but that's as far as we go &amp;mdash; and that's as far as I'd gone until today! However, rather than rehash other individuals' eloquent explanations, I'll pass along the list of the resources I used so that you may create your own journey. Enjoy!&lt;/p&gt;

&lt;h4&gt;Resources&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://mvanier.livejournal.com/2897.html&quot;&gt;Mike's World-O-Programming: The Y Combinator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dreamsongs.com/NewFiles/WhyOfY.pdf&quot;&gt;The Why of Y&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Y_combinator&quot;&gt;Fixed Point Combinator - Wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>TIL: Inspiration often needs some heavy nudging</title>
   <link href="http://swig505.com/2010/12/01/inspiration-and-heavy-nudging.html"/>
   <updated>2010-12-01T00:00:00-08:00</updated>
   <id>http://swig505.com/2010/12/01/inspiration-and-heavy-nudging</id>
   <content type="html">&lt;h2&gt;TIL: Inspiration often needs some heavy nudging&lt;/h2&gt;

&lt;p&gt;I've been neglecting my personal corner of cyberspace (do people still use this word?), so I decided to spend an hour today cleaning it up. In addition to a few minor cosmetic changes, I've changed the organization to hopefully encourage more frequent posting and &quot;wiki-fying&quot; informational entries to encourage updates and deprecations. My goal:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add a brief blog entry each day about something I learned that day&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'm hoping this course succeeds in two ways: 1) hopefully I will post more often, and 2) this is a way to consciously make an effort to learn something new &lt;em&gt;every&lt;/em&gt; day. So here's the first post in this crazy experiment:&lt;/p&gt;

&lt;h3&gt;Today I learned that inspiration often needs some heavy nudging&lt;/h3&gt;
</content>
 </entry>
 
 
</feed>