RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  

mauriciolinhares — 14 posts

Want to learn how to use Enumerables? Time to learn by building the Enumerable module yourself. Check how you could build the methods implemented at Enumerable yourself and use them in your code.
In case you didn't know, you can use your MongoDB document _id field for date range queries instead of having to use a separate created_at field and create a separate index for it. Here's how simple it is to do it.
Make the most of SQS using Ruby
While not particularly famous in the Ruby community, SQS is a really amazing queueing service, check out what it can do for you and how little Ruby code you have to write to use it.
Using Cloud Formations at AWS is an incredible way of building repeatable infrastructure, learn more about how it works and get to know cfn-bridge as well, a gem that aims to fill in the gaps not covered by the Cloud Formation API yet.
Just a couple tips of stuff we commonly have to do in Ruby when doing file operations.
Using factories is nice to simplify your specs, but you should be careful with the mutable objects you could be reusing there.
Much is said about code reuse, when to reuse and how to reuse, but there's a strong movement about not depending on a gem if it's small or if you can write one that does the same yourself. Is it really an improvement to write one yourself?
When building APIs you should be careful with what you actually allow people to see since anything that's out there could possibly be called by someone. Read more about it here.
Sometimes too much magic might be a problem for your Ruby codebase, check out how Ruby's implicit and explicit object conversions work and how you can use or remove them from your codebase.
Tired of having dozens of services running in your mac but only using a fraction of them at a time? Then stop doing it and start using foreman to do the job of managing them for you.
While fixing a bug at rspec-mocks, the real issue was a code smell, matching against generic exceptions at your tests. So, learn why you should not do it and how to fix it if you see code like that.
Learn how to implement object comparison in Ruby, the operators available and gotchas you might find while doing it.
If you have to handle various ruby projects with various different rubies and you don't want to go crazy managing the dependencies, you should start using read this tutorial and start using RVM. If you don't have this need yet you should also read it as RVM makes playing with new and different rubies and gems a breeze!
If you're looking for a better way to search your application's text and knows that relational databases usually can't handle the job, Solr and Sunspot are here to help you. In this simple tutorial you'll learn how to use Solr and Sunspot to add real world full text search to your Rails applications.