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.
A Detailed Look at a Small DCI Refactoring in Ruby
In this post I go over a small refactoring to clean up some code in Whoops by implementing the DCI pattern. I’ll cover the actual code changes and include my usual hand-wringing about what could be done better.
The 12 Gems of Christmas
I’m blogging about a new or “under-appreciated” rubygem every day for the next 12 days. Each day you will learn about a gem and how it can help you as a Ruby developer. Read all about The 12 Gems of Christmas.
Making Call Indexing Faster in Brakeman
I wrote up a small blog post about using perftools.rb to improve performance where I didn’t think there was room for improvement.
Contextuality - context global variables
I’ve had a problem. I’ve found a solution. I’ve wrote a solution. I’ve used it. [more inside]
Referencing local gems in your Gemfile
If you need to reference local gems in your Gemfile, but don’t want to annoy your coworkers by hardcoding a path in your home directory, here’s a quick solution.
Ruby Tidbit: Include vs Extend with Module Class Variables
I just put together a quick article about an interesting difference between include vs extend of modules when it comes to class variables. Interesting, if not necessarily practically applicable. :)
Convert to the new Rspec syntax with Vim macros
Rspec 2.11 introduces a new syntax: expect(foo).to eq('bar') instead of foo.should eq('bar'). [more inside]
Using Pen & Paper. CRC Cards.
Programmers tend to use software to solve absolutely all problems. Need to take notes? Here is an application for taking notes. Brainstorming? All sorts of mind mappers are available for you. Even though in most cases it makes perfect sense, sometimes I find that a piece of paper and a pen are better tools for the job. I’d like to talk about one of the most interesting and, unfortunately, underused tools for brainstorming: CRC cards. Read more…
Magma Rails 2013
We just launched <a href=”http://www.magmarails.com/?utm_source=rubyflow&utm_medium=rubyflow&utm_campaign=launchdate” target”_blank”>Magma Rails 2013</a> dates. [more inside]
Simple App Stats with StatBoard
I made a simple gem for displaying app usage stats.
Running a High Volume Rails app on Heroku
In 3 easy steps you can setup a rails app on Heroku that can easily handle 200 requests per second and 100 concurrent connections, for free. Check out how!
Your Objects, the Unix Way — Applying the Unix Philosophy to Object-Oriented Design
I just posted the latest article on the Code Climate blog. It’s written by John Pignata, and discusses the similarities between Unix design and good OOP (with a Ruby example).
turntabler: An evented Turntable.FM API
turntabler is an evented, fiber-aware, fully-implemented API for Turntable.FM. Features include untangled callbacks, interactive debugging, detailed documentation, and more all wrapped up in a clean, consistent, object-oriented API.
Adding borders to images from your Ruby code
This blog post explains how to easily add various kinds of borders to images using Cloudinary’s cloud-based image transformations. It also demos some useful chained transformations for quickly achieving interesting effects. The post includes sample code in Ruby on Rails.
Using RABL to build Sinatra and Rails APIs
As RABL has been growing in popularity, I have noticed a lot of confusions and misunderstandings about best practices and how RABL works. To help remedy that, I have put together three guides: Understanding RABL, Managing complex logic, and generating flexible responses. In addition, if you are using RABL successfully, please add yourself to People using RABL and let me know if there’s any other guides you would find helpful.
Beautifully Simple Blogging with a Rails Engine
I just released version 0.6 of the blog engine called Almanac that can be used in Ruby on Rails projects. It’s lightweight, elegant and includes some geeky goodies like Markdown for all inputs and simple social network integration.
Git database branches
We love Git. At Railsonfire we are currently working on a new version of our platform with lots of new features. For every feature we create a separate Git branch and once it’s done we integrate the feature into the main application. This keeps us from having half-baked features spoiling our service. [more inside]
Real life concurrency in Go
Concurrency is a hot topic in the Ruby community, so taking a look at how other languages/communities approach the challenge can be very valuable. This is exactly what I did in this blog post showing how to write concurrent code in Go.
Upgrading to Rails 4 eBook (beta)
I have released the first beta version of Upgrading to Rails 4. Rails 4 is not yet released, but might be soon. There are also certain features you can start using today in Rails 3.2 that have been extracted as gems. [more inside]
Portable Ruby Bit-Twiddling with #unpack()
Ruby code using strings to work with byte arrays may need to be updated in order to work with Ruby 1.9. Here’s a way to do it that retains compatibility with Ruby 1.8.
gem 'seo_params' - easy way to retrieve main SEO parameters
I just launched v.0.0.3 gem ‘seo_params’. It can be used to determine the main SEO parameters.
New mousetrap-rails version
I just released new mousetrap-rails version — 0.0.7.
How to write facemash in ruby
I just wrote all about Ruby, Facemash and the Elo rating system. It’s a small post which takes a little bit of a test driven approach to re-creating the Elo rating system in Ruby. It’s a nice little article, you should go read it.
Rapidly Build Distributed Applications with ITTIA DB and Qt
ITTIA DB SQL is available for the Qt application and UI development framework from Digia. This enhances cross-platform development and encourages best practices for concurrent processing of data. It also allows developers to access relational embedded data management software, offering a unique competitive edge with such features as replication, data distribution, reliable concurrency and logging.