public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Added Array#second through Array#tenth as aliases for Array#[1] through 
Array#[9] [DHH]
dhh (author)
Tue Jun 17 11:37:57 -0700 2008
commit  22af62cf486721ee2e45bb720c42ac2f4121faf4
tree    155c0f6bb42effe927953956140b7b1243f7e05c
parent  7650ff892cbffcaaaf9c5ab72466e98903a202d3
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *Edge*
0
 
0
+* Added Array#second through Array#tenth as aliases for Array#[1] through Array#[9] [DHH]
0
+
0
 * Added test/do declaration style testing to ActiveSupport::TestCase [DHH via Jay Fields]
0
 
0
 * Added Object#present? which is equivalent to !Object#blank? [DHH]
...
20
21
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
24
25
...
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
0
@@ -20,6 +20,51 @@ module ActiveSupport #:nodoc:
0
         def to(position)
0
           self[0..position]
0
         end
0
+
2
+        # Equal to self[1]
0
+        def second
0
+          self[1]
0
+        end
0
+
0
+        # Equal to self[2]
0
+        def third
0
+          self[2]
0
+        end
0
+
0
+        # Equal to self[3]
0
+        def fourth
0
+          self[3]
0
+        end
0
+
0
+        # Equal to self[4]
0
+        def fifth
0
+          self[4]
0
+        end
0
+
0
+        # Equal to self[5]
0
+        def sixth
0
+          self[5]
0
+        end
0
+
0
+        # Equal to self[6]
0
+        def seventh
0
+          self[6]
0
+        end
0
+
0
+        # Equal to self[7]
0
+        def eighth
0
+          self[7]
0
+        end
0
+
0
+        # Equal to self[8]
0
+        def ninth
0
+          self[8]
0
+        end
0
+
0
+        # Equal to self[9]
0
+        def tenth
0
+          self[9]
0
+        end
0
       end
0
     end
0
   end
...
13
14
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
17
18
...
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
0
@@ -13,6 +13,20 @@ class ArrayExtAccessTests < Test::Unit::TestCase
0
     assert_equal %w( a b c ), %w( a b c d ).to(2)
0
     assert_equal %w( a b c d ), %w( a b c d ).to(10)
0
   end
0
+  
0
+  def test_second_through_tenth
0
+    array = (1..10).to_a
0
+    
0
+    assert_equal array[1], array.second
0
+    assert_equal array[2], array.third
0
+    assert_equal array[3], array.fourth
0
+    assert_equal array[4], array.fifth
0
+    assert_equal array[5], array.sixth
0
+    assert_equal array[6], array.seventh
0
+    assert_equal array[7], array.eighth
0
+    assert_equal array[8], array.ninth
0
+    assert_equal array[9], array.tenth
0
+  end
0
 end
0
 
0
 class ArrayExtToParamTests < Test::Unit::TestCase

Comments

jcnetdev Mon Nov 17 21:14:11 -0800 2008

Really? Seriously?

broney Tue Nov 18 00:14:23 -0800 2008

I must admit, I think this is a pretty unuseful change.

djd Tue Nov 18 00:18:50 -0800 2008

I must admit, I think this is a pretty useful change. :-)

nikosd Tue Nov 18 00:42:26 -0800 2008

I’m not sure if this is useful or not, but isn’t this (and all the things like this) bloating the code base anyway?

michaelklishin Tue Nov 18 01:01:42 -0800 2008

Hey, they call Ruby on Rails “a little framework”, what did you expect?

kpumuk Tue Nov 18 01:36:33 -0800 2008
Oops.
<ul>
 <li><%= link_to videos.first.title, video_path(videos.first) %></li>
 <li><%= link_to videos.second.title, video_path(videos.second) %></li>
 <li><%= link_to videos.third.title, video_path(videos.third) %></li>
 <li><%= link_to videos.fourth.title, video_path(videos.fourth) %></li>
 <li><%= link_to videos.fifth.title, video_path(videos.fifth) %></li>
 <li><%= link_to videos.sixth.title, video_path(videos.sixth) %></li>
 <li><%= link_to videos.seventh.title, video_path(videos.seventh) %></li>
 <li><%= link_to videos.eighth.title, video_path(videos.eighth) %></li>
 <li><%= link_to videos.ninth.title, video_path(videos.ninth) %></li>
 <li><%= link_to videos.tenth.title, video_path(videos.tenth) %></li>
