<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Emphasized Insanity</title>
 <link href="http://blog.eizesus.com/feed/atom.xml" rel="self"/>
 <link href="http://blog.eizesus.com/"/>
 <updated>2010-03-09T22:42:49-05:00</updated>
 <id>http://blog.eizesus.com/</id>
 <author>
   <name>Elad Meidar</name>
   <email>elad@eizesus.com</email>
 </author>
 
 
 <entry>
   <title>Creating a Rails authentication system on Mongoid Part 3 - Password Resets</title>
   <link href="http://blog.eizesus.com/2010/03/creating-a-rails-authentication-system-on-mongoid-part-3-password-resets-8-3-2010"/>
   <updated>2010-03-08T00:00:00-05:00</updated>
   <id>http://gitready.com/2010/03/creating-a-rails-authentication-system-on-mongoid-part-3-password-resets-8-3-2010</id>
   <content type="html">&lt;p&gt;In the last &lt;a href=&quot;http://blog.eizesus.com/2010/03/creating-a-rails-authentication-system-on-mongoid-part-2-7-3-2010/&quot;&gt;post&lt;/a&gt; we added some functionality to our authentication system. We added a &amp;#8220;Remember me&amp;#8221; functionality to allow users to log in using a cookie and we also added an activation process that authenticates the email address we get from the user.&lt;/p&gt;
&lt;p&gt;On this post, i&amp;#8217;ll cover &lt;strong&gt;password resets&lt;/strong&gt;:&lt;/p&gt;
&lt;h4&gt;Password Resets&lt;/h4&gt;
&lt;p&gt;The logic behind a password reset process is rather simple, basically it is very similar to the &lt;strong&gt;activation&lt;/strong&gt; process we did before.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;We create some kind of a temporary (perishable) token that identifies the user who wishes to reset the password.&lt;/li&gt;
	&lt;li&gt;We send the user an email with a link that contains that token and leads to a page that allows the user to choose a new password.&lt;/li&gt;
	&lt;li&gt;We update the new password, and start dancing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;User.rb&lt;/h5&gt;
&lt;p&gt;First, we are going to add a field that will contain that reset token, and a method to generate it when required:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/325301.js?file=user.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;That&amp;#8217;s basically it.&lt;/p&gt;
&lt;h5&gt;UsersController&lt;/h5&gt;
&lt;p&gt;We need to add a few actions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;one to generate the token and trigger the reset password email.&lt;/li&gt;
	&lt;li&gt;one to show a &amp;#8220;reset password&amp;#8221; form with password and password confirmation field.&lt;/li&gt;
	&lt;li&gt;and last, an action to save the new password and log in the user. We can&amp;#8217;t use the &lt;code&gt;#update&lt;/code&gt; action because we need a little different behavior that i think is enough to justify a separate action: First we need to find the user record based on a token not by &lt;code&gt;id&lt;/code&gt; and second, we need to use our &lt;code&gt;logout_keeping_session&lt;/code&gt; to make sure no malicious changes are made to a logged in user if it exists.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The process will work like that:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The user will be able to go on a form and enter his email in case they forgot the password, that action will be &lt;code&gt;UsersController#forgot_password&lt;/code&gt;.&lt;/li&gt;
	&lt;li&gt;If the user entered a valid email address (and one that identifies a user on the application), then &lt;code&gt;UsersController#send_password_reset&lt;/code&gt; will generate a new reset token and send the user with reset instructions.&lt;/li&gt;
	&lt;li&gt;When the user follows the reset link on the email, they&amp;#8217;ll arrive on &lt;code&gt;UsersController#reset_password&lt;/code&gt; that will match the reset token from the &lt;span class=&quot;caps&quot;&gt;URI&lt;/span&gt; to a specific user on the system and allow the user to enter a new password if matched.&lt;/li&gt;
	&lt;li&gt;Once the user had changed and saved the password, they will be logged off and asked to re-login with their new password.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here&amp;#8217;s the current &lt;code&gt;UsersController&lt;/code&gt;:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/325973.js?file=users_controller.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;Source for the &lt;a href=&quot;http://gist.github.com/325981&quot;&gt;UsersController#forgot_password view&lt;/a&gt;, &lt;a href=&quot;http://gist.github.com/325982&quot;&gt;UsersController#send_password_reset view&lt;/a&gt;, &amp;#8220;UserMailer model&amp;#8221;http://gist.github.com/325983, &lt;a href=&quot;http://gist.github.com/325984&quot;&gt;Reset instructions mail template&lt;/a&gt; and &lt;a href=&quot;http://gist.github.com/325986&quot;&gt;UsersController#reset_password&lt;/a&gt; added.&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;Again, it seems that we tackled most of the problems we had with Mongoid in the early stages and practically nothing bothered us too much since the first part of this series.&lt;/p&gt;
&lt;p&gt;I keep the implementation of a background processor until a bit later, it is not that important at this stage so we&amp;#8217;ll get back to it later.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Creating a Rails authentication system on Mongoid Part 2 - Remember me and Account activation</title>
   <link href="http://blog.eizesus.com/2010/03/creating-a-rails-authentication-system-on-mongoid-part-2-7-3-2010"/>
   <updated>2010-03-07T00:00:00-05:00</updated>
   <id>http://gitready.com/2010/03/creating-a-rails-authentication-system-on-mongoid-part-2-7-3-2010</id>
   <content type="html">&lt;p&gt;On the first part of &lt;a href=&quot;http://blog.eizesus.com/2010/03/creating-a-rails-authentication-system-on-mongoid/&quot;&gt;Creating a Rails authentication system on Mongoid&lt;/a&gt; we tackled the basic structure of our authentication system. In this part we&amp;#8217;ll tackle our need in creating a &amp;#8220;Remember me&amp;#8221; functionality to allow users to login from a cookie and a basic account activation process.&lt;/p&gt;
&lt;p&gt;As a general thumb rule to this experience we try not to re-invent the wheel when we can, which basically means that we look at the existing authentication libraries source code and try to see if it has some kind of a problem on Mongo, if it doesn&amp;#8217;t we use it and i if does we fix it as you read in the first part.&lt;/p&gt;
&lt;p&gt;Out of all the authentication libraries we examined (and dropped for this cause) the one i liked the most and in my opinion the simplest yet complete is &amp;#8220;Restful Authentication&amp;#8221;, so we chose it as our base line and we use code snippets from it when ever we can.&lt;/p&gt;
&lt;h4&gt;Remember me?&lt;/h4&gt;
&lt;p&gt;The remember me functionality allows the user to login using a generated token that is found on a cookie we create, this allows the user to login without putting his user name and password &lt;strong&gt;everytime&lt;/strong&gt; they want to login as long as the cookie was not expired.&lt;/p&gt;
&lt;p&gt;The first thing we need to do to allow a login from cookie, is to get our User model familiar with some new fields and methods to make that process possible.&lt;/p&gt;
&lt;p&gt;First, we need to add a few fields to our user document and a add a few methods to instance and class, this is our new &lt;code&gt;User.rb&lt;/code&gt;:&lt;/p&gt;
&lt;h5&gt;User.rb changes&lt;/h5&gt;
&lt;p&gt;We changed &lt;code&gt;User.rb&lt;/code&gt; a bit:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324635.js?file=User.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;We &lt;strong&gt;added 2 fields&lt;/strong&gt;, &lt;code&gt;remember_token_expires_at&lt;/code&gt; and &lt;code&gt;remember_token&lt;/code&gt;, both to keep a token and and an expiry limit.&lt;br /&gt;
We also added the following instance methods:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;remember_token?&lt;/strong&gt; &amp;#8211; determines if a token should and can be remembered.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;remember_me&lt;/strong&gt; &amp;#8211; generates and saves the token and expiry limit.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;refresh_token&lt;/strong&gt; &amp;#8211; creates a new token.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;forget_me&lt;/strong&gt; &amp;#8211; cleans the token and expiry limit fields.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;we also added the following class methods:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;User.secure_digest&lt;/strong&gt; &amp;#8211; a wrapper to our encryption method.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;User.make_token&lt;/strong&gt; &amp;#8211; generates a new token.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now that we changed some of the options for our session management, we will need to update &lt;code&gt;sessions_controller&lt;/code&gt; and &lt;code&gt;application_controller&lt;/code&gt; as well.&lt;/p&gt;
&lt;h5&gt;ApplicationController changes&lt;/h5&gt;
&lt;p&gt;In the end of Part 1, i gave an example to some methods that should be on &lt;code&gt;application_controller&lt;/code&gt; in order to make the session management and the entire authentication process easier. Since those were just examples and were meant barely to support basic usage, we will need to go through it a bit more seriously and create a more precise and smart &lt;code&gt;application_controller&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In this case, we can simply grab all the methods from Restful Authentication&amp;#8217;s &lt;code&gt;authentication.rb&lt;/code&gt; module, and weld it to our &lt;code&gt;application_controller&lt;/code&gt;:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324641.js?file=application_controller.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;we added a few methods and changed a few existing ones, this is pretty straight forward and basically a 1:1 copy from Restful Authentication, the only important thing to really pay attention to are the &lt;code&gt;current_user&lt;/code&gt; and the &lt;code&gt;current_user=&lt;/code&gt; which are different than what we had in my previous example and now takes more into consideration (cookies and HTTPauth for example.)&lt;/p&gt;
&lt;p&gt;Since now we have a getter for &lt;code&gt;current_user&lt;/code&gt; we need to change our &lt;code&gt;sessions_controller&lt;/code&gt; too.&lt;/p&gt;
&lt;h5&gt;SessionsController changes&lt;/h5&gt;
&lt;p&gt;This is our current &lt;code&gt;sessions_controller&lt;/code&gt;:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324647.js?file=sessions_controller.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;note the &amp;#8220;remember me&amp;#8221; functionality consideration and the usage of our cookie-based-login methods from &lt;code&gt;application_controller&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now you can simply add a checkbox named &amp;#8220;remember_me&amp;#8221; to your &lt;code&gt;SessionsController#new&lt;/code&gt; form, but i am sure you can do that without a gist :)&lt;/p&gt;
&lt;h4&gt;Activation&lt;/h4&gt;
&lt;p&gt;&amp;#8220;Account Activation&amp;#8221; is generally a process that is meant to make sure the user who filled the registration form really has access to the email account by sending that address a message with a token-generated link that upon clicked, proves ownership of this email address and activates the account.&lt;/p&gt;
&lt;h5&gt;User.rb&lt;/h5&gt;
&lt;p&gt;We had to find a solution to annotate the user instance with it&amp;#8217;s current activation status, with that given we figured we have 2 options to tackle it:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;simple add a boolean field to store the current activation status&lt;/li&gt;
	&lt;li&gt;use some kind of a state machine that will allow us some more flexibility later&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Bearing in mind that we won&amp;#8217;t need more than a single status, we decided to go with the first option and simply add an &lt;code&gt;active&lt;/code&gt; boolean field, an &lt;code&gt;activation_code&lt;/code&gt; token field and an &lt;code&gt;activated_at&lt;/code&gt; timestamp. we also added those fields to our &lt;code&gt;attr_protected&lt;/code&gt; list since we don&amp;#8217;t really want them changed by mass-assignment.&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324659.js?file=user.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;We also added a simple &lt;code&gt;before_create&lt;/code&gt; methods that will generate an activation token for our user and a method to &lt;code&gt;activate!&lt;/code&gt; the user.&lt;/p&gt;
