Alex Young, a UK-based Rails developer, has put together a great guide that looks at the different development patterns used in Rails plugins and helps you develop well-designed plugins of your own. Read More
The Ruby Hit Squad is a crack team of Ruby developers – formed of Ryan Davis, Eric Hodel, Wilson Bilkovich, and Shaners Becker – devoted to eliminating “needless complexity.” Its first product, Vlad the Deployer, is a Capistrano competitor, designed to provide a fast, uncomplicated remote application deployment tool, but without the supposed complexity Capistrano offers. This is a top team of developers, and this is a big first splash, so check it out because it’s bound to become popular in the Ruby world. Read More
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
(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
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
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
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
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
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
(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
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
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
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
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:
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
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