The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Green Ruby News #87
Finished composing Green Ruby 87. Bunch of links this week, I had to make some selection.
How the Hash Works in Ruby
We wrote an article to explain how the Hash works in Ruby. [more inside]
All you need to know about ActiveJob /w Sidekiq adapter
So everybody must have heard about the shiny new ActiveJob which is going to be released in the next Rails 4.2 release. ActiveJob is a nice addition to Rails stack that helps standardise the background job interface. It works with many adapters on the market such as Resque, Sidekiq. In the article by Envato’s engineer Trung Lê (@joneslee85) will guide you through how to configure ActiveJob with Sidekiq adapter, additionally he will show you few secret gems behind the ActiveJob such as multi-queue prioritisation, callbacks, exceptions handling, background mailer and live object parsing (GlobalID).
Better Know Enumerable: partition
Part 2/n in a series exploring the corners of Enumerable. This part covers using the partition method to eliminate a conditional. Pudding may or may not be involved.
Rack Master now 2~4% Faster with 1 PR
Do you like speed? Do you hate unnecessary object allocation? Well then you just got a got a 2 to 4% performance boost in Rack & Rails for free.
Extensible Web Resource Loading Manifesto
Current web platform primitives are are not sufficient to deliver an extensible and perf-friendly platform - we need to fix that.
PSA: A reminder about WEBrick's :DoNotReverseLookup config option
Unless you remember to put :DoNotReverseLookup => true into your WEBrick config, reverse DNS lookup will happen for every incoming connection, potentially causing serious latency. My story: WEBrick and Socket.do_not_reverse_lookup: A Tale in Two Acts Technical details: Fix regression bug in WEBrick’s :DoNotReverseLookup config option implementation
Rails with Webpack - Why and How
The Asset Pipeline is the canonical way of packaging assets in Rails. It can make things easy and is a good approach for most Rails applications, but at times it can makes things harder and shows limitations. So, you might consider using an alternative for bundling your assets.
Process Payments with Paypal for Rails Apps
We just wrote a tutorial on processing payments with Paypal for Rails apps. It’s actually got a lot simpler since the last time I looked at it. [more inside]
Katrina Owen: Overkill
Here’s video for Katrina Owen’s talk, Overkill, from the recent E4E developer conference.
Practicing Ruby Scavenger Hunt
In celebration of the fact that Practicing Ruby’s archives are now completely open to the public, I’ve put together a little contest. You can read the rules here and participate without signing up for anything. [more inside]
Preserving technical knowledge
Some thoughts on preserving technical knowledge as devs change jobs.
How RuboCop can ease your code review pains. Style guides for Ruby coders
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.
Absolutes as an AntiPattern
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. [more inside]
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.
Property-Based Testing (QuickCheck) in Ruby
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…]
i18n Rails - How to organize your locales in larger projects
I wrote a blog post on how we cleaned up our locales on a larger Rails project. See the post here.
Prefer Objects as Method Parameters, Not Class Names
“Class-oriented programming” over-emphasizes classes. Class-oriented code can only reference constants, which results in classes which use inheritance instead of composition. [more inside]
10 skills that will make you a better Rubyist
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…]
ITTIA Sync Adapter Connects Android to Big Data
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.