&lt;p&gt;Given the key step in an activation process is the step where your application sends the user an email message with the activation link so we&amp;#8217;ll need to find a good way to send out an activation email when a user is created.&lt;/p&gt;
&lt;p&gt;As far as outgoing emails best practices goes, it&amp;#8217;s better not to preform the &lt;code&gt;ActionMailer#deliver_...&lt;/code&gt; method in the controller itself, but to:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Use an observer that will send that email when the current callback is fired. In our case that would be an &lt;code&gt;after_create&lt;/code&gt; observer on the User model.&lt;/li&gt;
	&lt;li&gt;Offload the task to some kind of a background processor such as DelayedJob or Resque.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A quick check in the Mongoid source-code revealed that we don&amp;#8217;t have support for Observers so that option is ruled out (again, until a patch arrives). As for a background processor, while DelayedJob has an ActiveRecord dependency Resque is pretty much free and relies on Redis so we decided to use Resque in our application.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ll cover the email management on one of the next posts, but for now we&amp;#8217;ll just use an &lt;code&gt;after_create&lt;/code&gt; callback on the User model that will perform a regular &lt;code&gt;ActionMailer&lt;/code&gt; delivery.&lt;/p&gt;
&lt;h5&gt;UsersController changes (and a bonus mailer)&lt;/h5&gt;
&lt;p&gt;Since we take care of the email notification on the model level (for now, until we offload it to a background processor later) we don&amp;#8217;t need to change our &lt;code&gt;UsersController#create&lt;/code&gt; methods, but we do need to add an action that will take care of the activation for us:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324700.js?file=users_controller.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;Remember to update your routes and either:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;add a &lt;code&gt;:collection =&amp;gt; {:activate =&amp;gt; :get}&lt;/code&gt; to your &lt;code&gt;map.users&lt;/code&gt; routes.&lt;/li&gt;
	&lt;li&gt;add a named route like &lt;code&gt;map.activate '/users/activate/:activation_code, :controller =&amp;gt; 'users', :action =&amp;gt; 'activate'&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;we chose to add a &lt;strong&gt;named route&lt;/strong&gt;, just because it makes more sense and that the &lt;code&gt;activate&lt;/code&gt; action is not a collection action, but not one that requires an &lt;code&gt;id&lt;/code&gt; too.&lt;/p&gt;
&lt;p&gt;Here are a &lt;a href=&quot;http://gist.github.com/324719&quot;&gt;sample user mailer&lt;/a&gt; and an &lt;a href=&quot;http://gist.github.com/324722&quot;&gt;activation mail view&lt;/a&gt; if you really need them :)&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;In this part we didn&amp;#8217;t ran into &lt;strong&gt;that&lt;/strong&gt; many issues because we use Mongoid, the only real problem was the lack of observers but since we are going to offload the email sending process to a background processor, it doesn&amp;#8217;t really matter.&lt;br /&gt;
In the next part, we&amp;#8217;ll tackle password resets and background processing.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Creating a Rails authentication system on Mongoid - Part 1</title>
   <link href="http://blog.eizesus.com/2010/03/creating-a-rails-authentication-system-on-mongoid"/>
   <updated>2010-03-06T00:00:00-05:00</updated>
   <id>http://gitready.com/2010/03/creating-a-rails-authentication-system-on-mongoid</id>
   <content type="html">&lt;h4&gt;Preface&lt;/h4&gt;
