<?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>gnapse.com &#187; Programming</title>
	<atom:link href="http://gnapse.com/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://gnapse.com/blog</link>
	<description>whatever comes to my mind</description>
	<lastBuildDate>Wed, 28 Jul 2010 18:50:37 +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>Railscasts on text</title>
		<link>http://gnapse.com/blog/2010/07/28/railscasts-on-text/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=railscasts-on-text</link>
		<comments>http://gnapse.com/blog/2010/07/28/railscasts-on-text/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 18:50:37 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Web programming]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[railscasts]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[screencasts]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=158</guid>
		<description><![CDATA[Every Rails programmer out there should have heard about Railscasts. It&#8217;s a great blog that every monday posts a new short screencast about some topic related to Ruby on Rails programming. It can be about features of the upcoming or just released new version of Rails, about how to integrate other services and softwares with [...]]]></description>
			<content:encoded><![CDATA[<p>Every Rails programmer out there should have heard about <a title="About Railscasts.com" href="http://railscasts.com/about" target="_blank">Railscasts</a>. It&#8217;s a great blog that every monday posts a new short screencast about some topic related to Ruby on Rails programming. It can be about features of the upcoming or just released new version of Rails, about how to integrate other services and softwares with Rails, about hot plugins and gems that can be really useful, or anything related that you can think of. It&#8217;s been running for over three years and keeps its content amazingly up to date. The credits go for Ryan Bates.</p>
<p>But you probably haven&#8217;t heard of <a title="About ASCIIcasts.com" href="http://www.asciicasts.com/about" target="_blank">ASCIIcasts</a>, which is a text version of the original blog, including a transcript of Ryan&#8217;s voice from the original video, along with key code samples and screenshots of the main features explained. Think of it as a textual equivalent of the screencast. It can serve various purposes, including being search friendly (you can make a full text search on Ryan&#8217;s spoken words), but also for people like me with a slow connection, it can help me have a glimpse of any episode before actually downloading it, maybe even sparing me the effort and bandwidth. If any of these or other reasons are good for you, or even for the sake of it, take a look as <a href="http://www.asciicasts.com/" target="_blank">ASCIIcasts</a>. You&#8217;ll love it almost as much as the original.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2010/07/28/railscasts-on-text/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My new iPad nano (aka iPhone)</title>
		<link>http://gnapse.com/blog/2010/02/03/my-new-ipad-nano-aka-iphone/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=my-new-ipad-nano-aka-iphone</link>
		<comments>http://gnapse.com/blog/2010/02/03/my-new-ipad-nano-aka-iphone/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 17:54:10 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Whatever]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=116</guid>
		<description><![CDATA[Most people are going crazy these days talking about the most recent gadget announced by Apple. They&#8217;ve seen the video, they went to the announcement conference, they are wondering when will they get one in their hands. They simply can&#8217;t wait. Meanwhile I am enjoying a similar experience. Somebody noticed out there that there are [...]]]></description>
			<content:encoded><![CDATA[<p>Most people are going crazy these days talking about <a title="iPad" href="http://apple.com/ipad" target="_blank">the most recent gadget announced by Apple</a>. They&#8217;ve seen <a href="http://www.apple.com/ipad/includes/video-ipad.html#video" target="_blank">the video</a>, they went to the announcement conference, they are wondering when will they get one in their hands. They simply can&#8217;t wait.</p>
<p>Meanwhile I am enjoying a similar experience. <a href="http://www.buzzfeed.com/kellyh3/ipad-nano-q94" target="_blank">Somebody noticed out there</a> that there are many of us with an iPad already (kind of). The <a title="iPhone" href="http://apple.com/iphone" target="_blank">iPad nano</a> has been around for a couple of years now but with another name. And I recently got one and I am delighted with it. Why going crazy about the new one when you can have the nano version which fits in your pocket, has a camera and makes phone calls too!</p>
<div id="attachment_120" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-120" title="ipad-nano" src="http://gnapse.com/blog/wp-content/uploads/2010/02/ipad-nano-18412-1264908879-85.jpg" alt="iPad nano" width="500" height="600" /><p class="wp-caption-text">iPad nano</p></div>
<p>Now seriously, after using the iPhone for some days I understand why people are crazy to experiment with its big but younger brother. Touch screens are seriously redefining how we interact with computers and from a developer standpoint it&#8217;s amazing the whole new set of possibilities that arise. And it&#8217;s not only touch screens and multi-touch, but also the ability to make a program adapt to different orientations of the device, to be able to access hardware services like a compass, accelerometer, GPS, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2010/02/03/my-new-ipad-nano-aka-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gitignore++</title>
		<link>http://gnapse.com/blog/2009/12/18/gitignore/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=gitignore</link>
		<comments>http://gnapse.com/blog/2009/12/18/gitignore/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 21:31:14 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[vcs]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=108</guid>
		<description><![CDATA[I always wondered why Rails developers on the Mac keep adding those .DS_Store files into the .gitignore file of their project repo. It just doesn&#8217;t feel right. When I cloned some of these repos in ubuntu I always wondered what the held that file has to do with me.  I also felt bad every time [...]]]></description>
			<content:encoded><![CDATA[<p>I always wondered why Rails developers on the Mac keep adding those <code>.DS_Store</code> files into the <code>.gitignore</code> file of their project repo. It just doesn&#8217;t feel right. When I cloned some of these repos in ubuntu I always wondered what the held that file has to do with me.  I also felt bad every time I added my <code>nbproject</code> folders and <code>*.kpf</code> files to my <code>.gitignore</code> list back in the days when I used Netbeans and Komodo to program in Rails. People interested in my projects need not be seeing this when they clone my code.<span id="more-108"></span></p>
<p>It turns out that <a title="Git Version Control System" href="http://git-scm.com/" target="_blank">git</a> offers three mechanisms to specify which files to ignore. Most people know about the <code>.gitignore</code> files inside the working tree. But if you take a look at the <a href="http://www.kernel.org/pub/software/scm/git-core/docs/gitignore.html" target="_blank">gitignore documentation</a> you&#8217;ll find out that there&#8217;s a second file to specify ignore patterns that are specific to a given user&#8217;s work-flow, but that shouldn&#8217;t be cluttering the .gitignore files inside the repo, which are normally also versioned by git and thus shared by all the developers working in the project. Patterns like these should go in the <code>$GIT_DIR/info/exclude</code> file, where <code>$GIT_DIR</code> usually refers to the <code>.git/</code> directory inside your working tree.</p>
<p>Nobody cares what&#8217;s your favorite editor and you shouldn&#8217;t be cluttering the ignore files versioned inside the repo with the patterns of the files generated by your working environment. That way your buddies on a Mac won&#8217;t laugh at you when they notice you are stuck with Netbeans because you&#8217;re on Linux, or that you are geeky enough to use Emacs or Vim instead of the sexy TextMate.</p>
<p>But wait. We still have to repeat all those pesky private ignore patterns in every different project, when we should be able to tell git globally about the garbage we normally want to ignore. <a title="Don't Repeat Yourself" href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself">DRY</a> anybody?</p>
<p>You&#8217;re right. That sounds very stupid. We are programmers after all. We&#8217;re supposed to be clever and lazy. So is the guy who invented all this git thing. It turns out that you can specify a global <code>.gitignore</code> file via <code>git-config</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git-config <span style="color: #660033;">--global</span> core.excludesfile <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>ernesto<span style="color: #000000; font-weight: bold;">/</span>.gitignore</pre></div></div>

<p>The file doesn&#8217;t have to be named <code>.gitignore</code> and it doesn&#8217;t have to be in your home directory. The <code>core.excludesfile</code> configuration directive is there precisely so that you can put this global ignore file anywhere you want. Also, beware of using <code>~/</code> to specify that the file is in your home directory. The documentation says that it works and expands it to the value of the <code>$HOME</code> environment variable, but it doesn&#8217;t work in my Mac.</p>
<p>So now you can go and edit that file and put the things that bother you privately. Mine for instance is something like this.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.DS_Store
.svn
<span style="color: #000000; font-weight: bold;">*</span>~
<span style="color: #000000; font-weight: bold;">*</span>.<span style="color: #7a0874; font-weight: bold;">&#91;</span>oa<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">*</span>.kpf
nbproject
Thumbs.db</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/12/18/gitignore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AMP: One VCS to rule them all</title>
		<link>http://gnapse.com/blog/2009/11/30/amp-one-vcs-to-rule-them-all/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=amp-one-vcs-to-rule-them-all</link>
		<comments>http://gnapse.com/blog/2009/11/30/amp-one-vcs-to-rule-them-all/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 18:59:56 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[bazaar]]></category>
		<category><![CDATA[distributed vcs]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[vcs]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=95</guid>
		<description><![CDATA[If you are a programmer and you already know something about git, mercurial, bazaar or some other modern distributed version control system, you should give AMP a try. And no, it is not a VCS in the most strict sense of the concept, but a meta-tool for VCS ease of use. Currently it works as [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a programmer and you already know something about <a href="http://git-scm.com/" target="_blank">git</a>, <a href="http://mercurial.selenic.com/" target="_blank">mercurial</a>, <a href="http://bazaar-vcs.org/" target="_blank">bazaar</a> or some other modern distributed version control system, you should give <a href="http://amp.carboni.ca/" target="_blank">AMP</a> a try. And no, it is not a <abbr title="Version Control System">VCS</abbr> in the most strict sense of the concept, but a meta-tool for VCS ease of use.</p>
<p>Currently it works as a Ruby interface to Mercurial, but they are aiming high. According to their own definition, &#8220;[their] goal is to produce a piece of software that lets you forget that you&#8217;re working on git project one moment and a Mercurial project the next.&#8221; A sort of meta-interface for most modern distributed VCS&#8217;s out there, so that you can use them all with the same set of commands, or maybe even interact between different VCS&#8217;s. Although I haven&#8217;t had the time yet to truly play with it, It appears to be highly customizable.</p>
<p>BTW, they also mention svn and cvs as VCS&#8217;s they want to support, but I can&#8217;t see why to drain out resources into these dinosaurs. I still don&#8217;t get why people still use centralized-only VCS&#8217;s if they have the choice of distributed version control. But anyway, I wish them good luck with the project overall, and I will sure keep an eye on it for a while.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/11/30/amp-one-vcs-to-rule-them-all/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great ORM for the iPhone SDK</title>
		<link>http://gnapse.com/blog/2009/10/20/great-orm-for-the-iphone-sdk/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=great-orm-for-the-iphone-sdk</link>
		<comments>http://gnapse.com/blog/2009/10/20/great-orm-for-the-iphone-sdk/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 21:23:57 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[persistence]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=83</guid>
		<description><![CDATA[I&#8217;ve started to dwell into iPhone&#8217;s data persistence world, and I have to say it&#8217;s a very diverse one, for such a small-device platform. We developers have four basic approaches to save our application&#8217;s data (property lists, archiving/nscoding, core data and sqlite), not to mention that preferences get stored and saved outside our app, and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started to dwell into iPhone&#8217;s data persistence world, and I have to say it&#8217;s a very diverse one, for such a small-device platform. We developers have four basic approaches to save our application&#8217;s data (property lists, archiving/nscoding, core data and sqlite), not to mention that preferences get stored and saved outside our app, and that we also have the low level approach of reading and writing directly to files on disk (but who needs that?).</p>
<p>However, I am spoiled by my Ruby on Rails background, and I started to think about ORM and ActiveRecord in no time. It turns out that, as I expected, I found a few blog posts and projects out there for this. Nothing surprising, since I&#8217;m not the only one coming to the iPhone from Rails, and I have just recently started programming for this platform. Several people have been struggling with it for some time now.</p>
<p>One of the most promising and wonderful projects I found is called <a href="http://iphonedevelopment.blogspot.com/2008/08/sqlite-persistent-objects.html" target="_blank">SQLite Persistent Objects</a>. It&#8217;s like ActiveRecord for the iPhone written in Objective-C (of course), but even better in some respects. You don&#8217;t write you data schemas first, but your classes instead. It&#8217;s the objects the ones that create the database and tables in the background as needed. It even features dynamic search methods too!</p>
<p>If you&#8217;re programming for the iPhone, I really recommend it (although I haven&#8217;t tested it thoroughly yet). The article above gives a link to a download, but the project seems to be <a title="SQLite Persistent Objects on Google Code" href="http://code.google.com/p/sqlitepersistentobjects/" target="_blank">hosted on google code</a>, so ti would be presumably better to download it from there.</p>
<p><strong>Update (2009-10-23):</strong> Coincidentally today the author of SQLite Persistent Objects <a title="SQLitePersistentObjects lives" href="http://iphonedevelopment.blogspot.com/2009/10/sqlitepersistentobjects-lives-it-lives.html" target="_blank">posted in his blog</a> that after deciding to discontinue development, <a href="http://blog.ddg.com/?p=21" target="_blank">another developer took over</a>, so the project (which I didn&#8217;t know was dying) is alive again! He also links to <a title="Using SQLitePersistentObjects" href="http://www.slideshare.net/360conferences/using-sqlite" target="_blank">a great presentation</a> that get you started very quickly.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/10/20/great-orm-for-the-iphone-sdk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Resting on Rails considered harmful</title>
		<link>http://gnapse.com/blog/2009/08/06/resting-on-rails-considered-harmful/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=resting-on-rails-considered-harmful</link>
		<comments>http://gnapse.com/blog/2009/08/06/resting-on-rails-considered-harmful/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 19:59:14 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web programming]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rest]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=57</guid>
		<description><![CDATA[Don&#8217;t worry, you can still take a nap on the train. This post is not about resting while traveling on rails, but about the use of the REST architecture in the Ruby on Rails web development framework. Rails has to be credited for introducing RESTful design to so many people, including me. I bet most [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t worry, you can still take a nap on the train. This post is not about resting while traveling on rails, but about the use of the <a title="Representational State Transfer" href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm" target="_blank">REST</a> architecture in the Ruby on Rails web development framework.</p>
<p>Rails has to be credited for introducing RESTful design to so many people, including me. I bet most web developers out there first knew about it from Rails, particularly from its 2.x release series, that have adopted resource-oriented design more seriously. The main benefit of adopting a REST-like architecture is that there&#8217;s a relatively easy and straightforward way of adding an API to our applications without developing an extra backend.</p>
<p>But Rails didn&#8217;t get it completely right, perhaps intentionally, with the outcome that there are so many people out there thinking they are developing RESTful applications.</p>
<p>To understand why, let&#8217;s review the original concept of REST, something I never did when I took it for granted from the Rails implementation.<span id="more-57"></span></p>
<h3>Defining REST</h3>
<p>REST stands for <em>Representational State Transfer</em>, and it is <em>an architectural style for distributed hypermedia systems</em>. This is the concise and original definition of its intention, according to its creator Roy Fielding in <a title="Roy Fielding's PhD dissertation" href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm" target="_blank">the paper that started it all</a>.</p>
<p>But perhaps more digestible and to the point than this paper is <a href="http://www.theamazingrando.com/blog/?p=107" target="_blank">a blog post</a> recently published by Paul Sandauskas in his blog, where he warns developer about not being fully compliant with REST guidelines. The short story is that resources should be hyperlinked to express their relationships, and client applications of a really RESTful <abbr title="Application Programming Interface">API</abbr> should be able to &#8220;navigate&#8221; across the exposed resources without previous knowledge of the <abbr title="Uniform Resource Identifier">URI</abbr> structure, beyond an initial entry point, which could be the analogy of a home page for a regular web site.</p>
<p>I really recommend you reading Paul&#8217;s article, since I won&#8217;t go into the many interesting details. Overall, the advantages are many: clients need to have no knowledge about the structure of the resources in the server&#8217;s URI space beyond the starting point, so the application provider can make structural changes without &#8220;breaking&#8221; the clients.</p>
<p>There&#8217;s plenty of information about REST out there, independent from the Rails point of view. For a start I recommend <a href="http://rest.blueoxen.net/cgi-bin/wiki.pl?FrontPage" target="_blank">the REST wiki</a>, <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" target="_blank">Wikipedia&#8217;s article</a> about it, <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm" target="_blank">Roy Fielding&#8217;s dissertation</a> (in particular chapters <a href="http://http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm" target="_blank">5</a> and <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/evaluation.htm" target="_blank">6</a>) and <a href="http://www.google.com/search?q=Representational+State+Transfer" target="_blank">google</a> of course.</p>
<h3>RESTing on Rails</h3>
<p>Rails tries to comply with REST and it&#8217;s great at it. But not fully compliant. Not that this is a bad thing though, and it&#8217;s even perhaps intentional (I don&#8217;t know). At least the most important REST guidelines are supported, particularly the URI-to-Resource mapping, avoiding a <abbr title="Remote Procedure Call">RPC</abbr> kind of design.</p>
<p>So where does Rails fails? Mainly at not expressing relationships between resources by including hyperlinks in a resource&#8217;s representation (after all, that&#8217;s what <em>hypermedia</em> means). This, seen from an API point of view, where representations are often <abbr title="eXtensible Markup Language">XML</abbr> or <abbr title="JavaScript Object Notation">JSON</abbr> for the consumption of a client application, hinders the ability of the system to survive structural changes in its design and its URI space without rendering all independent clients useless.</p>
<p>For example, imagine a client application connecting to the API exposed by your own application, and requesting information about the products you offer. A reasonable response by a rails application conveys information about the product name, description, price, and the internal auto-generated id.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;products</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;array&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;product<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category-id</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;integer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/category-id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Just a couch, as you would expect.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;integer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Couch<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;price</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;float&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>123.45<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/price<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/product<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;product<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category-id</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;integer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>6<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/category-id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>For your kid to pretend he's a hero.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;integer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Spiderman T-Shirt<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;price</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;float&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>12.95<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/price<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/product<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/products<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>The client application retrieves this XML representation of the resource but to request a single product resource from this list, it needs the URI identifying such resource. But what URI identifies each independent product resource? The client needs to know how the URI structure of our site works, and needs to construct URI&#8217;s based on this and the id of the desired product.</p>
<p>But what if we decide to restructure our web site in the future, and resources are no longer referenced the same way? All independent client applications are suddenly broken, or else we are stuck with our initial design choices so we don&#8217;t piss off our clients (who wants that after all?).</p>
<p>Why don&#8217;t we &#8220;navigate&#8221; through the resources exposed by our API instead? This implies conveying also hyper-textual information. After all, that&#8217;s what we do when we as human users enter an e-commerce web site (or any other web site). The <abbr title="HyperText Markup Language">HTML</abbr> web pages are the resources we consume, and the browser is the library we use to connect to the internet. We don&#8217;t know in advance, from a page with a list of products, what the URI&#8217;s are for each independent product. That information comes with the page. If the developers decide to change the URI structure of the web site in the future, we can still navigate across the site when we visit it again, provided the initial entry page (the home page) is the same.</p>
<p>So REST is nothing more than just applying foundational web principles to modern web-based programming interfaces.</p>
<h3>Does it really matter? Why bother?</h3>
<p>It doesn&#8217;t really matter, if you are just using your Rails application in a closed environment, that is, if not even you consume the API but just the regular HTML interface, or if you are the only consumer of the API of your own application.</p>
<p>But what if your application is cool and useful enough so that third party vendors start using it to integrate their systems with yours? Isn&#8217;t that good? And what if you decide to re-engineer your site in the future and all those non-human API-consumer clients start broking? You&#8217;ll either have to&#8230;</p>
<ul>
<li>&#8230;continue supporting the old and the new interfaces at the same time (more work for you),</li>
<li>&#8230;or convince your clients to re-program their interfaces with your application (more work for them),</li>
<li>&#8230;or just let them go for a better provider (you loose).</li>
</ul>
<p>Of course, you can always drop those pesky plans of re-engineering, but then you are stuck with your initial design choices, as far as they concern the external interface. Why condemn yourself with something that seems good today but might be holding you back in the future?</p>
<p>For Rails applications developers like me, there&#8217;s not much of a choice, but I wonder why Rails decided to auto-denominate themselves RESTful when they aren&#8217;t really, in the most strict sense of the word.</p>
<p>Pedantry? Perhaps.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/08/06/resting-on-rails-considered-harmful/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Emacs: my first achievements, frustrations and impressions</title>
		<link>http://gnapse.com/blog/2009/07/17/emacs-my-first-achievements-frustrations-and-impressions/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=emacs-my-first-achievements-frustrations-and-impressions</link>
		<comments>http://gnapse.com/blog/2009/07/17/emacs-my-first-achievements-frustrations-and-impressions/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 16:44:23 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web programming]]></category>
		<category><![CDATA[auto-complete]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=50</guid>
		<description><![CDATA[Wow, this was fast! I never thought writing again about Emacs just a day after my first post about it. So far (the short version) I am doing better than I thought for just about a couple of days being serious about this. There are a few things that still bother me a lot though, [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, this was fast! I never thought writing again about Emacs just a day after my first post about it.</p>
<p>So far (the short version) I am doing better than I thought for just about a couple of days being serious about this. There are a few things that still bother me a lot though, aside from the fact that I am not proficient using it yet, of course.</p>
<p><span id="more-50"></span></p>
<h3>My [mostly borrowed] customizations</h3>
<p>I&#8217;ve heavily customized Emacs to suit my needs better than it could do with its awkward defaults. Emacs key shortcuts (or is it key bindings?) are soooo unpleasant, unintuitive, lengthy and annoying that I refuse to use them at all. Happily one of Emacs&#8217; most powerful strengths, its ability to be customized, comes to the rescue. Actually this feature is what makes <a href="http://bettercoding.wordpress.com/2009/07/13/emacs-still-relevant/" target="_blank">Emacs still relevant after 30+ years</a>.</p>
<div id="attachment_52" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-52" title="customized-emacs" src="http://gnapse.com/blog/wp-content/uploads/2009/07/customized-emacs-300x225.png" alt="My Emacs after being customized" width="300" height="225" /><p class="wp-caption-text">My Emacs after being customized</p></div>
<p>Without going too much into details, I based my Emacs customizations mostly on <a href="http://github.com/rmm5t/dotfiles/tree" target="_blank">Ryan McGeary&#8217;s</a>, mostly because his setup is aimed at Ruby on Rails development and Git, which is what I want Emacs for in the first place. Overall, it&#8217;s <a title="Ruby mode for Emacs" href="http://rubyforge.org/projects/ri-emacs/" target="_blank">ri-emacs</a>, <a title="Rails support for Emacs" href="http://rinari.rubyforge.org/" target="_blank">rinari</a>, <a title="rhtml/erb mode for Emacs" href="http://github.com/eschulte/rhtml/tree" target="_blank">rhtml-mode</a>, <a title="Git support for Emacs" href="http://zagadka.vm.bytemark.co.uk/magit/" target="_blank">magit</a>, <a title="A snippets/templates system for Emacs" href="http://code.google.com/p/yasnippet/" target="_blank">yasnippets</a>, and several other non-language-specific customizations (<a title="Interactively Do Things" href="http://www.emacswiki.org/emacs/InteractivelyDoThings" target="_blank">ido</a>, <a title="Recently opened files" href="http://www.emacswiki.org/emacs/RecentFiles" target="_blank">recentf</a>, etc.)</p>
<p>On top of this setup, and after pruning stuff that I don&#8217;t need, at least for the moment (like erlang, markdown, haml, svn, carbon-emacs, etc.) I added support for some other stuff, namely <a title="RSpec support for Emacs" href="http://github.com/pezra/rspec-mode/tree">rspec</a>,  <a href="http://www.emacswiki.org/emacs/CuaMode" target="_blank">cua-mode</a> (see <a title="IBM's guidelines for user interface standards across platforms" href="http://en.wikipedia.org/wiki/IBM_Common_User_Access" target="_blank">Common User Access</a>), and other minor goodies from other sources.</p>
<p>Aside from McGeary&#8217;s setup as a base, I have to give credit to snippets of code I borrowed from elsewhere to further customize my environment. I should particularly mention <a href="http://devcraft.wordpress.com/2008/07/19/using-emacs-for-rails-development-the-perfect-setup/" target="_blank">Devcraft&#8217;s advises to customize Emacs for Rails development</a>, Dahoiv&#8217;s<a href="http://dahoiv.net/.emacs" target="_blank"> .emacs</a> file, the <a href="http://www.emacsblog.org/" target="_blank">Emacs blog</a> (where Ryan McGeary also writes) and the <a href="http://emacs-fu.blogspot.com/" target="_blank">emacs-flu blog</a>.</p>
<h3>Pros and Cons</h3>
<p><strong>On the good side</strong>, I have played for a while with the ruby on rails mode and it is good. The yasnippet extensions take a lot of credit on this, but overall it tastes very good on its own. I have yet to deal enough with the magit extension to fully evaluate my environment. I cannot afford buying a Mac+TextMate for Ruby development, and Emacs can hopefully come to the rescue for my productivity and joy while coding.</p>
<p>Also, having been able to get rid of most of the many painful key bindings in such a short time was amazing. I wonder why Emacs does not update its defaults to comply with the <a title="Common User Access" href="http://en.wikipedia.org/wiki/IBM_Common_User_Access" target="_blank">CUA standards</a>. The cua-mode is not enough.</p>
<p><strong>On the bad side</strong> (taking aside my own inexperience and lack of abilities) not everything is doing fine. Many of my key-bindings customizations break on &#8220;weird&#8221; modes, like C-w for closing the current buffer, which is not working when the current buffer is in <a title="Emacs mode to navigate and manipulate the file system" href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html" target="_blank">dired mode</a>.</p>
<p>Also, I feel disappointed with the embedded shell (<code>M-x eshell</code>). I actually expected a bash session inside an Emacs window, but aliases and tab-completion are not working as they should, which makes me suspect it is not bash but an Emacs shell program (surprise!!!). As it is right now, I prefer to <code>Alt-Tab</code> to my terminal emulator with a real bash session in it. Something similar happens with the Rails console (available via <code>C-c ; c</code>), which I really didn&#8217;t test a lot after I realized that pressing the up and down arrow keys didn&#8217;t navigate through my history of previous commands <img src='http://gnapse.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> .</p>
<h3>So, what is it then?</h3>
<p>In spite of all this, I still believe I can give Emacs a chance. Most shortcomings I&#8217;ve faced are not directly related to its function as a coding environment, but to tasks around coding, like going to the console to type rails-related commands, manipulating the file system, etc. I was doing these stuff outside my previous code editors anyway so I guess this can stay as is for some time.</p>
<p>Hopefully I&#8217;ll be able to fix some of this issues over time and always use more and more features of this wonderful editor. I could even live without using git from within it, but I have yet to test that. Meanwhile, I&#8217;ll take some time to get better at coding with what is currently working for me. It seems to me that <strong>Emacs will stay for a while on my desktop</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/07/17/emacs-my-first-achievements-frustrations-and-impressions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Taming Emacs</title>
		<link>http://gnapse.com/blog/2009/07/16/taming-emacs/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=taming-emacs</link>
		<comments>http://gnapse.com/blog/2009/07/16/taming-emacs/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 18:31:38 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[learning]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=44</guid>
		<description><![CDATA[I have always heard and read a lot about that piece of software called Emacs. You know what they say: you either love it or hate it (or else you pass by without knowing about it, in which case you probably don&#8217;t want to keep reading). Maybe it&#8217;s time to seriously consider it, because it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_46" class="wp-caption alignright" style="width: 160px"><img class="size-thumbnail wp-image-46" title="emacs_icon_small" src="http://gnapse.com/blog/wp-content/uploads/2009/07/emacs_icon_small-150x150.png" alt="Emacs icon" width="150" height="150" /><p class="wp-caption-text">Emacs icon</p></div>
<p>I have always heard and read a lot about that piece of software called <a href="http://www.gnu.org/software/emacs/" target="_blank">Emacs</a>. You know what they say: you either love it or hate it (or else you pass by without knowing about it, in which case you probably don&#8217;t want to keep reading).</p>
<p>Maybe it&#8217;s time to seriously consider it, because it&#8217;s intriguing how its fans always say it is the climax of productivity in computer programming and several other tasks, although it may be really hard to grasp in the first place. I have been warned, and I am determined not to be easily scared off of it, no matter how daunting this task may be.</p>
<p>And as I like to use my blog as a back reference for things I achieve or come to learn after a great deal of work and research, it might be reasonable to expect me to blog about my progress or my rage while trying to tame this wonderful and powerful beast.</p>
<p>I have found great websites so far to start banging my head, namely the <a href="http://www.emacswiki.org/" target="_blank">Emacs wiki</a>, the <a href="http://www.emacsblog.org/" target="_blank">Emacs blog</a> and Google <img src='http://gnapse.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  That is, of course, besides <a href="http://www.gnu.org/software/emacs/" target="_blank">Emacs&#8217; own website</a>, which serves as a starting point for a lot of information.</p>
<p>So far I have managed to customize it a bit much to my liking, but mostly out of copying and pasting (or is it yanking?) snippets of code from the web into my <code>.emacs</code> file. It&#8217;s going to be a long journey until I start typing my own elisp code. I am not even scratching the surface yet, I&#8217;m barely staring at it.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/07/16/taming-emacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bookmarks&#8217; last frontier</title>
		<link>http://gnapse.com/blog/2009/06/18/bookmarks-last-frontier/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=bookmarks-last-frontier</link>
		<comments>http://gnapse.com/blog/2009/06/18/bookmarks-last-frontier/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 19:52:57 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[auto-complete]]></category>
		<category><![CDATA[bookmarks]]></category>
		<category><![CDATA[command line]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=18</guid>
		<description><![CDATA[Bookmarks are ubiquitous these days. You can find them in your browser, code editor, desktop manager, web applications, the internet, anywhere. But there&#8217;s a place where bookmarks haven&#8217;t arrived yet: the command line. Or so I though&#8230; until recently. It turns out that to be sure, I searched for command-line bookmarks on google and after [...]]]></description>
			<content:encoded><![CDATA[<p>Bookmarks are ubiquitous these days. You can find them in your browser, code editor, desktop manager, web applications, <a title="Delicious" href="http://delicious.com/" target="_blank">the internet</a>, anywhere. But there&#8217;s a place where bookmarks haven&#8217;t arrived yet: the command line.</p>
<p>Or so I though&#8230; until recently. It turns out that to be sure, I searched for <a href="http://www.google.com/search?q=command-line+bookmarks" target="_blank">command-line bookmarks</a> on google and after a while digging for it, I managed to find <strong>three</strong> different projects that aim at providing this feature to <a title="Bourne Again SHell" href="http://www.gnu.org/software/bash/" target="_blank">my favorite shell</a>.</p>
<p>I downloaded and installed all these packages and I am sharing my thoughts about them here.<span id="more-18"></span></p>
<div id="attachment_25" class="wp-caption alignright" style="width: 310px"><a href="http://code.google.com/p/go-tool/"><img class="size-medium wp-image-25" title="go-tool" src="http://gnapse.com/blog/wp-content/uploads/2009/06/go-tool-300x216.png" alt="go-tool project to provide bookmarks for the command line" width="300" height="216" /></a><p class="wp-caption-text">go-tool</p></div>
<h3>go-tool</h3>
<p>This was the first one I found and the one I have used the most. The project is hosted at <a href="http://code.google.com/p/go-tool/" target="_blank">http://code.google.com/p/go-tool/</a> and it is developed in Python.</p>
<p>It has a command-line automated setup process that installs the python module system-wide, and there&#8217;s also a command to automatically setup shell integration.</p>
<p>Shell integration is achieved by registering some bash functions that do the actual directory change (this is needed because spawned processes do not change the working directory of the parent process, so a python script cannot actually change the working directory of the shell session that started the script). As you can imagine, this feature is common to all the three projects.</p>
<p>Directories are aliased to a short keyword that you can later use to change your current directory. You can add a bookmark for the current directory, or for any other directory, you can delete bookmarks, etc. The details are better covered in <a href="http://code.google.com/p/go-tool/" target="_blank">the project&#8217;s homepage</a>.</p>
<p>The main downside of this solution is that once you start using it, you start missing bash completion with the TAB key. Although I guess it shouldn&#8217;t be difficult to implement it ourselves. The program stores its bookmarks in <code>~/.go/bookmarks</code>. The main advantage is that it is multi-platform, supporting Unix-like environments (including Apple&#8217;s Mac) and Windows.</p>
<div id="attachment_26" class="wp-caption alignright" style="width: 310px"><a href="http://code.google.com/p/cdbm/"><img class="size-medium wp-image-26" title="cdbm" src="http://gnapse.com/blog/wp-content/uploads/2009/06/cdbm-300x216.png" alt="CDBM project to provide bookmarks for the command line" width="300" height="216" /></a><p class="wp-caption-text">CDBM</p></div>
<h3>cdbm</h3>
<p>The name is an acronym for &#8216;cd bookmarks&#8217; and the project is hosted at google code too (<a href="http://code.google.com/p/cdbm/" target="_blank">http://code.google.com/p/cdbm/</a>) although I found more information about it from its author&#8217;s <a href="http://www.onderstekop.nl/articles/124/" target="_blank">blog</a>. It is programmed in c.</p>
<p>This is the most simple of the three projects I found. It is simple to install and simple to use, but it is also the simplest in terms of features and possibilities, although unlike the previous one, it features auto-completion.</p>
<p>Shell integration is achieved in a similar way, through bash functions that have to be programmed into our <code>~/.bashrc</code> file.</p>
<p>Its main disadvantage is that is oriented to bookmarks indexed by numbers instead of aliases or keywords. In a more recent version the author added keyword support on top of the previous design, without removing the numeric index. However, keywords support still doesn&#8217;t feel natural.</p>
<div id="attachment_27" class="wp-caption alignright" style="width: 310px"><a href="http://www.micans.org/apparix/"><img class="size-medium wp-image-27" title="apparix" src="http://gnapse.com/blog/wp-content/uploads/2009/06/apparix-300x216.png" alt="Apparix project providing bookmarks for the command line" width="300" height="216" /></a><p class="wp-caption-text">Apparix</p></div>
<h3>apparix</h3>
<p>This was the last project I found and it is the most complete in terms of features. It is hosted at <a href="http://www.micans.org/apparix/" target="_blank">http://www.micans.org/apparix/</a> and implemented in c as well.</p>
<p>It features shell integration, bash auto-completion support, and it extends bookmarks to more than just a simple super-cd utility. For instance, bookmarked directories&#8217; contents can be listed remotely, without actually changing the current directory.</p>
<p>Shell integration si great, but its configuration could be more automated into the setup process, like the go-tool project does. But the bundled auto-completion is great. You can even auto-complete further into the subdirectories of the bookmark you are using in the command.</p>
<p>Take a look at the following sequence of commands:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ernesto<span style="color: #000000; font-weight: bold;">@</span>ubuntu:~$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>
ernesto<span style="color: #000000; font-weight: bold;">@</span>ubuntu:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache$ bm
added: cache - <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache
ernesto<span style="color: #000000; font-weight: bold;">@</span>ubuntu:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache$ apparix
<span style="color: #660033;">---</span> portals
<span style="color: #660033;">---</span> expansions
<span style="color: #660033;">---</span> bookmarks
j cache        <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache
ernesto<span style="color: #000000; font-weight: bold;">@</span>ubuntu:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache$ <span style="color: #7a0874; font-weight: bold;">cd</span>
ernesto<span style="color: #000000; font-weight: bold;">@</span>ubuntu:~$ to cache apt<span style="color: #000000; font-weight: bold;">/</span>archives<span style="color: #000000; font-weight: bold;">/</span>partial
ernesto<span style="color: #000000; font-weight: bold;">@</span>ubuntu:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>archives<span style="color: #000000; font-weight: bold;">/</span>partial$</pre></div></div>

<p>We change into the <code>/var/cache</code> directory, and then we register a bookmark for it with the <code>'bm'</code> command. The <code>'apparix'</code> command then lists the available bookmarks, where you can see our recent addition. Then we go back to our home directory, and use the <code>'to'</code> command to change into a subdirectory of the directory represented by the bookmark, instead of just changing into the bookmarked directory only.</p>
<h3>And the winner is&#8230;</h3>
<p>Clearly apparix is the most complete of the three alternatives I found, although I have been using the go-tool for some time already, and I was getting used to it. However, I always missed auto-completion for the go-tool, never decided to implement it my self, and now that I have found apparix with it, I guess I&#8217;ll make the switch.</p>
<p>You go and play with them and make your own choice. The command line will never be the same after you start using this.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/06/18/bookmarks-last-frontier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
