179. Django vs Rails, why python won

There’s a perception that web development using Ruby on Rails has already peaked, with more damning critics shouting that “Rails is a dying language.” Conversely, Python, and Django by extension, seem to be ever-increasing in popularity. Today we’ve set up a grudge match — it’s Django versus Rails, with the winner declared the better language. We open our conversation by exploring perceptions of Rails and Django, along with why Python’s many libraries give it a leading edge. After touching on coding trends, we look at metrics that compare Rails and Django usage. Our first metric is a classic ‘red versus blue states’ matchup as we geographically plot Rails’ and Django’s popularity. For our second metric, we analyze the surprising results of Stack Overflow’s 2020 most ‘Loved, Dreaded, and Wanted Languages.’ Near the end of the episode, we discuss each language’s ability to prototype projects before co-host Dave Anderson highlights what he most appreciates about each language. But in the end, there can only be one winner. Tune in to find out who came out the victor.


Key Points From This Episode:


  • Introducing the topic of Rails vs. Python; which is better?
  • The perception that Rails is dying due to the popularity of Python.
  • Why Python is a consistently popular choice, despite other available options.
  • Trends in how popular languages rise and then decline in usage.
  • The challenge of deciding which library or language to use.
  • Assessing the popularity of Python and Ruby according to geography.
  • Surprising results from Stack Overflow’s 2020 most ‘Loved, Dreaded, and Wanted Languages.’
  • Comparing Django and Ruby’s ability to quickly prototype your project.
  • Hear what host David Anderson appreciates about both Ruby and Django.
  • How Python’s greater applicability in other fields links with its popularity.

Transcript for Episode 179. Django vs Rails, why python won


MN: Before we begin, I just want to make a quick announcement, if you’re listening today on November 3rd, 2020. Hopefully you’re listening to us at a time where you can stop what you’re doing and go vote.


[0:00:13.8] DA: Right, you’re getting your coffee, your breakfast is ready, you made yourself an egg, you're like, don’t have anything to do today. No, you got to vote.


[0:00:23.5] MN: Yeah, you got to vote. And if you don’t have anything to do then come up with a plan right now, as you’re listening to this. If it’s in the morning and you had coffee, that’s fine. If it’s in the afternoon and your child needs to take a nap, you know, make a plan. Once your child wakes up, figure out how you and your child are going to go and vote. That’s going to probably be me.


He’s excited to vote, he can’t even vote right now, but when he turns 18, he’ll do the same. And we expect that you take the time to exercise your right to vote because everyone has one and we could all use some votes right now.


[0:00:59.4] DA: Yeah, and maybe you're like me and you already voted, like, two or three weeks ago.


[0:01:05.4] MN: Good job. Round of applause to you, yes.


[0:01:08.9] DA: I didn’t get a sticker though. If you go to vote today, then you may get a sticker and for that, I am very jealous.


[0:01:15.6] MN: You know what? Me too. Yes, go vote today and get a sticker. Do that, do it for all of us. On a serious tip, I think that it’s important for us to vote and do what’s right for the future, for your future, for children’s future, that we all vote and do the right thing. Please take the time to go and do that, you can go to iwillvote.com and figure out your polling location, where you can go and vote. Make sure you’re registered and if you're not, then it might be too late and I really hope that doesn’t happen to you.


Please, get yourself out there to vote, it’s really important that we do that.




[0:01:49.6] MN: Hello and welcome to The Rabbit Hole, the definitive developer’s podcast. Live from the boogie down Bronx. I’m your host, Michael Nunez. Our co-host today.


[0:01:57.2] DA: Dave Anderson.


[0:01:57.9] MN: Today, we’ll be talking about the fight of the century. Django versus Rails and how is Python winning right now, I guess, is the question.


[0:02:08.4] DA: Such a blood sport.


[0:02:09.4] MN: Yeah, you got to — dude, it’s like fight club, it’s like down in the basement, we got these two ready to duke it out.


[0:02:15.3] DA: Are you the Rubyist in the corner for Rails, am I the Djangoist?


[0:02:20.6] MN: I think so, I think I’m going to say, I’m going to say yes. I think when I first learned about Ruby, the first rule of Ruby is you must hate Python. I remember specifically being told that. It was just like, “No, the rule of Ruby is Ruby’s better than Python, just know that.” I was like, “Okay, I guess.”


[0:02:38.2] DA: I missed that chapter in the Sandi Metz book. Sandi’s like, “You know, yeah, after your journey into programming and Ruby and, you know, Python.”