&lt;p&gt;A few days ago we started our first real all-&lt;a href=&quot;http://www.mongodb.org&quot;&gt;MongoDB&lt;/a&gt; project at &lt;a href=&quot;http://www.nautilus6.com&quot;&gt;Nautilus6&lt;/a&gt;.&lt;br /&gt;
Up until now we used Mongo only on small time projects, ones that hardly required any data storage at all so this is practically the first real project that we will try (and hopefully succeed) to deploy with Mongo as the data layer.&lt;/p&gt;
&lt;p&gt;Since we use Rails on this project (Duh) we had to choose between the existing MongoDB adapters for rails:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/jnunemaker/mongomapper&quot;&gt;MongoMapper&lt;/a&gt; &amp;#8211; Which is pretty slick, has some plugin support but also replicates some of the familiar ActiveRecord functionality like: Dirty Attributes, Dynamic finders and magic timestamp attributes.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/durran/mongoid&quot;&gt;Mongoid&lt;/a&gt; &amp;#8211; the new child, missing some features from MM (dirty attributes, dynamic finders for example) but does cover some ActiveRecord wonders MM doesn&amp;#8217;t: Versioning, named scopes and better validation options. MongoId also supports a master/slave infrastructure which might be useful.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We decided to go with Mongoid due to the fact that i kind of like the code base better. Yes, it&amp;#8217;s young and not perfect but i still get the impression of &amp;#8220;we should do this thing right&amp;#8221; rather than the &amp;#8220;I want everything now&amp;#8221; approach (again, a matter of personal preference at the end, keep your flames away).&lt;/p&gt;
&lt;h5&gt;Our Goal: Authentication System&lt;/h5&gt;
&lt;p&gt;This is kind of funny, but this is our 3rd project that relies on MongoDB, and yet the first one to actually require authentication of some kind.&lt;/p&gt;
&lt;p&gt;Before getting into the options we have to choose from on the ruby library scope, there&amp;#8217;s a point to be made on our decision to use MongoDB as the database of choice:&lt;/p&gt;
&lt;p&gt;We want to :)&lt;/p&gt;
&lt;p&gt;Yeah, i know this is not enough and basically not a really good reason, but considering the fact that the other option we have is to use another relational database just for the user model sounds pretty ugly but with that being said, we might result just back to that.&lt;/p&gt;
&lt;h5&gt;Current state of Authentication gems/plugins in Rails&lt;/h5&gt;
&lt;p&gt;There are several widely used authentication libraries: Authlogic, RestfulAuth and the NiftyGenerators generators, and warden/devise that play around the Rack spaces.&lt;br /&gt;
While trying to use Authlogic and RestfulAuth we came across some serious difficulties due to the fact that those 2 libraries are simply, way over, deep in ActiveRecord.&lt;br /&gt;
We tried some hacking around but when we figured out it ain&amp;#8217;t going to go anywhere anytime soon, we pushed it out to a side project and hopefully some day we&amp;#8217;ll release those libraries with some decent Mongo based support.&lt;/p&gt;
&lt;p&gt;As for warden/devise, they are simple to use and devise even has a MongoMapper extension but since we decided not to use MongoMapper it had zero contribution to our efforts.&lt;br /&gt;
Personally, i am not a fan of Rack based authentication management. Not going too deep in it i&amp;#8217;ll just say that it feels like authentication/registration belongs on another level than on the actual request level (authorization can easily fit right in there on the other hand). On top of that i added some weird feeling when looking into the actual code base that looked rather constricted (yet effective) and the fact that i know some people that are having constant issues with those gems.&lt;/p&gt;
&lt;p&gt;The lone survivor to this library hunting massacre was NiftyGenerators, being really simple and has absolutely no strings attached to the actual &lt;span class=&quot;caps&quot;&gt;ORM&lt;/span&gt; in use, it was chosen to be the base line for our authentication system.&lt;/p&gt;
&lt;p&gt;Yes, we will have to code all those fancy shinies the other libraries magically weld into our code (Activation, confirmation etc. etc.) but it really feels like that something needs to be done with MongoDB on that matter.&lt;/p&gt;
&lt;h4&gt;Setting up MongoId&lt;/h4&gt;
&lt;h5&gt;Install&lt;/h5&gt;
&lt;p&gt;First thing you really want to do is to add &lt;code&gt;mongoid&lt;/code&gt; and maybe the &lt;code&gt;mongo_ext&lt;/code&gt; gems to your &lt;code&gt;gemfile&lt;/code&gt; and after run &lt;code&gt;bundle install&lt;/code&gt;:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324100.js?file=gemfile&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;em&gt;Side note:&lt;/em&gt; you should consider specifying a version on your own file, this is just for example.&lt;/p&gt;
&lt;h5&gt;Configuration&lt;/h5&gt;
&lt;p&gt;first, create &lt;code&gt;config/database.mongo.yml&lt;/code&gt;:&lt;br /&gt;
&lt;script src=&quot;http://gist.github.com/324102.js?file=mongoid.yml&quot;&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;next, you&amp;#8217;ll need to remove your &lt;code&gt;active_record&lt;/code&gt; framework initialization from &lt;code&gt;config/environment.rb&lt;/code&gt;&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324105.js?file=env.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;strong&gt;DO &lt;span class=&quot;caps&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;REMOVE&lt;/span&gt; database.yml, some plugins still need it there even if you don&amp;#8217;t use it (Cucumber&amp;#8217;s generators for example)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now add an initializer to load your Mongo environment on &lt;code&gt;config/initializers/mongo.rb&lt;/code&gt;:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324106.js?file=mongo.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;em&gt;Side note:&lt;/em&gt; make sure you are pointing to your own &lt;span class=&quot;caps&quot;&gt;YAML&lt;/span&gt; configuration file.&lt;/p&gt;
&lt;h4&gt;Nifty Generators &amp;#8211; Authentication&lt;/h4&gt;
&lt;h5&gt;Make me some skeletons!&lt;/h5&gt;
&lt;p&gt;To generate the user model, sessions and the entire Nifty authentication entities, run:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324109.js?file=gistfile1.txt&quot;&gt;&lt;/script&gt;&lt;p&gt;Some files will be created but the operation will die out with &lt;code&gt;uninitialized constant Rails::Generator::Commands::Base::ActiveRecord&lt;/code&gt;. Yeah, it&amp;#8217;s right, we don&amp;#8217;t have active record around and we are not going to use migrations at all since we use Mongo.&lt;/p&gt;
&lt;p&gt;We need to create our &lt;code&gt;user.rb&lt;/code&gt; manually.&lt;/p&gt;
&lt;h5&gt;Create user.rb manually&lt;/h5&gt;
&lt;p&gt;This is our &lt;code&gt;user.rb&lt;/code&gt; matched to mongoid&amp;#8217;s limitations:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324110.js?file=user.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;2 notes on that model:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;attr_accessible&lt;/strong&gt; &amp;#8211; Mongoid does not support &lt;code&gt;attr_accessible&lt;/code&gt;, we&amp;#8217;ll have to find another way to handle that (that of course, before we patch Mongoid).&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Validations&lt;/strong&gt; &amp;#8211; some validations in the original NiftyGenerators&amp;#8217;s model, have the &lt;code&gt;:on =&amp;gt; :create&lt;/code&gt; option, which Mongoid does not support. That&amp;#8217;s why we added the &lt;code&gt;check_password&lt;/code&gt; custom validator, and we run it only if it&amp;#8217;s a &lt;code&gt;new_record?&lt;/code&gt;. Yeah, another patch will come soon.&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;attr_protected for Mongoid::Document&lt;/h5&gt;
&lt;p&gt;So after we found out we can&amp;#8217;t use &lt;code&gt;attr_accessible&lt;/code&gt; with Mongoid, we had to see how can we implement it. Personally, i prefer &lt;code&gt;attr_protected&lt;/code&gt; over &lt;code&gt;attr_accessible&lt;/code&gt; since i always forget to add new fields to the list, which when dealing with mongo it is even easier to forget due to the lack of migrations.&lt;br /&gt;
Futher more, there are usually less fields you want to block than those you actually want to pass so it makes more sense to keep a short list rather than a long list.&lt;/p&gt;
&lt;p&gt;We extended &lt;code&gt;Mongoid::Document&lt;/code&gt; with &lt;code&gt;Mongoid::Document::ProtectedAttributes&lt;/code&gt; to allow the usage of &lt;code&gt;attr_protected&lt;/code&gt; and we created it in &lt;code&gt;lib/mongoid_protected_attributes.rb&lt;/code&gt;:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324131.js?file=mongoid_protected_attrs.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;We need to require it in order for it to work so we&amp;#8217;ll add this to our Mongo initializer in &lt;code&gt;config/initializers/mongo.rb&lt;/code&gt;:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324133.js?file=mongo.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;Now we simply add this on top of our &lt;code&gt;user.rb&lt;/code&gt;:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324133.js?file=user.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;Yay! now we can haz &lt;code&gt;attr_protected&lt;/code&gt;.&lt;/p&gt;
&lt;h5&gt;End of Part 1&lt;/h5&gt;
&lt;p&gt;By now you should be able to register and log in successfully, you might want to have an &lt;code&gt;application_controller&lt;/code&gt; that has some or all of those methods:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/324138.js?file=application_controller.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;On the next post i&amp;#8217;ll cover our fight to enable confirmation/activation.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Bag O' Links - 4/3/2010</title>
   <link href="http://blog.eizesus.com/2010/03/bag-o-links-4-3-2010"/>
   <updated>2010-03-04T00:00:00-05:00</updated>
   <id>http://gitready.com/2010/03/bag-o-links-4-3-2010</id>
   <content type="html">&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://ryanbigg.com/2010/03/testing-facebook/&quot;&gt;Testing Facebooker in Rails&lt;/a&gt; &amp;#8211; Facebooker claims another victim, this time it&amp;#8217;s &lt;a href=&quot;http://twitter.com/ryanbigg&quot;&gt;Ryan Bigg&lt;/a&gt; that puts up a hell of a fight.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.cdncatalog.com/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;CDN&lt;/span&gt; Catalog&lt;/a&gt; &amp;#8211; &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; and Javascript &lt;span class=&quot;caps&quot;&gt;CDN&lt;/span&gt; resources.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.alfajango.com/blog/performance-tuning-for-phusion-passenger-an-introduction/&quot;&gt;Performance tuning for Passenger&lt;/a&gt; &amp;#8211; some good tips.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://googlewebmastercentral.blogspot.com/2010/03/googles-seo-report-card.html&quot;&gt;Google&amp;#8217;s &lt;span class=&quot;caps&quot;&gt;SEO&lt;/span&gt; report card&lt;/a&gt; &amp;#8211; an internal document that is supposed to point some good &lt;span class=&quot;caps&quot;&gt;SEO&lt;/span&gt; practices.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://therealadam.com/archive/2010/03/02/a-quick-rvm-rundown/&quot;&gt;Quick &lt;span class=&quot;caps&quot;&gt;RVM&lt;/span&gt; rundown&lt;/a&gt; &amp;#8211; easy tutorial on installing multiple versions of ruby on your machine.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://lunarlogicpolska.com/blog/2010/02/15/mysql-and-mongodb-working-together-in-kanbanery&quot;&gt;MongoDB and MySQL play along with DataMapper&lt;/a&gt; &amp;#8211; this is actually quiet a nice solution.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.smashingmagazine.com/2010/02/13/the-definitive-guide-to-styling-web-links/&quot;&gt;Designing web links &amp;#8211; a definitive guide&lt;/a&gt; &amp;#8211; a smashing note from SmashingMagazine.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.webdesignerwall.com/trends/47-amazing-css3-animation-demos/#more-455&quot;&gt;Crazy CSS3 stuff&lt;/a&gt; &amp;#8211; seriously impressed.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/guestdfd1ec/design-patterns-for-distributed-nonrelational-databases&quot;&gt;Design patterns for noSQL databases&lt;/a&gt; &amp;#8211; important read if you are going to use it.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://weblog.jamisbuck.org/2010/3/2/unobtrusive-yet-explicit&quot;&gt;Unobtrusive, yet explicit&lt;/a&gt; &amp;#8211; &lt;span class=&quot;caps&quot;&gt;UJS&lt;/span&gt; in Rails3.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://arstechnica.com/business/data-centers/2010/02/what-second-life-can-teach-all-companies-about-scaling-web-apps.ars/&quot;&gt;What SecondLife can teach you about scaling&lt;/a&gt; &amp;#8211; a lot, and even &lt;a href=&quot;http://www.mvdirona.com/jrh/talksAndPapers/JamesRH_Lisa.pdf&quot;&gt;Microsoft&lt;/a&gt; has some good pointers.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.seriesseed.com/&quot;&gt;SeriesSeed&lt;/a&gt; &amp;#8211; some documents to help you in the process of financing your startup, incorporation and stuff included.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Treasures&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/adzap/validates_timeliness&quot;&gt;validates_timeliness&lt;/a&gt; &amp;#8211; Date and time validation plugin for Rails 2.x and allows custom date/time formats (in case you use a string input too, and not one of the Date/Time selectors).&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/keithnorm/Rubex&quot;&gt;Rubex&lt;/a&gt; &amp;#8211; In the past few days &lt;a href=&quot;http://rubular.com&quot;&gt;Rubular&lt;/a&gt; was sick, this is a simple sinatra replica you can use instead.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://erector.rubyforge.org/index.html&quot;&gt;erector&lt;/a&gt; &amp;#8211; Erector is a Builder-like view framework&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/samdanavia/ambitious_query_indexer&quot;&gt;ambitious_query_indexer&lt;/a&gt; &amp;#8211; another attempt to get a hit on database indexes in a Rails application.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://bit.ly/aEw0xP&quot;&gt;seo_checker&lt;/a&gt; &amp;#8211; check your rails apps &lt;span class=&quot;caps&quot;&gt;SEO&lt;/span&gt; grade.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/pivotal/jasmine-ruby&quot;&gt;jasmin-ruby&lt;/a&gt; and &lt;a href=&quot;http://github.com/pivotal/jasmine&quot;&gt;jasmin&lt;/a&gt; &amp;#8211; &lt;span class=&quot;caps&quot;&gt;DOM&lt;/span&gt;-less simple JavaScript testing framework.&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>Bag O' Links - 1/3/2010</title>
   <link href="http://blog.eizesus.com/2010/03/bag-o-links-1-3-2010"/>
   <updated>2010-03-01T00:00:00-05:00</updated>
   <id>http://gitready.com/2010/03/bag-o-links-1-3-2010</id>
   <content type="html">&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://drnicwilliams.com/2010/02/25/customized-google-forms/&quot;&gt;Customized Google forms with Heroku&lt;/a&gt; &amp;#8211; google say no to themes and fancy stuff? Nic says Aye!&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://gnoted.com/3-hacks-for-firefox-double-internet-browsing-speed/&quot;&gt;3 firefox hacks for some speed&lt;/a&gt; &amp;#8211; nice, but i think the thing you want the most is a 4GB&amp;lt; dev machine.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.robbyonrails.com/articles/2008/12/14/launching-ruby-on-rails-projects-a-checklist&quot;&gt;Launching a Rails Application &amp;#8211; Checklist&lt;/a&gt; &amp;#8211; a rather old entry form PlantArgon but still catches, we should probably post ours too.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://blog.jayfields.com/2010/02/maintainability-of-unit-tests.html&quot;&gt;The maintainability of Unit Tests&lt;/a&gt; &amp;#8211; long runs and test breaking when you refactor your code can simply be a reference to you, doing it wrong. but good points overall.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://szeryf.wordpress.com/2010/03/01/custom-shoulda-macros-a-tutorial/&quot;&gt;Writing shoulda macros&lt;/a&gt; &amp;#8211; a brief tutorial.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://news.ycombinator.com/item?id=1157864&quot;&gt;Command line utilities for Mac OS&lt;/a&gt; &amp;#8211; geeks unleashed.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://agilezen.com/&quot;&gt;AgileZen&lt;/a&gt;? &amp;#8211; might be a nice tool, if i&amp;#8217;ll get overconfused with PT.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://alexyoung.org/2009/10/22/javascript-dsl/&quot;&gt;Fear and loathing in Javascript &lt;span class=&quot;caps&quot;&gt;DSL&lt;/span&gt;&lt;/a&gt; &amp;#8211; love your rubies.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://eloquentjavascript.net/&quot;&gt;Eloquent Javascript&lt;/a&gt; &amp;#8211; a book that aims to teach javascript programming, looks pretty solid with a nice coverage on it.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://jgn.heroku.com/2010/02/28/rapid-prototyping-with-haml-sass-and-ruby/&quot;&gt;Rapid prototyping with &lt;span class=&quot;caps&quot;&gt;HAML&lt;/span&gt;, &lt;span class=&quot;caps&quot;&gt;SASS&lt;/span&gt; and Ruby&lt;/a&gt; &amp;#8211; argh, i don&amp;#8217;t like either &lt;span class=&quot;caps&quot;&gt;HAML&lt;/span&gt; or &lt;span class=&quot;caps&quot;&gt;SASS&lt;/span&gt; (yeah, i know), but this article does show some nice time saving techniques for those of you that prefer to burn in hell :).&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://rfw.posterous.com/how-nodejs-saved-my-web-application&quot;&gt;How Node.js saved my application&lt;/a&gt; &amp;#8211; a really nice use case on a Rails application.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://rfw.posterous.com/how-nodejs-saved-my-web-application&quot;&gt;Node.js, Redis and resque for scalability&lt;/a&gt; &amp;#8211; a really nice wrap by Paul Gross, design a nice web server with those tools to empower scalability.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://joemaller.com/2008/11/25/a-web-focused-git-workflow&quot;&gt;Web focused git workflow&lt;/a&gt; &amp;#8211; deploy / work / manage simple sites with git.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.igvita.com/2010/03/01/schema-free-mysql-vs-nosql/&quot;&gt;Schema-free mySQL vs. NoSQL&lt;/a&gt; &amp;#8211; Igvita with another one of his &amp;#8220;print-and-get-it-gold-framed-asap&amp;#8221; posts, this dude is simply one of the best.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.viget.com/inspire/practical-uses-of-css3/&quot;&gt;Practical examples of CSS3&lt;/a&gt; &amp;#8211; enough with round corners already!&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://blog.boxedice.com/2010/02/28/notes-from-a-production-mongodb-deployment/&quot;&gt;Deploying MongoDB in production&lt;/a&gt; &amp;#8211; Some important notes from BoxedIce&amp;#8217;s experience.. some very disappointing limitations on Mongo there.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://agiletesting.blogspot.com/2010/02/use-haproxy-14-if-you-need-mysql-health.html&quot;&gt;HAProxy 1.4&lt;/a&gt; &amp;#8211; the awesome load balancer is now with mysql health checks.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://sebastians-pamphlets.com/smart-robots-txt/&quot;&gt;A smart robots.txt&lt;/a&gt; &amp;#8211; get yourself a shiny new robots.txt&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://iampaddy.com/lifebelow600/&quot;&gt;Under 600px, a different &amp;#8216;fold&amp;#8217; perspective&lt;/a&gt; &amp;#8211; a neat perspective about layout design.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://saasinterrupted.com/2010/02/24/high-availability-principle-request-queueing/&quot;&gt;High availability principle: request queuing&lt;/a&gt; &amp;#8211; a good brief explanation and some others are there too.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Treasures&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers-js.html&quot;&gt;OpenLayers&lt;/a&gt; &amp;#8211; or the &lt;a href=&quot;http://dev.openlayers.org/&quot;&gt;main page&lt;/a&gt;, a javascript mapping &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;, looks promising but as always almost, documentation sucks.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.snippetstash.com/&quot;&gt;SnippetStash&lt;/a&gt; &amp;#8211; another charm by &lt;a href=&quot;http://twitter.com/bphogan&quot;&gt;bphogan&lt;/a&gt;, this time it&amp;#8217;s a convenient tool to keep snippets around. beats gist since you can write a more visible descriptive text.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/jnunemaker/canable/&quot;&gt;Canable&lt;/a&gt; &amp;#8211; simple permission system for rails.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/develon/authlogic_generator&quot;&gt;AuthlogicGenerator&lt;/a&gt; &amp;#8211; Generate a complete Authlogic stack with authentication, activation and password reset.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/napcs/960static&quot;&gt;960static&lt;/a&gt; &amp;#8211; generate static websites with 960.gs and StaticMatic.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/defunkt/gist&quot;&gt;Command line gists&lt;/a&gt; &amp;#8211; i didn&amp;#8217;t know it&amp;#8217;s out there.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.bennadel.com/projects/cormvc-jquery-framework.htm&quot;&gt;CorMVC &amp;#8211; jQuery &lt;span class=&quot;caps&quot;&gt;MVC&lt;/span&gt; framework&lt;/a&gt; &amp;#8211; it&amp;#8217;s been a while since i started looking for some javascript &lt;span class=&quot;caps&quot;&gt;MVC&lt;/span&gt; resources, this might be reasonable.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/bebanjo/delorean&quot;&gt;Delorean&lt;/a&gt; &amp;#8211; a space/time continuum abuser in ruby.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/ahoward/main&quot;&gt;Main&lt;/a&gt; &amp;#8211; a class factory and dsl for generating command line programs real quick.&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>Using Sinatra to test remote services in Rails</title>
   <link href="http://blog.eizesus.com/2010/02/using_sintara_to_test_remote_services_in_rails-27-2-2010"/>
   <updated>2010-02-27T00:00:00-05:00</updated>
   <id>http://gitready.com/2010/02/using_sintara_to_test_remote_services_in_rails-27-2-2010</id>
   <content type="html">&lt;p&gt;A few weeks ago i was chatting with &lt;a href=&quot;http://www.ryanbigg.com&quot;&gt;Ryan Bigg&lt;/a&gt; about one of his projects, and he was contemplating about the fact he couldn&amp;#8217;t find a decent way to test a remote &lt;span class=&quot;caps&quot;&gt;XMLRPC&lt;/span&gt; service handling in that application.&lt;/p&gt;
