<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Happy person, funny programmer



  var _gaq = _gaq || [];
  _gaq.push([‘_setAccount’, ‘UA-26144798-1’]);
  _gaq.push([‘_trackPageview’]);

  (function() {
    var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
  })();</description><title>fernando blat</title><generator>Tumblr (3.0; @blat)</generator><link>http://fernando.blat.es/</link><item><title>Fast, easy, realtime metrics using Redis bitmaps «</title><description>&lt;a href="http://blog.getspool.com/2011/11/29/fast-easy-realtime-metrics-using-redis-bitmaps/"&gt;Fast, easy, realtime metrics using Redis bitmaps «&lt;/a&gt;: &lt;p&gt;Bitmaps in Redis&lt;/p&gt;</description><link>http://fernando.blat.es/post/18082563957</link><guid>http://fernando.blat.es/post/18082563957</guid><pubDate>Wed, 22 Feb 2012 16:45:38 -0300</pubDate></item><item><title>Wat — Destroy All Software Talks</title><description>&lt;a href="https://www.destroyallsoftware.com/talks/wat"&gt;Wat — Destroy All Software Talks&lt;/a&gt;: &lt;p&gt;WAT?!?&lt;/p&gt;</description><link>http://fernando.blat.es/post/17730367150</link><guid>http://fernando.blat.es/post/17730367150</guid><pubDate>Thu, 16 Feb 2012 19:32:01 -0300</pubDate></item><item><title>Speed up Textmate</title><description>&lt;p&gt;Just a reminder: if you are working in a project with a lot of temporary files, let’s say uploaded images, don’t forget to ignore them in the properties of Textmate. In my case, igoring &lt;code&gt;public/uploads&lt;/code&gt; has make the difference.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzhshc1hNw1qz4y16.png"/&gt;&lt;/p&gt;
&lt;p&gt;My value for “File pattern” property:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;!(/\.(?!htaccess)[^/]*|\.(jpeg|jpg|png|gif|mp3|pdf|swf)|\.(tmproj|o|pyc)|\.log|/tmp\r|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;My value for “Folder pattern” property:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|log|tmp|pbxproj|xcode(proj)?|bundle|system|uploads))$&lt;/code&gt;&lt;/pre&gt;</description><link>http://fernando.blat.es/post/17712852494</link><guid>http://fernando.blat.es/post/17712852494</guid><pubDate>Thu, 16 Feb 2012 12:32:04 -0300</pubDate><category>textmate</category></item><item><title>a story for tomorrow. 
This video was written and produced while...</title><description>&lt;iframe src="http://player.vimeo.com/video/36519586" width="400" height="225" frameborder="0"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;a story for tomorrow. &lt;/p&gt;
&lt;p&gt;&lt;span&gt;This video was written and produced while traveling through Chile &amp; Patagonia with my girlfriend. We spent 5 weeks exploring this amazing country, and this is how we chose to document it. Thanks so much for checking it out.&lt;/span&gt;&lt;/p&gt;</description><link>http://fernando.blat.es/post/17581631507</link><guid>http://fernando.blat.es/post/17581631507</guid><pubDate>Mon, 13 Feb 2012 22:09:28 -0300</pubDate></item><item><title>99 problems but money ain't one - (37signals)</title><description>&lt;a href="http://37signals.com/svn/posts/3107-99-problems-but-money-aint-one"&gt;99 problems but money ain't one - (37signals)&lt;/a&gt;: &lt;blockquote&gt;
&lt;p&gt;&lt;span&gt;But if customers actually think about what a venture capital injection entails, it’s not all California Love. The company’s cash concerns might have (temporarily) vanished, but they’re replaced with a new list of problems.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://fernando.blat.es/post/17378823594</link><guid>http://fernando.blat.es/post/17378823594</guid><pubDate>Fri, 10 Feb 2012 15:20:04 -0300</pubDate></item><item><title>7 ideas sobre el caso Garzón | La Kancilleria - Blogs larioja.com</title><description>&lt;a href="http://blogs.larioja.com/lakancilleria/2012/02/10/7-ideas-sobre-el-caso-garzon/"&gt;7 ideas sobre el caso Garzón | La Kancilleria - Blogs larioja.com&lt;/a&gt;</description><link>http://fernando.blat.es/post/17374928435</link><guid>http://fernando.blat.es/post/17374928435</guid><pubDate>Fri, 10 Feb 2012 13:25:43 -0300</pubDate></item><item><title>Ajax for dummies</title><description>&lt;img src="http://28.media.tumblr.com/tumblr_lz6o4yHelJ1qz4y16o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Ajax for dummies&lt;/p&gt;</description><link>http://fernando.blat.es/post/17373039078</link><guid>http://fernando.blat.es/post/17373039078</guid><pubDate>Fri, 10 Feb 2012 12:24:32 -0300</pubDate><category>ajax</category></item><item><title>Blurred pair - palomaleca</title><description>&lt;img src="http://30.media.tumblr.com/tumblr_lz6j18q8CJ1qz4y16o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://flic.kr/p/axvaQg" target="_blank"&gt;Blurred pair - palomaleca&lt;/a&gt;&lt;/p&gt;</description><link>http://fernando.blat.es/post/17370315177</link><guid>http://fernando.blat.es/post/17370315177</guid><pubDate>Fri, 10 Feb 2012 10:34:19 -0300</pubDate></item><item><title>Encode Paypal IPN parameters to UTF-8 properly</title><description>&lt;p&gt;&lt;a href="http://www.paypal.com" target="_blank"&gt;Paypal&lt;/a&gt; sucks the most of the time, whenever it has the opportunity to demonstrate it. One of that chances are payment notifications, also known as IPN, and the encoding of the parameters.&lt;/p&gt;
&lt;p&gt;First of all, Paypal ignores the parameters charset that you send with all the purchase parameters, so, if you don’t change your settings in Paypal webpage, it is going to send you the parameters in &lt;code&gt;windows-1252&lt;/code&gt; encoding.&lt;/p&gt;
&lt;p&gt;Rails assumes that the world is fair and modern and works in &lt;code&gt;UTF-8&lt;/code&gt;, so when your application receives a request Rails sets the encoding of the parameters to &lt;code&gt;UTF-8&lt;/code&gt; without converting them.&lt;/p&gt;
&lt;p&gt;For example, if Paypal sends you the string &lt;em&gt;“Almería”&lt;/em&gt;, in your parameters you will see &lt;em&gt;“Almer\xEDa”&lt;/em&gt;, and if you ask for the encoding:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;"Almer\xEDa".encoding
 =&gt; #&lt;Encoding:UTF-8&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To fix it, the first thing is to reproduce this state:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;a = "Almería".encode("windows-1252").force_encoding("UTF-8")
