Antonio Cangiano has pitched Ruby 1.8.7, 1.9.1p378, 1.9.2, JRuby 1.5.1 and IronRuby 1.0 against each other for a Ruby performance “shootout” on Windows 7. JRuby 1.5.1 came in as fastest. Read More
I’ve been itching to do some audio or video interviews on Ruby Inside – here’s the first! Gregg Pollack of EnvyLabs and Ruby5 (previously of RailsEnvy fame) is doing a screencasting and podcasting workshop at BizConf so I thought I’d ask him what that entails and how developers can benefit from learning about these media. (I like things short and simple so the interview is just 10 minutes long.)
Link to YouTube in case the video embed doesn’t work for you.
Products mentioned by Gregg include Screenr, Jing, ScreenFlow, and Camtasia for Mac. Gregg is also keen for you to get in touch with him if you have anything to promote on the Ruby5 podcast. Read More
Isolate, developed by John Barnette, seems to be a less opaque alternative to Bundler where gems are built and installed within a single Ruby project, in a “vendorized” fashion.
Steven’s adoption and advocacy of Isolate stems from a bitter and fundamental disagreement between Steven, BJ Clark, and an un-named Bundler developer. Ah, the intrigue! Read More
At RailsConf 2010, Fabio Akita (of AkitaOnRails.com) went crazy with his camcorder and interviewed a wide selection of Rubyists, as well as famous C++ and Agile manifesto developer Bob Martin.
The interviews are divided up into groups:
- Robert Martin – as well as an interview with Fabio, a video of his keynote at RailsConf 2010 is also included
- David Heinemeier Hansson – 23 minutes of one-on-one with DHH – a refreshing change from his usual keynote/mass audience style
- Miscellaneous interviews – covering Ryan Bates (Railscasts), Ben Scofield, James Golick, Carl Lerche, and Santiago Pastorino.
- Ruby Heroes winner interviews – covering Aaron Patterson [Nokogiri], Gregory Brown [Prawn], Nick Quaranto [Gemcutter], and Wayne E Seguin [RVM]
Some sample code will clear up any confusion:
class Product < ActiveRecord::Base
scope :untitled, where(attribute(:name) == nil)
def self.cheaper_than(price)
where attribute(:price) < price
end
def self.search(term)
where attribute(:name) =~ "%#{term}%"
end
end
sexy_scope reimplements Arel Read More attribute methods like lt, in, matches and not using regular Ruby operators.
Earlier today, someone on Twitter linked up this fun “Ruby propaganda” poster by Paul Battley. I asked him if I could post a copy here for fun and he pointed out that it’s six years old! With Ruby sliding down the TIOBE index a couple of places, though, perhaps it’s time to revive it ;-)
Update: Since the flames have already begun, this is just a fun, tongue in cheek link to a poster I thought was cool. No language wars needed! Read More
Glyph(GitHub repo) is an interesting looking “document authoring framework” built in Ruby by Fabio Cevasco. Glyph is both a tool chain and a macro language that’s parsed by Treetop into XHTML (which can then be transformed into PDF).
Fabio has clearly put a ton of work into this and has been eating a lot of his own dogfood, as this 72 page PDF manual for Glyph (produced by Glyph itself) demonstrates. In an e-mail to me, Fabio stressed that “he could really use some help” from people interested in document authoring and building in the form of code contributions and testing, and he’s ready to help people get started with that. Read More
It’s been almost a year since Ric Roberts posted about using MongoDB and MongoMapper and I’ve seen an explosion in the number of people using these tools in the Ruby community since then (I use them heavily on coder.io too).
MongoMapper has become the de facto standard way to use MongoDB from Ruby, but it’s not the only game in town. Mongoid, by Durran Jordan, has recently been creeping up in popularity too, and with a stunning project site and robust documentation, it deserves some attention.
At first glance, Mongoid and MongoMapper seem to take similar approaches and have very similar APIs, so I got in touch with both Durran Jordan (Mongoid) and John Nunemaker (MongoMapper) to split some hairs and it turns out they have different motivations, aims, and, underneath it all, they target different use cases pretty well. Read More
In January 2008, I lamented that the lack of a true mod_ruby was damaging Ruby’s viability on the Web (which led to 100+ posts in the comments section!) but within a couple of months Phusion released Passenger (then known as mod_rails) and Ruby webapp deployment hasn’t been the same since.
Now, Phusion have built up a successful little consulting business (with some seriously big name clients) and are hard at work on Passenger 3. “Ease of use, stability, and robustness” are the keywords, and while performance is still being improved, Phusion seem keen to make Passenger the highest quality solution rather than merely the faster. Read More
For the past couple of years, Hampton Catlin (best known as the inventor of Haml) has run an annual Ruby survey and you can take the 2010 survey now. There are 23 multiple choice questions, mostly about your library and coding preferences.
At the time of posting, 3619 people have taken the survey and, interestingly, you can check out the results of the survey as it goes on – the results page is automatically updated each day.
Things that stand out in the results are the significant growth in jQuery, Ruby 1.9 (up to 24% this year from 7.6% in 2009), and Haml usage, and that 10% of respondents list Sinatra as their webapp framework of choice (up from 2.8% in 2008). Read More
Hi – this is a guest post by Giles Bowkett. I made at least $10,000 in the last few months selling videos on my personal blog (including at least $5,000 selling a video about how to have a terrific programming career, and at least $5,000 selling a video about how to sell videos on your blog).
As crazy and hucksterish as this might seem, I’m not the only one. PeepCode, the Pragmatic Programmers, RailsEnvy, ThinkCode.tv, and Codeulate all sell Ruby-related screencasts; Rubyists selling Ruby-related ebooks include Jeremy McAnally, former Rails Activist Mike Gunderloy, Marc-André Cournoyer, the husband-and-wife team of Thomas Fuchs and Amy Hoy, and, if you go back as far as 2006, DHH himself, and 37Signals as a whole (who made $120,000 in one month selling a PDF off their blog, and in the process sparked a debate with Tim O’Reilly about whether traditional publishers still had any value at all – a debate somewhat ironic in the context of this year’s new, traditionally-published 37Signals book, Rework). Read More
I received this e-mail today:
Who could refuse such a short, pleasant e-mail? Not me, which is why if you’re looking to soothe your soul and do some Rails work, you should check out their job listing. You need to be near to Seattle as you need to be on-site at least a day or two each week, but full-time and half-time arrangements will be considered. Read More
If you’re using the MongoDB document oriented “NoSQL” database from Ruby at all, you owe it to yourself to try John Nunemaker’s MongoMapper – it’s practically the ActiveRecord of the MongoDB world.
The latest version is a strong step forward. ActiveRecord-esque scoping has been added, and a smart new querying DSL has been implemented that lets you do things like:
User.where(:age.gt =27).sort(:age).skip(1).limit(1).all
If you’re not using MongoDB at all and aren’t sure what all the hoopla is about, John’s Why I Think Mongo Is To Databases What Rails Was To Frameworks from December 2009 is a great high-level introduction to the concepts involved. Read More
In Rethinking PDF Creation in Ruby, Jared takes a playful swipe at Gregory Brown’s much loved Prawn PDF generation library. He expresses a preference for converting HTML and CSS documents to PDF, rather than using the more PDF-level conventions Prawn adopts. To do this, he and some colleagues built PDFKit, a Ruby HTML-to-PDF library powered by wkhtmltopdf.
Given the “Prawn is a bit meh” tone of Jared’s article, though, Gregory Brown is not impressed and points out that Prawn gives you stronger and more precise under-the-hood control, useful particularly for building complex forms, tables and doing point-perfect positioning of on-page elements. Read More
Developers hankering for more performance from their Rack and Rails applications are using Ruby 1.9 fibers and event-based EventMachine-driven libraries as a way to boost the performance of their applications – in opposition to scaling by merely running multiple processes or using threads.
It’s no secret that thread-based development can be Hard™, even if you didn’t have to deal with Ruby quirks like autoloading not working properly and the GIL (Global Interpreter Lock). Luckily, Ruby 1.9 provides fibers, light-weight “execution units” that are manually scheduled by their parent application.
Back in April, Mike Perham introduced Phat, an asynchronous Rails 2.3.5 app running on Ruby 1.9 and supporting “many concurrent requests in a single Ruby process.” In his explanation, he referred back to Scalable Ruby Processing with EventMachine, a talk he gave at Austin On Rails that’s worth checking out. Read More