Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Open Source Programming Ruby Software

Interviews: Ask Ruby on Rails Creator David Heinemeier Hansson a Question 109

David Heinemeier Hansson created the Ruby on Rails open-source web framework in 2003. David is also the founder and CTO of Basecamp, a project management tool that's been used by more than 15 million people. In addition, David is the best-selling author of REWORK, a book about starting and running businesses a better way. David has agreed to take some time to answer some of your questions.

Ask as many questions as you'd like, but please, one per comment. (And feel free to also leave your suggestions for who Slashdot should interview next.) We'll pick the very best questions -- and forward them on to David Heinemeier Hansson himself.
This discussion has been archived. No new comments can be posted.

Interviews: Ask Ruby on Rails Creator David Heinemeier Hansson a Question

Comments Filter:
  • by sunderland56 ( 621843 ) on Wednesday August 03, 2016 @11:39AM (#52636201)

    "Ruby on Rails" ? Is there a good reason for the name, or were you watching too many old western train movies?

    • "Ruby on Rails" ? Is there a good reason for the name, or were you watching too many old western train movies?

      Here [ruby-forum.com] has a discussion of the name in RoR's early time (2007). Also, it seems that many people do not even know what Ruby on Rails [rubyonrails.org] is. My company is still using it and I am the only person develop and maintain the application... Not a bad web frame work at all.

      • But as you point out, you're the only one still developing and maintaining a single application using it. Both Ruby and RoR were fads. Nice to see them continuing their steady decline to irrelevance.
        • ASP was a fad, too. In fact, the vast majority of things in computing are fads.
          • ASP was a fad, too. In fact, the vast majority of things in computing are fads.

            ^^^ AMEN. Preach it! :-)

            And even those things that aren't fads disappear even though they're still useful. Zip drives, CDs, boot floppies for those times that nothing else works, all sorts of software that has been re-written and does a worse job than before, all the software that would still work just fine except the OS can't run it, ...

        • But as you point out, you're the only one still developing and maintaining a single application using it. Both Ruby and RoR were fads. Nice to see them continuing their steady decline to irrelevance.

          First, I don't know why you are attacking me. I've been working with it because our company is using it. I'm not the "person" who made the decision to use it. Second, my company has several applications using it (internal use). RoR is best for small companies with small to medium database size. Last, the framework becomes fad (in opinion of many people like you) because many others didn't use it properly. They jumped on the band wagon right away, and as a results, they found out later that the framework doe

          • So, pointing out the truth is now attacking someone? Okay, maybe it is in this case, for you trying to justify continuing to go along with a stupid decision made by someone else that will become unmaintainable once you leave/get hit by a truck/develop dementia.

            An outsider could argue that you prefer it that way because it gives you job security, not because it's the best tool for the job (which it isn't going forward).

            Attacking ruby and ruby on rails does not mean someone is a bitter person. Just means th

  • What do you think of Elixir and Phoenix? I haven't used Ruby on Rails but I really like Phoenix and looking at Rails I can see a lot of influences. But it's hard to beat the foundation that Erlang brings. Maybe I should have taken a better look at Rails while I was still using Python.
  • by jellomizer ( 103300 ) on Wednesday August 03, 2016 @11:52AM (#52636313)

    Ruby On rails had a huge spike in popularity a decade ago. Then the traditional forms of development had taken over. How do you plan on keeping the language up to date on the current trends?

    • by Tablizer ( 95088 )

      spike in popularity a decade ago ... How do you plan on keeping the language up to date on the current trends?

      Rename it "RoR.node.nosql.js++"

  • Why? (Score:2, Troll)

    by Gravis Zero ( 934156 )

    What in god's name possessed you to create this monstrosity?

  • Why not Python? (Score:5, Interesting)

    by scorp1us ( 235526 ) on Wednesday August 03, 2016 @12:09PM (#52636429) Journal

    You ended up with something that reads almost as the same as Python, which has a much larger audience and library set. Couldn't you have just started with Python?

    • Ruby On Rails != Ruby

      (the guy being interviewed didn't write Ruby)

    • To the people who modded me troll, I really what to know why, given the substantial similarities, he chose to create Yet Another Language which only minor changes to an existing one, and created an entire other community which fractures the industry into yet another shard again. There is an existing plethora of OOP languages. I just want to know why he felt his was the right course of action.

      On a personal level I think it's immoral from an industry perspective to fracture the community (and the productivit

  • by Parker Lewis ( 999165 ) on Wednesday August 03, 2016 @12:33PM (#52636597)
    What were the influences (I mean, other frameworks, even in other languages) you used while building the first Rails version?
  • Abstractions (Score:4, Informative)

    by almeida ( 98786 ) on Wednesday August 03, 2016 @12:51PM (#52636775)

    I worked on a project around 2007 that used Ruby on Rails. That was my first experience with Ruby and my first experience with a real web product. I liked Ruby and Rails, but it was easy to get bitten by some of the abstractions. I remember the site bogged down really bad whenever we searched for a record in a large database table. The problem was that the database was hidden behind ActiveRecord, so it was easy to forget we were using a database at all. Writing a for loop to search for a record that matched some criteria felt natural, because our interface was with objects, not the underlying tables. However, behind the scenes, each iteration was a separate query. The result was thousands and thousands of queries, instead of just a single query with a simple WHERE clause. We were essentially doing in Ruby what we could have done much more efficiently in SQL. Once we realized the problem, we rewrote that kind of code so it used more or less raw SQL. The result was much faster, but we lost the readability of the abstraction. Everyone on the team was new to Ruby and Rails (grad students who shuffled in and out each semester), so it's possible that we were just doing things completely wrong. Still, it feels like it shouldn't have been that easy to shoot ourselves in the foot. Have things improved since then? How do you balance nice abstractions like ActiveRecord with performance? How do you make it clear to novices what's going on internally, so they can avoid the mistakes that we made?

    • I worked on a project around 2007 that used Ruby on Rails. That was my first experience with Ruby and my first experience with a real web product. I liked Ruby and Rails, but it was easy to get bitten by some of the abstractions. I remember the site bogged down really bad whenever we searched for a record in a large database table. The problem was that the database was hidden behind ActiveRecord, so it was easy to forget we were using a database at all. Writing a for loop to search for a record that matched some criteria felt natural, because our interface was with objects, not the underlying tables. However, behind the scenes, each iteration was a separate query. The result was thousands and thousands of queries, instead of just a single query with a simple WHERE clause. We were essentially doing in Ruby what we could have done much more efficiently in SQL. Once we realized the problem, we rewrote that kind of code so it used more or less raw SQL. The result was much faster, but we lost the readability of the abstraction. Everyone on the team was new to Ruby and Rails (grad students who shuffled in and out each semester), so it's possible that we were just doing things completely wrong. Still, it feels like it shouldn't have been that easy to shoot ourselves in the foot. Have things improved since then? How do you balance nice abstractions like ActiveRecord with performance? How do you make it clear to novices what's going on internally, so they can avoid the mistakes that we made?

      I agree with what you said that the frame work makes things much easier to deal with database. As a result, one wouldn't know how to optimize it. If I remember correctly, they put in some optimization ways to deal with SQL (such as include, select, etc) starting in either version 1.2 or a little later (can't remember). What it does is to improve SQL in order to make 1 call instead of 100 calls for 100 records. However, it is extremely difficult to be as perfect as SQL language, so you would have to decide

    • The problem was that the database was hidden behind ActiveRecord, so it was easy to forget we were using a database at all. Writing a for loop to search for a record that matched some criteria felt natural, because our interface was with objects, not the underlying tables.

      Object-Relational Impendance Mismatch [wikipedia.org]

      Law of Leaky Abstractions [joelonsoftware.com]

      This problem is not unique to Ruby on Rails usage of the ActiveRecord pattern. People blindly using Hibernate and other ORMs run into the same thing, and it is, in general, what happens when people fall for one or more of the fallacies of distributed computing ("latency is zero" and "bandwidth is infinite".)

      ActiveRecord pattern provides a theoretically pleasing abstraction, that is OK when accessing one row out of a relation. Trying to

  • by Anonymous Coward

    Are you in the mindset of embracing Angular, React, Ember, etc, or is your vision focused solely on Turbolinks as the future of Rails?

  • by Anonymous Coward

    Using the power of hindsight what would you have done differently if you were to start Rails again from scratch?

  • by Anonymous Coward

    Here's my question: Why is ROR so bloody SLOW?

    And while we're on the subject, why is it sooooo hard to do anything outside the "approved" way of doing stuff in ROR?

  • What are your thoughts on the MEAN stack ( MongoDB, Express.js, Angular, and Node.js)?
  • by Anonymous Coward on Wednesday August 03, 2016 @02:49PM (#52637833)

    I can't believe I just read all this crap from these whining beaches. It's like Slashdot gulped a keg of Red Bull while doing an 8-Ball off a teenage hookers ass listening to Nickelback's entire catalog on shuffle repeat.

    I guess I don't understand the hate, since I still use Rails almost daily. I work efficiently, my clients pay me well, and because I have enough experience I guess, I don't ever run up against the platform's "performance issues". Granted, I am not building applications that have millions of users per month. Neither are most of the rest of these people. I guess it all boils down to- Haters gonna hate.

    On to the questions. I'm going to ask a few, because so many other people threw their questions away already:

    1. What's next for Rails 6 (or whatever is beyond Rails 5)?
    2. I do notice that people are still talking about performance like it's 2005, and a few programmers I respect have already moved on to Elixir or React. Have you played around with either? Any good ideas we can steal? Better integration opportunities?
    3. I feel like I'm always finding out about better "Rails Way" design patterns too late. For instance, when you explained your controllers setup/philosophy on Full Stack Radio. That was a situation where I'd kind of been doing that, but because I never really labeled it or gave it enough thought, it was more like I sometimes got lucky and made good decisions. Sometimes I didn't. Where, in the Rails community, is a resource to pick up on those more advanced patterns? Real world solutions that aren't necessarily a rails default, but are a good idea that will make life easier for developers at all stages of their careers?

    Thanks for doing this. I don't know why you would have picked Slashdot for a Q&A though. It's like Reddit's garbage disposal in here.

  • by Tablizer ( 95088 ) on Wednesday August 03, 2016 @03:21PM (#52638163) Journal

    I tried to "get" the philosophy of RoR, but ultimate failed. It seems RoR has a steep learning curve; but once mastered, one is allegedly more productive. Some use the analogy of becoming a medical doctor: a long slog through medical school, but big benefits (such as money) await you in the end. Do you agree with this alleged trade-off profile of RoR?

    And, how can this approach work for decentralized departmental groups with lots of coder turn-over, especially if the bureaucracy makes it difficult to hire such that coders from other platforms are to be retrained? The ramp-up time for re-training seems hard to justify under such an environment without a RoR-only edict from on high. Would you agree RoR may not fit certain organizational environments? Thank You.

  • by Anonymous Coward on Wednesday August 03, 2016 @05:39PM (#52639493)

    First of all, thank you for Rails, it helped me to convince my former employer to look beyond Java for web application development and now about half of the projects I do is helping teams of smart people who've painted themselves into a corner using the platform. What a beautiful statefull mess we living in!

    I personally feel your contribution to web application development in general is not Rails but the explosion of batteries included web frameworks we are seeing around us now. Things got shaken up 10+ years ago and they are still stirring. Yes, the github is full of failed frameworks withering away but also some really cool stuff spawned in the ripples Rails caused.

    My question: now that things have cooled down a bit regarding Ruby on Rails (merb and arel have been assimilated, framework upgrades are almost doable, most have settled on minitest, etc) what still makes you excited about this project or are you secretly migrating basecamp to phoenix and assimilate that into Rails too?

  • Have you ever had a eureka or solved a bug while you were racing, or at least driving?
    More generally, do the abstractions that help you learn to race assist you in understanding parts of your web & technology systems?
  • by CySurflex ( 564206 ) on Wednesday August 03, 2016 @10:12PM (#52641287)
    Hi DHH. How much of the code for basecamp 3 did you personally write? and is it a challenge to clear out long stretches of time for concentrating on development (vs meetings, etc) due to your seniority at the company? From your blog posts it seems that you're definitely still significantly involved in day to day development.
  • by Anonymous Coward

    Python has gained what could be called a critical mass of popularity and works at a similar level of abstraction to Ruby. If you were creating Rails today, would you still choose Ruby? What are its advantages?

    • Python has gained what could be called a critical mass of popularity and works at a similar level of abstraction to Ruby. If you were creating Rails today, would you still choose Ruby? What are its advantages?

      That'd be Django, which is basically python on rails with a less broken ORM. (And also a godlike admin system which I truly wish rails had. Having come from the django world to rails via my new job thats one thing I genuinely miss about django)

  • You are quite famous for being loudly dismissive of Rails critics.

    But do you ever get the urge to learn from your experience (and mistakes) and build a new framework that's different from Rails?

    In other words, if you could burn Rails to the ground and start over without the need to maintain any sort of backwards compatibility, what would you do differently?

  • With the rise of Javascript front-end frameworks (Ember, Angular, etc.), is there really a serious place for large opinionated server-side frameworks any more?

    Is Rails destined to be a framework for writing APIs to feed front-end frameworks? And if so, is that enough?

  • by sg_oneill ( 159032 ) on Thursday August 04, 2016 @04:50AM (#52642553)

    As far as I can tell, by default ActiveRecord does not enforce referential integrity at the database level. Is there a reason for this omission? Also is there any plan to introduce parameterized queries for raw SQL queries. I still keep seeing people on stack-overflow recomending inerpolation as an alternative, and this seems rather dangerous.

  • I am impressed by all the sour bitching about RoR in /. If you tried, and cannot learn it, then programming just might not be for you. Granted, it might not be the perfect fit for everybody, but RoR has an impressive merit on the growth of the web. 10 years ago I discovered it, and the framework taught me how to structure complex business applications and back them with proper unit and integration testing. Today we run a company on the 6 digit revenue that is backed mostly by RoR. Thanks Daniel!
  • Why Denmark is so keen to develop languages? When do we see an interview of Bjarne Stroustrup?

Our OS who art in CPU, UNIX be thy name. Thy programs run, thy syscalls done, In kernel as it is in user!

Working...