a.encoding
 =&gt; #&lt;Encoding:UTF-8&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And then, try to get back to &lt;code&gt;UTF-8&lt;/code&gt;. Sadly this doesn’t work:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;a.encode("UTF-8")
 =&gt; "Almer\xEDa" 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want a detailed explanation, you can read &lt;a href="http://jalada.co.uk/2011/12/07/solving-latin1-and-utf8-errors-for-good-in-ruby.html" target="_blank"&gt;this post&lt;/a&gt;, which has help me a lot and has inspired me to get the solution:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
class Hash
  def encode_to_utf8
    copy_of_params = {}
    self.each do |k,v|
      copy_of_params[k] = fix_cp1252_utf8(v)
    end
    copy_of_params
  end

  private
  
  def fix_cp1252_utf8(text)
    text.force_encoding('windows-1252').encode('cp1252',
                :fallback =&gt; {
                  "\u0081" =&gt; "\x81".force_encoding("cp1252"),
                  "\u008D" =&gt; "\x8D".force_encoding("cp1252"),
                  "\u008F" =&gt; "\x8F".force_encoding("cp1252"),
                  "\u0090" =&gt; "\x90".force_encoding("cp1252"),
                  "\u009D" =&gt; "\x9D".force_encoding("cp1252")
                }).encode("utf-8")
  end
  
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So, when you receive the parameters from paypal notification, just call encode_to_utf8 to get the proper encoding back to your data.&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;(I know you love to use inject, but I don’t link so much to have to return the temporal hash inside the block :)&lt;/em&gt;&lt;/div&gt;</description><link>http://fernando.blat.es/post/17318291802</link><guid>http://fernando.blat.es/post/17318291802</guid><pubDate>Thu, 09 Feb 2012 11:32:05 -0300</pubDate><category>ruby</category><category>ruby on rails</category><category>paypal</category><category>ipn</category><category>encoding</category><category>utf-8</category></item><item><title>Apprentice.io Three Week Retrospective</title><description>&lt;a href="http://robots.thoughtbot.com/post/16382750772/apprentice-io-three-week-retrospective"&gt;Apprentice.io Three Week Retrospective&lt;/a&gt;</description><link>http://fernando.blat.es/post/17163960696</link><guid>http://fernando.blat.es/post/17163960696</guid><pubDate>Mon, 06 Feb 2012 16:40:44 -0300</pubDate><category>thoughtbot</category><category>ruby on rails</category></item><item><title>Modularized Association Methods in Rails 3.2</title><description>&lt;p&gt;&lt;a href="http://blog.hasmanythrough.com/2012/1/20/modularized-association-methods-in-rails-3-2" target="_blank"&gt;Modularized Association Methods in Rails 3.2&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span&gt;The real reason for this change is being able to compose your own methods with the standard generated methods. Before this change, you’d have to use &lt;/span&gt;&lt;code&gt;alias_method_chain&lt;/code&gt;&lt;span&gt; or some other fancy footwork to layer your own logic on top of the standard association functionality. Either that or you’d have to somehow duplicate the standard behavior in your own method. Ick. Now you can compose methods using inheritance and &lt;/span&gt;&lt;code&gt;super&lt;/code&gt;&lt;span&gt;, the way Alan Kay intended you to.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://fernando.blat.es/post/17163861712</link><guid>http://fernando.blat.es/post/17163861712</guid><pubDate>Mon, 06 Feb 2012 16:38:26 -0300</pubDate><category>ruby on rails</category><category>active model</category></item><item><title>Janki Method | Jack Kinsella - Rails Developer London</title><description>&lt;a href="http://www.jackkinsella.ie/2011/12/05/janki-method.html"&gt;Janki Method | Jack Kinsella - Rails Developer London&lt;/a&gt;</description><link>http://fernando.blat.es/post/16075944682</link><guid>http://fernando.blat.es/post/16075944682</guid><pubDate>Wed, 18 Jan 2012 18:09:23 -0300</pubDate></item><item><title>Por encima de las posibilidades ¿de quién?</title><description>&lt;a href="http://www.elpais.com/articulo/opinion/encima/posibilidades/quien/elpepiopi/20120117elpepiopi_6/Tes"&gt;Por encima de las posibilidades ¿de quién?&lt;/a&gt;: &lt;p&gt;&lt;a class="tumblr_blog" href="http://javiloureiro.com/post/16003959569" target="_blank"&gt;javiloureiro&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Cada vez que escucho el argumento de que hemos vivido por encima de nuestras posibilidades, quito el seguro de mi 8 mm.&lt;/p&gt;
&lt;p&gt;Francisco Pastor lo expresa perfectamente en esta carta publicada en El País.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Ahora estoy a punto de quedarme sin trabajo gracias a los que han vivido “por encima de nuestras posibilidades”. Ahora me piden “un esfuerzo más”. Yo siempre he pagado puntualmente la hipoteca y lo sigo haciendo así que no he hundido a la banca. Yo no he hecho bajar la Bolsa, no he hundido los mercados, no he inflado la economía, no he especulado con la vivienda, no he organizado carreras de coches en mi ciudad, no necesito un aeropuerto sin aviones, no tengo yate para ver la salida de la Copa América, no he ido nunca a ver la ópera en el Palau de les Arts. Yo no he deteriorado la escuela ni la sanidad públicas, no he tenido becas ni subvenciones, no he cobrado nunca el paro ni he provocado déficit al Estado, la autonomía ni la Seguridad Social. Yo no conozco a Moody’s, Fitch ni Standard &amp; Poor’s pero sí conozco a los que vivieron por encima de mis posibilidades. Yo no les voté, a mí no me representan.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;small&gt;(via &lt;a href="http://twitter.com/mariagps" target="_blank"&gt;mariagps&lt;/a&gt;)&lt;/small&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://fernando.blat.es/post/16004316264</link><guid>http://fernando.blat.es/post/16004316264</guid><pubDate>Tue, 17 Jan 2012 09:35:51 -0300</pubDate><category>la crisis</category></item><item><title>Machos</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lxx5nomFDI1qz4y16o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Machos&lt;/p&gt;</description><link>http://fernando.blat.es/post/15982369110</link><guid>http://fernando.blat.es/post/15982369110</guid><pubDate>Mon, 16 Jan 2012 22:33:24 -0300</pubDate></item><item><title>TEDxMadrid - Vicente Guallart - Redes de edificios...</title><description>&lt;iframe width="400" height="225" src="http://www.youtube.com/embed/WGozbiymBZc?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;TEDxMadrid - Vicente Guallart - Redes de edificios autosuficientes (by &lt;a href="http://www.youtube.com/watch?v=WGozbiymBZc&amp;feature=player_embedded#!" target="_blank"&gt;TEDxTalks&lt;/a&gt;)&lt;/p&gt;</description><link>http://fernando.blat.es/post/15975187804</link><guid>http://fernando.blat.es/post/15975187804</guid><pubDate>Mon, 16 Jan 2012 20:34:10 -0300</pubDate><category>tedxmadrid</category><category>edificios autosuficientes</category><category>urbanismo sostenible</category></item><item><title>Toldo: ¡Hola Chile!</title><description>&lt;a href="http://blog.tol.do/post/15945062182/hola-chile"&gt;Toldo: ¡Hola Chile!&lt;/a&gt;: &lt;p&gt;Ya podéis crear vuestra tienda on-line en Chile usando Dineromail!&lt;/p&gt;
&lt;p&gt;&lt;a class="tumblr_blog" href="http://blog.tol.do/post/15945062182/hola-chile" target="_blank"&gt;toldo&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hoy tenemos una gran noticia para compartir con vosotros:&lt;/p&gt;
&lt;p&gt;Si estás en Chile y quieres abrir una tienda en internet, desde hoy puedes hacerlo en Toldo.&lt;/p&gt;
&lt;p&gt;Hemos incorporado a nuestros sistemas de pago &lt;a href="http://www.dineromail.com/" title="Dineromail" target="_blank"&gt;DineroMail&lt;/a&gt;, la plataforma de pago online que mejor funciona en Chile. Con este sistema,…&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Lo voy a celebrar tomando este mote con huesillo:&lt;/p&gt;
&lt;p&gt;&lt;img height="500" src="http://farm8.staticflickr.com/7010/6696452113_77e62f5c0f_z.jpg" width="500"/&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;/blockquote&gt;</description><link>http://fernando.blat.es/post/15947295300</link><guid>http://fernando.blat.es/post/15947295300</guid><pubDate>Mon, 16 Jan 2012 12:09:00 -0300</pubDate><category>toldo</category><category>chile</category><category>dineromail</category></item><item><title>"Doing good engineering is not primarily making good decisions, it’s seeking good feedback..."</title><description>“Doing good engineering is not primarily making good decisions, it’s seeking good feedback which lets you quickly discard bad decisions.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="https://twitter.com/#!/KentBeck/status/157836025148882946" target="_blank"&gt;Kent Beck&lt;/a&gt;&lt;/em&gt;</description><link>http://fernando.blat.es/post/15899008104</link><guid>http://fernando.blat.es/post/15899008104</guid><pubDate>Sun, 15 Jan 2012 16:39:12 -0300</pubDate></item><item><title>El desvarío · ELPAÍS.com</title><description>&lt;a href="http://www.elpais.com/articulo/reportajes/desvario/elpepusocdmg/20120115elpdmgrep_1/Tes"&gt;El desvarío · ELPAÍS.com&lt;/a&gt;</description><link>http://fernando.blat.es/post/15895791995</link><guid>http://fernando.blat.es/post/15895791995</guid><pubDate>Sun, 15 Jan 2012 15:42:10 -0300</pubDate></item><item><title>F1 2012 season promo- Six world champions in track v2 (by...</title><description>&lt;iframe width="400" height="225" src="http://www.youtube.com/embed/blU5SgM7l1g?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;F1 2012 season promo- Six world champions in track v2 (by &lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;v=blU5SgM7l1g" target="_blank"&gt;Ikeraldai&lt;/a&gt;)&lt;/p&gt;</description><link>http://fernando.blat.es/post/15762403238</link><guid>http://fernando.blat.es/post/15762403238</guid><pubDate>Fri, 13 Jan 2012 01:57:53 -0300</pubDate><category>f1</category></item><item><title>"Con la crisis todos vamos a tener que ser emprendedores, nos guste o no" - Libre Mercado</title><description>&lt;a href="http://www.libremercado.com/2012-01-06/con-la-crisis-todos-vamos-a-tener-que-ser-emprendedores-nos-guste-o-no-1276446089/"&gt;"Con la crisis todos vamos a tener que ser emprendedores, nos guste o no" - Libre Mercado&lt;/a&gt;: &lt;p&gt;&lt;strong&gt;P: ¿Qué tres consejos daría a un emprendedor que esté empezando?&lt;/strong&gt;&lt;strong&gt;R: &lt;/strong&gt;Que tenga siempre perspectiva. La única manera de enfrentarte a problemas, desilusiones y errores es mirando más allá, siendo capaz de tener perspectiva sobre la realidad para poder contextualizar lo que sucede y superarlo. Y ser optimista. La crisis nos afecta a todos y nos obliga a trabajar más, esforzarnos más y sufrir más. La única manera de aguantar es con optimismo.&lt;/p&gt;
&lt;p&gt;Por ultimo, recomendaría no tomar como referente la gente que tienes cerca, en tu sector o tu país, sino personas o compañías de éxito internacional. Si siempre te mides con tu competencia cercana acabas siendo como ellos y progresando en pasos cortos y sin visión. Si te comparas con alguien de otra liga crecerás con visión y foco, darás pasos más largos.&lt;/p&gt;</description><link>http://fernando.blat.es/post/15617355994</link><guid>http://fernando.blat.es/post/15617355994</guid><pubDate>Tue, 10 Jan 2012 10:16:37 -0300</pubDate></item></channel></rss>

