RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
October 01, 2014
Preserving technical knowledge
Some thoughts on preserving technical knowledge as devs change jobs.
Your code is not only interpreted by a machine, but by fellow programmers as well. Here's a few words describing How RuboCop can ease your code review pains and why style guides can be useful for team work.
I posted new atricle titled Absolutes as an AntiPattern. Hope you enjoy!
Input/Output in Ruby
Input/Output, generally referred to as I/O, is a term that covers the ways that a computer interacts with the world. Screens, keyboards, files, and networks are all forms of I/O. Data from these devices is sent to and from programs as a stream of characters/bytes.

Learn about Ruby's beautiful, duck-typed approach to Input/Output.
September 30, 2014
66 Useful Links from RESTFest 2014
If you missed RESTFest 2014, or want to know where you should follow up, Eric Oestrich collected 66 useful links at the conference. Enjoy!
How do gems work?
Gems might seem magical. But with a little investigation, they’re pretty easy to understand.
The theft Ruby gem allows for property-based testing in Ruby — generating valid, randomly-generated input and validating that a particular property is true.
Decorator Pattern in Ruby
Decorators allow us to add behavior to objects without affecting other objects of the same class. The decorator pattern is a useful alternative to creating sub-classes. We will look at an example where we use subclassing to solve a problem, and then look at how decorator objects provide a better solution. [Continue reading...]
I wrote a blog post on how we cleaned up our locales on a larger Rails project. See the post here.
“Class-oriented programming” over-emphasizes classes. Class-oriented code can only reference constants, which results in classes which use inheritance instead of composition.

This becomes a problem when you want to mix static state and runtime state, because static state is viral, as static state can only compose other static state.

Avoid passing class names as method parameters as much as possible.
September 29, 2014
Just published new blog post about 10 skills you need to master to become a better Ruby developer.
Presenters in Rails
When your models are bloated with methods that are only used in views, it might be a good time to refactor them. Moving that logic into helper modules might be OK in some cases, but as the complexity of your views grows, you might want to look at presenters. In this article, I will walk through how I refactored views to use presenters instead of helper methods. [Continue reading...]
Due to an unprecedented influx of sensitive data that is managed and collected on mobile devices, ITTIA is offering a state-of-the-art bidirectional synchronization solution for Android apps that enables big data collection on-the-go. ITTIA DB SQL communicates with ITTIA DB Sync, and uses a back-end RDBMS to store device data in existing tables and download updates specific to each device.
Green Ruby News #86
Green Ruby News #86 is out.
I just wrote a guide for adding a staging environment to Rails explain why and how to it set up: how to copy data from your production environment, how to deal with mails, the question to ask for...
September 28, 2014
finite_machine version 0.9.2 brings important fixes to transitions involving :any type state and thread safety.
I just released activerecord-time-scope, which provides sets of useful scopes for time-related columns.
Devise is considered the best-of-breed authentication solution for Rails apps. In this blog post, we go over how Devise is built on top of Warden, how to use it in a Rails app, and how to write tests for it.

How to use Devise in Rails for Authentication
September 27, 2014
Website screenshot server
I made this tiny gem because I couldn't find any solution for ad hoc ruby code reloading that would also work on Windows (e.g. shotgun and rerun use fork(), so they're unix-only). Hope you find it useful and let me know what you think!
September 26, 2014
Rails Disco tries to get the best bits of event sourcing integrated into a Ruby on Rails tool stack. The adds commands, events and projection and some Rails generators. I think it works very good. I seek for help to maintain this project. I believe in the idea, but lack the time to get this thing production ready. Every feedback and help is appreciated.
A blog post about how we at CookiesHQ used Google's geocoder to seed our database with journeys for testing geomatching using PostGIS.
I’m the newest Rails Support Engineer to join Ninefold and a big advocate of developer bootcamps. Her talk sounded like it would be perfect for where I am in my career.

An excellent point that Kate made was that you shouldn’t only rely on your senior developers to teach your junior ones. As the common saying goes, “you don’t know something until you teach it.” The last person who was taught should be doing the teaching. This will definitely cut down on the amount of cynicism that can interfere with the learning process.

