This Week in Ruby: Rails 3.2, Rails Tutorial, and Why You Should Learn Smalltalk

Posted about 5 hours back at Ruby Inside

It's the latest Web-based syndication of Ruby Weekly, the weekly Ruby and Rails e-mail newsletter (which just tipped 11K subscribers). Ruby Weekly now has a 'tips' page where you can submit links for potential inclusion so if you're releasing something or have written a cool post, fill out the form and you may be in Ruby Weekly next week :-)

Headlines

Rails 3.2 Released
DHH has unveiled Rails 3.2! Not quite as big a deal as 3.1 but has a faster development mode, faster route recognition, a tagged logger, and more. With Rails master now aiming at 4.0.0, it seems 3.2 may be the last version of Rails to support Ruby 1.8.

Ruby on Rails Tutorial, 2nd Edition (Updated for Rails 3.2)
Michael Hartl's "Rails Tutorial" site has been incredibly popular over the last year and he's now finishing up a 2nd edition that's fully updated to Rails 3.2 standards. The first 5 chapters are already good to go and can be read no-cost, as always, at railstutorial.org.

Articles and Tutorials

Backing Up with Backup: A Neat DSL for Backup Operations
Pat Allan loves Michael van Rooijen's 'backup' gem so much that he wants to to convince you to use it, by showing you two examples of why he finds it so useful. It does seem pretty handy..

Why Every Ruby Developer Should Learn Smalltalk
Smalltalk was the first purely object oriented language (though Simula included objects before it) and it heavily inspired Ruby's initial development. Victor Savkin thinks that Rubyists could learn a lot from playing with Smalltalk.

The Right Way to Code DCI in Ruby
DCI (Data, Context and Interaction) is an interesting object oriented pattern that's been discussed in the Ruby community lately, but Mike Pack thinks most articles oversimplify its use. In this post, he digs into the idea.

The 'Rails and Spine.JS' Series
Ken Collins is working on a series of posts about using the Spine.js JavaScript MVC framework alongside a Rails app. This is the first of three posts so far.

systemd Socket Activation and Ruby
systemd is a system and service manager for Linux (and replacement for the System V init daemon). Here, Marcin Kulik looks at how a socket-based Ruby server can take advantage of systemd's socket activation feature.

RVM Stable (and More)
Michal Papis of Engine Yard looks at the 'stable' release of RVM (Ruby Version Manager) and how to install and use it. Some handy RVM tips here.

Media

RailsCasts: Upgrading to Rails 3.2
In the latest RailsCasts episode, Ryan Bates looks at the newly released Rails 3.2 and shows off some of its new features. Short and sweet in just 9 minutes.

Web Programming and Updating Frameworks with Yehuda Katz
The Ruby Rogues sit down with Yehuda Katz to discuss Web frameworks, JavaScript, Rails, Merb, Sinatra, Rack, and more. And just why is to_json a problem? If you have a spare hour, find out :-)

Libraries and code

SitemapGenerator: Generate XML Sitemaps from Ruby
Originally a Google idea, XML sitemaps are now used by several search engines and SitemapGenerator will generate Sitemap 0.9 compliant sitemaps for you from Ruby. Includes Rails integration too but is otherwise framework agnostic.

tconsole: A MiniTest Testing Console for Rails
tconsole is a testing console for Rails based around MiniTest (also supporting Test::Unit). It allows you to issue commands concerning what tests to run, and see their test output.

Lisp in 32 Lines of Ruby
Implementing a small Lisp interpreter is the super geeky equivalent of 'hello world' and Michael Fogus (author of The Joy of Clojure) deftly pulls it off in 32 lines of Ruby here.

Ruby Jobs of the Week

Rubyist (or Pythonista) Required at RackSpace [San Antonio, Texas]
Hosting company Rackspace is looking for a developer with Ruby or Python experience (and maybe even Erlang!) to work in its foundation software development team. If Git, Capistrano, MongoDB, and Rails are all interesting to you, check it out.