[0:02:49.1] MN: [Inaudible: 02:49] Python, I don't know about that stuff. I’ve done very little Python work. Dave would know. I think you mentioned before in the past that in the Stride interview, it was us pairing and I was like well, “Teach me how to Python bro, let’s do this.”


[0:03:05.9] DA: Right, yeah. That’s true. That was the other way around, for me. Where, I think like, William was my Ruby Yoda, basically, showing me the ways of the force.


[0:03:19.9] MN: You know, the question I normally have that people ask me is, “You know, is Rails dead? Are we now officially not  using Rails anymore because Python is so much better?”


[0:03:32.6] DA: I don’t know, I keep on hearing about all these new versions of Rails that are coming out and it sounds pretty cool to me. I’m not using it, like I worked, on a couple of projects where you know, I had a choice and I was like — “No, not today.”


[0:03:52.7] MN: Not today old friend.


[0:03:55.5] DA: I think if I crossed paths, I wouldn’t be upset. But, you know, I really like Django, I appreciate it, it has a lot of good features.


[0:04:03.2] MN: Yeah, I mean, if I ever get the opportunity to work in Python, then it’s like great for my career because Python is winning. And Django’s riding its coat tails because Rails is dying. And that’s, like, the word on the street. I remember having it introduced a new programming language for an application we were building. And everyone, this particular shop was like a C# shop.


Say that five times fast, the C# Shop, right?


[0:04:29.5] DA: By the seashore.


[0:04:30.8] MN: By the seashore. The idea that we were like, “Okay, we got to choose a new language for us to build this new application and we were thinking about doing Ruby.” They were like, “No, I refuse to learn Ruby. I would much rather stick to C# than learn Ruby because Ruby is a dying language.” I don’t know what to say now. I don’t think that’s true at all. But all the cool kids right now are using Python and using Django. And for data science and it’s smart and all that stuff.


[0:05:01.4] DA: Yeah, although that’s kind of like a conflation, I guess of concerns to a degree, as well. Because, I think I’ve heard it said and I really like saying it, I think it’s funny and true that Python is the second best language for anything that you need to do.


[0:05:17.0] MN: Yeah.


[0:05:19.5] DA: It kind of has a bunch of different things that you can use it for and like if you look at the graph, the Google trend graph over time, for Python. It’s like, wow, it’s like surging in popularity. But it’s kind of like eating a lot of this other market of people that wasn’t even maybe using a programming language. Like, you know, excel jockeys are using pandas. And, you know, aspiring machine learning vehicle that are using Python because there’s a lot of popular libraries out there that already exist in Python that aren’t available in Ruby.


[0:06:01.2] MN: Right, and there’s like a lot of, I don’t know — what do y’all folks over at Python call gems in Ruby? It’s not like snakes or what is that called? Like the packages.


[0:06:10.1] DA: Just like a pile of snakes.


[0:06:12.7] MN: A bucket of snakes, what is it? It’s just called packages, right? Your normal,  you guys just call it packages?


[0:06:17.8] DA: No, they got weird names for it too and they’re a little inconsistent, like, you got wheels, like you get in your wheels from the cheese shop or —


[0:06:27.3] MN: A what?


[0:06:29.7] DA: Different things but I think they just call them packages, like, it doesn’t really stick.


[0:06:35.2] MN: It’s not like a gem and you don’t need to point that in a gem file or anything weird like that I imagine.


[0:06:41.6] DA: No, not like a flute or a basket or something — they didn’t extend the metaphor. ‘The Cheese Shop’ is like the Monty Python thing. I think there’s a famous cheese reference in Monty Python.


[0:06:51.6] MN: I see, yeah, it’s just plain old packages, that’s good, y'all are normal, not like Ruby who uses gems. But there’s like a lot of packages that are, you know, that support data science related work or machine learning. I think I’ve read a QR about NumPy being really popular amongst the academia folks. And like, no one’s going to bother to write that and Ruby, if it already exist in Python and they’re very similar programming languages.


[0:07:19.9] DA: Right, yeah.


[0:07:21.5] MN: Either you have NumPy or met Matplotlib and SciPy, you can tell that I’m just reading off the list because I don’t normally use Python.


[0:07:31.2] DA: I was like, wow.


[0:07:31.6] MN: I imagine people who are listening to this would definitely be quite familiar.


[0:07:35.6] DA: Yeah, wow, with so much hatred in your heart, you just know all these so well.