&lt;p&gt;Testing remote service calls like a boss is achieved by using &lt;a href=&quot;http://rubygems.org/gems/fakeweb&quot;&gt;FakeWeb&lt;/a&gt; which is pretty awesome when you work in front of a &lt;span class=&quot;caps&quot;&gt;REST&lt;/span&gt; web service of something like that, but it does have a really big -1 on it: It binds a mocked response to a &lt;strong&gt;specific url&lt;/strong&gt;, and you can&amp;#8217;t add more responses for that url based on parameters.&lt;br /&gt;
Meaning, basically, that if you want for example to test a web service that requires &lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; requests to a specific url, FakeWeb just won&amp;#8217;t cut it.&lt;/p&gt;
&lt;p&gt;So basically, Ryan suggested an idea that seemed nice at the moment: add a Rails metal Rack app to handle those requests.&lt;/p&gt;
&lt;p&gt;Awesome idea, but a few setbacks:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;If you don&amp;#8217;t want that application to run on other environments, you&amp;#8217;ll have to scope the behavior to the &lt;em&gt;test&lt;/em&gt; environment only, simple? yeah. but personally i don&amp;#8217;t like having &lt;code&gt;if Rails.env == &quot;test&quot;&lt;/code&gt; in my code.&lt;/li&gt;
	&lt;li&gt;Since we are trying to mock a webservice, we&amp;#8217;ll have to add different handlers in that metal application which can lead to a long, ugly, conditional and eye-ripping unmaintainable code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So there I thought, why not just initiate a Sinatra application as part of your tests, and easily manage that sinatra as the mocked web service? &lt;span class=&quot;caps&quot;&gt;WIN&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I created the &lt;a href=&quot;http://rubygems.org/gems/sinatra_fake_webservice&quot;&gt;SinatraFakeWebService&lt;/a&gt; gem that provides a simple interface to instantiate that Sinatra application and to manage the mocked webservice interface.&lt;/p&gt;
