Posted by kev
Sun, 15 Apr 2007 20:13:00 GMT
An interview by a twitter developer has gotten a good deal of press lately. For many, it has reawakened the giant that is the “does Rails scale” debate, and others feel compelled to defend the framework.
The problem with Rails isn’t that Ruby is slow. It’s also not that Rails is slow, or big, or bloated, or doesn’t scale. The problem isn’t that Rails doesn’t support multiple databases or composite keys out of the box. The problem is that this is how the vocal minority in the community tends to respond to criticism.
So let’s all slow down and take a look at how we got here and what we can do to avoid it. That’s of course assuming we want to. Inflammatory posts certainly get lots of traffic, but I think Rails is in the spotlight enough we can actually talk like reasonable people and still get things done.
More after the jump.
Read more...
Posted in Rails, Op-Ed, Musings | 29 comments
Posted by kev
Fri, 06 Apr 2007 18:36:00 GMT
Hi guys. Gluttonous has been quiet lately, so I wanted to update you a bit on life in general.
First off, I haven’t yet talked about my work at Powerset. We’ve been quickly growing and I’m humbled by the type of people who join up on a daily basis. We’re about to hit 6 Ruby devs and 50 in the company, and for me it really feels like a dream.
That being said, I talk a bit more about what I’m actually doing at Powerset in an interview given over at the Working With Rails Blog in their series on Hackfest winners.
Additionally, I give an update on one of the reasons this blog has gone dry for a while at the end of the interview. You really shouldn’t miss this.
As far as speaking goes, I’ll be giving a talk on improving test coverage with Heckle at the Silicon Valley Ruby Conference in San Jose on April 21-22. The list of speakers is amazing, and I’m looking forward to the conf. If you’re there, come say hi.
Posted in Rails, Ruby, sightings | no comments
Posted by kev
Fri, 16 Mar 2007 17:58:00 GMT
class Package < ActiveRecord::Base
def <=>(other)
versions = self.version.split(".").push self.rel
other_versions = other.version.split(".").push other.rel
versions.size.times do |n|
if versions[n] =~ /[^\d]/ || other_versions[n] =~ /[^\d]/
comparison = versions[n] <=> other_versions[n]
else
comparison = versions[n].to_i <=> other_versions[n].to_i
end
return comparison unless comparison.zero?
end
return 0
end
end
[Package.new(:version => "0.0.8a"),
Package.new(:version => "0.0.8c"),
Package.new(:version => "0.0.8b")].sort.map(&:version)
[Package.new(:version => "0.0.8"),
Package.new(:version => "0.0.10"),
Package.new(:version => "0.0.9")].sort.map(&:version)
Posted in Rails, Ruby | 3 comments
Posted by kev
Sat, 16 Sep 2006 01:54:00 GMT
Today I checked in version 0.5 of ARTS into my plugin repository. This release adds support for page['some_id'].toggle and friends.
In general the assertion looks like:
assert_rjs :page, ELEMENT_ID, *METHOD_CALLS
So, to match page['some_id'].toggle you use:
assert_rjs :page, 'some_id', :toggle
You can continue to string as many method calls as you’d like. To match page['some_id'].toggle.up.down.left.right.everywhere:
assert_rjs :page, 'some_id', :toggle, :up, :down, :left, :right, :everywhere
Finally, for assignment make sure to append an ‘=’ to the method name and include the value. For example, to match page['some_id'].style.color = 'red':
assert_rjs :page, 'some_id', :style, :color=, 'red'
Go check it out.
Posted in Rails, testing | 3 comments
Posted by kev
Mon, 11 Sep 2006 00:55:00 GMT
Hi guys. One of the reasons ARTS still doesn’t have support for the square bracket syntax of RJS is that I haven’t thought of a form of assertion I’d like. I think this might work:
assert_rjs :page, 'foo_id', :toggle
:page is used to denote the [] syntax and foo_id is the id of the element we’re working with. All subsequent chained methods follow afterwards as symbols like :toggle.
This example would match page['foo_id'].toggle.
What do you think? Do you have a better idea? Please do give me your thoughts. This is the one major hole in ARTS and I’d like to get it patched up.
Posted in Rails, testing | 1 comment
Posted by kev
Fri, 08 Sep 2006 19:52:00 GMT
Today Chris Abad of the sd.rb podcast uploaded four new episodes:
In Episode 004: Numbers Tom Preston-Werner (of [Gravatar], Chronic) gives the first part of a series I hope he’ll continue called “Ruby is Awesome”. This talk focuses on interesting things about how Ruby handled numbers. Though this sounds really basic, he showed things that I had never come across and kept my attention. If you’re newish to Ruby this is definitely worth your attention. Go take a look.
Episode 005: ARTS Plugin is my presentation on using ARTS to build test driven RJS. This is from the second meeting of sd.rb so the first part is full of Rails basics. If you’re interested in seeing ARTS in action (used to build an ajaxified blog) you probably want to skip to about 1/3 of the way in.
Episode 006: Dynamic Domains features Chris Abad talking about his new application [Outlandish] and how they implemented dynamic domains.
Finally, in Episode 007: Rails Authentication I talk very briefly about how to use the acts_as_authenticated and restful_authentication plugins. At some point I begin rambling about how REST works, but that part is best left for when the podcast of last night’s REST presentations go up. I’ll point you there when it happens.
Posted in Rails, Ruby, sd.rb, sightings | 3 comments
Posted by kev
Wed, 06 Sep 2006 18:47:59 GMT
In case you missed it, I’ve got information about proposals for the Caboose Documentation Project on the Caboose Blog.
If you’re interested in helping out, please go take a look.
Posted in Rails, documentation
Posted by kev
Mon, 04 Sep 2006 22:16:00 GMT
Rabble just released an article on his Testing Rails Blog on how to run tests on deploy with Capistrano. It covers basic Capistrano tasks that will work with a single deployment server and then goes into some more advanced tasks for multiple server deployment and concurrent deploys. Go check it out.
Posted in Rails, testing, sightings
Posted by kev
Sun, 03 Sep 2006 21:23:00 GMT
In case you missed the changeset, Assaf Arkin’s assert_select has been included in EdgeRails. This officially marks the deprecation of assert_tag.
I think this is a good thing. I always found the syntax of assert_tag ugly. assert_select looks to be a fine replacement.
If you aren’t running edge, it is available as a plugin.
Posted in Rails, testing
Posted by kev
Sat, 02 Sep 2006 23:30:00 GMT
Today I decided to see how much of the test code in my current side project I could rip fixtures out of. At the same time I could see what kind of speed increase I got from staying away from the database. Model tests seem to be the most straight forward so I started there.
Read more...
Posted in Rails, Ruby, testing | 2 comments