[0:07:43.6] MN: I mean, but like, going back to the Google trends you mentioned, we went back to as far as, like, 2012 and saw that Java, you know, was like everybody was using jJava in 2012. I was just like the thing to do, I guess. Or rather, the search queries were for more Java related stuff.


[0:08:01.9] DA: No, it’s like 2004, 2005 is like how far back I think it goes. And it’s just like, I mean yeah, I guess even back to like 2015, 2016, it’s like — Java is just like one hundo — or like, you know, it’s pretty far up there at least, it’s kind of declining over time.


[0:08:20.2] MN: And then soon after, it changes, right?


[0:08:23.9] DA: Pretty popular.


[0:08:24.4] MN: Like by 2015, that’s when Python starts getting its popularity.


[0:08:29.2] DA: Right?


[0:08:30.3] MN: Yeah, it’s all noobs coming in with their data science.


[0:08:35.8] DA: Just pushing it over. But, I don’t know, it’s interesting because it just kind of levels out over time. It doesn’t really seem like it’s going up or down — or I, don’t see, like, a dramatic thing. Where, you know, Python is skyrocketing into the sky. Or Ruby is getting buried into the ground. It’s like you know —


[0:08:59.4] MN: They’re coasting, straight line, you know?


[0:09:02.3] DA: I mean, what other metrics are there for deciding which of these two libraries we should use? Or what destiny we should use, should we use GitHub Stars?


[0:09:11.7] MN: You want to go there? Let’s do it. What do the Stars say?


[0:09:18.1] DA: Yeah, the stars are aligned for Django my friend.


[0:09:22.2] MN: Man.


[0:09:23.5] DA: Yeah, but not much of a difference here, 46,000 versus 53,000. Pretty similar.


[0:09:34.7] MN: It’s less than 10, right? About like seven-ish?


[0:09:37.6] DA: Yeah.


[0:09:39.0] MN: I mean, yeah, it seems like Python has taken the lead in this. I think the other one that was really interesting, in terms of another metric of — that you use. I thought it was just funny, I don’t know if this is a metric of which language to use but it’s just like, where are these search queries more popular in —.


[0:09:58.7] DA: Right, I was shocked by this, this is like the electoral map, right?


[0:10:02.0] MN: Yeah, it was pretty strange because Google changed the colors to, like, red and blue. But all the red states, I guess, were all for Ruby.


[0:10:13.0] DA: Yeah. West Virginia.


[0:10:15.3] MN: Yeah, west Virginia is Ruby.


[0:10:17.7] DA: I don’t know. North and South Dakota.


[0:10:21.0] MN: Hard red for Ruby baby.


[0:10:23.8] DA: This whole deep south thing from Louisiana to west Virginia.


[0:10:29.0] MN: — And Kentucky and —


[0:10:30.0] DA: — South Carolina for good measure. But you know, we really flipped a lot of these states, you know, we did, in fact, turn Texas blue. We turned Georgia, Florida, Ohio. Sweeping the country. Even Alaska, Maine, wow.


[0:10:48.3] MN: All Python. Flipped it.


[0:10:51.8] DA: Yeah, basically, you know Guido for president. There you go, you got a vote, just write in Guido if you have to, writing that but you know whatever you do, you got to go blue.


[0:11:06.3] MN: Yeah, go blue. Go hard on blue. Let’s bring it home baby but all right, let’s use another metric. Let me see if this is safe. You know the Ruby on Rails out there, I think you had another criteria which is Stack Overflow. Where we could look into Stack Overflow, and I feel like I am going to lose again.


[0:11:27.0] DA: Like CS, Stack Overflow came out right before the world ended.


[0:11:31.9] MN: Yes, yes.


[0:11:35.3] DA: But you know, here we are. We had some distance from that so we can look back at this — and I love this section. The most loved, dreaded, and wanted web frameworks, which will definitely tell us which we need to use like this is definitively the answer.


[0:11:51.9] MN: Right and I think you have the data to back it up?


[0:11:56.1] DA: Yeah, Django is 55.3% love.


[0:11:59.4] MN: Versus Rails, which is like what?


[0:12:02.4] DA: What do you guess it is?


[0:12:04.7] MN: Four. I am guessing like four.


[0:12:05.4] DA: Oh come on, no. Have some confidence.


[0:12:08.4] MN: Wait, so you said 50, you said 54.


[0:12:10.3] DA: 55.3 for Django.


[0:12:12.7] MN: 55, it will probably be like 30.