</ul>
dekart Tue Nov 18 01:42:21 -0800 2008

Hey, guys, could you add helpers up to [100]? I need special helpers such as eighty_six and seventy_three too :)

We also should add method_missing to parse one_hundred_thousands_and_forty_nine to completely exclude numbers from Ruby code

yaroslav Tue Nov 18 01:44:03 -0800 2008

So many smart and helpful people in this thread, with original comments.

NZKoz Tue Nov 18 02:03:40 -0800 2008

Gee guys, your helpful attitude astounds me. Here’s an idea, don’t use the methods and they won’t bug you.

If you really think 10 methods equals bloat, you’d better go and remove every class and method in your application! Let me give you a quick head start:

 def entire_app(url)
  case url
  when "/hello_world.txt" 
    "Hello WORLD!" 
  end
 end

jinzhu Tue Nov 18 02:55:54 -0800 2008

10 useless methods,another 10 useless methods,another 10 useless methods ……

peter Tue Nov 18 03:14:31 -0800 2008

+1 for this change

dhh Tue Nov 18 03:47:52 -0800 2008

Haha. I’m honored by the attention of this commit! It reminds me of the good ol’ days where we debated whether pluralization was worth it. Or whether 1.second was good. Thanks for the memories ;).

This particular patch was born from the daily work I do administrating the applications at 37signals. A lot of the support work requires going into script/console and investigating various objects. In the console, I got sick of not being able to do people.second when I had a collection and knew I needed the second record. first and last was so nice and fluid, but if I needed second or third, I had to drop back to array access. Didn’t like that, so here you go.

DarkTatka Tue Nov 18 04:02:38 -0800 2008

i completely agree with this commit, 3 of 5 my applications end with this as extension anyway.

aizatto Tue Nov 18 04:09:40 -0800 2008

If you needed this so much, why not stuff this into ~/.irbrc instead? Then its global to all your consoles! Personally I think that would have been a much more appreciated solution rather than stuffing it into activesupport.

jorrel Tue Nov 18 04:11:07 -0800 2008

I wanted ‘second’ when I’m iterating hashes. But ‘third’ to ‘tenth’ sugar doesn’t seem to taste that sweet. :)

hgtesta Tue Nov 18 04:12:02 -0800 2008

+1 for this too. I always use Array#first and Array#last for arrays of size 2.

radar Tue Nov 18 04:13:10 -0800 2008

Doesn’t anyone else think that typing array1 is faster than typing array.second? Surely by now it’s become natural.

augustl Tue Nov 18 04:39:25 -0800 2008

I think the biggest problem with this is that when I see people.fifth in code, I won’t know what to do. Also, spotting people[4] is easier when skimming the code.

Then again, if the argument is that this was used a lot in console, it’s all good I guess.

dhh Tue Nov 18 05:50:42 -0800 2008

I’ve actually also used it in code. It’s particularly useful for command parameters. Think ARGV.second, ARGV.third. But yeah, not something you’d use every day. My most common use is with the console.

dhh Tue Nov 18 05:51:48 -0800 2008

Radar, you could make the same argument against the built-in first and last. They have [0] and [-1] equivalents. But the English versions read nicer. Ruby is full of stuff that merely improves on readability. I love that about the language.

georgi Tue Nov 18 06:06:50 -0800 2008

I guess, this is just a diss to all the LOC counters ;)

raganwald Tue Nov 18 06:56:59 -0800 2008

Would anyone prefer methods like caddr?

NZKoz Tue Nov 18 06:58:59 -0800 2008

perhaps cdaddaddr?

divineforest Tue Nov 18 07:05:05 -0800 2008

Nice commit :). I suggest that those second…tenth methods to be added to ActiveRecord::Base as well so we could do just Person.second.

bkerley Tue Nov 18 07:19:53 -0800 2008

@raganwald: http://github.com/ivey/carpark provides it

Peeja Tue Nov 18 08:36:11 -0800 2008