&lt;h4&gt;Installation&lt;/h4&gt;
&lt;p&gt;Install the gem:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo gem install sinatra_fake_webservice&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you use bundler or such:&lt;br /&gt;
&lt;code&gt;gem 'sinatra_fake_webservice', :group =&amp;gt; 'test'&lt;/code&gt; &lt;br /&gt;
should do it.&lt;/p&gt;
&lt;h4&gt;Usage&lt;/h4&gt;
&lt;p&gt;In your &lt;code&gt;test_helper.rb&lt;/code&gt; or the Cucumber/rSpec equivalent:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/317143.js?file=test_helper.rb&quot;&gt;&lt;/script&gt;&lt;p&gt;and tests:&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/317143.js?file=test_webservice.rb&quot;&gt;&lt;/script&gt;&lt;h4&gt;todos&lt;/h4&gt;
&lt;p&gt;If this would be proven as useful, i&amp;#8217;ll probably add a better &lt;span class=&quot;caps&quot;&gt;DSL&lt;/span&gt; for the interaction other than the ugly &lt;em&gt;Net::&lt;span class=&quot;caps&quot;&gt;HTTP&lt;/span&gt;&lt;/em&gt; all over.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Bag O' Links - 23/2/2010</title>
   <link href="http://blog.eizesus.com/2010/02/bag-o-links-23-2-2010"/>
   <updated>2010-02-23T00:00:00-05:00</updated>
   <id>http://gitready.com/2010/02/bag-o-links-23-2-2010</id>
   <content type="html">&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.smashingmagazine.com/2010/02/23/shalom-showcase-of-web-design-in-israel/&quot;&gt;Israeli web design&lt;/a&gt; &amp;#8211; a really good writeup on SmashingMagazine on the difficulties of&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.queness.com/post/2291/20-gorgeous-free-fonts-for-your-headlines&quot;&gt;20 Free fonts for your headlines&lt;/a&gt; &amp;#8211; most of them are nice, keep in mind readability is an important aspect of headlines.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.railsupgradehandbook.com/&quot;&gt;Rail 3 upgrade handbook&lt;/a&gt; &amp;#8211; out and for only 12$, worths it.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.patmaddox.com/2010/02/22/use_long_method_names_that_say_what_they_do/&quot;&gt;Using long methods name for better readability&lt;/a&gt; &amp;#8211; longer methods names == reader have a better chance of knowing what they do.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://railsontherun.com/2010/02/22/speed-up-your-rails-xml-responses/&quot;&gt;Speeding up &lt;span class=&quot;caps&quot;&gt;XML&lt;/span&gt; responses in Rails&lt;/a&gt; &amp;#8211; switching the backend to Nokogiri. i&amp;#8217;d add that a smart caching tactic would make even more sense.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://justinfrench.com/index.php?id=265&quot;&gt;Learn to test your code&lt;/a&gt; &amp;#8211; a good advice for new developers.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://atomicnoggin.ca/blog/2010/02/20/pure-css3-pie-charts/&quot;&gt;Pure CSS3 charts&lt;/a&gt; &amp;#8211; quick tutorial.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://pivotallabs.com/users/steve/blog/articles/262-rails-slashdotted-no-problem&quot;&gt;Rails, Slashdotted, no problem&lt;/a&gt; &amp;#8211; how PivotalLabs handled a traffic boost on a client project.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://shiftcommathree.com/articles/make-your-rails-maintenance-page-respond-with-a-503&quot;&gt;Using a 503 &lt;span class=&quot;caps&quot;&gt;HTTP&lt;/span&gt; response in your application on maintenance&lt;/a&gt; &amp;#8211; sounds good.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.stevesouders.com/blog/2010/02/15/browser-performance-wishlist/&quot;&gt;Browser wishlist&lt;/a&gt; &amp;#8211; Steve wants a few more things done better, me too.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://terrbear.org/?p=233&quot;&gt;Bling gem management&lt;/a&gt; &amp;#8211; bundler isn&amp;#8217;t even stable yet, and there&amp;#8217;s already a replacement.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://zigzag.github.com/2010/02/14/from-textmate-to-vim-for-rails-coders.html&quot;&gt;From Textmate to Vim&lt;/a&gt; &amp;#8211; move from Textmate to vim, easily.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://webreflection.blogspot.com/2010/02/javascript-overload-patterns.html&quot;&gt;Javascript overload patterns&lt;/a&gt; &amp;#8211; how to implement overloading in native javascript.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://dailyjs.com/2010/02/18/framework/&quot;&gt;Let&amp;#8217;s make a framework&lt;/a&gt; &amp;#8211; DailyJS are going though a javascript framework development, interesting.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://nosql.mypopescu.com/post/398352022/recipes-for-using-nosql-solutions&quot;&gt;Recipes for using noSQL solutions&lt;/a&gt; &amp;#8211; get help to decide if your project should use a noSQL solution.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.royans.net/arch/library/&quot;&gt;Scalable web architecture library&lt;/a&gt; &amp;#8211; lots of good reads of many use cases.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.railway.at/2010/02/13/avoiding-rails-3-dependency-hell-with-rvm/&quot;&gt;avoiding rails 3 dependency hell with rvm&lt;/a&gt; &amp;#8211; skip hell and rest.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://spreadsheets.google.com/ccc?key=0AuiEX8D0wiR7dGs5WFc1RzZkZnNkYTQtOFFiVFJ2a3c&amp;amp;hl=en&quot;&gt;Hourly rate survey&lt;/a&gt; &amp;#8211; weird actually, i don&amp;#8217;t think it can point out something beyond particular reference.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com/tutorials/javascript-ajax/make-your-mootools-code-shorter-faster-and-stronger/&quot;&gt;make a better MooTools code&lt;/a&gt; &amp;#8211; good tips.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Treasures&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/toolmantim/toadhopper-sinatra&quot;&gt;toadhopper-sinatra&lt;/a&gt; &amp;#8211; Post Hoptoad notifications from Sinatra.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://crackersnack.com/blog/2010/2/19/announcing-the-currencies-gem.html&quot;&gt;Currencies&lt;/a&gt; &amp;#8211; Money gem gets currencies. win.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://inlinestyler.torchboxapps.com/styler/&quot;&gt;Converting &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt;/&lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; to inline &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt;&lt;/a&gt; &amp;#8211; easily make email templates.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://penguin.theopalgroup.com/cgi-bin/css3explainer/selectoracle.py&quot;&gt;Selectoracle&lt;/a&gt; &amp;#8211; translate &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; selector statements to english/spanish.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://rubygems.org/gems/query_trace&quot;&gt;query_trace&lt;/a&gt; &amp;#8211; a new version for this great tool.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/johanoskarsson/cassandra-ec2&quot;&gt;cassandra-ec2&lt;/a&gt; &amp;#8211; easily deploy a cassandra cluster on EC2.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/airblade/paper_trail&quot;&gt;PaperTrail&lt;/a&gt; &amp;#8211; Track changes to your models&amp;#8217; data. Good for auditing or versioning.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/perfectline/locale_routing&quot;&gt;local-routing&lt;/a&gt; &amp;#8211; Detects and handles locale from request URLs, prepends locale for generated URLs by wrapping itself around Rails ActionController::Routing methods.&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>Bag O' Links - 16/2/2010</title>
   <link href="http://blog.eizesus.com/2010/02/bag-o-links-16-2-2010"/>
   <updated>2010-02-16T00:00:00-05:00</updated>
   <id>http://gitready.com/2010/02/bag-o-links-16-2-2010</id>
   <content type="html">&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://shiftcommathree.com/articles/how-to-install-mongodb-on-os-x&quot;&gt;Installing MongoDB on MacOS&lt;/a&gt; &amp;#8211; me thinks it&amp;#8217;s the simplest way i came across.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://vimeo.com/6702444&quot;&gt;On domains and databases&lt;/a&gt; &amp;#8211; a nice (and long) presentation by Ben scofield on an alternatives to relational databases in common domains.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://idkn.wordpress.com/2009/03/15/why-i-find-mysql-to-be-so-bad/&quot;&gt;Why i find MySQL to be so bad&lt;/a&gt; &amp;#8211; a nice writeup by my friend &lt;a href=&quot;http://twitter.com/idokan&quot;&gt;@idokan&lt;/a&gt;, he finds MySQL to be disturbing sometimes and provides some good points.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://learnyouahaskell.com/chapters&quot;&gt;Learn you Haskell&lt;/a&gt; &amp;#8211; I started playing with Haskell a few months ago, i must say it&amp;#8217;s a pretty nice language although syntax is hard for the Rubist that i am, &lt;a href=&quot;http://www.engineyard.com/blog/2010/a-hint-of-hubris/&quot;&gt;Hubris&lt;/a&gt; seems to allow me to enjoy both worlds tho.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://wtfjs.com/&quot;&gt;wtfJS&lt;/a&gt; &amp;#8211; a man&amp;#8217;s struggle against Javascript weirdness.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://duckpunching.com/passenger-mod_rails-for-development-now-with-debugger&quot;&gt;Passenger heart ruby-debug&lt;/a&gt; &amp;#8211; how do people live without it.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://carlos.bueno.org/2010/02/measuring-javascript-parse-and-load.html&quot;&gt;The hidden cost of Javascript&lt;/a&gt; &amp;#8211; Carlos attempts to perform &lt;strong&gt;real&lt;/strong&gt; benchmarking taking more variables in mind. on another note &lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; is trying to &amp;#8220;compare between leading javascript libraries&amp;#8221; out there.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://openbit.co.uk/?p=135&quot;&gt;HTML5 WebSQL&lt;/a&gt; &amp;#8211; Another shiny HTML5 &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; magic, and it&amp;#8217;s just what i asked for christmas! another db to maintain!&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://lindsaar.net/how-to-make-an-rss-feed-or-atom-feed-in-rails&quot;&gt;Quick way to create &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt; feeds in Rails&lt;/a&gt; &amp;#8211; now we haz it.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://ai.mee.nu/seeking_a_database_that_doesnt_suck&quot;&gt;Seeking a database that doesn&amp;#8217;t suck&lt;/a&gt; &amp;#8211; so am i (loving Mongo now btw). Author does have a good overview of the current actors out there, even if his personal opinion is sometimes incorrect.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://gilesbowkett.blogspot.com/2010/02/bundler-schmundler.html&quot;&gt;Bundler Schmundler&lt;/a&gt; &amp;#8211; someone is not happy about current changes and approach with Bundler, i must say that in general i can&amp;#8217;t seem to understand the need to break backward compatibility so fast and so hard.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://thechangelog.com/post/382278264/riak-high-performance-document-store-built-on-json-and-r&quot;&gt;Riak&lt;/a&gt;  &amp;#8211; an interesting late joiner to the party of document storing databases, there is a &lt;a href=&quot;http://thechangelog.com/post/383049531/ripple-ruby-client-for-riak&quot;&gt;Ruby client named Ripple&lt;/a&gt; too.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.coffeepowered.net/2010/02/10/safe-action-caching-with-memcached/&quot;&gt;Safe action caching with Memcached&lt;/a&gt; &amp;#8211; preventing Memcached from going crazy over silly chars getting in the way.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.codethatmatters.com/2010/01/git-autocomplete-in-mac-os-x/&quot;&gt;Git autocomplete in MacOS&lt;/a&gt; &amp;#8211; OH &lt;span class=&quot;caps&quot;&gt;YEAH&lt;/span&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://weblog.rubyonrails.org/2010/2/9/plugin-authors-toward-a-better-future&quot;&gt;Plugin authors: Towards a better future&lt;/a&gt; &amp;#8211; some instructions on the recent Rails 3 related plugin approach changes. Again, was breaking backwards compatibility right here and now was necessary?.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.smashingmagazine.com/2010/02/09/applying-mathematics-to-web-design/&quot;&gt;Applying mathematics in web design&lt;/a&gt; &amp;#8211; golden ratio hits again.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://ingraminternet.com/posts/18-textmate-ruby-1-9-1-and-rvm-the-facts&quot;&gt;Textmate + ruby1.9.1 + rvm&lt;/a&gt; &amp;#8211; &lt;a href=&quot;http://twitter.com/pjammer&quot;&gt;@pjammer&lt;/a&gt; makes them play nice.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.mongodb.org/display/DOCS/Indexing+as+a+Background+Operation&quot;&gt;Indexing as a Background process on Mongo&lt;/a&gt; &amp;#8211; now available at stores near you.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://blog.mongodb.org/post/381927266/what-about-durability&quot;&gt;MongoDB&amp;#8217;s single server durability&lt;/a&gt; &amp;#8211; explained.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://javascript.crockford.com/javascript.html&quot;&gt;Javascript is the most misunderstood language&lt;/a&gt; &amp;#8211; is it?&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.barelyfitz.com/screencast/html-training/css/positioning/&quot;&gt;Lears &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; positioning in 10 steps&lt;/a&gt; &amp;#8211; i love the new wave of small &amp;#8220;tour guide&amp;#8221; web apps to learn stuff.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://ryanbigg.com/2010/02/congratulations/&quot;&gt;Congratulations&lt;/a&gt; &amp;#8211; &lt;a href=&quot;http://ryanbigg.com/2010/02/congratulations/&quot;&gt;@ryanbigg&lt;/a&gt; on possible choices in the life of a developer, and how a proper methodology can get you want you want and need.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/ezmobius/redis-remote-dictionary-server&quot;&gt;Redis presentation &amp;#8211; use cases&lt;/a&gt; &amp;#8211; nice.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://nosql.mypopescu.com/post/385372130/your-chance-to-review-the-fosdem-nosql-event#fosdem-ericevans&quot;&gt;Lots of other noSQL presentations&lt;/a&gt; &amp;#8211; woot.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.scottmoe.info/2009/04/18/my-apache-configuration-for-ruby-on-rails-with-passenger&quot;&gt;Example apache configuration for Rails on Passenger&lt;/a&gt; &amp;#8211; including some caching headers and extra mods.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.web2media.net/laktek/2010/02/16/building-real-time-web-apps-with-rails3/&quot;&gt;Real time cramp app on Rails3&lt;/a&gt; &amp;#8211; a quick example.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Treasures&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/assaf/highfive&quot;&gt;HighFive&lt;/a&gt; &amp;#8211; HTML5/CSS3/jQuery goodness for Rails.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/jim/carmen&quot;&gt;Carmen&lt;/a&gt; &amp;#8211; A simple collection of geographic names and abbreviations for Rails apps (includes replacements for country_select and state_select).&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/hmcgowan/roo&quot;&gt;roo&lt;/a&gt; &amp;#8211; Roo provides an interface to Open Office, Excel, and Google Spreadsheets.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.liquidx.net/plotkit/&quot;&gt;PlotKit&lt;/a&gt; &amp;#8211; javascript graphs and plots.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/mynyml/harmony&quot;&gt;Harmony&lt;/a&gt; &amp;#8211; Javascript + &lt;span class=&quot;caps&quot;&gt;DOM&lt;/span&gt; in your ruby, the simple way.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://nanoc.stoneship.org/&quot;&gt;Nanoc&lt;/a&gt; &amp;#8211; another quick publishing tool in Ruby, jekyll style.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/cardmagic/contacts&quot;&gt;Contacts&lt;/a&gt; &amp;#8211; A universal interface to import email contacts from various providers including Yahoo, Gmail, Hotmail, &lt;span class=&quot;caps&quot;&gt;AOL&lt;/span&gt; and Plaxo.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/jweiss/rocking_chair&quot;&gt;RockingChair&lt;/a&gt; &amp;#8211; An in-memory CouchDB implementation in Ruby for Couchrest and SimplyStored.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://philosophyofweb.com/2010/02/redweb-a-web-interface-for-redis/&quot;&gt;Redweb&lt;/a&gt; &amp;#8211; a web interface for Redis.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/bhuga/quantity&quot;&gt;Quantity&lt;/a&gt; &amp;#8211; Quantity descriptions for ruby.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://bgrepeat.com/&quot;&gt;BGrepeat&lt;/a&gt; &amp;#8211; backgrounds, lots.&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>Bag O' Links - 9/2/2010</title>
   <link href="http://blog.eizesus.com/2010/02/bag-o-links-9-2-2010"/>
   <updated>2010-02-09T00:00:00-05:00</updated>
   <id>http://gitready.com/2010/02/bag-o-links-9-2-2010</id>
   <content type="html">&lt;p&gt;Feels good to be back on a Bag o Links routine.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://gist.github.com/296719&quot;&gt;Get your database size rake task&lt;/a&gt; &amp;#8211; a little toy i made and &lt;a href=&quot;http://afreshcup.com&quot;&gt;Mike&lt;/a&gt; improved, additions are welcome.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://gregosuri.com/how-facebook-uses-erlang-for-real-time-chat&quot;&gt;How facebook uses erlang for real-time chat&lt;/a&gt; &amp;#8211; erlang jabber implementation, that&amp;#8217;s got to be good.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://petewarden.typepad.com/searchbrowser/2010/01/mapreduce-for-idiots.html&quot;&gt;MapReduce for idiots&lt;/a&gt; &amp;#8211; or just for those who never took the time to read.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.idiotsabound.com/did-i-mention-mongodb-is-fast-way-to-go-mongo&quot;&gt;MongoDB vs. CouchDB vs. Mysql&lt;/a&gt; &amp;#8211; mongo is fast indeed, but the atomic actions benefits of Couch are still appealing.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.ibm.com/developerworks/web/library/wa-memleak/&quot;&gt;Memory leaks in Javascript&lt;/a&gt; &amp;#8211; how to prevent and identify possible leaks and probably save a few Firefox users out there.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.switchonthecode.com/tutorials/javascript-tutorial-why-the-this-keyword-breaks&quot;&gt;Why Javascript&amp;#8217;s &amp;#8216;this&amp;#8217; breaks&lt;/a&gt; &amp;#8211; when &lt;code&gt;window&lt;/code&gt;, object or scope wins.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.switchonthecode.com/tutorials/javascript-objects-a-useful-example&quot;&gt;Javascript objects, a simple example&lt;/a&gt; &amp;#8211; yes, it is simple.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://blog.digimonkey.com/2010/01/mongosphinx-with-mongodb-and-mongomapper/&quot;&gt;MongoMapper and MongoSphinx, a party!&lt;/a&gt; &amp;#8211; make sphinx play nice with mongo.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.opensourcery.co.za/2010/02/08/paginating-documents-with-couchrest-and-will_paginate/&quot;&gt;Paginating with CouchREST and will_paginate&lt;/a&gt; &amp;#8211; Overriding &lt;code&gt;WillPaginate::Collection.create&lt;/code&gt; is the solution i guess.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.rubyinside.com/rails-3-0-beta-links-2966.html&quot;&gt;Rails 3 links and resources&lt;/a&gt; &amp;#8211; from rubyinside, here&amp;#8217;s another one from Yehuda Katz on the new &lt;a href=&quot;http://yehudakatz.com/2010/02/09/using-bundler-in-real-life/&quot;&gt;Bundler&lt;/a&gt; and real life usage.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://boldr.net/upgrade-plugins-gems-rails-3/&quot;&gt;How to upgrade plugins for Rails 3&lt;/a&gt; &amp;#8211; also, remember to update the record on &lt;a href=&quot;http://railsplugins.org&quot;&gt;RailsPlugins&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://blog.mostof.it/posts/why-ruby-part-three-method-arguments/&quot;&gt;Why Ruby? series &amp;#8211; method arguments&lt;/a&gt; &amp;#8211; a nice series of posts covering that dude&amp;#8217;s view on Ruby.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/&quot;&gt;The building blocks of ruby&lt;/a&gt; &amp;#8211; Yehuda shows the power of blocks in a set of nice examples.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com/tutorials/javascript-ajax/quick-tip-how-to-extend-built-in-objects-in-javascript/&quot;&gt;Extending native objects in Javascript&lt;/a&gt; &amp;#8211; prototyping for beginners.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://blog.hakeraj.com/method-definitions-javascript-style&quot;&gt;Dynamic methods in Ruby &amp;#8211; javascript style&lt;/a&gt; &amp;#8211; nice, a bit kinky&amp;#8230; but nice.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.romancortes.com/blog/pure-css-coke-can/&quot;&gt;Rolling coke can &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt;&lt;/a&gt; &amp;#8211; nice.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://blog.peepcode.com/tutorials/2010/what-pythonistas-think-of-ruby&quot;&gt;What pythonists think of Ruby&lt;/a&gt; &amp;#8211; peepcode writeup.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://almosteffortless.com/2010/02/08/cloudfront-no-brainer-cdn-support-for-s3/&quot;&gt;CloudFront &amp;#8211; no brainer &lt;span class=&quot;caps&quot;&gt;CDN&lt;/span&gt; for S3&lt;/a&gt; &amp;#8211; A very fast change that can help many, but i am still having trouble with CloudFront&amp;#8217;s expiry options that do not fit any case.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.mr-flow.com/mrflow/user/html/home.do&quot;&gt;mr.flow&lt;/a&gt; &amp;#8211; compose MapReduce modules online.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://chriseppstein.github.com/blog/2010/02/08/haml-sucks-for-content/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;HAML&lt;/span&gt; sucks for content&lt;/a&gt; &amp;#8211; some good points added to the ongoing war.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.cloudxl.com/&quot;&gt;CloudXL &amp;#8211; Cloud service providers&lt;/a&gt; &amp;#8211; a list of Cloud service providers around, filterable too.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://graysky.org/2010/02/downtime-postmortem/&quot;&gt;Downtime postmortem&lt;/a&gt; &amp;#8211; oneforty went down, this is how they are learning from it.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://highscalability.com/blog/2010/2/8/how-farmville-scales-to-harvest-75-million-players-a-month.html&quot;&gt;How Farmville scales&lt;/a&gt; &amp;#8211; the most annoying (and largest) facebook game scaling solutions.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.52framework.com/&quot;&gt;52frameworks&lt;/a&gt; &amp;#8211; HTML5 + CSS3 framework.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://woorkup.com/2010/02/07/anatomy-of-the-perfect-sidebar/&quot;&gt;Anatomy of a perfect sidebar&lt;/a&gt; &amp;#8211; woork&amp;#8217;s magic.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://seancribbs.com/tech/2010/02/06/why-riak-should-power-your-next-rails-app/&quot;&gt;Why Riak for your next Rails app is a good idea&lt;/a&gt; &amp;#8211; Chris takes another direction in the noSQL land.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.matthewhutchinson.net/2010/2/7/fake-it-till-you-make-it&quot;&gt;Fake it till you make it&lt;/a&gt; &amp;#8211; a faker rake task.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Treasures&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/maxim/sogger&quot;&gt;sogger&lt;/a&gt; &amp;#8211; a StackOverFlow growler&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/maxim/html_press&quot;&gt;html_press&lt;/a&gt; &amp;#8211; &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; and Rack middleware for &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; compression with caching support.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/ffmike/auto-session-timeout&quot;&gt;auto-session-timeout&lt;/a&gt; &amp;#8211; this is a JQuery version, original is a prototype version.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://github.com/cloudhead/toto&quot;&gt;toto&lt;/a&gt; &amp;#8211; quick blog on Heroku.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;</content>
 </entry>
 
 <entry>
   <title>GitHub post - Afterthoughts</title>
   <link href="http://blog.eizesus.com/2010/02/github-post-afterthoughts-8-2-2010"/>
   <updated>2010-02-08T00:00:00-05:00</updated>
   <id>http://gitready.com/2010/02/github-post-afterthoughts-8-2-2010</id>
   <content type="html">&lt;p&gt;My lat &amp;#8216;Bye Bye Github&amp;#8217; post caused a far more mess than i initially intended it will, my one and only goal by posting it was to express my thoughts as a user, thoughts which apparently came out a bit too harsh and i am sorry if it hurt someone, i wasn&amp;#8217;t aiming for that.&lt;/p&gt;
