<?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>Gastón Ramos - Ruby, Rails...</title>
	<atom:link href="http://gastonramos.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gastonramos.wordpress.com</link>
	<description>Blog dedicado al desarrollo web en general pero más que nada en ruby on rails</description>
	<lastBuildDate>Fri, 13 Nov 2009 12:37:59 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>la</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='gastonramos.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/4073e1228d0cfd42f2a08111301ef380?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Gastón Ramos - Ruby, Rails...</title>
		<link>http://gastonramos.wordpress.com</link>
	</image>
			<item>
		<title>47</title>
		<link>http://gastonramos.wordpress.com/2009/11/13/47/</link>
		<comments>http://gastonramos.wordpress.com/2009/11/13/47/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 12:34:38 +0000</pubDate>
		<dc:creator>Gastón Ramos</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[tecnologia]]></category>
		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://gastonramos.wordpress.com/?p=384</guid>
		<description><![CDATA[En un proyecto en el que estoy trabajando se me ocurrió saber cuantos devs habían pasado por ahí, es decir cuantas personas diferentes modificaron el código, como no sé cual es comando de git que le corresponde lo resolví en bash:
git log &#124; grep Author: &#124; sort -u &#124; cut &#8211;delimiter=&#8221; &#8221; -f2 &#124; sort [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=384&subd=gastonramos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>En un proyecto en el que estoy trabajando se me ocurrió saber cuantos devs habían pasado por ahí, es decir cuantas personas diferentes modificaron el código, como no sé cual es comando de git que le corresponde lo resolví en bash:</p>
<p>git log | grep Author: | sort -u | cut &#8211;delimiter=&#8221; &#8221; -f2 | sort -u | wc -l</p>
<p>Por supuesto que el cálculo no es exacto pero en menos de 1 minuto obtuve una respuesta bastante cercana a la realidad:</p>
<p>47</p>
<p>¿Lindo número para jugar en quiniela eh?</p>
<p>PD: Gente, Lead Projects, Developers, CTOs, Etc. Hay que tratar de mantener ese número lo más bajo posible, en mi opinión más de 4 es mucho, así que para este caso estoy en un orden 10x de lo que es aceptable para mí <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>PD: Que bueno hubiese sido que de 5 números menos <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>¿Qué opininan?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/384/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=384&subd=gastonramos&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gastonramos.wordpress.com/2009/11/13/47/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86112553d9846f4c7b16e8bfee1f28f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gastón Ramos</media:title>
		</media:content>
	</item>
		<item>
		<title>Jornadas de software libre en Junin</title>
		<link>http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/</link>
		<comments>http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 15:30:37 +0000</pubDate>
		<dc:creator>Gastón Ramos</dc:creator>
				<category><![CDATA[gnu]]></category>
		<category><![CDATA[jornadas]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[varios]]></category>
		<category><![CDATA[sl]]></category>

		<guid isPermaLink="false">http://gastonramos.wordpress.com/?p=366</guid>
		<description><![CDATA[Hace poco me invitaron para dar una charla en las Jornadas de Software libre de Junin, y el viernes pasado llegué allí con tal motivo, comimos un asado *muy* bueno con coca cola por supuesto  , al otro día tuve que abrir el día con mi charla de Ruby (todos sabemos lo que significa [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=366&subd=gastonramos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hace poco me invitaron para dar una charla en las Jornadas de Software libre de Junin, y el viernes pasado llegué allí con tal motivo, comimos un asado *muy* bueno con coca cola por supuesto <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , al otro día tuve que abrir el día con mi charla de Ruby (todos sabemos lo que significa comenzar a las 9:00 AM un sábado!) la charla salió muy bien para mi gusto y la gente parecía bastante entusiasmada,hicieron varias preguntas, después vino &#8220;El Profe&#8221; Román con una charla acerca  de como participar del proyecto Open Office, y más tarde y para cerrar el día, Javier hablando acerca Asterix, quiero destacar que la organización fué excelente todo muy lindo.Al final hubo regalos!!! Muchas gracias a todos los organizadores por esta gran jornada!.</p>
<p>Para los que quiera ver los slides:</p>
<p><a href="http://gastonramos.files.wordpress.com/2009/11/ruby-un-lenguaje-simple-natural-y-productivo-gaston-ramos1.pdf">Ruby-un-lenguaje-simple-natural-y-productivo-gaston-ramos</a></p>
<p>Acá les dejo algunas fotos:</p>
<p>&nbsp;</p>

<a href='http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/attachment/00003/' title='00003'><img width="150" height="112" src="http://gastonramos.files.wordpress.com/2009/11/00003.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="" title="00003" /></a>
<a href='http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/attachment/00006/' title='00006'><img width="150" height="112" src="http://gastonramos.files.wordpress.com/2009/11/00006.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="" title="00006" /></a>
<a href='http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/attachment/00007/' title='00007'><img width="150" height="112" src="http://gastonramos.files.wordpress.com/2009/11/00007.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="" title="00007" /></a>
<a href='http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/attachment/00008/' title='00008'><img width="150" height="112" src="http://gastonramos.files.wordpress.com/2009/11/00008.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="" title="00008" /></a>
<a href='http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/attachment/00009/' title='00009'><img width="150" height="112" src="http://gastonramos.files.wordpress.com/2009/11/00009.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="" title="00009" /></a>
<a href='http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/attachment/00012/' title='00012'><img width="150" height="112" src="http://gastonramos.files.wordpress.com/2009/11/00012.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="" title="00012" /></a>
<a href='http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/attachment/00015/' title='00015'><img width="150" height="112" src="http://gastonramos.files.wordpress.com/2009/11/00015.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="" title="00015" /></a>
<a href='http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/attachment/00018/' title='00018'><img width="150" height="112" src="http://gastonramos.files.wordpress.com/2009/11/00018.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="" title="00018" /></a>
<a href='http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/attachment/00019/' title='00019'><img width="150" height="112" src="http://gastonramos.files.wordpress.com/2009/11/00019.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="" title="00019" /></a>

  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/366/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=366&subd=gastonramos&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gastonramos.wordpress.com/2009/11/04/jornadas-de-software-libre-en-junin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86112553d9846f4c7b16e8bfee1f28f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gastón Ramos</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails edge, Ruby 1.9 style String interpolation support</title>
		<link>http://gastonramos.wordpress.com/2009/07/10/rails-edge-ruby-1-9-style-string-interpolation-support/</link>
		<comments>http://gastonramos.wordpress.com/2009/07/10/rails-edge-ruby-1-9-style-string-interpolation-support/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 18:04:00 +0000</pubDate>
		<dc:creator>Gastón Ramos</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[rails edge]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://gastonramos.wordpress.com/?p=352</guid>
		<description><![CDATA[Este es el primer post de una serie que he decidido comenzar titulada &#8220;Analizando commits de rails edge&#8221;. Aclaro que los post no van a tener orden alguno y que voy a comentar los que me llaman la atención a _mí_  .
En este caso el commit se trata de agregar a rails la nueva [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=352&subd=gastonramos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Este es el primer post de una serie que he decidido comenzar titulada <strong>&#8220;Analizando commits de rails edge&#8221;</strong>. Aclaro que los post no van a tener orden alguno y que voy a comentar los que me llaman la atención a _mí_ <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
En este caso el <a href="http://github.com/rails/rails/commit/da635394c1c3004f4dacf4a35275404e5b1aef43">commit</a> se trata de agregar a rails la nueva forma de interpolación de strings que trae ruby 1.9 ( la idea es que se pueda usar con versiones menores también), pueden ver el código en este archivo:</p>
<pre>
activesupport/lib/active_support/core_ext/string/interpolation.rb
</pre>
<p>Cómo uds sabrán en Ruby se pueden interpolar strings de la siguiente manera:</p>
<pre>
&gt;&gt;"%s, %s" % ["Masao", "Mutoh"]
=&gt; "Masao, Mutoh"
</pre>
<p>Cómo lo explica el comentario en el código:</p>
<pre>
 # call-seq:
  #   %(arg)
  #   %(hash)
  #
  # Format - Uses str as a format specification, and returns the result of applying it to arg.
  # If the format specification contains more than one substitution, then arg must be
  # an Array containing the values to be substituted. See Kernel::sprintf for details of the
  # format string. This is the default behavior of the String class.
  #   * arg: an Array or other class except Hash.
  #   * Returns: formatted String
  # Example:
  #    "%s, %s" % ["Masao", "Mutoh"]
  #
  # Also you can use a Hash as the "named argument". This is recommended way so translators
  # can understand the meanings of the msgids easily.
  #   * hash: {:key1 =&gt; value1, :key2 =&gt; value2, ... }
  #   * Returns: formatted String
  # Example:
  #   For strings.
  #   "%{firstname}, %{familyname}" % {:firstname =&gt; "Masao", :familyname =&gt; "Mutoh"}
  #
  #   With field type to specify format such as d(decimal), f(float),...
  #   "%d, %.1f" % {:age =&gt; 10, :weight =&gt; 43.4}
</pre>
<p>Es decir que ahora podemos interpolar strings de la siguiente manera:</p>
<pre>
&gt;&gt; "%{firstname}, %{familyname}" % {:firstname =&gt; "Masao", :familyname =&gt; "Mutoh"}
ArgumentError: malformed format string - %{
	from (irb):2:in `%'
	from (irb):2
&gt;&gt;
</pre>
<p>Auuuchh! estoy probando con un irb con ruby 1.8.6, así que necesito requerir el archivo:</p>
<pre>
&gt;&gt; require 'activesupport/lib/active_support/core_ext/string/interpolation.rb'
=&gt; true
&gt;&gt; "%{firstname}, %{familyname}" % {:firstname =&gt; "Masao", :familyname =&gt; "Mutoh"}
=&gt; "Masao, Mutoh"
</pre>
<p>Ahora sí! podemos interpolar string nombrados pasando un hash como argumento, Hermoso!<br />
Estuve mirando en los fuentes de Ruby 1.9 y no encuentro dónde está escrita esta nueva funcionalidad, el método que define la interpolación con&#8221;%&#8221; es  <strong>rb_str_format_m</strong> y está en la línea número 1202 del archivo <strong>string.c</strong> en el trunk de ruby, pero sólo está la vieja forma de interpolación. <strong>Entonces dónde está ? Alguien sabe?</strong><br />
Es más hice esta prueba:</p>
<pre>
$ irb1.9
require 'activesupport/lib/active_support/string/interpolation.rb'
=&gt; true
irb(main):002:0&gt; "%{firstname}, %{familyname}" % {:firstname =&gt; "Masao", :familyname =&gt; "Mutoh"}
ArgumentError: malformed format string - %{
	from (irb):2:in `%'
	from (irb):2
	from /usr/bin/irb1.9:12:in `'
</pre>
<p>Y la versión que tengo de ruby 1.9 es:<br />
<strong>ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]</strong><br />
Un poco vieja, probemos con ruby 1.9 compilado desde trunk<br />
<strong>ruby 1.9.2dev (2009-07-11 trunk 24027) [i686-linux]</strong></p>
<pre>
./ruby  -e 'puts "%{firstname}, %{familyname}" % {:firstname =&gt; "Masao", :familyname =&gt; "Mutoh"}'
Masao, Mutoh
</pre>
<p>Funcionó! entonces en algún lugar tiene que estar.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/352/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=352&subd=gastonramos&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gastonramos.wordpress.com/2009/07/10/rails-edge-ruby-1-9-style-string-interpolation-support/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86112553d9846f4c7b16e8bfee1f28f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gastón Ramos</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails 2.3, rake y reenable method</title>
		<link>http://gastonramos.wordpress.com/2009/07/08/rails-2-3-rake-y-reenable-method/</link>
		<comments>http://gastonramos.wordpress.com/2009/07/08/rails-2-3-rake-y-reenable-method/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 13:48:22 +0000</pubDate>
		<dc:creator>Gastón Ramos</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://gastonramos.wordpress.com/?p=345</guid>
		<description><![CDATA[Estoy terminando de hacer una migration a Rails 2.3 de la
app con la que estoy trabajando, resulta que me encontré con el siguiente tema:
Luego de instalar rails y migrar la app, llegó el momento de hacer un deploy a
staging, entonces me econtré con el siguiente error:

undefined method `reenable' for &#60;Rake::Task db:schema:dump =&#62;
[environment]&#62;:Rake::Task

googleando un poco llegué [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=345&subd=gastonramos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Estoy terminando de hacer una migration a Rails 2.3 de la<br />
app con la que estoy trabajando, resulta que me encontré con el siguiente tema:<br />
Luego de instalar rails y migrar la app, llegó el momento de hacer un deploy a<br />
staging, entonces me econtré con el siguiente error:</p>
<pre>
undefined method `reenable' for &lt;Rake::Task db:schema:dump =&gt;
[environment]&gt;:Rake::Task
</pre>
<p>googleando un poco llegué a este <a href="http://antono.info/en/138">link </a> que dice que hay que instalar<br />
la nueva versión de rake, investigando un poco más, llegué a este <a href="http://rails.lighthouseapp.com/projects/8994/tickets/1412-dbmigrateredo-does-not-dump-the-schema-after-migrating-back-up">PATCH </a><br />
que hace uso del método Rake::Task#reenable, el caso es que este método<br />
se agrega e con la versión de rake 0.8.2 y como el pibe dice en el comentario<br />
del patch, no hay problemas por que rails 2.3 require rake 0.8.3&#8230;. pero<br />
que pasa cuando:</p>
<p>1- Instalo rails 2.3<br />
2- Hago un &#8216;rake rails:freeze&#8217;<br />
3- hago &#8216;cap staging deploy:migrations&#8217;</p>
<p>Y no tengo rails 2.3 instalado en el server y por eso justamente hice un freeze.</p>
<p>Si leemos la task que arma las dependencias de rails:</p>
<pre>
  s.add_dependency('rake', '&gt;= 0.8.3')
  s.add_dependency('activesupport',    '= 3.0.pre' + PKG_BUILD)
  s.add_dependency('activerecord',     '= 3.0.pre' + PKG_BUILD)
  s.add_dependency('actionpack',       '= 3.0.pre' + PKG_BUILD)
  s.add_dependency('actionmailer',     '= 3.0.pre' + PKG_BUILD)
  s.add_dependency('activeresource',   '= 3.0.pre' + PKG_BUILD)
</pre>
<p>uando hacemos el freeze nos copia todas estas cosas menos el rake,<br />
lo cual parece razonable. Pero creo debería agregar en config/environment.rb</p>
<p>config.gem &#8220;rake&#8221;, :version =&gt; &#8216;0.8.3&#8242;</p>
<p>Que opinan uds? </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/345/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=345&subd=gastonramos&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gastonramos.wordpress.com/2009/07/08/rails-2-3-rake-y-reenable-method/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86112553d9846f4c7b16e8bfee1f28f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gastón Ramos</media:title>
		</media:content>
	</item>
		<item>
		<title>Instalando Mod_Ruby</title>
		<link>http://gastonramos.wordpress.com/2009/04/22/instalando-mod_ruby/</link>
		<comments>http://gastonramos.wordpress.com/2009/04/22/instalando-mod_ruby/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 03:02:16 +0000</pubDate>
		<dc:creator>Gastón Ramos</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[mod_ruby]]></category>

		<guid isPermaLink="false">http://gastonramos.wordpress.com/?p=328</guid>
		<description><![CDATA[Bueno dada la escasa y fea documentación que mod_ruby tiene me decidí a escribir un pequeño tutorial de instalación del mismo en debian, que paso a detallar:
Primero instalamos el modulo de apache para ruby (mod_ruby)
apt-get install libapache2-mod-ruby
Luego debemos crear el siguiente archivo:
vi /etc/apache2/mods-available/ruby.conf
y ponemos lo siguiente:
&#60;IfModule mod_ruby.c&#62;
  RubyRequire apache/ruby-run

  &#60;Files *.rbx&#62;
  SetHandler [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=328&subd=gastonramos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Bueno dada la escasa y fea documentación que mod_ruby tiene me decidí a escribir un pequeño tutorial de instalación del mismo en debian, que paso a detallar:</p>
<p>Primero instalamos el modulo de apache para ruby (mod_ruby)</p>
<pre>apt-get install libapache2-mod-ruby</pre>
<p>Luego debemos crear el siguiente archivo:<br />
vi /etc/apache2/mods-available/ruby.conf</p>
<p>y ponemos lo siguiente:</p>
<pre>&lt;IfModule mod_ruby.c&gt;
  RubyRequire apache/ruby-run

  &lt;Files *.rbx&gt;
  SetHandler ruby-object
  RubyHandler Apache::RubyRun.instance
  &lt;/Files&gt;
&lt;/IfModule&gt;</pre>
<p>Entre otras cosas le decimos que debe tratar los archivos .rbx como<br />
archivos de ruby.</p>
<p>Luego de esto ya tenemos los dos archivos necesarios para habilitar el módulo en apache:</p>
<p>ruby.load (que secopia al instalar el módulo) y ruby.conf generado por nosotros. Ahora cómo mod_ruby  ejecuta los scrips de ruby como CGI necesitamos poner la directiva Options +ExecCGI en el folder dónde vamos a poner nuestros scripts, en mi caso particular necesito que todos los usuarios del sistema puedan ejecutar sus scripts desde su ~/public_html entonces para lograr esto tenemos que editar la configuración del módulo user_dir, editamos el archivo</p>
<pre>vi /etc/apache2/mods-available/userdir.conf
<pre>y agregamos lo siguiente:
<pre> &lt;IfModule mod_userdir.c&gt;
        UserDir public_html
        UserDir disabled root

        &lt;Directory /home/*/public_html&gt;
                AllowOverride FileInfo AuthConfig Limit Indexes
                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
                # Para poder ejecutar scripts en ruby agregamos la linea de abajo
                Options +ExecCGI
                &lt;Limit GET POST OPTIONS&gt;
                        Order allow,deny
                        Allow from all
                &lt;/Limit&gt;
                &lt;LimitExcept GET POST OPTIONS&gt;
                        Order deny,allow
                        Deny from all
                &lt;/LimitExcept&gt;
        &lt;/Directory&gt;
&lt;/IfModule&gt;</pre>
</pre>
</pre>
<p>No sé si esto muy seguro o tiene alguna consecuencia no deseada, si es así comenten!<br />
Bueno ahora sólo necesitamos habilitar el móludo para esto ejecutamos el siguiente comando:</p>
<p>a2enmod ruby</p>
<p>y hacemos un reload del apache</p>
<p>/etc/init.d apache2 reload</p>
<p>despues de esto para probarlo ponemos un archivo en nuestro home</p>
<p>vi /home/gaston/test-ruby.rb</p>
<p>con un simple:</p>
<pre>puts "hello world"</pre>
<p>vamos al navegador a la siguiente url:</p>
<p>http://aca-va-la-url-de-tuserver/~gaston/test-ruby.rb</p>
<p>y vamos a ver un hermoso &#8220;hello world&#8221; si todo salió bien.</p>
<p>Bueno, con mod_ruby solo para escribir una página web dinámica vamos a tener que hacer algo cómo esto:</p>
<p>puts &#8220;&lt;h1&gt;Mi Título&lt;/h1&gt;&#8221;</p>
<p>lo cual es muy molesto, para hacer las cosas un póco más lindas y más fácil debemos usar eruby que nos permite ejecutar código ruby dentro de archivos de text (como por ejémplo un arhivo html)</p>
<p>Entonces comencemos por instalar eruby:</p>
<pre>apt-get install eruby</pre>
<p>y luego tenemos que modificar nuevamente el archivo /etc/apache2/mods-available/ruby.conf de esta manera:</p>
<pre>&lt;IfModule mod_ruby.c&gt;
  RubyRequire apache/ruby-run
  RubyRequire apache/eruby-run

  &lt;Files *.rbx&gt;
  SetHandler ruby-object
  RubyHandler Apache::RubyRun.instance
  &lt;/Files&gt;

 &lt;Files *.rhtml&gt;
  SetHandler ruby-object
  RubyHandler Apache::ERubyRun.instance
 &lt;/Files&gt;

&lt;/IfModule&gt;</pre>
<p>Y luego debemos agregar la siguiente directiva al archivo de configuración de apache /etc/apache2/apache2.conf</p>
<pre>AddType text/html .rhtml</pre>
<p>Con esto recargamos el apache y ya podemos escribir nuestros .rhtml<br />
y poner código ruby entre los tags &lt;%= %&gt;</p>
<p><strong>Links útiles:</strong></p>
<p>http://en.wikipedia.org/wiki/ERuby<br />
http://wiki.modruby.net/ja/?InstallGuide<br />
http://modruby.net/<br />
http://ubuntuforums.org/archive/index.php/t-356350.html<br />
http://www.ruby-doc.org/docs/ProgrammingRuby/html/web.html</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/328/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=328&subd=gastonramos&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gastonramos.wordpress.com/2009/04/22/instalando-mod_ruby/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86112553d9846f4c7b16e8bfee1f28f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gastón Ramos</media:title>
		</media:content>
	</item>
		<item>
		<title>Acts as state machine y metaprogramming</title>
		<link>http://gastonramos.wordpress.com/2009/03/20/acts-as-state-machine-y-metaprogramming/</link>
		<comments>http://gastonramos.wordpress.com/2009/03/20/acts-as-state-machine-y-metaprogramming/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 16:52:32 +0000</pubDate>
		<dc:creator>Gastón Ramos</dc:creator>
				<category><![CDATA[metaprogramming]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[acts as state machine]]></category>

		<guid isPermaLink="false">http://gastonramos.wordpress.com/?p=301</guid>
		<description><![CDATA[Fe de erratas: En el artículo de abajo dónde expliqué cómo generar un named_scope por cada estado declarado con acts_as_state_machine hay un BUG el tema es así, los named_scope se definían en un método (self.define_named_scopes) que era llamado desde el constructor de la clase User, por consiguiente si queremos usar uno de estos named_scopes antes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=301&subd=gastonramos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span style="color:#ff0000;"><strong>Fe de erratas:</strong></span> <span style="color:#000000;">En el artículo de abajo dónde expliqué cómo generar un named_scope por cada estado declarado con acts_as_state_machine <span style="color:#ff0000;">hay un BUG</span></span> <span style="color:#000000;">el tema es así, los named_scope se definían en un método </span>(self.define_named_scopes) que era llamado desde el constructor de la clase User, por consiguiente si queremos usar uno de estos named_scopes antes de que se instancie algún objeto de esta clase, el scope no existe, cómo era de esperar.</p>
<p>Entonces la solución rápida sería hacer directamente así:</p>
<pre>class User   &lt; ActiveRecord::Base
   acts_as_state_machine :initial =&gt; :inactive
   state :inactive
   state :active

   event :active do
     transitions :from =&gt; :inactive, :to =&gt; :active
   end

  ########################################################
  # define all state as named_scopes
  #
  self.states.each{|st|
    self.named_scope st, :conditions =&gt; { :state =&gt; st.to_s },
                      : order =&gt; 'created_at DESC'
  }
end</pre>
<hr />
<p>Hace bastante que vengo usando la genial biblioteca <strong>&#8220;Acts as state machine&#8221;</strong> que nos permite tener un <strong>máquina de estados finita</strong> (o autómata finito) en un modelo Active Record y a partir de las últimas versiones en cualquier objeto Ruby, y desde hace un tiempito que vengo pensando &#8220;Qué bueno sería que ASSM te genere un named_scope por cada estado posible&#8221;, entonces si por ejemplo tenemos 2 estados: <strong>active</strong>, <strong>inactive</strong> podríamos hacer algo así:</p>
<pre>User.inactive # Esto retorna todos los usuarios con estado inactive
User.active # Esto retorna todos los usuarios con estado active</pre>
<p>Bueno, acá está la solución que se me ocurrió:</p>
<pre>class User   &lt; ActiveRecord::Base
   acts_as_state_machine :initial =&gt; :inactive
   state :inactive
   state :active

   event :active do
     transitions :from =&gt; :inactive, :to =&gt; :active
   end

   def initialize(*args)
      self.class.define_named_scopes
      super *args
    end

  def self.define_named_scopes
    self.states.each{|st|
    self.named_scope st, :conditions =&gt; { :state =&gt; st.to_s },
                      : order =&gt; 'created_at DESC'
    }
  end
end</pre>
<p>Nice eh! tenemos un método que escribe los named_scope por nosotros y seguro que se puede mejorar o quizás agregar una opción a AASM para que lo haga cuando lo deseemos, el tema es que cómo necesitamos la lista de los estados, debemos ejecutar esto después de especificar los mismos, aunque una solución más elegante sería modificar AASM y hacer que los named_scope se genere cada vez que especificamos un estado.</p>
<p>Hasta la próxima!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/301/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=301&subd=gastonramos&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gastonramos.wordpress.com/2009/03/20/acts-as-state-machine-y-metaprogramming/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86112553d9846f4c7b16e8bfee1f28f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gastón Ramos</media:title>
		</media:content>
	</item>
		<item>
		<title>Nested Forms rails 2.3</title>
		<link>http://gastonramos.wordpress.com/2009/02/18/nested-forms-rails-23/</link>
		<comments>http://gastonramos.wordpress.com/2009/02/18/nested-forms-rails-23/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 15:22:30 +0000</pubDate>
		<dc:creator>Gastón Ramos</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[rails edge]]></category>

		<guid isPermaLink="false">http://gastonramos.wordpress.com/?p=268</guid>
		<description><![CDATA[En el proyecto en el que estoy actualemente estamos usando Rails 2.3, uno de los motivos de usar rails 2.3 es que nos venía muy bien la nueva feature &#8220;Nested Forms&#8221;, resultaque estuve dando vueltas con algunos problemas hasta que finalmente los saque funcionando bien.
Les cuento yo tengo un formulario para crear un user, el [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=268&subd=gastonramos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>En el proyecto en el que estoy actualemente estamos usando Rails 2.3, uno de los motivos de usar rails 2.3 es que nos venía muy bien la nueva feature &#8220;<strong>Nested Forms&#8221;</strong>, resultaque estuve dando vueltas con algunos problemas hasta que finalmente los saque funcionando bien.</p>
<p>Les cuento yo tengo un formulario para crear un user, el modelo de user es el siguiente:</p>
<pre>class User &lt; ActiveRecord::Base
   has_one :person, :as =&gt; :personable, :dependent =&gt; :destroy
   accepts_nested_attributes_for :person
....
end</pre>
<p>Es decir que un user tiene datos de contacto a travez de has_one :person (suena raro creo que se podría cambiar por has_one :contact_info, :class_name =&gt; &#8220;Person&#8221;) , y entonces el form era el siguiente:</p>
<pre>&lt;% form_for(:user, :url =&gt; users_path) do |f| -%&gt;

&lt;p&gt;&lt;%= label_tag 'login' %&gt;&lt;br/&gt;
&lt;%= f.text_field :login %&gt;&lt;/p&gt;

&lt;p&gt;&lt;%= label_tag 'password' %&gt;&lt;br/&gt;
&lt;%= f.password_field :password %&gt;&lt;/p&gt;

&lt;p&gt;&lt;%= label_tag 'password_confirmation', 'Confirm Password' %&gt;&lt;br/&gt;
&lt;%= f.password_field :password_confirmation %&gt;&lt;/p&gt;

&lt;% f.fields_for(:person) do |person_fields| %&gt;
  &lt;p&gt;&lt;%= person_fields.label :email %&gt;&lt;br/&gt;
  &lt;%= person_fields.text_field :email %&gt;&lt;/p&gt;

  &lt;p&gt;&lt;%= person_fields.label :first_name, 'First Name:' %&gt;&lt;br/&gt;
  &lt;%= person_fields.text_field :first_name %&gt;&lt;/p&gt;
&lt;% end %&gt;

&lt;p&gt;&lt;%= submit_tag 'Create User' %&gt;&lt;/p&gt;

&lt;% end -%&gt;</pre>
<p>Resulta que esto no me funcionó y me daba el siguiente error:</p>
<p>ActiveRecord::AssociationTypeMismatch (Person(#-619527948) expected, got HashWithIndifferentAccess(#-607513158)):</p>
<p>El problema puntual era que no generaba bien el form y en vez de generar esto:</p>
<pre>&lt;<span class="start-tag">input</span><span class="attribute-name"> id</span>=<span class="attribute-value">"user_person_attributes_first_name"
  </span><span class="attribute-name">name</span>=<span class="attribute-value">"user[person_attributes][first_name]" </span><span class="attribute-name">
  size</span>=<span class="attribute-value">"30" </span><span class="attribute-name">type</span>=<span class="attribute-value">"text" </span><span class="error"><span class="attribute-name">/</span></span>&gt;</pre>
<p>generaba esto:</p>
<pre>&lt;<span class="start-tag">input</span><span class="attribute-name"> id</span>=<span class="attribute-value">"user_person_first_name"
  </span><span class="attribute-name">name</span>=<span class="attribute-value">"user[person][first_name]" </span><span class="attribute-name">
  size</span>=<span class="attribute-value">"30" </span><span class="attribute-name">type</span>=<span class="attribute-value">"text" </span><span class="error"><span class="attribute-name">/</span></span>&gt;</pre>
<p>Y entonces daba el error por que ActiveRecord (Nested model) genera un método <strong>person_attributes=</strong> en modelo dónde declaramos el accepts_nested_attributes_for (user en este caso) y por eso el form anterior no funciona como era de esperar.</p>
<p>En el controller tenía lo siguiente:</p>
<pre>class UsersController &lt; ApplicationController
  def new
    @user = User.new(:person =&gt; Person.new)
  end

  def create
    @user = User.new(params[:user])
    @user.save
  end
.....
end</pre>
<p>La solución fue modificar el form y hacer así:</p>
<pre>&lt;% form_for @user do |f| -%&gt;

&lt;p&gt;&lt;%= label_tag 'login' %&gt;&lt;br/&gt;
&lt;%= f.text_field :login %&gt;&lt;/p&gt;

&lt;p&gt;&lt;%= label_tag 'password' %&gt;&lt;br/&gt;
&lt;%= f.password_field :password %&gt;&lt;/p&gt;

&lt;p&gt;&lt;%= label_tag 'password_confirmation', 'Confirm Password' %&gt;&lt;br/&gt;
&lt;%= f.password_field :password_confirmation %&gt;&lt;/p&gt;

&lt;% f.fields_for(:person) do |person_fields| %&gt;
  &lt;p&gt;&lt;%= person_fields.label :email %&gt;&lt;br/&gt;
  &lt;%= person_fields.text_field :email %&gt;&lt;/p&gt;

  &lt;p&gt;&lt;%= person_fields.label :first_name, 'First Name:' %&gt;&lt;br/&gt;
  &lt;%= person_fields.text_field :first_name %&gt;&lt;/p&gt;
&lt;% end %&gt;

&lt;p&gt;&lt;%= submit_tag 'Create User' %&gt;&lt;/p&gt;

&lt;% end -%&gt;</pre>
<p>cambié el</p>
<pre>&lt;% form_for(:user, :url =&gt; users_path) do |f| -%&gt;</pre>
<p>por</p>
<pre>&lt;% form_for @user do |f| -%&gt;</pre>
<p>El form para editar un user quedó prácticamente igual y funciona con los attributes de person y todo sin hacer nada del lado del controller. Ahora la pregunta es: Esta bien que nested_forms solamente funcione con la forma?:</p>
<pre>&lt;% form_for @user do |f| -%&gt; </pre>
<p>S<strong>i alguien tiene la respuesta que comente!</strong></p>
<p>Saludos</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/268/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=268&subd=gastonramos&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gastonramos.wordpress.com/2009/02/18/nested-forms-rails-23/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86112553d9846f4c7b16e8bfee1f28f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gastón Ramos</media:title>
		</media:content>
	</item>
		<item>
		<title>Tirar el código</title>
		<link>http://gastonramos.wordpress.com/2009/02/14/tirar-el-codigo/</link>
		<comments>http://gastonramos.wordpress.com/2009/02/14/tirar-el-codigo/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 17:38:04 +0000</pubDate>
		<dc:creator>Gastón Ramos</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[Agile]]></category>

		<guid isPermaLink="false">http://gastonramos.wordpress.com/2009/02/14/tirar-el-codigo/</guid>
		<description><![CDATA[Estoy leyendo un libro de Smalltalk y la verdad leí una frase que me encantó, así que quería dejar plasmada acá:
 &#8220;El código escrito es importante, pero mucho más importante es el conocimiento que vamos obteniendo conforme programamos. Si aprendemos día a día, probablemente el código viejo no sea bueno. Tirar código no es malo, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=264&subd=gastonramos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Estoy leyendo un libro de Smalltalk y la verdad leí una frase que me encantó, así que quería dejar plasmada acá:<br />
<em><strong> &#8220;El código escrito es importante, pero mucho más importante es el conocimiento que vamos obteniendo conforme programamos. Si aprendemos día a día, probablemente el código viejo no sea bueno. Tirar código no es malo, lo malo es no aprender a diario.&#8221;</strong></em></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/264/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=264&subd=gastonramos&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gastonramos.wordpress.com/2009/02/14/tirar-el-codigo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86112553d9846f4c7b16e8bfee1f28f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gastón Ramos</media:title>
		</media:content>
	</item>
		<item>
		<title>How Do You Plan Infrastructure?</title>
		<link>http://gastonramos.wordpress.com/2009/02/12/how-do-you-plan-infrastructure/</link>
		<comments>http://gastonramos.wordpress.com/2009/02/12/how-do-you-plan-infrastructure/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 11:39:08 +0000</pubDate>
		<dc:creator>Gastón Ramos</dc:creator>
				<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://gastonramos.wordpress.com/?p=252</guid>
		<description><![CDATA[Sigo con la lectura del libro de Kent Y Martin, ahora quiero compartir on Uds. una parte del capítulo 10 titulada &#8220;How Do You Plan Infrastructure?&#8221;:
&#8220;When you plan in a function-oriented, such as we suggest, the obvious question is how to deal with infrasctuture. Before we can start building functionality we have to put together [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=252&subd=gastonramos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Sigo con la lectura del <a href="http://www.amazon.com/Planning-Extreme-Programming-Kent-Beck/dp/0201710919/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1234264895&amp;sr=8-1">libro</a> de Kent Y Martin, ahora quiero compartir on Uds. una parte del capítulo 10 titulada <strong>&#8220;How Do You Plan Infrastructure?&#8221;</strong>:</p>
<p>&#8220;When you plan in a function-oriented, such as we suggest, the obvious question is how to deal with infrasctuture. Before we can start building functionality we have to put together the distributed object messaging infranstructure components before you deliver any customer functionality.</p>
<p><strong>This style of development is a common feature of the dead and dying projects</strong> we&#8217;ve seen-and we don&#8217;t think it&#8217;s a coincidence. Doing infrastructure without customer function leads to following risks:</p>
<ul>
<li>You spend a lot of time no delivering things that are valuable to the customer, wich straints the relationship with with customer.</li>
<li>You try to make the infrastructure cover everything you think you might need, wich leads to an overly complex infrastructure.</li>
</ul>
<p>Therefore, evolve the infrastructure as you build the functionality. For each iteration, build just enough infrastructure for the stories in that iteration. You won&#8217;t build a more complex infrastructure than you need, and the customer is engaged in building the infrastructure because she sees the dependent functionality as it&#8217;s evolving.&#8221;</p>
<p>Creo no hace falta agregar nada, sólo que estoy totalmente de acuerdo con lo que dice.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/252/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=252&subd=gastonramos&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gastonramos.wordpress.com/2009/02/12/how-do-you-plan-infrastructure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86112553d9846f4c7b16e8bfee1f28f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gastón Ramos</media:title>
		</media:content>
	</item>
		<item>
		<title>Overtime doesn&#8217;t help.</title>
		<link>http://gastonramos.wordpress.com/2009/02/10/overtime-doesnt-help/</link>
		<comments>http://gastonramos.wordpress.com/2009/02/10/overtime-doesnt-help/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 11:49:03 +0000</pubDate>
		<dc:creator>Gastón Ramos</dc:creator>
				<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://gastonramos.wordpress.com/?p=242</guid>
		<description><![CDATA[Hace poco comencé a leer el libro &#8220;Planning Extreme Programming&#8221; de Kent Beck y Martin Fowler (dos grosos) leyendo el capítulo 7 hay un párrafo que me gustó mucho y quería compartirlo, paso a detallar:
&#8220;Overtime doesn&#8217;t help. Although in the very short term it does speed up the team, if you do it for any [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=242&subd=gastonramos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hace poco comencé a leer el libro &#8220;<a title="Planning Extreme Programming" href="http://www.amazon.com/Planning-Extreme-Programming-Kent-Beck/dp/0201710919/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1234264895&amp;sr=8-1">Planning Extreme Programming</a>&#8221; de <strong>Kent Beck</strong> y <strong>Martin Fowler </strong>(dos grosos) leyendo el capítulo 7 hay un párrafo que me gustó mucho y quería compartirlo, paso a detallar:</p>
<p>&#8220;Overtime doesn&#8217;t help. Although in the very short term it does speed up the team, if you do it for any length of time you will get bitten badly. The big killer is motivation. It&#8217;s much better to have a motivated programmer work seven hours than a tired, distracted programmer work ten. Even if the programmers want to work long hours it&#8217;s not a good idea. <strong>Long hours make people tired, tired people make mistakes, and mistakes take time to fix.</strong> We&#8217;ve both gone into clients in the morning and spent all day chasing a bug that was put in a ten o&#8217;clock the previous night. Particularly with young Silicon Valley teams, where long hours are such an important tribal ritual,  we have to work hard to get people not to do overtime. <strong>If they really have no life, get them to play computer games in the evening instead</strong>. It&#8217;s much more productive to have castles mown by trebuchets than it is to slip bugs into complicated software.&#8221;</p>
<p>La verdad me encantó esta parte del capítulo, sobre todo por que en este último tiempo me he econtrado con varias personas que valoran el &#8220;overtime&#8221;  por más que ello no favorezca a que el sistema avance, y en lo personal trato de no trabajar fuera de hora o cuando estoy muy cansado.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/242/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&blog=1034400&post=242&subd=gastonramos&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gastonramos.wordpress.com/2009/02/10/overtime-doesnt-help/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86112553d9846f4c7b16e8bfee1f28f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gastón Ramos</media:title>
		</media:content>
	</item>
	</channel>
</rss>