Re: LOC:


        [:second, :third, :fourth, :fifth, :sixth, :seventh, :eighth, :ninth, :tenth].each_with_index do |name, i|
            define_method(name) { self[i+1] }
        end

Et voila.

Oshuma Tue Nov 18 10:08:36 -0800 2008

I think something like this should be included on a per-app basis, as opposed to being in core. How hard is it to just ‘cp array_stupid.rb ./lib’ for your projects?

-5 points for this, kthx.

kris Tue Nov 18 10:26:29 -0800 2008

Commits like this push me closer to Merb.

ieure Tue Nov 18 10:27:15 -0800 2008

This is great, but could you please provide Japanese localization? It’s so much easier for me to use:

foo.二番目に, foo.第3, foo.第4

When I’m in the console instead of foo1, foo2…foo[N].

Thanks, I’d really appreciate it.

georgi Tue Nov 18 10:27:27 -0800 2008

@Peeja: your code will not show in the documentation.

heypanda Tue Nov 18 10:35:42 -0800 2008

Or you could have some fancy-fun and alias :n(st/th) for 0 to your heart’s content. Then you get people.1st people.2nd… people.100th. If you’re feeling particularly courageous, you could toss the sucker in method_missing, and be able to do people.53485th.

heypanda Tue Nov 18 10:40:44 -0800 2008

Though I suppose that would cause confusion, since people expect “first” to be the “0th”. Well boo to that. Start at 1.

heypanda Tue Nov 18 10:44:44 -0800 2008

Or, I could learn Ruby, and realize that you can’t start a method with a number.

georgi Tue Nov 18 10:49:31 -0800 2008

Seriously I cant understand the console use case. Typing the brackets is for me way faster than typing a method name, even with tab completion.

dlisboa Tue Nov 18 11:34:18 -0800 2008

These methods are pointless. So are most method added for readability (Time.now instead of Time.new?). But I believe there are more important ways to spend our time, and more valuable discussions. Just leave it.

rubymaverick Tue Nov 18 12:25:40 -0800 2008

Honestly the only arguments I can really see for being against this is the extra methods being in the Array#methods call, which I sometimes use in the console. But even then most of the time when I’m looking up a method I have a pretty good idea what its called so I usually end up doing #methods.grep /whatever/ anyways

brennandunn Tue Nov 18 12:52:35 -0800 2008

More pointless bloat for the docs. What’s next, revamping #succ to make ‘first’.next # => ‘second’ ?

bkerley Tue Nov 18 12:52:38 -0800 2008

Can we get an alternate version for C users who think of arrays as a0 being the “zeroth,” a1 being “first,” etc.? I’d like the choice in my code.

Aupajo Tue Nov 18 13:54:59 -0800 2008

Sugar so sweet it makes my teeth ache.

adkron Tue Nov 18 14:38:58 -0800 2008

So what do things like this do to my load time, and my memory usage. I know that there was just the commit of using :only on resources to lower memory consumption of routes. Now that we saved that memory we can fill it with other things. I believe that I read an interview with you, David, where you were asked about what is going in the rails core in the next release and you said something along the lines of, ‘It is more like; what is coming out?’ Maybe that isn’t what I heard.

binarylogic Tue Nov 18 15:01:25 -0800 2008

It’s ten methods. I don’t understand why people get worked up over methods that are optional. Not to mention you can’t iterate using “first”, “second”, etc. So it should be very obvious that this is more or less a console utility. I think he could have stopped at “third”. Honestly, is anyone going to do this all the way up to fourth? If you are going beyond “third” there is some calculation involved where using the index would be easier.

defunkt Tue Nov 18 15:02:55 -0800 2008

If GitHub had a Hall of Fame, this thread would be the first entry.

ryanb Tue Nov 18 16:13:00 -0800 2008

@defunkt lol, and this one could be second.

mattly Tue Nov 18 16:30:06 -0800 2008

@binarylogic people get worked up for two reasons: 1) it makes rails more complex 2) it widens the gap between rails and “real” ruby, and if you work with non-rails ruby quite frequently, that gap becomes really annoying.

yairgo Tue Nov 18 16:39:28 -0800 2008

This is awesome!! Do you think we can add in second_to_last, third_to_last… tenth_to_last??

