Ruby Is Closer to Human Thought Than to Code

Question: What inspired you to create Rails?

David Heinemeier Hansson: Rails really started as an application.  It never started as Rails.  It just started as me wanting to build Basecamp in this new program language—new to me program language—called Ruby.  And as I was starting to build a Basecamp, our project management tool at 37Signals, I found a need to just build a bunch of tools for it.  I had to have something to talk to the database, something to generate some HTML.  All these things I weren’t finding good existing solutions for in Ruby, so I basically just had to do it myself.

And what I found was someway, halfway into the creation of Basecamp that I had this big toolkit now.  I’d been building all these little things that I needed as I needed them, and now I discovered that I had a whole toolkit.  And I also discovered that I like programming now so much better than I ever had in the past.  So what was making me happy about this?  Well, first of all, obviously, the Ruby language, but also all these tools I’d built for myself.  They just felt just right in a way that no other programming language or environment had before.

So I started thinking: hey, if I’m having so much fun building with these tools, building with Ruby and then what became Rails, it can be selfish not to share that.  All the things that we build at 37Signals are built on top of open source tools.  We use Linux, MySQL, Ruby itself.  All of these infrastructure components are open source; they’re free, and you can use them, you can change them, you can do whatever you want.  So it kind of feels like once you’re in that world, you’d be an ass if you just developed something you liked a lot, and then you just kept it to yourself.  Like, “This is my toy, and nobody else can play.”  So that seemed like a bad idea.

So about halfway through the development of Basecamp I just realized I’m going to release this.  I’m going to put it out into the world, but, before I do so, I want it to be good.  I’d used a bunch of software that I found really, really frustrating to get into because either the documentation was bad, or the examples were lacking, or it just didn’t feel polished.  So I wanted Rails to feel really polished.  I wanted it to have great documentation, be easy to get started with and get into, so I actually waited about a year from when I decided I was going to release this, until I actually did.  And it wasn’t until that year later where it felt good enough for somebody else to use.

Question: If you were to start again, would you choose Ruby as the basis for Rails?

David Heinemeier Hansson:  If I had to do Rails today, I would absolutely choose Ruby.  Since discovering Ruby, I really haven't been all that interested in other program languages.  It's kind of funny; when I used to develop in PHP or the stuff I did in Java, I was always looking for something else.  I was always looking for another programming language, another... just something else, in part just to distract me from being bored in the languages I was in.

But with Ruby it was kind of different. Ruby right from the beginning just fit like a glove.  It was this magic language that sort of like your thought's been waiting for.  Like this was the language that was going to express what I have to say in such an eloquent way that I'm frequently just astonished.  I'll write a piece of code and look at it and say, “Geez, that's beautiful!”  And I would not have that reaction before, just because other program languages just to me don't have that emotional appeal.  Ruby has just a deep emotional appeal of how beautiful you can write something.  It feels much closer to my thought process.  It feels like I'm expressing exactly what I want to say in code without translating it.  Usually you call it code because it's sort of hard to read and hard to understand, but Ruby really shouldn't be called code because it's much closer to human thought than code is.

Question: What exactly is the relationship between Ruby and Rails?

David Heinemeier Hansson:  Ruby is sort of the basic language.  You can say anything in Ruby.  You can talk about anything in Ruby.  There's no limits to that.  Rails is much more like a genre, so rails is like "thrillers."  Like, if you want to make a thriller, you use Rails for that.  If you're using something else, if you want to write a love story, then you probably use another framework or something else entirely.  Ruby is great for both of those things, but Rails is really the tool that sits on top of Ruby that just makes Ruby great for web development... talking to a database, outputting, HTML, putting all these things together and making great web applications.

Recorded July 22, 2010

Interviewed by Peter Hopkins

David Heinemeier Hansson was so fed up with PHP and Java that he almost gave up on programming altogether—then he found Ruby and everything changed.

American imperialism: fat-shaming Uncle Sam

Opponents of 19th-century American imperialism were not above body-shaming the personification of the U.S. government.

Credit: Bill of Rights Institute / Public domain
Strange Maps
  • In the years before 1900, the United States was experiencing a spectacular spurt of growth.
  • Not everyone approved: many feared continued expansionism would lead to American imperialism.
  • To illustrate the threat, Uncle Sam was depicted as dangerously or comically fat.
Keep reading Show less

Why information is central to physics and the universe itself

Information may not seem like something physical, yet it has become a central concern for physicists. A wonderful new book explores the importance of the "dataome" for the physical, biological, and human worlds.

Credit: agsandrew via Adobe Stock
13-8
  • The most important current topic in physics relates to a subject that hardly seems physical at all — information, which is central to thermodynamics and perhaps the universe itself.
  • The "dataome" is the way human beings have been externalizing information about ourselves and the world since we first began making paintings on cave walls.
  • The dataome is vast and growing everyday, sucking up an ever increasing share of the energy humans produce.
Keep reading Show less

CT scans of shark intestines find Nikola Tesla’s one-way valve

Evolution proves to be just about as ingenious as Nikola Tesla

Credit: Gerald Schömbs / Unsplash
Surprising Science
  • For the first time, scientists developed 3D scans of shark intestines to learn how they digest what they eat.
  • The scans reveal an intestinal structure that looks awfully familiar — it looks like a Tesla valve.
  • The structure may allow sharks to better survive long breaks between feasts.
Keep reading Show less

Dogs know when people are lying

A new study tested to what extent dogs can sense human deception.

Credit: Adobe Stock / kozorog
Surprising Science
  • A study of 260 dogs found that, in some cases, dogs can tell when people are lying.
  • The experiments involved giving dogs information about the location of food.
  • The majority of the dogs did not follow false suggestions when they knew humans were lying.
  • Keep reading Show less
    Quantcast