<?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</title>
	<atom:link href="http://gnapse.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://gnapse.com/blog</link>
	<description>whatever comes to my mind</description>
	<lastBuildDate>Wed, 03 Feb 2010 17:59:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>My new iPad nano (aka iPhone)</title>
		<link>http://gnapse.com/blog/2010/02/03/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 many [...]]]></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>What I don&#8217;t like about Safari</title>
		<link>http://gnapse.com/blog/2010/02/01/what-i-dont-like-about-safari/</link>
		<comments>http://gnapse.com/blog/2010/02/01/what-i-dont-like-about-safari/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 15:49:14 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[gmail offline]]></category>
		<category><![CDATA[google chrome]]></category>
		<category><![CDATA[google gears]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[tabbed browsing]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=113</guid>
		<description><![CDATA[I&#8217;ve tried. I swear that I tried. But I can&#8217;t make Safari my main browser. It&#8217;s the simple things that keep me from liking it. But most of the time simple things can (and do) make the difference.
There&#8217;s no way to make it open links by default in new tabs in the background. And no, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tried. I swear that I tried. But I can&#8217;t make Safari my main browser. It&#8217;s the simple things that keep me from liking it. But most of the time simple things can (and do) make the difference.</p>
<p>There&#8217;s no way to make it open links by default in new tabs in the background. And no, I do not want to be doing ⌘-click to achieve this. And I do hate browsers opening new windows unless specifically told. Tabbed browsing was invented long ago and most browsers do it fine (read Opera, Firefox and Chrome). At the very least they give you enough options for you to control how you want it to behave. Safari gives some options, but they&#8217;re not enough. I know this is Apple&#8217;s way of doing things, and most of the time they get it right, but in this case their lack of options and their selection of defaults is not good for me.</p>
<p>And finally, to make things even worse, I cannot see the URL of a link when I hover it. I do not need Safari to have a permanent status bar. It could adopt Google Chrome&#8217;s way to do this, which is to show a small tooltip in the place where the status bar would be, but only for the time I am hovering the link.</p>
<p>Google Chrome would be the right choice, and I do use it a lot, but why on Earth does it lack Gears? How is it that Google supports its plugin on Firefox and Safari but not on their own browser??!! I cannot live without Gmail Offline, so that&#8217;s why I haven&#8217;t been able to dump Firefox completely.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2010/02/01/what-i-dont-like-about-safari/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gitignore++</title>
		<link>http://gnapse.com/blog/2009/12/18/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>

		<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"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td 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></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/12/18/gitignore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome for Mac and Linux</title>
		<link>http://gnapse.com/blog/2009/12/09/google-chrome-for-mac-and-linux/</link>
		<comments>http://gnapse.com/blog/2009/12/09/google-chrome-for-mac-and-linux/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 23:01:54 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[gmail offline]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google chrome]]></category>
		<category><![CDATA[google gears]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=98</guid>
		<description><![CDATA[I received with great joy today the news that Google&#8217;s web browser, Google Chrome, has been officially released for Mac (and Linux), even if it is still tagged as beta.
Since its first appearance in the web browsers scene more than a year ago, Google Chrome has been a source of innovation the area, with isolated [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_99" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-99" title="google-chrome-mac" src="http://gnapse.com/blog/wp-content/uploads/2009/12/google-chrome-mac-300x208.png" alt="Google Chrome running on Leopard" width="300" height="208" /><p class="wp-caption-text">Google Chrome running on Leopard</p></div>
<p>I received with great joy today the news that Google&#8217;s web browser, Google Chrome, <a href="http://chrome.blogspot.com/2009/12/google-chrome-for-holidays-mac-linux.html" target="_blank">has been officially released</a> for <a href="http://googlemac.blogspot.com/2009/12/google-chrome-for-mac-goes-beta.html" target="_blank">Mac</a> (and Linux), even if it is still tagged as beta.</p>
<p>Since <a href="http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html" target="_blank">its first appearance in the web browsers scene more than a year ago</a>, Google Chrome has been a source of innovation the area, with isolated processes per tabs, a revolutionary javascript engine, and the great news that its source code would be freely available as open source.</p>
<p>Sure that many were worried by its <a href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;ved=0CAkQFjAA&amp;url=http%3A%2F%2Fcoderrr.wordpress.com%2F2008%2F09%2F03%2Fgoogle-chrome-privacy-worse-than-you-think%2F&amp;ei=3CEgS-DPAo-QtgepnLSmCg&amp;usg=AFQjCNFvWsMCNXX23C9woQ-ci0_jdzeFjQ&amp;sig2=2z4VoH3SAti21jUbwUcExw" target="_blank">controversial privacy-violation practices</a>, but the openness of its source code will always allow anyone with the know-how to modify it to their own needs, and that of the worried ones (me included to some extent, I&#8217;ll give you that). Indeed there&#8217;s a project called <a href="http://www.srware.net/en/software_srware_iron.php" target="_blank">Iron</a> which offers precisely that: Google Chrome for the privacy fanatics.<span id="more-98"></span></p>
<p>But just as about anything that&#8217;s new, Chrome for the Mac and Linux has several shortcomings compared to its Windows version that most people are accustomed to. <a href="http://theappleblog.com/2009/12/08/chrome-for-mac-beta-available-now/" target="_blank">The Apple Blog notes a few of these issues</a>, at least those that affect Mac users, which are probably the same features not present yet in the Linux version as well. The most striking absence, at least for me, is <a title="Google Gears" href="http://gears.google.com/" target="_blank">Gears</a>, of which I have become extremely dependent since <a href="http://gmailblog.blogspot.com/2009/01/new-in-labs-offline-gmail.html" target="_blank">Gmail offline appeared</a>. This one even comes as a great negative surprise, since Chrome is the only browser that comes with Gears bundled, and being both (Gears and Chrome) from the same provider, I kind of assumed that they were inseparable <img src='http://gnapse.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Not everything is bad news though. Google Chrome for both platforms integrates itself very well, or so they say. At least for the Mac I can confirm it. Google Chrome feels more like a Mac app than <a title="Opera Web Browser" href="http://www.opera.com/" target="_blank">Opera</a> does, which is kind of surprising if you take into account that Opera has been around for the Mac since, well, forever, I guess. And according to <a href="http://chrome.blogspot.com/2009/12/google-chrome-for-holidays-mac-linux.html" target="_blank">the official announcement</a> in Google Chrome&#8217;s blog post about this beta release, Chrome seems to blend just well with a variety of GTK themes.</p>
<p>I really hope that this browser and <a title="Chromium" href="http://www.chromium.org/" target="_blank">the open source project behind it</a> continue to improve. This news today is indeed a big step, and I&#8217;m sure those differences in feature sets will become smaller with time. I also hope that projects similar to <a href="http://www.srware.net/en/software_srware_iron.php" target="_blank">the Iron alternative</a> appear for other platforms too. Its open source nature makes it possible for this to come true.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/12/09/google-chrome-for-mac-and-linux/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/</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 a [...]]]></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>Picasa rotate sucks</title>
		<link>http://gnapse.com/blog/2009/10/22/picasa-rotate-sucks/</link>
		<comments>http://gnapse.com/blog/2009/10/22/picasa-rotate-sucks/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 13:57:17 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[face recognition]]></category>
		<category><![CDATA[iphoto]]></category>
		<category><![CDATA[picasa]]></category>
		<category><![CDATA[picture management]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=86</guid>
		<description><![CDATA[I love Picasa. I really do. But what I recently discovered something that is almost unforgivable. Picasa does not automatically rotate your images in disc, and when you manually save changes (rotates included) it forcefully saves the original picture, consuming valuable disk space.
I am bothered with this for a reason. I recently acquired a MacBook [...]]]></description>
			<content:encoded><![CDATA[<p>I love Picasa. I really do. But what I recently discovered something that is almost unforgivable. Picasa does not automatically rotate your images in disc, and when you manually save changes (rotates included) it forcefully saves the original picture, consuming valuable disk space.</p>
<p>I am bothered with this for a reason. <a title="My new toy is keeping me busy" href="http://gnapse.com/blog/2009/09/18/my-new-toy/" target="_self">I recently acquired a MacBook</a> and I dumped iPhoto after just a few minutes of using it because it attempted to hide the actual pictures from me via any other application. You&#8217;re stuck with iPhoto when you use it, and <strong>I like to access my pictures directly with my file manager</strong> or even with other applications (Photoshop, Gimp, whatever). Then <a title="iPhoto alternatives" href="http://www.google.com/search?q=iphoto+alternative" target="_blank">I started looking for alternatives</a> and Picasa popped up in no time as a very good one, and free (as in beer). I remember I used it on Windows but never committed fully to it, but now I have been happy with it for while on the Mac, and have invested a considerable amount of time tuning my very dear pictures collection, mostly in terms of organization and fixing rotations, because I prefer to do other editing tasks in more professional programs. In terms of organization it got even better just  few weeks after I started using it, when <a href="http://gnapse.com/blog/2009/09/24/picasa-face-recognition/" target="_self">it introduced facial recognition technology</a>, allowing me to organize and browse my pictures by the people appearing on them, and with a minimal effort. It was all a sweet honey moon.<span id="more-86"></span></p>
<div id="attachment_87" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-87" title="picasa-rotate" src="http://gnapse.com/blog/wp-content/uploads/2009/10/picasa-rotate-300x187.jpg" alt="Pictures rotated in Picasa are still in its original state on disk." width="300" height="187" /><p class="wp-caption-text">Pictures rotated in Picasa are still in its original state on disk.</p></div>
<p>But a couple of days ago I wanted to lighten a dark picture I had recently shot, and fired up Photoshop just to be surprised. I went back to Picasa to check it out, but the picture was correctly oriented there. I looked for the picture in Finder and opened it with Preview, and I even bothered copying it over the network to a PC to open it with Windows Picture Viewer. Even Picasa in the PC got it wrong! Everywhere I tried, the picture was wrongly rotated, as it originally came from my camera. Only Picasa on my Mac got it &#8220;right&#8221;.</p>
<p>After some digging and research, I discovered that this is not a bug but a &#8220;feature&#8221;. Picasa merely stores the rotation info of each image in the <code>.picasa.ini</code> file in the directory where the image resides. This is faster and safer, since the original pictures are never modified, or so they say. And there&#8217;s an option (hidden in the right click menu of a picture that has been rotated or modified in any way within Picasa) to save the changes to disk. But wait! Do not allow you to think for a moment that this could solve the issue. This will save a copy of the original, forcefully, with no way to choose not to do this at my own risk.</p>
<p>I am not an expert of picture editing, but what&#8217;s the risk involved in picture rotating? If there&#8217;s a risk, why Photoshop or Gimp do not alert me about doing this? Why is this the very first software that avoids at all costs to actually let go the original un-rotated image?</p>
<p>A few weeks ago I would have dumped Picasa completely, but face recognition is kind of addictive. I have already invested time in tagging my friends and relatives, and it&#8217;s fun to play slideshows of a certain person, or even slideshows of pictures where two given persons appear. So Picasa stays for now. But I&#8217;ll be doing everything else from Adobe Bridge, even importing from cameras, copying and moving pictures around, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/10/22/picasa-rotate-sucks/feed/</wfw:commentRss>
		<slash:comments>7</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/</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>Picasa turns awesome with face recognition technology</title>
		<link>http://gnapse.com/blog/2009/09/24/picasa-face-recognition/</link>
		<comments>http://gnapse.com/blog/2009/09/24/picasa-face-recognition/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 16:22:18 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[face recognition]]></category>
		<category><![CDATA[geo-tagging]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[iphoto]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[picasa]]></category>
		<category><![CDATA[picture management]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=79</guid>
		<description><![CDATA[I have always loved Picasa for the way it manages my huge (~14gb) pictures collection, and yesterday it went even better. Picasa 3.5 introduced facial recognition technology, allowing me to easily tag pictures with the people in it. The program automatically scans all my pictures in the background to find faces in them, and allows [...]]]></description>
			<content:encoded><![CDATA[<p>I have always loved <a href="http://picasa.google.com/" target="_blank">Picasa</a> for the way it manages my huge (~14gb) pictures collection, and yesterday <a href="http://googlephotos.blogspot.com/2009/09/announcing-picasa-35-now-with-name-tags.html">it went even better</a>. <a href="http://googleblog.blogspot.com/2009/09/picasa-35-now-with-name-tags-and-more.html" target="_blank">Picasa 3.5 introduced facial recognition technology</a>, allowing me to easily <a href="http://picasa.google.com/features-nametags.html" target="_blank">tag pictures with the people in it</a>. The program automatically scans all my pictures in the background to find faces in them, and allows me to tag the people those faces represent. It even goes beyond that, by actually grouping similar faces automatically so that I do not have to tag each individual face by hand. When the similarity is not so conclusive, Picasa puts face tags to your consideration, and I can confirm or reject these suggestions. This all has a margin of error of course, but by the time I am writing this, it has scanned over 80% of my collection and there have been almost no mistakes, all of which I have been able to correct by hand in no time. Picasa was rapidly able to get to know most of my relatives and friends.<span id="more-79"></span></p>
<p>Having migrated to Mac not so long ago, I am aware that <a title="iPhoto" href="http://www.apple.com/ilife/iphoto/" target="_blank">Apple&#8217;s default picture managing software</a> already had this feature, although I cannot really say how it worked. I did try iPhoto for a few hours on my first days with <a href="http://gnapse.com/blog/2009/09/18/my-new-toy/">my new MacBook</a>, but I immediately hated it for trying to hide my pictures from me. Picasa at least respects my organizational scheme at the file-system level, instead of imposing me one, and I am still able to access my pictures through Finder.</p>
<p>As Picasa recognizes faces, you can add information about this people as you tag them. It can even use (and sync with) your Google Account contacts if you are signed in to Picasa Web Albums. It would be nice though, if it gave you the choice in Mac OS X to use the system&#8217;s address book instead, or alternatively. And as a side note, face recognition is not the only new feature of Picasa 3.5, also including in the package geo-tagging with a Google Maps panel withing Picasa&#8217;s interface, and <a title="What's new in Picasa 3.5" href="http://picasa.google.com/support/bin/answer.py?hl=en&amp;answer=93773" target="_blank">more</a>. For the time being, this new version has only been released for Windows and Mac in its English version. Non-English speaking users, or Linux fans, will have to wait a bit. Not to say that Mac people should be completely happy though, because I am still waiting for Picasa to port the very nice picture viewer that it installs on Windows.</p>
<p>In the mean time, I can enjoy watching a slideshow of pictures with me and my girlfriend in it, or detailing how my niece&#8217;s face has changed over time since she was born just a few years ago. Face recognition rocks. But beware, if you are a fanatic of organization, it can get become addictive!</p>
<p>PS: I wanted to include a screenshot, but I don&#8217;t feel right to publish an image with lots of pictures of faces and names of actual people, without their consent, and painting black areas over names and faces renders the screenshot useless for its original purpose. So I am going on without it. If you want to see it working, <a title="Download Picasa" href="http://picasa.google.com/" target="_blank">download the program</a> and give it a try.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/09/24/picasa-face-recognition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My new toy (is keeping me busy)</title>
		<link>http://gnapse.com/blog/2009/09/18/my-new-toy/</link>
		<comments>http://gnapse.com/blog/2009/09/18/my-new-toy/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 20:31:01 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Whatever]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=69</guid>
		<description><![CDATA[I have a new toy occupying most of my computer time, and since I am new to this platform and I feel totally attracted to it, I have not much time for anything else, including this blog.
I finally ended this mac envy that has been consuming me for the last few months. Being a Ruby [...]]]></description>
			<content:encoded><![CDATA[<p>I have a new toy occupying most of my computer time, and since I am new to this platform and I feel totally attracted to it, I have not much time for anything else, including this blog.</p>
<div id="attachment_70" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-70 " title="MacBook" src="http://gnapse.com/blog/wp-content/uploads/2009/09/IMG_0528-300x225.jpg" alt="My new MacBook seen from behind" width="300" height="225" /><p class="wp-caption-text">My new MacBook seen from behind</p></div>
<p>I finally ended this <a href="http://www.google.com/search?q=mac+envy" target="_blank">mac envy</a> that has been consuming me for the last few months. Being a Ruby on Rails developer for some time now, all those <a href="http://railscasts.com/">screencasts</a> and tutorials always based in MacOS X and <a href="http://macromates.com/" target="_blank">Textmate</a> have had an effect on me. Although it seems that I&#8217;ll be playing mostly with <a title="Apple's Development Environment" href="http://developer.apple.com/TOOLS/xcode/" target="_blank">xcode</a> instead of Textmate for some time, but it&#8217;s sexy to have Textmate just an inch away in case I need it.</p>
<p>PS: For the couple of friends of mine that already had a Mac, my envy was not malicious.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/09/18/my-new-toy/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Resting on Rails considered harmful</title>
		<link>http://gnapse.com/blog/2009/08/06/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 web [...]]]></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>0</slash:comments>
		</item>
	</channel>
</rss>
