A couple of months ago Bartosz described how we use Facebook to improve communication in our team. Actually most of the content on our wall are more or less interesting links from the internet. We quickly noticed a troubling pattern though—they are easy to forget. And if you forget them, you can’t use them.
So we decided that we’ll be regularly preparing a brief summary of the best content so it’s easy to find and convenient to browse. Our goal is not to provide The Hot News™—you can find them anywhere—but the top of the top stuff which we believe will remain valuable for a long time. So… let’s start!
Roy Tomeij, one of the speakers on the last wroc_love.rb conference, suggested that
classes should be replaced with
classes are for designers and
How to (and why) test factories—short and easy, but very useful protip from Thoughtbot.
If yours tests take too long, check if you can replace doubles with OpenStruct. Xavier Shay did some benchmarks on the subject.
There is new shiny tool on the horizon, Testacular, and I think it can soon replace Selenium. It allows to run tests in multiple browsers with your favorite testing engine under the hood.
If you don’t feel comfortable writing tests, there is a new site for you: betterspecs.org, the collection of bad examples turned to good. It’s open-sourced so you can always add a new example or fix another if you disagree with proposed solution.
DCI is a hot topic these days, but there is still lack of good examples, especially in Rails context. Victor Savkin fills this gap with an article Data Context Interaction: The Evolution of the Object Oriented Paradigm. If you like the solution proposed by Victor also check his gist collection and DCI-Sample repo.
Another interesting approach to DCI in Rails is shown on already mentioned Xavier Shay’s blog in article titled Dependecy Injection for Rails Controllers.
At last, an article about patterns themselves: The First Step to Applying Design Patterns: Don’t. Very good explanation why design patterns are awesome, when you should use them and when not.
See you next time!