A few times it was said that this was more for use in the console, which is a strong argument that it really shouldn’t be in the code base.

If you think Array1, Array2 aren’t readable maybe you should find a different hobby/profession.

amerine Tue Nov 18 16:49:02 -0800 2008

if you cannot discern between what ruby does and what rails adds then yes I can see it being a problem…. but maybe the problem is that you don’t know ruby well enough. Rails makes lots of stuff easier, and this just adds to the list.

Personally I don’t mind access to my arrays in that fashion. It makes sense and is pretty readable.

+4 Bonus points for making it even easier for my designer to handle small bits of code.

chrislloyd Tue Nov 18 17:11:31 -0800 2008
robbyrussell Tue Nov 18 19:40:32 -0800 2008

Let the man have his cake. :-)

adkron Tue Nov 18 19:57:51 -0800 2008

Good point Chris. I like your answer.

tedhenry10 Tue Nov 18 20:01:53 -0800 2008

Rails 0.9 was better.

boblmartens Tue Nov 18 20:16:43 -0800 2008

Wait, am I wrong, or do you not have to use this if you don’t want to?

rubyruy Tue Nov 18 20:38:51 -0800 2008

I love this patch.

timander Tue Nov 18 20:58:39 -0800 2008

On the bright side, Git lets you undo commits as if they never even happened.

brianmario Tue Nov 18 21:06:42 -0800 2008

for the love of god, you’re all spamming my github dashboard :P

Those of you who hate this patch and want to move to another framework, go ahead. There’s 10x more about to start using Rails anyway.

Those of you who love this patch (and still love rails with it, for that matter) – do you really need to justify yet another spoonful of sugar?

@dhh – keep up the good work, I personally don’t mind if there are a few more methods I can optionally use to make my life easier

anildigital Tue Nov 18 22:05:15 -0800 2008

I think the kind of commit is really useful. But should it be part of framework or not, not very sure!

johnwyles Tue Nov 18 23:57:08 -0800 2008

Why stop at ten? Why not make some dynamic methods for converting numerics to flattened strings so we can do this for all elements in the array? I for one welcome our new 30+ character representational format!

It is hard not to get excited about such a thing: hella_long_array.one_million_seven_hundred_fifty_five_thousand_two_hundred_sixty_third

Error: Unclosed “” tag.

janx Wed Nov 19 00:45:50 -0800 2008

car, cadr, caddr, cadddr, caddddr, cadddddr ..

elisehuard Wed Nov 19 01:04:31 -0800 2008

@chrislloyd’s answer nails it.

NZKoz Wed Nov 19 01:09:54 -0800 2008

Honestly, guys, the amount of effort you’ve expended here rivals only the penis extension thread on trac.

@defunkt: You need to add a STFU button which closes a thread and tells people to take a walk, hug their loved ones, or read a book.

matthooks Wed Nov 19 01:30:11 -0800 2008

cough ibtl cough

neilh Wed Nov 19 01:42:45 -0800 2008

“This is awesome!! Do you think we can add in second_to_last, third_to_last… tenth_to_last??” – lol

tefflox Wed Nov 19 02:11:19 -0800 2008

Hi. Here is my first github comment. I love this change. It may not be “useful” in the Cartesian sense, but it does subtract some hurt. Love it!

yawningman Wed Nov 19 02:32:17 -0800 2008

sweet….


highscores = HighScore.first(:conditions => {:game => "Killer Instinct"})

p highscores.first 
p highscores.second
p highscores.third 
p highscores.fourth
....

elliottcable Wed Nov 19 02:54:41 -0800 2008

I’m not going to argue against this — this is essentially, at it’s core, Rails-ish. This is the very reason I don’t use Rails, and I know there’s many others who think like me. There’s a thin line between sugar (Ruby) and bloat (Rails), and it’s useless to complain about Rails crossing it. I agree that Chris should add a feature to GitHub just so he can close this thread and we can all get on with life /=

spiceee Wed Nov 19 03:28:30 -0800 2008

I think some people should go back to Java, where such a crime would never be perpetrated.

nikosd Wed Nov 19 06:09:59 -0800 2008