IRQA - A Requirements Definition and Management Solution for Systems Engineering Projects

Posted about 11 hours back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

Visure Solutions recently announced the availability of IRQA which denotes a solution for requirements definition and management (RDM). A sound process using professional tools is important for ensuring the quality of product and solution development with respect to the requirements specification. By Michael Stal

This week in open source

Posted about 12 hours back at GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS - Home

bourbon

Over the past week bourbon went up to version 1.3.5. A whole bunch of sweet new features are in it now:

Frank (frankzilla) added a modular-scale mixin, of which the golden-ratio mixin is but one implementation (126a83b and 96659a2). He also added a parameterized fallback color to linear-gradient (60e2c63).

Phil LaPier (plapier) worked with Gabe Berke-Williams (gabebw) on a bourbon command-line too for working with Sass outside of a Rails app, such as Jekyll, WordPress, or even a static site (ad1499b, b55a763, 0ebf906, c2077d8, 13e70d3, 2fc2c90, and bf34e70). You can run bourbon install to install it and bourbon update to update an existing installation.

capybara-webkit

A careful sleuth has updated the documentation for capybara-webkit this week. Marc Schwieterman (marcisme) discovered that a fully passing test suite depends on ImageMagick, and documented as much in the contributions guide (df39268).

factory_girl

Version 2.5.0 of factory_girl is out, and there’s a badass new feature in it. But first:

Joshua Clayton (joshuaclayton) fixed a bug where the :parent’s factory wasn’t being passed along (4aecfff). Carlos Antonio da Silva (carlosantoniodasilva) fixed the URLs in the readme to point to correct locations (aa74edd and 42f5a10).

Oh, and you may remember from last week that Josh deprecated the attributes_for method admist much controversy. Well, he undid that (2d6adfd).

Josh then implemented a feature that Joe Ferris (jferris), FactoryGirl’s originator, has wanted for years: you can specify how FactoryGirl should construct the class (5780364). Joe excitedly documented this (ea89aad). This means that FactoryGirl can be used for non-ActiveRecord classes, including immutable classes.

paperclip

In accordance to our new gem schedule, paperclip hit 2.5.1 this week. Mike Burns (mike-burns) cut the release, adding a ChangeLog and updating the NEWS file (b7f9b6f and ec4793e). In short: Fog storage is passed the content type, S3 can be encrypted, and ActiveRecord is optional.

Presentation: Mobile Web Development with HTML5

Posted about 14 hours back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

Keith Donald and Josh Long discuss the mobile browsers, the hardware constraints, the existing simulators, emulators and JavaScript frameworks, and the HTML5 support for doing mobile development. By Keith Donald and Josh Long

jQ.Mobi – jQuery Optimized for Mobile Devices

Posted about 14 hours back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

appMobi has open sourced jQ.Mobi, a rewrite of jQuery, competing with jQuery Mobile for developer mindshare. By Abel Avram

Episode #241 - January 27th, 2012

Posted about 16 hours back at Ruby5

We weren't timely enough to get the news of the release of Rails 2.3.1, but we are still chock full of ruby news this week! The BitNami RailsStack installer, business_time, DCI education and commentary, Draper 1.1, theme-in-a-gem, Lisp in Ruby, wat, and Rails' Hidden Features in this feature-packed Ruby5.

Listen to this episode on Ruby5

This episode is sponsored by New Relic

How can you make the awesomeness of NewRelic even more... uh... awesomer? By adding metrics collection to your own code to capture the kinds of things only you would know you care about!

In this blog entry

, Sean Walberg shows you how to do it. Thanks for the submission, Sean!

RubyStack
The BitNami Rails stack has been updated for rails 3.2. It can be deployed using a native installer, as a virtual machine or in the cloud, and includes pretty much everything you'd want in a Rails environment except for a butler to go run your errands while you're in the zone.

