It’s time for New Year’s edition of our summary of the content found in couple of the last weeks. While you are getting back into ordinary flow you can read about Vim, objects in Rails and improve your hacker’s toolbox. Enjoy!
As you could notice I’m big fan of Vim and I promote it intensively among colleagues. Even if you think that it is not for newbies or you feel uncomfortable using it, you should be aware that you’re probably using an editor which is not designed for programmers. So, if you are interested in topic, just know that you can build an IDE around Vim, arm it in powerful search feature or configure for writing… prose.
At last but not least, if you’re still not convinced, check this amazing tip how Vim can save your time.
Object Oriented Rails
There are a lot of interesting ideas how to improve OO approach in Rails. Xavier Shay shared with his solution for form objects and completely redesigned idea of controllers. Chris Flipse shows how you can isolate validations from AR objects which plays well with the idea of form objects and splitting AR into Domain Objects and persistence layer.
DHH encourages us for more intensive usage of Concerns, which he compares to DCI idea. Actually, it’s not the same, so keep in mind Victor Savkin’s page about Ruby and DCI. If we are talking about DCI—there are some interesting voices in the discussion. Gregory Brown raised some common issues about this paradigm, and Rebo responsed with nice article about DCI’s ‘C’ part.
We are looking forward for another possible cure of AR-madness, which could be DataMapper 2. Solnic just wrote some notes about plans and roadmap of this well looking project. You also try some already available patterns to decompose fat AR models.
During last month we found some cool stuff and tips which could improve your hackers toolbox. Vidir is a vim-like tool for mass-edit of file names—open directory, edit names with power of Vim, save and quit and voilà! If you like functional programming you will probably add this simple map alias into your shell. For impatient devs we’ve got another tip, that would automatically reload your irb session.
That’s all for today. Thanks for reading and I wish you a Happy New Year!