@defunkt: Ok, this commit is one of the reasons I’ve come to lurve github a little more! Don’t ever put a STFU button! (Although it would be useful – to be honest :D)

matthewrudy Wed Nov 19 06:15:09 -0800 2008

Yeah. I think this is great. A great discussion, a great argument.

I read the commit logs every day, but this just makes me happy in a way I never expected.

Thankyou Github.

jamesu Wed Nov 19 06:19:03 -0800 2008

I suggest you also add the following methods:

second_from_last, third_from_last, fourth_from_last, fifth_from_last, sixth_from_last, seventh_from_last, eighth_from_last, ninth_from_last, and tenth_from_last.

gaffo Wed Nov 19 07:47:17 -0800 2008

@DHH, as you said to me earlier on Lighthouse,

“While I applaud the effort, I think this is not really don’t enough to be worth a [commit] in Rails code. If you use this a lot, I would definitely recommend making a plugin out of it, though.” -DHH : http://rails.lighthouseapp.com/projects/8994/tickets/1303-scriptgenerate-library

NZKoz : these types of arguments are exactly why rails is a good framework, people are allowed to make comments on things they don’t like.

defunkt: keep it up.

dcrec1 Wed Nov 19 08:33:15 -0800 2008

I think it should be in a plugin, maybe with more other aliases

trevorturk Wed Nov 19 08:40:11 -0800 2008

ActiveSupport::CoreExtensions::PradiptasRolodex?

Yardboy Wed Nov 19 09:12:59 -0800 2008

I got into a discussion of this over lunch one day at RubyConf. I’m reminded of George Carlin’s rant about some religious schlub not liking what he heard on the radio. “The radio has two knobs, Reverend… one turns it off, and the other changes the channel!” In other words, if you don’t like it, don’t use it.

That being said, I can’t wait for someone to add #penultimate.

elliottcable Wed Nov 19 09:32:24 -0800 2008

It’s not about “if you don’t like it, don’t use it”. It’s about it being bloat. It’d be nice if computers could download, upload, transfer, run, and keep in memory an infinite amount of code. They can’t. There’s tons of slightly useful things you could add to Ruby that would be kinda nice, but they’d also be yet more bloat – YMB. Such things shouldn’t be added to Rails.

Wait, what am I saying? This is what Rails is all about. Thar she blows, men! Man the harpoons!

elliottcable Wed Nov 19 09:32:57 -0800 2008

On another note, this epic thread has spawned it’s own meta-commentary: http://tr.im/19fd?stackoverflow

adelcambre Wed Nov 19 09:48:25 -0800 2008

+ # Equal to self[10]
+ def eleventh
+   self[10]
+ end

Now it goes to eleventh.

amerine Wed Nov 19 10:25:26 -0800 2008

@elliottcable Comments about comments? I love the tubes sometimes.

pervel Wed Nov 19 10:26:15 -0800 2008

I think DHH is using a Danish keyboard. Typing brackets on a Danish keyboard is actually quite cumbersome. :)

toretore Wed Nov 19 13:22:37 -0800 2008

http://pastie.org/317766

Joking aside, I’ve sometimes typed users.second just because my brain thought it’d work, and yes, [ and ] are a bit of a PITA to type on non-US keyboards.

georgi Wed Nov 19 14:45:53 -0800 2008

Programmers should just use US keyboard layout.

unimatrixZxero Thu Nov 20 00:55:30 -0800 2008

@georgi: Yes they should.

ozataman Thu Nov 20 02:10:16 -0800 2008

While I myself use similar patches on a per-app basis, these kinds of extensions are a pure bloat to what otherwise is a great framework.

I understand that Rails is all about agile programming, but there needs to be a level of elegance and succinct quality we should not be willing to go below.

ashchan Thu Nov 20 03:41:56 -0800 2008

@ieure: We programmers from China also need these especially for testers: foo.第二, foo.第三, foo.第四…

stalcottsmith Thu Nov 20 10:56:26 -0800 2008

What a bunch of whiny bitches! I personally vote for .second_from_last or .next_to_last as well. Readability first. Keep it up.

benatkin Thu Nov 20 13:18:06 -0800 2008

