Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

By Peter Cooper / August 16, 2007

Gosu

Gosu claims it’s the “coolest gamedev library around.” That’s pretty hard to qualify, but with a focus on Ruby, I won’t be one to argue. It’s installable as a gem, with a simple gem install gosu, is MIT licensed (although the sound component is third party closed source), and works on OS X, Linux and Windows. It supports 2D graphics (accelerated with your 3D hardware), sound, and various forms of input (keyboard, mouse, gamepad, etc).

(Note: Sorry for the slow flow of posts on Ruby Inside this week.. I still have no broadband due to the house move, but it will be back on in the next few days.. Read More

By Peter Cooper / August 11, 2007

Bountyshirt
(from one of Bounty Hunter Inc’s great t-shirts – yes, you can buy this!)

Jay Philips has stumbled across an interesting technique that like Symbol#to_proc, allows you to define block actions more succinctly for methods like map and sort_by. It goes one step beyond Symbol#to_proc’s goodness, however, and makes things even tighter. He calls it the Methodphitamine. Consider this typical Ruby on Rails example to fetch a list of capitalized last names for all users in a database:

User.find(:all).map{|x| x.contacts.map{|y| y.last_name.capitalize }}

Using Symbol#to_proc, you end up with something like:

User.find(:all).map{|x|x.contacts.map(&:last_name).map(&:capitalize)}

But with the “Methodphitamine”, we get:

User.find(:all).map &its.contacts.map(&its.last_name.capitalize)

Learn more about it in Jay’s blog post. Read More

By Peter Cooper / August 10, 2007

Arscreencast

Gregg Pollack of RailsEnvy, co-author of the infamous Rails vs PHP/Java “commercials”, has put together a presentation cum screencast about ActiveRecord and object mapping in general. It’s based on a presentation given on June 16 to the Orlando Ruby User Group. He covers the origins of ActiveRecord, the rationale for its use, and walks through topics like many to many relationships, polymorphic relationships, and tagging. Read More

By Peter Cooper / August 10, 2007

Fixinfixtures

In “Fixin’ Fixtures” Chris Wanstrath looks at how to make working with fixtures in a Rails testing environment a lot less painful. His opening paragraph says it best:

The main problem with fixtures, for me, has always been how unfun they are. They literally suck the fun out of anything they’re around. You throw them in your test/ directory, then suddenly testing is, like, work. But it’s not work, dammit. This is Ruby, dammit.

So, keep them fun. Write your fixtures in Ruby.

Enjoy! Read More

By Peter Cooper / August 8, 2007

Performancetips

Ben Smith takes a look at using the YSlow Firefox plugin to improve the performance of Rails-powered sites. He shows how to tweak Rails applications (and even Nginx) to satisfy some of YSlow’s recommendations. Even though he doesn’t go into much depth, it’s a good post if it helps raise the awareness of YSlow in the Rails community. As I’ve been forced to use dialup and mobile Internet lately (and the trend will continue for others with the iPhone, etc) I’ve become acutely aware of the performance differences between well developed and poorly developed sites! Read More

By Peter Cooper / August 7, 2007

Calendardateselect

Calendar Date Select is a new(ish) “date and time picker”, developed by Tim Harper, designed primarily for developers to use in Rails applications. It uses the standard Prototype JavaScript library, and is easily installed as a Rails plugin:

script/plugin install http://calendardateselect.googlecode.com/svn/tags/calendar_date_select

Take a look at the collection of demos of the picker to see its full range. Read More

By Peter Cooper / August 6, 2007

Treepower

Ryan Davis has released the second major version of ParseTree, a much loved Ruby library that extracts parse trees for Ruby classes and methods and returns them in an s-expression type format using standard Ruby data types. It relies on Ryan’s other well known library, RubyInline. In his announcement, Ryan gives a demonstration:

As an example:

def conditional1(arg1)
if arg1 == 0 then
return 1
end
return 0
end

becomes:

[:defn,
:conditional1,
[:scope,
[:block,
[:args, :arg1],
[:if,
[:call, [:lvar, :arg1], :==, [:array, [:lit, 0]]],
[:return, [:lit, 1]],
nil],
[:return, [:lit, 0]]]]]

There are many significant enhancements beyond the 1.x.x family, so check it out. Read More

By Hendy Irawan / August 4, 2007

(English translation of the text below follows)

Situs Resmi Ruby Indonesia telah diluncurkan. Jadi sekarang telah tersedia 9 terjemahan dalam situs web Ruby, belum termasuk beberapa lagi yang masih dalam pengerjaan.

Programmer Indonesia yang menyukai Ruby semakin banyak, berdiskusi menggunakan wadah milis id-ruby, yang sekarang sudah semakin ramai.

Adanya situs ini diharapkan dapat semakin membantu kemajuan Ruby dan teknologi di tanah air tercinta. Selain berisi materi yang terdapat di situs Ruby versi Inggris, situs ini juga menyediakan materi-materi yang spesifik terhadap komunitas Ruby di Indonesia.

Tim pelaksana proyek ini terdiri dari Arie Kusuma Atmaja, Yohanes Santoso, dan Hendy Irawan. Read More

By Peter Cooper / August 4, 2007

Fredgeorge

Fred George, a Thoughtworks consultant with some 38 years’ development experience, presents “Applying Agile to Ruby”, a 50 minute video and slide-based presentation. He looks at the usual Agile practices (and a few design patterns) and applies them to the Ruby ecosystem. Be warned, there’s a lot of comparison of Ruby to Java, but George’s delivery is dynamic enough to keep things interesting. Read More

By Peter Cooper / August 3, 2007

There are three jobs from the Ruby Inside Job Board from the last month:

Rails Developer for Startup (San Francisco, CA)
A Rails Developer or Senior Rails Developer is needed at Affinity Labs, Inc, based in San Francisco, California. Affinity is a typical fast-moving startup, and they’re looking for people especially with skills in areas like Ruby, Rails, ERB, AJAX, RJS, YAML, REST and Capistrano. Basically, it’s a SF-based Rails developer’s dream job! You can even pick which OS you work on, you get a fully stocked fridge, and bi-weekly happy hour parties.

Rails Developer, System Integration Engineer, and Platform App Developer for Clinical Research Software Co (St. Read More

By Peter Cooper / August 3, 2007

Method Missing

method_missing is one of Ruby’s coolest bits of metaprogramming voodoo. Two years, Why wrote about it, and now Amy Newall, half of a Massachusetts-based husband-wife development team, writes about 10 things you should know about method_missing. Read More

By Peter Cooper / July 31, 2007

Ruby Inside hasn’t had any new items for the last several days as I’ve just bought a house, and have had to enjoy the various work that brings. So, to get things back on track with Ruby Inside, here’s a roundup of some of the key news and articles I’ve seen over the past week instead:
Shoes

Why Releases His Shoes To The World
Despite the finest Ruby blog in the land, Why’s RedHanded, slipping into a coma earlier this year, Why continues to wow the Ruby community with his contributions. This time around, he’s built a cross-platform toolkit for making “Web-like Desktop Apps” using Ruby called Shoes. Read More

By Peter Cooper / July 25, 2007

Call Graph-1
Charlie Savage, author of ruby-prof, recently baked in support for Rails to ruby-prof, so now it’s possible to profile your Rails application, see where the delays are, and work on improving performance.

Hot on the heels of this development, Charlie wrote “How to Profile Your Application“, an article that does just what it says on the tin, and which demonstrates how to profile the CPU time used on a single Rails request, and visualize the call tree.

This was quickly followed up with “Making Rails Go Vroom“, another great article that looks at what parts of Rails significantly slow things down. Read More

By Peter Cooper / July 24, 2007

Railsfingersup
(credit: yarrg)
This morning, Pete Forde of Unspace prodded me to write about a new book, “Beginning Rails” by Jeffrey Allan Hardy and Cloves Carneiro Jr. (with Hampton Catlin). And, when I receive my copy from Apress, I will be reviewing it here. Of more immediate interest to me, however, was a note that David Heinemeier Hansson, the creator of Ruby of Rails, had denied the authors the right to use the Rails logo on the front of their book:

Jeff wanted the Rails logo on the cover of the book but was informed by Apress that David Heinemeier Hansson has been “politely resisting” permission to use the logo, and has said in the future, it will only appear on his books. Read More

By Peter Cooper / July 23, 2007

Randscrcast-1

Railscasts, maintained by Ryan Bates, continues to release one great free screencast after another, with 9 so far this month, although we’re going to include one from June 29 for good measure. We first looked at Railscasts a few months ago, so if you haven’t visited again since, it’s worth it. Here are the latest screencasts:

Recently Popular Posts