More on DCI
DCI has become a hot topic in Rails, largely because some of the language features in Ruby make it a compelling choice for code organization. In this article, Mike Pack describes how DCI isn't just a code organization choice, but goes all the way into influencing the 'mental model' your users have of the application. He also talks about performance considerations, which has been absent from most of the DCI discussions to date.

Draper 1.1
Sometime between travellng the world to speak at conferences and teaching newcomers to be Ruby Ninjas, Jeff Casimir has found the time to release Draper 1.1. This release includes performance tweaks and compatibility with CanCan, among other stuff.

business_time

business_time is an ActiveSupport add-on that gives you business -time helper methods such as "4.business_days.from_now".

This release adds configurable week start and end (if you're a baker, or live in the middle East, for instance), as well as several other small pullup requests. Further, Chris Wise shared with us an article he wrote showing how to integrate business_time with the holidays gem, so business_time automatically skips over holidays when doing calculations.

EngineYard Theme
Ok, so you might not need to build the next EngineYard website, but if you've ever had a common set of design assets (css/javascript/images/partials/etc) and wanted to bundle them up so you're not just blindly copying files across projects, rip this project apart and learn how it works.

Risp?

Mike Fogus implemented Lisp in 40 lines of Ruby code, then went back and tweaked it to be 32 lines. And desipte Arild's comment in the audio, its not like an 'obfuscated C' contest either.

Take 5 minutes, peruse the code, and stretch your mind a bit. You might just learn a thing or two about Ruby while you're at it!

wat
If you missed it in your twitter stream this week, go watch it right now. ~4 minutes of standup-at-the-command-line only a developer could love.

Arlington UnConf
This was supposed to be a closing shoutout to friend-of-the-show Jim Gay who is hosting an Unconference in Arlington, VA next month. The next story was added so this got bumped into the main story lineup.

Rails Hidden Features
Well, maybe not quite 'hidden', but definitely the not-quite-talked-about features that will have an impact on your day to day development.

Rails 3.2.1 has been released

Posted 1 day back at Riding Rails - home

Rails 3.2.1 is out, with some fixes and doc improvements. Please check the CHANGELOGs gist for details.

Presentation: Event-Driven Programming in Clojure

Posted 1 day back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

Zach Tellman explains how to deal with asynchronous programming difficulties in Clojure using an event-driven data structure. By Zach Tellman

Presentation: Devops Fools, Tools and other Smart Things

Posted 1 day back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

Patrick Debois discusses the role of tools in creating a new devops culture that needs to be build inside organizations around the idea of craftsmanship. By Patrick Debois

Designer Tools

Posted 1 day back at GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS - Home

In addition to the basic development environment everyone at thoughtbot works with, there are a number of other apps most of the designers here use to keep our work flows efficient and our skills top notch. When I came to thoughtbot as an apprentice a little over three months ago, I was exposed to a variety of new apps that greatly improved my work-flow, so I thought I would share with you some of the apps I open up every morning and a bit on how I use them.

The basics

These apps are not necessarily design-specific apps but they are so essential in our day to day work-flows that I couldn’t leave them out.

  • Propane: Chat client for 37Signals’ Campfire. This is an indispensable communication tool.
  • Growl: Notifications for anything and everything. Used primarily for Campfire notifications.
  • iTerm: Terminal emulation for OSX. Mostly beneficial for it’s ability to open multiple widows in tabs.
  • MacVim: Text editing. If you’re not already using Vim, take the time to start learning. It will greatly speed up your development time and if your working with developers who use Vim it will make pairing easier.
  • Divvy: Helps you keep your screens and windows spaced, aligned and organized efficiently without clicking and dragging all day.

Adobe

If you work on the web I am sure you are already familiar with the typical Adobe software that web designers use, so Im not going to get into the details of our Adobe setups here. Most of us prefer to do hand sketches/whiteboarding and move into wire framing with HTML and CSS as soon as possible any way. Static mock-ups tend to have a host of draw backs when working in an agile development process. That said, photoshop, illustrator and fireworks are still our workhorses when it comes to specific graphic design needs.

Skitch

A handy screen capturing tool that allows you to very easily draw and add notes on top of your screen shots, without having to open up photoshop or some other image editing tool.

Cloud App

Collaboration and iteration are key ingredients in doing great work and I have found this app to be an effective way of sharing screen shots with team members, clients and other designers so I can get that valuable feedback on the development of my work. When you take screen shot Cloud app automatically uploads your image to web servers and in a drop-down from the Cloud app icon in the OSX menu bar, provides you with a sharable link to that image.

Notational Velocity

Good for general note taking and the keeping of VIM and Git cheat-sheets. Especially if you are new to VIM or Git keeping track of commands and remembering how to get certain things done right can be quite challenging, so we all suggest building up robust cheat-sheets with this little app.

FontCase or FontExplorer X

Great typography is a fundamental element of great design. Managing your fonts effectively will help you find that perfect type-face faster and reduce the time it takes to get started with a solid visual design direction. Taking the time to organise your typefaces in a way that is meaningful to you can also be a good way of curating your collection and more intimately familiarizing your self with the fonts in it.

Little Snapper or Gimme Bar

Both are awesome tools for building a personally curated library of design inspiration. Saving images and examples of the things that inspire you is a great way to refine and hone your own personal style and also a great way to help kick off the visual direction for a new project. If you are not using tools like these already, start. It will be hugely beneficial to the quality of work you do.

Hues

A great little app for grabbing colors from anywhere on your screen. It provideds rgb, hsl, and hex values for any color you select which makes pulling color pallets from photos and images you have stashed in your Gimme Bar or Little Snapper quite nice.

Bourbon

Bourbon is not an app, it’s a library of SASS mixins and functions that greatly speed up front-end development time. It is just as awesome for new comers to .css/.scss as it is for the most seasoned pros. It’s also one of the main reasons the sketch-to-html&css-wire frames process has proven to be so effective and efficient for us. We have extensively written about bourbon before.

So that’s it for a light-weight overview of the apps I find my self opening on a daily basis. Hopefully I have introduced you to some new and useful tools. I’d also love to hear about some of the tools your using, so feel free to add your comments below!

Dentaku - a calculator for Ruby

Posted 1 day back at OnRails.org

I’m currently working on a project that requires the use of formulas or expressions to implement business rules (the original system is an Excel workbook), and I needed a way to implement some of the same functionality. My first thought was to model the formulas in ActiveRecord, clause by clause, using something like `acts_as_nested_set` to handle hierarchies and grouping. However, I’ve done something similar before, and was never quite satisfied with the result — it always felt “heavy” — so I decided to try a different approach this time.

The result is Dentaku, a gem that parses and evaluates Excel-like formulas, allowing the use of named variables that will be substituted for real values at run time. So far, the result values will be either boolean or numeric, but strings will probably be added soon.

To illustrate how it works, let me set up the following (quite contrived) hypothetical situation: You’re building an upvote system for a Reddit-type site, but the customers do not want to encode all the logic for the system in Ruby — they need to be able to manage all the rules on the fly. However, they are willing to be limited to only using a few predefined attributes of the user as all variable inputs to the rules.

The initial ruleset is something like this: A vote from a “normal” user is worth one point for each week the user has been with the site. A vote from an “admin” user is worth 100 points. A vote from a “limited” user is worth one point, and a vote from a “blacklisted” user is worth zero points. However, users can earn achievements, which update a “bonus” number for the user, and any normal or limited user’s vote points are augmented with the bonus, but only after the user has been with the site for at least five weeks. (Hey, I promised contrived, right?) So how could we accomplish this with Dentaku?

We could create the following rules:


    +-------------------------------+----------------------+  
    | conditions                    | points               |  
    +-------------------------------+----------------------+  
    | admin                         | 100                  |  
    | normal and age_in_weeks < 5   | age_in_weeks         |  
    | limited and age_in_weeks < 5  | 1                    |  
    | normal and age_in_weeks >= 5  | age_in_weeks + bonus |  
    | limited and age_in_weeks >= 5 | 1 + bonus            |  
    | blacklisted                   | 0                    |  
    +-------------------------------+----------------------+  

Then, given a hash representing the user like:

    user = {
      :admin        => false,
      :normal       => true,
      :limited      => false,
      :blacklisted  => false,
      :age_in_weeks => 10,
      :bonus        => 8
    }

we could calculate the points for a vote by the represented user like so:

    def calculate_points_for(user, rules)
      calculator = Dentaku::Calculator.new

      rules.each do |rule|
        if calculator.evaluate(rule.conditions, user)
          return calculator.evaluate(rule.points, user)
        end
      end

      # no rules matched, default to zero
      0
    end

So that’s what Dentaku is about — I hope someone else finds it useful. You can check it out, fork it, etc at the Dentaku Github page, or just `gem install dentaku` and start playing!

Most-Wanted Features in Entity Framework

Posted 2 days back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

The EF team has setup a uservoice forum to let users request and vote for features. We are highlighting the current top 7 most-voted-for feature requests, along with possible workarounds you can use today. By Roopesh Shenoy

webOS Is to Run on Many Devices and Enyo on All Major Browsers

Posted 2 days back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

HP has decided to broaden the reach of webOS by adopting the standard Linux kernel, and it’s Enyo development framework is going to run on all major browsers. Enyo 2.0 has been open sourced. By Abel Avram

A users guide to the Trajectory redesign

Posted 2 days back at GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS - Home

We released a redesign to the Trajectory UI today. I want to explain the thinking that went into the redesign, what the benefits to users are, and what’s in store for Trajectory as we move forward.

View of the main stories index.

First, let’s do a quick history lesson. A year and a half ago, we decided to build Trajectory to scratch our own itch. We wanted a lightweight agile project management tool that had a strong focus on discussions, both for the stories being worked on, as well as for longer term planning. The original design for the Trajectory UI emerged out of an iterative process, and evolved as we learned more about the product over the course of its development.

This redesign was a chance to take stock of what’ve we learned through that process, and lay the groundwork for the future. The most obvious change is the lighter color scheme. We’d heard continual feedback that people found it difficult to quickly scan through stories because of the dark color scheme. The new UI fixes this problem and provides a more pleasant experience for extended, daily use.

Next, we designed the UI to respond better to differing screen sizes. If you have a large monitor, the site will expand to use the space available to it. Shrink your window down, and the site remains just as usable. There’s more work to be done, but the long term goal is to serve a single web-based interface to all devices, whether it’s a 27” display or your mobile device.

There are a number of other UI improvements. We’ve improved the searching and filtering of stories. (Pro tip: hit the f key to enter search mode.)

The new search interface.

It’s now easier to estimate and re-estimate stories.

The new story estimation UI.

You can also quickly see the progress on stories created from an Idea.

Progress of stories attached to an idea.

We also performed a heavy refactoring/rewriting of the front-end markup and style. We were able to eliminate and simplify substantial portions of the front-end code, which should hopefully translate to snappier performance within the browser.

Trajectory is going to be a very important part of what thoughtbot does in 2012. If you haven’t done so yet, sign up for a free trial and see what we’re so excited about.

Amazon Launches DynamoDB

Posted 2 days back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

Amazon Launches DynamoDB On January 18th, Amazon Web Services launched DynamoDB, which as explained by Werner Vogels, AWS’ Chief Technical Officer in his blog, is an NoSQL database designed for Internet scale web applications. By JP Morgenthal