&lt;p&gt;I felt like it is necessary that i will explain things a little more and maybe put an end to this witch hunt that was swirling in both of Github&amp;#8217;s direction and mine.&lt;/p&gt;
&lt;p&gt;Most people came to realize somehow that i &lt;strong&gt;demand&lt;/strong&gt; &lt;span class=&quot;caps&quot;&gt;SLA&lt;/span&gt; for 7$/m, Well, i&amp;#8217;m not. Although i do not hold the 200$/m plan on the other hand, i&amp;#8217;d like to think that it&amp;#8217;s reasonable to want leap in expected level of service once you start taking money from people, and again when you start hosting Mission Critical apps. It&amp;#8217;s no secret that i am not the only one disappointed with Github&amp;#8217;s uptime history. Yes, they always explain what caused the downtime and I&amp;#8217;m glad that they do, But explaining what&amp;#8217;s wrong isn&amp;#8217;t enough, though.&lt;/p&gt;
&lt;p&gt;They try, i know, they have the parts there that show that they really try to make things better, like &lt;span class=&quot;caps&quot;&gt;DRBD&lt;/span&gt;, but when things go wrong everything breaks anyway. Basically it&amp;#8217;s like making backups but never testing them, and that is the thing that annoys me the most, You can easily compare that to my mistake in my deployment process on those 3 projects that got delayed this week.&lt;/p&gt;
&lt;p&gt;I am absolutely sure Github will get better, they have some awesome people working there and they are hosted in a wonderful place but it has nothing to do with the fact that i can always &amp;#8220;go somewhere else where they have better uptime and reliability&amp;#8221; until the reach my &lt;strong&gt;personal&lt;/strong&gt; service requirement as a paid service.&lt;/p&gt;
&lt;p&gt;Yes, it is my responsibility as a business owner to choose the right tools and craft the right processes in order to provide a sustainable toolset for my clients and team members.&lt;br /&gt;
All the backups in the world, 500 mirror sites and nothing else couldn&amp;#8217;t have helped me get my deployments out because i needed a way to pull from the master, and because of &lt;strong&gt;my buggy process&lt;/strong&gt; (weird situation as it is) regardless Github&amp;#8217;s outage i was delayed by 2 hours.&lt;/p&gt;
&lt;p&gt;The basic problem was the fact we work as an international team, although usually it works amazingly well. When you need a 24/h development cycle in your team, having 50% of the team still working when the other half is sound asleep in the other side of the world is a wonderful thing. The problem started when one on my Israeli developers (&lt;span class=&quot;caps&quot;&gt;GMT&lt;/span&gt; &amp;#8211; 5), had committed his last feature to master and acknowledged that i can issue a move to a staging server, ready to deliver a copy to the client as the contract expect.&lt;/p&gt;
&lt;p&gt;Up until early this morning I didn&amp;#8217;t keep the &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; keys for all the developers machines so when my developer went to his long overdue vacation (leaving the laptop at home obviously) i was left with no access to his local copy, Github being down, and overall stuck. Yes, this is a faulty project management. Yes it is already fixed in the form of adding another remote repository on CodebaseHQ and having all keys (except that guy&amp;#8217;s) set on my machine as well.&lt;/p&gt;
&lt;p&gt;Coming to think about it, even if the basic process error was indeed mine as a project manager, i expect a high service level from every service and get i pay for. This is why i am driving a mercedes and not on a bus, this is why i live in a house with impact windows and this is why i use a Mac and not Windows.&lt;/p&gt;
&lt;p&gt;I can&amp;#8217;t create a fault tolerant procedure for every in house project, it would cost a lot more than we can back up and i will spend a lot more time on it than working on our projects and this is why we pay 3rd parties to take those internal processes out of our hand and deliver us a product back.&lt;/p&gt;
&lt;p&gt;I don&amp;#8217;t see the reason of holding a double or a triple safety net for everything that we do in here, will i need 2 accountants now? a generator in addition to UPSs? it is very hard to draw the line where you fully trust a service you pay for and when you don&amp;#8217;t and how you feel about it even.&lt;/p&gt;
&lt;p&gt;Today, Github contact me to explain their side of the deal and also offered to park my account for a few months as an act of good service. Although it was very nice of them (as usual, their support was always awesome) i decided not to take it, keeping in mind it might seal this whole thing with an ugly stamp. Thank you Github, but we&amp;#8217;ll just have to meet again in 3-6 months.&lt;/p&gt;
&lt;p&gt;I hope this will bring an end to this whole thing, tomorrow it&amp;#8217;s back to &amp;#8220;Bag o Links&amp;#8221; routine.&lt;/p&gt;
&lt;p&gt;As a last note, I got all kinds of responses, thought it might help to clear those out:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;#8220;Git is decentralized, how did you screw that up?&amp;#8221;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Yes, that&amp;#8217;s true. i covered the reasons why it couldn&amp;#8217;t have helped me in our specific situation.&lt;br /&gt;
Yes, we should have thought about it earlier and we&amp;#8217;ll have to change that in order to make a smoother slide next time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;#8220;He should have just installed Gitosis&amp;#8221;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Again, why should i bother when there are services our there offer to do all the hard work for us? assuming i ask one of our developers to install gitosis, being payed 75$/h it should take apprx 6 minutes &lt;strong&gt;a month&lt;/strong&gt; to maintain it in order to match Github&amp;#8217;s lowest offer. makes sense? not for me. some people, including me, prefer to pay money for a properly designed git workflow than to deal with the hassle of doing it themselves. I would happily pay Github even 4 times the current rates they are taking if i was certain it would grant me my peace of mind.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;#8220;Fix your grammar&amp;#8221;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sorry, not a native english speaker.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;#8220;If you want &lt;span class=&quot;caps&quot;&gt;SLA&lt;/span&gt;, pay for it!&amp;#8221;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I will, where?&lt;/p&gt;</content>
 </entry>
 
 
</feed>