The joy of GitHub

Who knew that coding could be such a social activity! I really like GitHub, with its ability to fork people’s code base, apply your own changes, offer it up to be merged back in, see the difference logs, comment on the difference logs … ah, now that last one’s genius!

Somebody happened upon this quiet little commit from DHH … yes, the DHH, creator of Ruby on Rails. The bright spark goes and posts it to Reddit, prompting the world and its duck to chime in with an opinion! It’s quite funny reading through the comments, both on Reddit and on GitHub.

What does the commit do? Not a lot. It’s what we call syntactic sugar: aliasing something in code as something else. It means we’ll be able to do this:

['a', 'b', 'c', 'd'].third
=> 'c'

Of course, i have an opinion too. I can see why it could be useful, but i don’t really think it is worthy of being in the Rails core code. I doubt i will ever use it. I also agree with the person who says it widens the gap between Ruby and Rails. When Array#first is available in Ruby, people will wonder why Array#second is not.

I do wonder, if anyone other than DHH had submitted this ‘patch’, whether it would have been accepted into core Rails.

After laughing at this thread over lunch today, one of my colleagues sent me an instant message:


I replied:

return true

I think it’s good that people are looking at the commits, seeing what’s going into Rails, and having their say about it. This is community-driven development at its best! Cheers, GitHub! :)

Update: DHH has responded! It now only goes up to fifth … but Array#forty_two has been added in as compensation! DHH calls it accessing “the reddit”.


3 comments on “The joy of GitHub

  1. Chris Wanstrath, PJ Hyett, and Tom Preston-Werner did a great job with GitHub, recently i tried it and I was really stunned one try isn't enough t o explore more about it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s