[0:12:14.9] DA: Oh no, people love Ruby already. It is 49.3.


[0:12:18.8] MN: Okay, not too bad, that’s good.


[0:12:20.8] DA: Yeah, you know it didn’t break 50%, which, you know that’s the burning [Inaudible: 12:24] but, you know, to be honest though, it’s none of these things is ASP.NET Core, which maybe is what we should be doing our podcast on.


[0:12:33.8] MN: Oh no, wait, that is the most wanted?


[0:12:37.1] DA: Most loved, 70.7% — so you know.


[0:12:41.3] MN: ASP.NET Core.


[0:12:43.5] DA: Core yeah, got to check it out.


[0:12:45.3] MN: No way.


[0:12:45.7] DA: Look for your missing. I mean like you love React right? That is 68.9% but you know?


[0:12:50.7] MN: Oh yeah, no React is the truth. But, I mean, that is a different episode.


[0:12:55.6] DA: Yeah, right. Yeah, totally I mean I guess there is this other aspect of it, which is, like, how old is like the peanut butter of your backend go with the jelly of your frontend if you are doing a single page app? Or, you know, maybe should you even do a single page app? That’s probably a different episode entirely.


[0:13:16.1] MN: Oh yeah.


[0:13:16.9] DA: Or should you do ASP.NET Core? Apparently you know that is where it’s at.


[0:13:23.0] MN: I mean if we looked at the most — I mean the ‘Wanted’ tab in this, Django is definitely crushing it for sure. With 9.4% versus Ruby on Rails at 4.4. So that is very sad news for us.


[0:13:38.5] DA: Yeah, not wanted.


[0:13:41.5] MN: Yeah and then people are just like, “No, I don’t want it” it is under Spring and Express, wow.


[0:13:49.3] DA: I mean I think it is tied maybe. Maybe fractionally below Spring but like ASP.NET Core still coming out on top with the want.


[0:13:57.7] MN: Oh man that’s crazy, I would not have thought of that be it.


[0:14:02.5] DA: But you know the last measure that we have for, like, deciding what we should use is of course like is it the least dreaded. Is it not awful?


[0:14:12.3] MN: Oh man, no, no, please god. And I see it, oh gosh. Ruby on Rails dreaded 50.7% versus Django at 44.7.


[0:14:28.5] DA: But that’s stinks too though.


[0:14:31.5] MN: But Rails is still higher, I don’t understand.


[0:14:35.0] DA: Yeah, I mean, it is almost like people write big monolithic apps using these frameworks and then they grow to loathe them overtime.


[0:14:44.0] MN: Oh yeah, that can be it.


[0:14:45.8] DA: But you know we have the one consolation that at least none of these things is Angular.


[0:14:51.2] MN: None of them is Angular? So close.


[0:14:53.9] DA: It was 75%. What — three and four people just hate it.


[0:14:58.8] MN: Yeah, no that people wow and then Drupal, I don’t think I have ever heard of Druple on purpose. What does? I have to Google that.


[0:15:07.4] DA: That’s PHP. It is like a CMS.


[0:15:09.2] MN: Oh wow yeah, oh man and Angular is above the PHP library?


[0:15:15.1] DA: Yes, it’s rough. That’s rough. But, you know, I don’t know. So it does seem like Django is winning by all of these metrics, right?


[0:15:27.6] MN: Yeah, I mean looking at all of these metrics, yeah it looks like it. And I guess I’ll ask you. By being familiar with Django I think one of the benefits that I’ve heard in the past of using Ruby on Rails is that it is just so much faster and easier to, like, ramp up a product if you really wanted to. and does Django have a similar view point of building an application?

Is it more terse, like, more difficult to get something off the runway using Django? Or is it just Rails has that popular opinion — that popular opinion that, “Oh, if you are going to do something fast you want to see it, like, you know, see if your product actually works, build it with Rails real quick, boom-boom-boom.”


[0:16:07.5] DA: Yeah, I mean I think this is another episode maybe for prototyping and getting someone out there. And Django, you can prototype pretty quickly. Like, you have a server running pages baked in, you have emails baked in. You have the ORM baked in. Like, pretty much everything that you could want is baked into it. I do follow, like, online or on podcasts, other podcasts, like, the new releases that are coming out for Ruby on Rails and there is some pretty good hotness.


Like on Ruby on Rails, web pack is baked in. And I felt like the story for getting Django and React kind of baked together was like, a little bit less out of box. Yeah, I don’t know. There is a lot of things that I think Ruby on Rails leads the pack on.