I was curious how many comments there were, and rather than looking through my history, I started looking for this commit in the repository. I must say that the rails directory structure is well organized. Everything’s broken down into little bits. Nice use of include.

danski Thu Nov 20 14:29:40 -0800 2008

All my arrays have length of eleven, thus this change is useless to me.

danski Thu Nov 20 14:32:32 -0800 2008

oh yeah and

%w(second third fourth fifth sixth seventh eighth ninth tenth).each {|n| define_method…..

/facepalm

boof Thu Nov 20 23:18:11 -0800 2008

This should be an initializer. -1

henrik Fri Nov 21 02:31:39 -0800 2008

Peeja, danski: When I saw this commit back in June, I liked about it that it didn’t involve metaprogramming. If it only spans 2–10, I find this more readable. Also good for RDoc.

bryanthompson Fri Nov 21 07:56:49 -0800 2008

I wonder what Zed has to say about this.

“kris- Commits like this push me closer to Merb.”

+1, and I wonder if Rails could just be split into a Rails-Core and a Rails-More, as well as a Rails-More-dumb_array_methods_and_other_gibberish

redinger Fri Nov 21 08:20:12 -0800 2008

Let’s get Dave Thomas to give a RailsConf Keynote about how we should fork Rails for the people that don’t want convenience methods.

boblmartens Fri Nov 21 08:24:43 -0800 2008

I find this entire section of comments fascinating … the say the least.

What’s with the redundant comments?

bak Fri Nov 21 09:37:05 -0800 2008

My only objection to this is that we already have myarray.at built into Ruby. It doesn’t start at zero if that sort of thing bothers you, it works no matter how large your array is, it’s less typing, and it doesn’t even require square brackets.

henrik Fri Nov 21 13:22:45 -0800 2008

bak: Array#at is zero-indexed.

mikehale: The redundant comments are likely for RDoc.

bak Fri Nov 21 17:18:53 -0800 2008

henrik: so it is. Don’t know where that blip came from.

technohippy Fri Nov 21 17:43:27 -0800 2008

Hi all, I pushed ahead with this idea: http://d.hatena.ne.jp/technohippy/20081121#1227285803

Aupajo Sat Nov 22 00:11:04 -0800 2008

@technohippy

Good god.

ZhangHanDong Sat Nov 22 20:36:21 -0800 2008

~/work/test_222>rails -v Rails 2.2.2 ~/work/test_222>cs Loading development environment (Rails 2.2.2) >> arr = [1,2,3,4,5,6,7,8,9,10] => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] >> arr.first => 1 >> arr.second => 2 >> arr.third => 3 >> arr.fourth => 4 >> arr.fifth => 5 >> arr.sixth NoMethodError: undefined method `sixth’ for [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:Array from (irb):7 >> arr.seventh NoMethodError: undefined method `seventh’ for [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:Array from (irb):8 >> arr.eighth NoMethodError: undefined method `eighth’ for [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:Array from (irb):9 >> arr.ninth NoMethodError: undefined method `ninth’ for [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:Array from (irb):10 >> arr.tenth NoMethodError: undefined method `tenth’ for [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:Array from (irb):11

why ???

ps, cs command = ./script/console

activars Thu Nov 27 17:44:37 -0800 2008

at least it’s readable

jko170 Fri Nov 28 10:35:39 -0800 2008

I really like this. What’s wrong with more readable???

skrat Fri Apr 03 07:41:51 -0700 2009
To DHH: stop programming, start writing poetry. you are too good for this Ruby thing, because replacing
dhh_dumbideas[2]
with
dhh_dumbideas.second
is the most stupid thing I’ve ever seen. It surely makes the code more readable as you have to read the word instead of a number. thumbs up , just please, don’t become a Ruby core developer
skrat Fri Apr 03 07:42:26 -0700 2009

sorry: dhh_dumbideas1

heycarsten Fri Apr 03 08:11:21 -0700 2009

skrat, I think you want dhh_dumbideas1 for the second item.

heycarsten Fri Apr 03 08:12:03 -0700 2009

Oops, textile.

artpop Sat Apr 04 17:55:08 -0700 2009

@skrat sorry but that is pure gold =D

Also I decree this to be the final ever comment on this topic.