Kate broke down the four phases of onboarding for a new developer:
Read about the 4 phases of onboarding a Junior dev.
September 25, 2014
A short, annotated blog post on how to use Passenger standalone in development with smooth integration of debugger and pry.
Brian Knapp shares some lessons learned from his landmark Ruby web framework benchmarking post. Really great post.
We just posted a complex Barcelona Ruby Conference (#Baruco) summary written by Phillip Boksz.
September 24, 2014
*nix have pipes, Elixir has pipes, Ruby deserves pipes! I just hacked this together yesterday and I'd love to get some feedback:

pipable("moo") | Reverse | Leet | Mooify | :downcase |'@pcreux') | { delete: 'o' }
# => cw said: 00m
Blog post announcing Hangar, the Rails plugin we made at Faraday to expose factories to our Protractor tests.
Harry's is open-sourcing Kontrast, an automated testing tool for comparing visual differences between two versions of a website.
Advanced gsub
Today I'm celebrating the two-year anniversary of RubyTapas today, and in honor of that I've freed up a short screencast about an advanced usage of String#gsub from the archives.
Want to get started with Docker for hosting your Rails apps? There are a lot of options out there. In this post I describe a start to deploy a Rails app with Docker.
Should my company choose RubyMotion or Swift?
We've been writing a few Swift apps at TFG. Here's a summary of our experience shifting from RubyMotion .
September 23, 2014
Use RSpec and JSON Schema to create a test-driven process in which changes to the structure of your JSON API drive the implementation of new features.
Can you learn Rails before learning Ruby? You can, for a little while. But if you want to learn enough Ruby to master Rails, study Ruby on its own. There are tons of Ruby books out there. I counted four shelves the last time I was in a bookstore. A lot of them are good. But there are a few that are in a class of their own. And they'll help you through the entire process of picking up Ruby.
Dancing drones, Gangam Style, Matz, sun and the nicest-looking presentation ever, in other words: Sunny Memories from the Barcelona Ruby Conference 2014 .
Do you find yourself too lazy to go to translation file to create a new translation entry? Are your views full of "I'll turn this in to a translation call later" literal strings?. Well, end to your woes is a click away. Check out the new version of Burek!
Here's a writeup on various ways to create Structs with some suggestions on improvements.
September 22, 2014
Writing detailed documentation helps to improve software design. Explaining the intent mitigates inconsistencies and helps other people to understand our initial idea.

We'll discover why the semantic of the raised exceptions is important to write solid API interfaces.

[Read the article]
Just cooked up a blog post about interaction with objects using first order functions: Click here to enjoy
We've scoured through the change notes to bring you some of the more interesting tidbits that are changing in Rails 4.2.
In previous part, we’ve set up an application with Neo4j and Rails and deployed it to Heroku. From here, we’re going to see the ways to declare relationships and write query in Neo4j.
September 21, 2014
TTY gem release v0.1.0
I've released tty gem that aids in developing beautiful command line clients. The library has been in development for a while and has ambitions goals for the future. Please check it out and let me know your thoughts. Finally please take a look at this lovingly crafted project page. Thanks!
Green Ruby News #85
Posted this week Green Ruby News 85 with a bunch of fresh links.
You probably know how to add authentication to a Rails app with a framework like Devise or OmniAuth, but don't let your understanding stops there. In our recent blog post, we talked about several ways to add authentication in a Rails app, and talk about their benefits and drawbacks. 

Rails Authentication Methods
September 20, 2014
How can you plug complex, multi-model SQL queries into ActiveRecord models so that you can use them in your views? ActiveRecord Eager Loading with Query Objects and Decorators.
September 19, 2014
Use fancy Postgres features like Common Table Expressions to calculate a duration in business hours in any time zone. Blogged here.
Store Schema v0.0.1
I've just released Store Schema. Enhances ActiveRecord::Base.store_accessor with data conversion capabilities.
Parelation v0.0.1
I've just released Parelation. It translates HTTP parameters to ActiveRecord queries.
I just wrote about splitting up the large Rails applications.
I just published a blog post about my take on splitting up Rails applications.