[0:17:00.3] MN: I see. So the idea that developing an app, I guess, with the different frontend framework like React — using web pack could potentially be easier on Rails because Rails has adopted that into its all library. It is knowing that people are probably going to build their frontend using, say, JavaScript library versus using ERBs.


[0:17:23.4] DA: Yeah and since it’s just pulled into the main package, it is like — you don’t have to read a hundred blog posts to figure out what the most reasonable way to do it is. It's just like you don’t have to think about it, it just is and it is part of it. But that being said, there are things that are really strong with Django. Having these both, I really like Django a lot. It’s super powerful, pretty much anything you can do with SQL, you can very easily do it around.


And you also get, like, the admin pages for managing the models out of the box. So you can grant access to some super user who maybe can administer the content of the site, or, like a support user who can manipulate the data manually for the backend.


[0:18:14.7] MN: I see. So like Django being more powerful out of the box. And people who can understand the benefits will use the benefits and will get more out of Django versus Rails in that regard.


[0:18:28.0] DA: I think so. I think, like, I mean maybe you can speak to this a little bit. I don’t think Rails has as strong of an admin page game.


[0:18:36.2] MN: Oh now, yeah you do that shit in ERB like it’s pretty gross and you just make it happen. I don’t think it is as in depth as what I would expect from Django. But if you — I mean I guess I can take this loss of Rails not winning in this fight. I know that a lot of people are gaining popularity. I mean, rather that Python is than Django gaining a lot of popularity in the past couple of years for its data science and machine learning algorithm packages. Not snake jars or bins, snake bins.


[0:19:10.2] DA: Oh god, this is going to be in my nightmares. I never thought about Python packages being snake bins just filled with tiny snakes.


[0:19:17.1] MN: Yeah, like you know, you need to play like the little flute, like, with the snake charmers used to charm its packages and its machine learning algorithm packages and whatnot. You know I just would like to make the announcement, you know Rails isn’t dead but I guess Python has a lot of its benefits for the future. For that of machine learning and — machine learning and artificial intelligence and all of that data science and processing things.


So I am willing to, you know, I don’t want to say throw in the towel but lose the fight. But with my chin up, you know? Like maybe next version, Rails will be on top somehow.


[0:19:51.5] DA: Yeah, I mean like it is just a bigger tent, right? So there is just different people who are coming in and enjoying Python, learning to program. Which is great and maybe as a result of that, organizations are like, “Okay, well if I got this kind of person who is using Python then why not my web development too, as well as my data science and everybody else?” It is, like, kind of generally friendly. And, you know, has the capability.


It is not the most powerful language in the world but it does have the capability to shell out and interface with C code. And low level linear algebra craziness. And all of that but, you know, Ruby in Rails, pretty solid on the web devs side still.


[0:20:44.2] MN: Awesome, yeah I think that with that, we’ll leave it up to you all for everyone to decide. Django or Rails, whatever you choose, make sure you don’t have to choose the right one. You can always figure out a way to migrate from one to the other. But they both have their benefits and hopefully we’ll see even more benefits in the future. And I am sure this fight isn’t going to end today. We’ll probably see it down the road if anything changes.


[0:21:06.5] DA: Yeah. And I guess that people can also just tell us why we are completely wrong and why we should be using .NET Core.


[0:21:12.5] MN: .NET Core, yeah I would love to hear why we should be using .NET Core. I imagine either .NET Core — I didn’t see it on the list but I can already hear my brother in the back of my head yelling at me that, “If I am building some new web dev application it should be in Elixir” — and LiveView, I think is what it’s called. Elixir seems to be the hotness right now. Everyone loves that Elixir.


[0:21:35.2] DA: Yeah, there are some cool ones. I think that is another, like, thing we’ll have to talk about a little bit later.




[0:21:39.9] MN: Follow us now on Twitter @radiofreerabbit so we can keep the conversation going. Like what you hear? Give us a five star review and help developers like you find their way into The Rabbit Hole and never miss an episode, subscribe now however you listen to your favorite podcast. On behalf of our producer extraordinaire, William Jeffries and my amazing co-host, Dave Anderson and me, your host, Michael Nunez, thanks for listening to The Rabbit Hole.



Links and Resources:

The Rabbit Hole on Twitter


Michael Nunez

David Anderson

William Jeffries

I Will Vote

Sandi Metz

GitHub Stars

Guido van Rossum

Stack Overflow