<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<title>in web we trust</title>
<link>http://www.inwebwetrust.net</link>
<description>Fernando Blat's blog, developer at &lt;a href="http://www.lacoctelera.com"&gt;La Coctelera&lt;/a&gt;.</description>
<language>es-es</language>
<dc:subject>Economía</dc:subject>


<image>
	<url>http://s3.amazonaws.com/lcp/inwebwetrust/f/0fb274acbeca58bdf98c9be1c0347f4b.jpg</url>
	<title>in web we trust</title>
	<link>http://www.inwebwetrust.net</link>
</image>
<generator>the-shaker v0.1. More on http://www.the-shaker.com</generator>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/InWebWeTrust" type="application/rss+xml" /><item>
<title>No SQL</title>
<link>http://www.inwebwetrust.net/post/2009/07/04/no-sql</link>
<pubDate>2009-07-04T19:12:05+00:00</pubDate>
<content:encoded><![CDATA[<p>Lately, I have been so curious about <a href="http://www.computerworld.com/action/article.do?command=printArticleBasic&taxonomyName=Databases&articleId=9135086&taxonomyId=173">alternatives to relational databases</a>. Deeping a little bit exist a lot of interest about topics related with it.</p>
<p>The most important that I have found recently is the <a href="http://blog.oskarsson.nu/2009/06/nosql-debrief.html">NoSQL conference</a>, with lot of talks and information about <a href="http://project-voldemort.com/">Voldemort</a>, <a href="http://incubator.apache.org/cassandra/">Cassandra</a>, <a href="http://couchdb.apache.org/">CouchDB</a>, and so on.</p>
<p>You can find some notes about that <a href="http://developer.yahoo.net/blog/archives/2009/06/nosql_meetup.html">here</a>.</p>
<p>I'm still suspicous about all this technologies, specially because it implies a hard change in the way to model and consume data, moreover when SQL and RDMBs are very valid nowadays, and (for sure) they have a big future, but they offer a lot of advantages that you have to know in order to take advantage if you have the chance.</p>
<p><strong>Update:</strong></p>
<p>A great post about this topics: <a href="http://thinkvitamin.com/dev/should-you-go-beyond-relational-databases/">Should you go Beyond Relational Databases?</a></p>
]]></content:encoded>
<comments>
http://www.inwebwetrust.net/post/2009/07/04/no-sql#comentarios
</comments>
</item>
<item>
<title>Modeling entity relationships in a non-relational scenario</title>
<link>http://www.inwebwetrust.net/post/2009/06/27/modeling-entity-relationships-in-non-relational-scenario</link>
<pubDate>2009-06-27T18:22:58+00:00</pubDate>
<content:encoded><![CDATA[<p>Since I saw <a href="http://couchdb.apache.org/index.html">the presentation</a> about <a href="https://github.com/langalex/couch_potato/tree">Couch Potato</a>, a library for using <a href="http://couchdb.apache.org/index.html">CouchDB</a> with your Ruby applications I was very curious about how to map a relational schema (that is the most common way to model entities and their relationship) in a document / plain schema where each element has no relation with the others.</p>
<p>And at last, today I found a <a href="http://code.google.com/appengine/articles/modeling.html">cool post from Google</a> and it's <a href="http://wiki.apache.org/couchdb/EntityRelationship">equivalent for CouchDB</a>.</p>
<p>Now it's time to play with CouchDB!</p>
]]></content:encoded>
<comments>
http://www.inwebwetrust.net/post/2009/06/27/modeling-entity-relationships-in-non-relational-scenario#comentarios
</comments>
</item>
<item>
<title>Forcing I18n locale in a block</title>
<link>http://www.inwebwetrust.net/post/2009/06/11/tricks-for-i18n</link>
<pubDate>2009-06-11T18:32:16+00:00</pubDate>
<content:encoded><![CDATA[<p>If you work in a project with i18n maybe you found useful this small trick for forcing the locale in a block:</p>
<pre name="code" class="ruby">
 module I18n 
   class << self  
     def in_locale(new_locale, &block)
       old_locale = I18n.locale
       I18n.locale = new_locale
       yield
       I18n.locale = old_locale
     end
   end
 end
 </pre>
<p>This is very useful, for example, when you have to send a notification to a user in his locale, not in the current locale, so you have to do it in this way:</p>
<pre name="code" class="ruby">
   I18n.in_locale(@user) { UserMailer.deliver_new_comment(...) } 
 </pre>
<p>Hope it helps.</p>
]]></content:encoded>
<comments>
http://www.inwebwetrust.net/post/2009/06/11/tricks-for-i18n#comentarios
</comments>
</item>
<item>
<title>i18n_gettext</title>
<link>http://www.inwebwetrust.net/post/2009/02/16/i18n_gettext</link>
<pubDate>2009-02-16T07:25:29+00:00</pubDate>
<content:encoded><![CDATA[<p>Two weekends ago we celebrated the first <a href="http://rails-hackathon.org/">Rails Hackathon</a> in Madrid: the idea was to make groups of two or the people, select a ticket from the Rails core, and create a patch for it.</p>
<p><a href="http://www.samlown.com/">Sam Lown</a> and me, decided to work in a plugin for allowing compatibility between <a href="http://www.gnu.org/software/gettext/">GetText</a> and the new <a href="http://rails-i18n.org/">Rails i18n</a> support. The result is our beta plugin <a href="http://github.com/ferblape/i18n_gettext/tree/master">i18n_gettext</a>, which is still in development and we are trying in beta versions of <a href="http://unvlog.com">unvlog.com</a> and <a href="http://www.planetaki.com">planetaki.com</a>.</p>
<p>If you try it, any feedback will be wellcome.</p>
]]></content:encoded>
<comments>
http://www.inwebwetrust.net/post/2009/02/16/i18n_gettext#comentarios
</comments>
</item>
<item>
<title>Testing Twitter notifications</title>
<link>http://www.inwebwetrust.net/post/2009/01/30/testing-twitter-notifications</link>
<pubDate>2009-01-30T21:02:56+00:00</pubDate>
<content:encoded><![CDATA[<p>In <a href="http://www.lacoctelera.com">La Coctelera</a> we offer to the users the possibility to automatically update their <a href="http://www.twitter.com">Twitter</a> status with a link to the last post or the last published photos (shortly :).</p>
<p>The tests for notifying twitter are very easy if you use the powerful <a href="http://mocha.rubyforge.org/">Mocha</a> (in the beginning we tried to simulate the <code>Twitter::Base</code> class, but it gets a little bit more complicated):</p>
<pre name="code" class="ruby">
   def test_an_activity_of_new_photos_notify_in_twitter
     User.any_instance.stubs(:premium_role?).returns(true)
     User.any_instance.stubs(:twitter_photos?).returns(true)
     User.any_instance.stubs(:twitter_username).returns('wadus')
     User.any_instance.stubs(:twitter_password).returns('wadus')
     photo = photos(:photo_blat_1)
     a = activities(:activity1)
     Twitter::Base.any_instance.expects(:update).with("He subido una nueva foto a La Coctelera: #{photo.guid}").once
     a.notify_in_twitter
   end
 </pre>
<p>If you don't know Mocha you should learn to use it, in other case, you can  ignore this post :)</p>
<p>Also, I recommend you to watch this <a href="http://podcast.sdruby.com/podcasts/013_mocha_stubba.m4v">old screencast about Mocha</a>
</p>
]]></content:encoded>
<comments>
http://www.inwebwetrust.net/post/2009/01/30/testing-twitter-notifications#comentarios
</comments>
</item>
<item>
<title>Updating Query Memcached</title>
<link>http://www.inwebwetrust.net/post/2008/12/21/updating-query-memcached</link>
<pubDate>2008-12-21T18:52:01+00:00</pubDate>
<content:encoded><![CDATA[<p>After a lot of time without having time I decided to update <a href="http://github.com/ferblape/query_memcached/tree/master">query_memcached</a> plugin with a lot of changes that the github collaborators pushed some weeks ago.</p>
<p>These are the major changes:</p>
<ul>
<li>there was a bug that made the plugin don't work in some situations</li>
<li>the philosophy have changed a bit and now not all is magic, and you have to indicate in each model if it has to use cache or not</li>
<li>at last I could write down some tests</li>
</ul>
<p>It is important for you to update, specially if you where using the previous version.</p>
<p>Enjoy!</p>
]]></content:encoded>
<comments>
http://www.inwebwetrust.net/post/2008/12/21/updating-query-memcached#comentarios
</comments>
</item>
<item>
<title>Program your i-Buddy with Ruby</title>
<link>http://www.inwebwetrust.net/post/2008/11/23/program-your-i-buddy-with-ruby</link>
<pubDate>2008-11-23T11:43:32+00:00</pubDate>
<content:encoded><![CDATA[<p>This days I have been working on a small library for the <a href="http://www.i-buddy.com/">i-Buddy</a> device, a small gadget for MSN Messenger lovers, that you can connect to your computer through a USB port and has some functionality like light its head with different colours, light a small hearth, move the flaps and turn left or right.</p>
<p>The main attractive is the price (no more than 25 €) and the simplicity.</p>
<p><img class="imgcen" src="http://www.inwebwetrust.net/myfiles/inwebwetrust/Imagen-10.png" alt="" /></p>
<p>The library result of my work is <a href="https://github.com/ferblape/rubi-buddy/tree">rubi-buddy</a>, and works with Ruby and <a href="http://www.a-k-r.org/ruby-usb/">ruby-usb</a>, and its inspired in the one that <a href="http://11870.com/blog/i-buddy-en-11870com/">developed at 11870</a>.</p>
<p>The library is in progress, because I still have to implement the flap movement. Also, I want to add more examples in the project. At this moment there is only one that checks the response code from <a href="http://www.lacoctelera.com">La Coctelera</a> and turn the head light green or red.</p>
<p>If you are interested, I encourage you to use it and to add more examples.</p>
]]></content:encoded>
<comments>
http://www.inwebwetrust.net/post/2008/11/23/program-your-i-buddy-with-ruby#comentarios
</comments>
</item>
<item>
<title>Small tip for debugging Javascript in IE</title>
<link>http://www.inwebwetrust.net/post/2008/11/18/small-tip-for-debugging-javascript-in-ie</link>
<pubDate>2008-11-18T15:01:36+00:00</pubDate>
<content:encoded><![CDATA[<p>Today we had to find a small bug in La Coctelera's javascript: the bug was a hash with a colon after the last element. The problem was that, of course, it didn't work on IE 6 and don't have any debugger for Javascript installed on my Vmware.</p>
<p>The only information I had was the generic error (an object was expected), and the line and column where the mistake was. So I decide to understand how to find that line in all the linked javascript files.</p>
<p>My conclusions are that the line could be from the HTML resulted from loading the page, or that line in one of each javascript files. It is, you have to find that line in all your javascripts and in the result page (viewing the source code) and then try to deduce which of all causes the error.</p>
<p>If the number of line is big enough you could reject some files, but not always you'll be so lucky.</p>
<p>And that's what I have learnt today.</p>
]]></content:encoded>
<comments>
http://www.inwebwetrust.net/post/2008/11/18/small-tip-for-debugging-javascript-in-ie#comentarios
</comments>
</item>
<item>
<title>Application servers serving static files</title>
<link>http://www.inwebwetrust.net/post/2008/10/20/application-servers-serving-static-files</link>
<pubDate>2008-10-20T07:34:25+00:00</pubDate>
<content:encoded><![CDATA[<p>Since <a href="http://mongrel.rubyforge.org/" title="http://mongrel.rubyforge.org/" id=link_1>mongrel</a> and <a href="http://code.macournoyer.com/thin/" title="http://code.macournoyer.com/thin/" id=link_0>thin</a> appear as the people favorites application server (with all my respects to <a href="http://www.modrails.com">Passenger</a>), the configuration of webservers changed in order that you have a web server plus a kind of proxy and then a lot of application servers.</p>
<p>The idea is that, given a request, the webserver has to decide if it is an static or a dynamic url and then serve the request itself or pass it to the proxy of application servers.. </p>
<p>The problem is that, as thin and mongrel are also web servers, if you don't take care with the configuration your application server can be serving all the static files too and be busy when it has to attend a dynamic request, with all the problems it causes.</p>
<p>That's why for me is very surprising when you search in Google about Apache + Mongrel, for example, and you arrive to virtual hosts configurations that doesn't take this into account.</p>
<p>The rules are very easy:</p>
<pre>
 RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_URI} !/stylesheets/.* [NC]
 RewriteCond %{REQUEST_URI} !/images/.* [NC]
 RewriteCond %{REQUEST_URI} !/javascripts/.* [NC]
 RewriteCond %{REQUEST_URI} !.*\.js$ [NC]
 RewriteCond %{REQUEST_URI} !.*\.jpg$ [NC]
 RewriteCond %{REQUEST_URI} !.*\.gif$ [NC]
 RewriteCond %{REQUEST_URI} !.*\.css$ [NC]
 RewriteCond %{REQUEST_URI} !.*\.js$ [NC]
 RewriteCond %{REQUEST_URI} !.*\.png$ [NC]
 RewriteCond %{REQUEST_URI} !.*\.ico$ [NC]
 RewriteCond %{REQUEST_URI} !.*\.bmp$ [NC]
 RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
 </pre>
<p>And this is an example: in order to your needs you can tune this configuration including more filet ypes and static directories.</p>
<p>For nginx the rule is also very simple.</p>
<p>So, you know, don't forge to include rewrite rules for serving static files.
</p>
]]></content:encoded>
<comments>
http://www.inwebwetrust.net/post/2008/10/20/application-servers-serving-static-files#comentarios
</comments>
</item>
<item>
<title>Tagueame, the Rails Rumble application</title>
<link>http://www.inwebwetrust.net/post/2008/10/20/tagueame-the-rails-rumble-application</link>
<pubDate>2008-10-20T07:13:33+00:00</pubDate>
<content:encoded><![CDATA[<p><img src='http://www.inwebwetrust.net/myfiles/inwebwetrust/Imagen-9.png' width='332' height='111' class='imgcen'/></p>
<p>This weekend we have been <a href="http://railsrumble.com/">rumbling</a>, and as a result we present <a href="http://tagueame.r08.railsrumble.com/">Tagueame</a>. In a few words:</p>
<blockquote><p>Tagueame is a little experiment about socializing online opinions about your friends and family.</p></blockquote>
<p>Feel free to register and enjoy. It's very funny!
</p>
]]></content:encoded>
<comments>
http://www.inwebwetrust.net/post/2008/10/20/tagueame-the-rails-rumble-application#comentarios
</comments>
</item>
 
</channel>
</rss>
