Self-Motivation
David Goggins
Former Navy Seal
Career Development
Bryan Cranston
Actor
Critical Thinking
Liv Boeree
International Poker Champion
Emotional Intelligence
Amaryllis Fox
Former CIA Clandestine Operative
Management
Chris Hadfield
Retired Canadian Astronaut & Author
Learn
from the world's big
thinkers
Start Learning

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.

Live on Tuesday | Personal finance in the COVID-19 era

Sallie Krawcheck and Bob Kulhan will be talking money, jobs, and how the pandemic will disproportionally affect women's finances.

How often do vaccine trials hit paydirt?

Vaccines find more success in development than any other kind of drug, but have been relatively neglected in recent decades.

Pedro Vilela/Getty Images
Surprising Science

Vaccines are more likely to get through clinical trials than any other type of drug — but have been given relatively little pharmaceutical industry support during the last two decades, according to a new study by MIT scholars.

Keep reading Show less

Consumer advocacy groups are mostly funded by Big Pharma, according to new research

An article in Journal of Bioethical Inquiry raises questions about the goal of these advocacy groups.

Image by Jukka Niittymaa / Pixabay
Politics & Current Affairs
  • Two-thirds of American consumer advocacy groups are funded by pharmaceutical companies.
  • The authors of an article in Journal of Bioethical Inquiry say this compromises their advocacy.
  • Groups like the National Alliance on Mental Illness act more like lobbyists than patient advocates.

Keep reading Show less

Bubonic plague case reported in China

Health officials in China reported that a man was infected with bubonic plague, the infectious disease that caused the Black Death.

(Photo by Centers for Disease Control and Prevention/Getty Images)
Coronavirus
  • The case was reported in the city of Bayannur, which has issued a level-three plague prevention warning.
  • Modern antibiotics can effectively treat bubonic plague, which spreads mainly by fleas.
  • Chinese health officials are also monitoring a newly discovered type of swine flu that has the potential to develop into a pandemic virus.
Keep reading Show less

Women who go to church have more kids—and more help

Want help raising your kids? Spend more time at church, says new study.

Pixabay
Culture & Religion
  • Religious people tend to have more children than secular people, but why remains unknown.
  • A new study suggests that the social circles provided by regular church going make raising kids easier.
  • Conversely, having a large secular social group made women less likely to have children.
Keep reading Show less
Quantcast