<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Roberto Soares</title>
	<atom:link href="http://roberto.peakhut.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://roberto.peakhut.com</link>
	<description>software development and other stuff</description>
	<lastBuildDate>Sun, 15 Apr 2012 12:17:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='roberto.peakhut.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Roberto Soares</title>
		<link>http://roberto.peakhut.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://roberto.peakhut.com/osd.xml" title="Roberto Soares" />
	<atom:link rel='hub' href='http://roberto.peakhut.com/?pushpress=hub'/>
		<item>
		<title>Admin controllers with Inherited Resources</title>
		<link>http://roberto.peakhut.com/2010/09/27/admin-controllers-with-inherited-resources/</link>
		<comments>http://roberto.peakhut.com/2010/09/27/admin-controllers-with-inherited-resources/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 15:24:27 +0000</pubDate>
		<dc:creator>Roberto Soares</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[controllers]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[inherited_resources]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[will_paginate]]></category>

		<guid isPermaLink="false">http://roberto.peakhut.com/?p=220</guid>
		<description><![CDATA[In this post I&#8217;ll show how I&#8217;ve dried up the admin controllers of a project at Todobebe using inherited_resources, a gem that makes your controllers inherit all restful actions. Basically I&#8217;ve coded two classes to be inherited by the controllers. The first one is the base for all admin controllers: It can be used to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=220&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-224" title="fruits" src="http://peakhut.files.wordpress.com/2010/09/431958217_7d2b3a8ce9_z1.jpeg?w=500" alt="fruits"   /><br />
In this post I&#8217;ll show how I&#8217;ve dried up the admin controllers of a project at <a href="http://client.todobebe.com/corporate/">Todobebe</a> using <a href="http://github.com/josevalim/inherited_resources">inherited_resources</a>, a gem that makes your controllers inherit all restful actions.</p>
<p>Basically I&#8217;ve coded two classes to be inherited by the controllers.<br />
<span id="more-220"></span><br />
The first one is the base for all admin controllers:</p>
<p><pre class="brush: ruby; gutter: false;">
#app/controllers/admin/base_controller.rb
class Admin::BaseController &lt; ApplicationController
  before_filter :authenticate_user! #devise filter
  layout &quot;admin&quot;
end
</pre></p>
<p>It can be used to set up the behavior of all admin controllers as authentication. For instance the dashboard controller:</p>
<p><pre class="brush: ruby; gutter: false;">
#app/controllers/admin/dashboard_controller.rb
class Admin::DashboardController &lt; Admin::BaseController
  def index; end
end
</pre></p>
<p>The next class inherits from <em>Admin::BaseController</em> and it uses the method <em>inherit_resources</em> to include the features of <a href="http://github.com/josevalim/inherited_resources">Inherited Resources</a> and overrides the method <em>collection</em> to support pagination (<a href="http://github.com/mislav/will_paginate">will_paginate</a>).</p>
<p><pre class="brush: ruby; gutter: false;">
#app/controllers/admin/resources_controller.rb
class Admin::ResourcesController &lt; Admin::BaseController
  inherit_resources
  protected
  def collection
    get_collection_ivar || set_collection_ivar(end_of_association_chain.paginate(:page =&gt; params[:page], :per_page =&gt; per_page))
  end

  def per_page
    20
  end
end
</pre></p>
<p>As a result of that, the controllers for resources has became very simple:</p>
<p><pre class="brush: ruby; gutter: false;">
#app/controllers/admin/pictures_controller.rb
class Admin::PicturesController &lt; Admin::ResourcesController
  belongs_to :gallery
end
</pre></p>
<p>The above is better than:</p>
<p><pre class="brush: ruby; gutter: false;">
#app/controllers/admin/pictures_controller.rb
class Admin::PicturesController &lt; ApplicationController
  layout &quot;admin&quot;
  before_filter :authenticate_user!
  before_filter :load_gallery
  def index
    @pictures = @gallery.pictures.paginate(:page =&gt; params[:page], :per_page =&gt; 20)
    #(...)
  end
  #(...) new, edit, update, create and destroy...
  private
  def load_gallery
    @gallery = Gallery.find(params[:gallery_id])
  end
end
</pre></p>
<p>Right?</p>
<p>Some controllers would have just 1 line:</p>
<p><pre class="brush: ruby; gutter: false;">
#app/controllers/admin/galleries_controller.rb
class Admin::GalleriesController &lt; Admin::ResourcesController; end
</pre></p>
<p>That is all.</p>
<p>For more information about <a href="http://github.com/josevalim/inherited_resources">inherit_resources</a>:</p>
<ul>
<li><a href="http://railscasts.com/episodes/230-inherited-resources">Railscast episode 230</a></li>
<li><a href="http://www.akitaonrails.com/2009/09/01/screencast-real-thin-restful-controllers-with-inherited-resources">Akita&#8217;s screencast</a></li>
<li><a href="http://blog.plataformatec.com.br/tag/inherited_resources/">Plataformatec Blog</a></li>
</ul>
<p>Thanks to <a href="http://brunomiranda.com">Bruno Miranda</a> for the English text revisions. Photo by <a href="http://www.flickr.com/photos/mattieb/431958217/">mattieb</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peakhut.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peakhut.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/peakhut.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/peakhut.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/peakhut.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/peakhut.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/peakhut.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/peakhut.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/peakhut.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/peakhut.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/peakhut.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/peakhut.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/peakhut.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/peakhut.wordpress.com/220/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=220&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.peakhut.com/2010/09/27/admin-controllers-with-inherited-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/144d33eb4d11754ac56544bd5501f0f3?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">bt1</media:title>
		</media:content>

		<media:content url="http://peakhut.files.wordpress.com/2010/09/431958217_7d2b3a8ce9_z1.jpeg" medium="image">
			<media:title type="html">fruits</media:title>
		</media:content>
	</item>
		<item>
		<title>Paperclip Recipes</title>
		<link>http://roberto.peakhut.com/2010/01/14/paperclip_recipes/</link>
		<comments>http://roberto.peakhut.com/2010/01/14/paperclip_recipes/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 14:42:34 +0000</pubDate>
		<dc:creator>Roberto Soares</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[delayed_job]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[paperclip]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[s3]]></category>

		<guid isPermaLink="false">http://roberto.peakhut.com/?p=131</guid>
		<description><![CDATA[One of the main features in the Todobebe web sites is photo uploads. We have already improved the process a few times(refactoring FTW) and in this post I selected some recipes based in our experience: asynchronous upload to s3 delaying the thumbnail generation anonymous photos saving photo dimensions If you are using paperclip, some of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=131&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-130" title="paperclips" src="http://peakhut.files.wordpress.com/2009/12/paperclips-e1260721186864.jpeg?w=500" alt="Paperclips"   /><br />
One of the main features in the <a href="http://client.todobebe.com/corporate_digital/DIGITAL.html">Todobebe web sites</a> is photo uploads. We have already improved the process a few times(refactoring FTW) and in this post I selected some recipes based in our experience:</p>
<ul>
<li>asynchronous upload to s3</li>
<li>delaying the thumbnail generation</li>
<li>anonymous photos</li>
<li>saving photo dimensions</li>
</ul>
<p>If you are using paperclip, some of the following recipes may be useful for you.<br />
<span id="more-131"></span></p>
<h2>About Paperclip and Installation</h2>
<p><a href="http://github.com/thoughtbot/paperclip">Paperclip</a> is a file upload plugin for <a href="http://rubyonrails.org/">Rails</a> created by the <a href="http://thoughtbot.com/">thoughtbot</a> (same guys who created <a href="http://github.com/thoughtbot/shoulda">shoulda</a> and <a href="http://github.com/thoughtbot/factory_girl">factory_girl</a>). Paperclip is very active in github. Let it be known that it is the forth or fifth file upload plugin that I&#8217;ve already used and the best one so far IMHO.</p>
<p>Its installation is simple. In your config/environment.rb, add:</p>
<p><pre class="brush: ruby;">
config.gem 'paperclip', :source =&gt; 'http://gemcutter.org'
</pre></p>
<p>Those using old paperclip versions may not have noticed it can be installed as a gem now (what is recommended by its developers).</p>
<h2>Basic usage</h2>
<p>If you just want to save a file in the file system:</p>
<p><pre class="brush: ruby;">
class User &lt; ActiveRecord::Base
    has_attached_file :avatar, :styles =&gt; { :medium =&gt; &quot;120x120&gt;&quot;, :thumb =&gt; &quot;80x80&gt;&quot; }
 end
</pre></p>
<p>and for s3 storage (with a thumbnail):</p>
<p><pre class="brush: ruby;">
class User &lt; ActiveRecord::Base
  has_attached_file :avatar, :storage =&gt; :s3,
    :styles =&gt; { :medium =&gt; &quot;120x120&gt;&quot;, :thumb =&gt; &quot;80x80&gt;&quot; },
    :s3_credentials =&gt; &quot;#{RAILS_ROOT}/config/amazon_s3.yml&quot;,
    :bucket =&gt; &quot;papertest&quot;,
    :path =&gt; &quot;:class/:id/:basename_:style.:extension&quot;
end
</pre></p>
<p>That&#8217;s it! If you need to improve the users&#8217; experience and don&#8217;t want make them wait for: (1)the thumbnail generation and (2)the upload to s3 after they already have waited (3)the upload to your server, a bit more code will be necessary.</p>
<h2>Asynchronous upload to s3</h2>
<p>This recipe uses the gem <a href="http://github.com/collectiveidea/delayed_job">delayed_job</a> which can be easily replaced by other background job solution such as <a href="http://github.com/purzelrakete/workling/">workling</a> or a rake task + a cron job. If you don&#8217;t know delayed_job, there is a <a href="http://railscasts.com/episodes/171-delayed-job">nice railscast</a> about it. Assuming you have delayed_job installed, let&#8217;s start our example:</p>
<p><pre class="brush: ruby;">
class User &lt; ActiveRecord::Base
    has_attached_file :local_avatar, :styles =&gt; { :medium =&gt; &quot;120x120&gt;&quot;, :thumb =&gt; &quot;80x80&gt;&quot; }
    has_attached_file :remote_avatar, :storage =&gt; :s3,
      :styles =&gt; { :medium =&gt; &quot;120x120&gt;&quot;, :thumb =&gt; &quot;80x80&gt;&quot; },
      :s3_credentials =&gt; &quot;#{RAILS_ROOT}/config/amazon_s3.yml&quot;,
      :bucket =&gt; &quot;papertest&quot;,
      :path =&gt; &quot;:class/:id/:basename_:style.:extension&quot;
 end
</pre></p>
<p>The basic idea is to upload to the filesystem(local_avatar) and in background to upload to s3(remote_avatar). In the form there will be something like this:</p>
<p><pre class="brush: ruby;">
&lt;%= f.file_field :local_avatar %&gt;
</pre></p>
<p>Nothing new so far. Now we&#8217;ll use a ActiveRecord callback to schedule the upload to s3:</p>
<p><pre class="brush: ruby;">
after_save :queue_upload_to_s3
def queue_upload_to_s3
  send_later(:upload_to_s3) if self.local_avatar_updated_at_changed?
end
def upload_to_s3
  self.remote_avatar = local_avatar.to_file
  self.save!
end
</pre></p>
<p>And if you don&#8217;t want to keep a local copy, just change this method:</p>
<p><pre class="brush: ruby; highlight: [3];">
def upload_to_s3
  self.remote_avatar = local_avatar.to_file
  self.local_avatar = nil
  self.save!
end
</pre></p>
<p>Another tip it&#8217;s to create an alias to forget that you are working with two attachments:</p>
<p><pre class="brush: ruby;">
alias_method :avatar=, :local_avatar=
def avatar
  self.remote_avatar? ? self.remote_avatar : self.local_avatar
end
</pre></p>
<p>In the views you will do:</p>
<p><pre class="brush: ruby;">
&lt;%= f.file_field :avatar %&gt;

&lt;%= image_tag @user.avatar.url(:thumb) %&gt;
</pre></p>
<p>I really like this solution because it&#8217;s simple and non intrusive.<br />
Alternatives:</p>
<ul>
<li><a href="http://codewordstudios.com/posts/3-delayed-upload-delivery-to-s3-with-paperclip-delayed-job">Delayed upload delivery to S3 with Paperclip + Delayed::Job</a>(1 table, 2 models, temporary local files. nice solution)</li>
<li><a href="http://www.railstoolkit.com/posts/uploading-files-directly-to-amazon-s3-using-fancyupload">Uploading files directly to Amazon S3 using FancyUpload</a></li>
</ul>
<h2>Delaying the thumbnail generation</h2>
<p>For this one I&#8217;ve made a mix of two solutions that I found:</p>
<ul>
<li><del datetime="2010-01-14T12:25:21+00:00"><a href="http://eastblue.org/blag/2009/05/07/delaying-paperclip.html">Delaying Paperclip</a></del>(broken link)</li>
<li><a href="http://blog.madeofcode.com/post/201282903/paperclip-s3-delayed-job-in-rails">Paperclip, S3 &amp; Delayed Job in Rails</a></li>
</ul>
<p>First of all, it&#8217;s necessary to add a column (processsing, for instance) to flag that the thumbnail isn&#8217;t ready. Once you&#8217;ve done that, we have to prevent the thumbnail generation.</p>
<p><pre class="brush: ruby;">
before_local_avatar_post_process do |image|
  if image.dirty?
    image.processing = true
    false # halts processing
   end
end
</pre></p>
<p>That will prevent any image processing by paperclip. Now we just need to implement a method to let the paperclip to do it and put on background, in this recipe using the delayed_job:</p>
<p><pre class="brush: ruby;">
after_save :queue_process_styles

def queue_process_styles
  send_later(:process_styles) if self.local_avatar.dirty?
end

def process_styles
  self.local_avatar.reprocess!
  self.processing = false
  self.save(false)
end
</pre></p>
<p>And for placeholder image to show the thumbnails during the processing, just use the option <em>default_url</em>:</p>
<p><pre class="brush: ruby;">
has_attached_file :local_avatar, :styles =&gt; { :medium =&gt; &quot;120x120&gt;&quot;, :thumb =&gt; &quot;80x80&gt;&quot; },
  :default_url =&gt;  &quot;:class/:attachment/:style/processing.png&quot;
</pre><br />
Alternative:</p>
<ul>
<li><a href="http://www.jstorimer.com/ruby/2010/01/30/delayed-paperclip.html">delayed_paperclip</a></li>
</ul>
<h2>Anonymous photos</h2>
<p>To implement it, we have to customize the file path using the options <em>path</em> and <em>url</em>:</p>
<p><pre class="brush: ruby;">
has_attached_file :local_avatar,
  :url =&gt; &quot;/system/:attachment/:id/:style/:filename&quot;,
  :path =&gt; &quot;:rails_root/public:url&quot;
</pre></p>
<p>The value of each of those words beginning with <em>:</em> is determined by a method of the P<a href="http://wiki.github.com/thoughtbot/paperclip/interpolations">aperclip::Interpolations</a>.  The <em>:attachment</em>, for instance, returns the pluralized name of the attachment as given to <em>has_attached_file</em>. To create one is very simple:</p>
<p><pre class="brush: ruby;">
Paperclip.interpolates :anonymous do |attachment, style|
  Digest::SHA1.hexdigest(&quot;#{attachment.instance.id}&quot;)
end
</pre></p>
<p>Back to our example:</p>
<p><pre class="brush: ruby;">
has_attached_file :local_avatar,
  :url =&gt; &quot;/system/:attachment/:id/:style/:anonymous.:extension&quot;,
  :path =&gt; &quot;:rails_root/public:url&quot;
#example:
#/system/local_avatars/12/original/7b52009b64fd0a2a49e6d8a939753077792b0554.jpg
</pre></p>
<p>I don&#8217;t know if SHA-1 is the best way to do it and I would like to receive suggestions to improve this code.</p>
<p>Alternatives:</p>
<ul>
<li>:id</li>
<li>:id_partition</li>
<li>:timestamp</li>
<li>an interpolation created by you</li>
</ul>
<h2>Photo dimensions</h2>
<p>The class <em>Paperclip::Geometry</em> has methods to get the image dimensions.  We just need to add the columns(width and height, for instance) and set their values using an appropriate callback:</p>
<p><pre class="brush: ruby;">
before_save :set_dimensions

def set_dimensions
  tempfile = self.local_avatar.queued_for_write[:original]
  
  unless tempfile.nil?
    dimensions = Paperclip::Geometry.from_file(tempfile)
    self.width = dimensions.width
    self.height = dimensions.height
  end
end
</pre></p>
<p>That&#8217;s it!</p>
<h2>Uploaded successfully!</h2>
<p>I wanted to share the above recipes as I figure they are useful to those working in similar projects. I&#8217;d like to thank those who have worked on the projects mentioned above: <a href="http://www.workingwithrails.com/person/7980-christopher-saylor">Christopher Saylor</a>, <a href="http://brunomiranda.com">Bruno Miranda</a> and <a href="http://danteregis.com/">Dante Regis</a>.<br />
Thank you for reading!</p>
<p>Photo by <a href="http://www.flickr.com/photos/williac/1389849058/">williac</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peakhut.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peakhut.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/peakhut.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/peakhut.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/peakhut.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/peakhut.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/peakhut.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/peakhut.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/peakhut.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/peakhut.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/peakhut.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/peakhut.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/peakhut.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/peakhut.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=131&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.peakhut.com/2010/01/14/paperclip_recipes/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/144d33eb4d11754ac56544bd5501f0f3?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">bt1</media:title>
		</media:content>

		<media:content url="http://peakhut.files.wordpress.com/2009/12/paperclips-e1260721186864.jpeg" medium="image">
			<media:title type="html">paperclips</media:title>
		</media:content>
	</item>
		<item>
		<title>Some of My Favorite iPhone OS apps, Part I</title>
		<link>http://roberto.peakhut.com/2009/08/25/some-of-my-favorite-iphone-os-apps-part-i/</link>
		<comments>http://roberto.peakhut.com/2009/08/25/some-of-my-favorite-iphone-os-apps-part-i/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 02:05:15 +0000</pubDate>
		<dc:creator>Roberto Soares</dc:creator>
				<category><![CDATA[iPhone OS]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[comic books]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ipod touch]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[rpg]]></category>
		<category><![CDATA[soccer]]></category>
		<category><![CDATA[sport]]></category>

		<guid isPermaLink="false">http://roberto.peakhut.com/?p=76</guid>
		<description><![CDATA[Last week my friend Davis Cabral asked me about some nice apps to install in his new iPhone. I have an iPod Touch and seldom if ever use it to listen to music. In fact, my wife and I called it &#8220;the house computer&#8221;. Davis asked the right person, and below there are my thoughts [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=76&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><img class="size-full wp-image-109 aligncenter" title="ipod" src="http://peakhut.files.wordpress.com/2009/08/ipod.png?w=500" alt="ipod"   /></p>
<p>Last week my friend <a title="Davis Cabral" href="http://daviscabral.com.br">Davis Cabral</a> asked me about some nice apps to install in his new iPhone. I have an iPod Touch and seldom if ever use it to listen to music. In fact, my wife and I called it &#8220;the house computer&#8221;. Davis asked the right person, and below there are my thoughts about some of my favorite apps.<br />
<span id="more-76"></span></p>
<h2>Reading</h2>
<p>After I finished reading all paper books I own, I chose to read some classic &#8216;virtual&#8217; books using my iPod. A Kindle would be better (<a title="Amazon Kindle 2 by Bruno Miranda" href="http://brunomiranda.com/past/2009/7/28/amazon_kindle_2/">right Bruno</a>?), but unfortunately it&#8217;s unavailable in my country. At least there are good reader apps for iPhone OS. I&#8217;ve already read the short-story <a href="http://en.wikipedia.org/wiki/I,_Robot_(Cory_Doctorow)"><em>I, Robot</em> written by Cory Doctorow</a> (what I started to read because I thought it was <a href="http://en.wikipedia.org/wiki/I,_Robot">the Asimov&#8217;s book</a>&#8230;) using the <a title="Stanza app(Lexcycle)" href="http://www.lexcycle.com/">Stanza app</a> and currently I&#8217;m reading <em><a href="http://en.wikipedia.org/wiki/Alice%27s_Adventures_in_Wonderland">Alice in Wonderland</a></em> using the <a title="Classics app" href="http://www.classicsapp.com/">Classics app</a>. The both are nice apps, each one with its own characteristics.</p>
<p><a href="http://www.classicsapp.com/">Classics</a> has an impressive and beautiful UI with a virtual shelf, &#8216;page flip&#8217; animation and bookmarks. There are twenty three available books so far. <a title="App Store" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=294773236&amp;mt=8">$0.99</a>.</p>
<p><a href="http://www.lexcycle.com/">Stanza</a> has a (bugged) UI with many options (colors, layout, orientation) and lets you browse many catalogs with paid and free ebooks like <a href="http://oreilly.com/">O&#8217;Reilly Ebooks</a> and <a title="There are nearly 30,000 free books in the Project Gutenberg Online Book Catalog." href="http://www.gutenberg.org">Project Gutenberg</a>. And it&#8217;s not only that, there is a desktop app to sync your own files. <a title="App Store" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=284956128&amp;mt=8">Free</a>.</p>
<p>Besides the usual books, I read comic books and there are some nice solutions for iPhone OS, eg.: <a title="App Store" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=299880440&amp;mt=8">PullLists</a>, <a title="App Store" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=314931934&amp;mt=8">Comic Reader Mobi</a>.</p>
<p>I&#8217;m using the <a href="http://www.bitolithic.com/ComicZeal/comiczeal.htm">Comiczeal</a><strong> </strong>what syncs with the <a title="ComicZeal Sync" href="http://www.bitolithic.com/ComicZeal/ComicZealSync/comiczealsync.htm">ComicZeal Sync</a>(for Mac and Win) and has a good file management, unfortunately only in the iPhone side. <a title="App Store" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=288016881&amp;mt=8">$0.99</a>.</p>
<h2>Games</h2>
<p>When I wanna play some video game, there are two what I really like: <a href="http://www2.gamevil.com/eng_new/iphone.jsp?game=2">Zenonia</a> and <a href="http://www.gameloft.com/iphone-games/real-soccer-2009/">Real Soccer 2009</a>.</p>
<p><a href="http://www2.gamevil.com/eng_new/iphone.jsp?game=2">Zenonia</a> is an old school RPG game&#8230; in fact, it is a fun RPG action game that mixes many cool features of some great RPG games. There are three classes to choose(paladin, warrior and thief) a lot of NPCs, items, weapons, monsters, active and passive skills and it&#8217;s a long game (I&#8217;ve already played 14 hours along about two months and I think I played only half of it). <a title="App Store" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=321439127&amp;mt=8">Free Lite version</a>, <a title="App Store" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=316720410&amp;mt=8">Full $2.99</a>.</p>
<p><a href="http://www.gameloft.com/iphone-games/real-soccer-2009/">Real Soccer 2009</a> is a soccer game(oh!) with nice graphics and gameplay. However, its best part is the intuitive controls that make it better to play than Pro Evolution Soccer for PC with a joystick! With just a direction pad and two buttons you get 17 moves. Sometimes I catch my wife playing it. <a title="App Store" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=289728309&amp;mt=8">$0.99</a>.</p>
<p>In the next part I&#8217;ll write about apps in other categories: Productivity, Social Networking and Home Entertainment.</p>
<p>Photo by <a href="http://www.flickr.com/photos/meaghanmurf/3647680777">meaghan murphy</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peakhut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peakhut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/peakhut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/peakhut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/peakhut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/peakhut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/peakhut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/peakhut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/peakhut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/peakhut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/peakhut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/peakhut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/peakhut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/peakhut.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=76&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.peakhut.com/2009/08/25/some-of-my-favorite-iphone-os-apps-part-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/144d33eb4d11754ac56544bd5501f0f3?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">bt1</media:title>
		</media:content>

		<media:content url="http://peakhut.files.wordpress.com/2009/08/ipod.png" medium="image">
			<media:title type="html">ipod</media:title>
		</media:content>
	</item>
		<item>
		<title>Resultado do Sorteio do Livro de Rails do Urubatan</title>
		<link>http://roberto.peakhut.com/2009/05/02/resultado-do-sorteio-do-livro-de-rails-do-urubatan/</link>
		<comments>http://roberto.peakhut.com/2009/05/02/resultado-do-sorteio-do-livro-de-rails-do-urubatan/#comments</comments>
		<pubDate>Sat, 02 May 2009 19:19:13 +0000</pubDate>
		<dc:creator>Roberto Soares</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[portuguese]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://roberto.peakhut.com/?p=70</guid>
		<description><![CDATA[A editora NOVATEC cedeu ao RubyOnda.com uma cópia do livro &#8220;RubyOnRails: Desenvolvimento Fácil e Rápido de Aplicações Web&#8221; escrito por Rodrigo Urubatan para sorteio entre nossos colaboradores. Mais informações no post anterior. E o premiado foi: Pedro Delfino dos Santos Neto (twitter, blog). Parabéns ao ganhador e bons estudos! Para quem estiver interessado no livro, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=70&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A editora <a href="http://www.novatec.com.br/">NOVATEC</a> cedeu ao <a href="http://rubyonda.com/">RubyOnda.com</a> uma cópia do <a href="http://livro.urubatan.com.br/">livro</a> &#8220;RubyOnRails: Desenvolvimento Fácil e Rápido de Aplicações Web&#8221; escrito por <a href="http://www.urubatan.com.br/">Rodrigo Urubatan</a> para sorteio entre nossos colaboradores. Mais informações no <a href="http://roberto.peakhut.com/2009/04/09/ganhe-o-novo-livro-de-rails-escrito-por-urubatan/">post anterior</a>.</p>
<p>E o premiado foi: Pedro Delfino dos Santos Neto (<a href="http://twitter.com/pedrodelfino">twitter</a>, <a href="http://www.e-tinet.com/">blog</a>). Parabéns ao ganhador e bons estudos!</p>
<p>Para quem estiver interessado no livro, até o final de maio poderá usar o código RUBYONDA para <a href="http://www.novatec.com.br/livros/rubyonrails/">comprar o livro com <strong>20% de desconto</strong> no site da NOVATEC</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peakhut.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peakhut.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/peakhut.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/peakhut.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/peakhut.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/peakhut.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/peakhut.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/peakhut.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/peakhut.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/peakhut.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/peakhut.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/peakhut.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/peakhut.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/peakhut.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=70&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.peakhut.com/2009/05/02/resultado-do-sorteio-do-livro-de-rails-do-urubatan/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/144d33eb4d11754ac56544bd5501f0f3?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">bt1</media:title>
		</media:content>
	</item>
		<item>
		<title>Ganhe o novo livro de Rails escrito por Urubatan</title>
		<link>http://roberto.peakhut.com/2009/04/09/ganhe-o-novo-livro-de-rails-escrito-por-urubatan/</link>
		<comments>http://roberto.peakhut.com/2009/04/09/ganhe-o-novo-livro-de-rails-escrito-por-urubatan/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 23:54:25 +0000</pubDate>
		<dc:creator>Roberto Soares</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[portuguese]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://roberto.peakhut.com/?p=35</guid>
		<description><![CDATA[A editora NOVATEC está promovendo o livro recém lançado &#8220;RubyOnRails: Desenvolvimento Fácil e Rápido de Aplicações Web&#8221; escrito por Rodrigo Urubatan. Ler a resenha escrita por ele é de empolgar qualquer um, ainda mais pelo livro servir tanto como base para novatos, quanto como referência pelos veteranos. E agora a melhor parte, a editora cedeu [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=35&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_45" class="wp-caption alignright" style="width: 114px"><img src="http://peakhut.files.wordpress.com/2009/04/book_rubyonrails_urubatan.jpeg?w=104&#038;h=150" alt="RubyOnRails por Urubatan" title="book_rubyonrails_urubatan" width="104" height="150" class="size-thumbnail wp-image-45" /><p class="wp-caption-text">Livro RubyOnRails - Urubatan</p></div><br />
A editora <a href="http://www.novatec.com.br">NOVATEC</a> está promovendo o <a href="http://livro.urubatan.com.br/">livro</a> recém lançado &#8220;RubyOnRails: Desenvolvimento Fácil e Rápido de Aplicações Web&#8221; escrito por <a href="http://www.urubatan.com.br/">Rodrigo Urubatan</a>. Ler a <a href="http://www.urubatan.com.br/mais-um-livro-sobre-ruby-on-rails-publicado/">resenha</a> escrita por ele é de empolgar qualquer um, ainda mais pelo livro servir tanto como base para novatos, quanto como referência pelos veteranos.</p>
<p>E agora a melhor parte, a editora cedeu ao <a href="http://rubyonda.com">RubyOnda</a> uma cópia do livro para sortearmos entre nossos colaboradores. Para concorrer basta enviar pelo menos um post para o <a href="http://rubyonda.com">RubyOnda</a> até <strong>25/04/2009</strong>.</p>
<p>E quem não ganhar não precisa ficar triste, até o final de maio poderá usar o código <strong>RUBYONDA</strong> para <a href="http://www.novatec.com.br/livros/rubyonrails/">comprar o livro com <strong>20% de desconto</strong> no site da NOVATEC</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peakhut.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peakhut.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/peakhut.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/peakhut.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/peakhut.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/peakhut.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/peakhut.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/peakhut.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/peakhut.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/peakhut.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/peakhut.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/peakhut.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/peakhut.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/peakhut.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=35&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.peakhut.com/2009/04/09/ganhe-o-novo-livro-de-rails-escrito-por-urubatan/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/144d33eb4d11754ac56544bd5501f0f3?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">bt1</media:title>
		</media:content>

		<media:content url="http://peakhut.files.wordpress.com/2009/04/book_rubyonrails_urubatan.jpeg?w=104" medium="image">
			<media:title type="html">book_rubyonrails_urubatan</media:title>
		</media:content>
	</item>
		<item>
		<title>Back to blog</title>
		<link>http://roberto.peakhut.com/2009/03/30/back-to-blog/</link>
		<comments>http://roberto.peakhut.com/2009/03/30/back-to-blog/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 15:17:34 +0000</pubDate>
		<dc:creator>Roberto Soares</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://peakhut.wordpress.com/?p=4</guid>
		<description><![CDATA[It has been 2 years since I last posted on my old blog. I am back to share my experiences, knowledge and occasionally personal stuff. I am currently developing Rails applications for Todobebe. Whenever possible I spend time studying Perl, Cocoa amongst other things. Expect to see items related to those subjects here. Some posts [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=4&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It has been 2 years since I last posted on my old blog. I am back to share my experiences, knowledge and occasionally personal stuff.</p>
<p>I am currently developing Rails applications for <a href="http://client.todobebe.com/corporate/">Todobebe</a>. Whenever possible I spend time studying Perl, Cocoa amongst other things. Expect to see items related to those subjects here. </p>
<p>Some posts will be in portuguese, normally when I write about local events. </p>
<p>Feel free to subscribe to the <a href="http://roberto.peakhut.com/feed/">feed</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peakhut.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peakhut.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/peakhut.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/peakhut.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/peakhut.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/peakhut.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/peakhut.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/peakhut.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/peakhut.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/peakhut.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/peakhut.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/peakhut.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/peakhut.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/peakhut.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roberto.peakhut.com&amp;blog=6855785&amp;post=4&amp;subd=peakhut&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roberto.peakhut.com/2009/03/30/back-to-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/144d33eb4d11754ac56544bd5501f0f3?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">bt1</media:title>
		</media:content>
	</item>
	</channel>
</rss>
