Issues » 142

This week's Ruby news Previous issues | Read this issue on the Web
Ruby Weekly Issue 142
April 25, 2013
Parsing JSON The Hard Way
From the Practicing Ruby journal comes an excellent walkthrough of building a JSON parser from Aaron 'tenderlove' Patterson with the emphasis being on using parser and compiler tools in Ruby rather than parsing JSON per se.
String#scrub Method Added to Edge Ruby (Ruby 2.1)
If the string includes an invalid byte sequence for the encoding, #scrub replaces invalid bytes with a given replacement character.
From our Sponsor
Time to break up that huge Ruby App? We have you covered.
New Relic’s Ruby Agent now provides Cross Application Tracing which tracks and visualizes how different services in your infrastructure communicate. In addition to tracking across Ruby apps, we can trace API calls made to Java, Python, PHP, or .NET apps. For example, you can use CAT to see related Transaction Traces between a Rails application and a high performance Java service.
Ruby Versions Demystified
MRI, Rubinius, JRuby, 1.8, 1.9, 2.0.. there are a lot of terms to keep track of when dealing with the most popular distributions and versions of Ruby interpreters. Mitchell Hashimoto explains the differences.
RVM 2.0: The Plan
A high level overview of what is planned for RVM 2, the next version of the popular Ruby version manager and installer.
Running Bash (or any External) Commands From Ruby
Want to run a bash script or command from Ruby? The un-named admin demonstrates a few different ways.
Ruby Hacking Guide Chapter 11: Finite-State Scanner
Translation of a single chapter from the Japanese 'Ruby Hacking Guide' book that looks into how MRI's code scanner works at a deep level.
Metaprogramming Fibonacci
A look at the process behind using metaprogramming to abstract a memoization technique out of a recursive Fibonacci calculation method.
Don't Spam Your Users: Batch Notifications in Rails
A look at getting around the problem of sending individual notifications from a busy webapp by instead merging notifications over time into fewer, more palatable e-mails.
Advanced Topics in Ruby FFI
Not for beginners. Covers aliasing with typedef, attach_function usage, FFI::Structs as parameters, creating your own data types, and implementing type safety.
Instrumenting Ruby On Rails with TraceView in Under 10 Minutes
Watching and Listening
A Screencast on using MiniTest with Rails, Just For You
Mark Bates over at has kindly offered up access to their MiniTest Rails screencast to Ruby Weekly readers. Why? Because in celebration of RailsConf, he wants to offer a month of his service to you too. (Disclaimer: We have no financial or business connection.)
Impressive Ruby Productivity with Vim and Tmux
Impress your friends, scare your enemies, and boost your productivity 800% with this live demonstration of vim and tmux. You will learn how to build custom IDEs for each of your projects, navigate quickly between files, write and run tests, view and compare git history, create pull requests, publish gists, format and refactor your code with macros, remote pair program, and more, all without leaving the terminal.
High Rails Availability at Braintree
A look at how payments provider Braintree gets high availability on their Rails application, from pausing traffic without failing requests through to load balancing and rolling deploys.
Help, I'm Stuck. What Do I Test Next?
What do you do when you are stuck in a TDD process? How do you decide where to start when testing? How can you pick what to test next?
The Death of Ifs
A quick (5 minute) look at how you can cut out many of the "if" conditions in your Ruby code.
Libraries, Code and Tools
Sync: Realtime Rails Partials
Sync lets you render partials for models that, with minimal code, update in realtime in the browser when changes occur on the server. Includes a handy screencast to show off the idea.
A Scorched Earth Game in Ruby with OpenGL/Gosu/Chingu
Scorched Earth is an artillery style game (a la Gorillas that came with QBasic) and its mechanic has been elegantly recreated in Ruby here by James Moriarty.
Groupdate: Group ActiveRecord Objects by Dates
An add-on for Rails 3.0 and above that provides a simple way to group objects by day, week, month and more, complete with timezone support. Supports PostgreSQL and MySQL.
lazyload-rails: jQuery Lazy Load for Rails image_tag helpers
Automatically get Rails image_tag helpers to render lazyload-friendly HTML image tags.
ruby-lint 0.0.3: A Linter and Static Code Analysis Tool for Ruby
Hatch: An Experiment in Invalid Object Representations
DevOps Hipster aka Infrastructure Engineer at Jimdo (Hamburg, Germany)
You understand the hidden potential that lies between development and operations. You adore automatisation so in the end, you always drop the adequate DevOps Borat punchline. You love and contribute to open source software? Join us!
Senior Software Engineer - Ruby, Web and Data Science at State [London, UK]
Senior Rails Developer at PhishMe, Inc. [Virginia]
Place a job listing in a future issue of Ruby Weekly here
Last but not least..
The Pragmatic Studio's New 'Ruby on Rails Programming' Course
Following on from their popular Ruby Programming course, Mike and Nicole Clark have just released a Rails-specific course aimed at Rails 4.
Published by Cooper Press.
Want to sponsor an issue? See our Q2 2014 media kit.

© 2014 Cooper Press Ltd. Email policy Privacy policy
Office 30, Fairfield Enterprise Centre, Louth, LN11 0LS, UK
Update your email address
or unsubscribe here

ONE e-mail each Thursday. Easy to unsubscribe. No spam — your e-mail address is safe
Published by Cooper Press and curated by Peter Cooper