Command Line Heroes - Python’s Tale

Episode Date: June 25, 2019

A benevolent dictator for life steps down and changes the course of the Python language forever. Guido van Rossum’s “Transfer of Power” memo brings attention to the way programming languages evo...lve. In this episode, Emily Morehouse makes the connection between Python’s technical extensibility and its inclusive community. Michael Kennedy explains how Python is both easy to learn and powerful enough to build YouTube and Instagram. And Diane Mueller highlights how the Python community took the lead on so many inclusive practices that are spreading in tech—including the rise of community-led decision-making. Sometimes, a benevolent dictator can get a language started. But Python shows it’s communities that make languages thrive. Learn more about Python at redhat.com/commandlineheroes Also check out these Python podcasts that guest Michael Kennedy is part of — Talk Python to Me, and Python Bytes We hear from Guido van Rossum in this episode from a Computer History Museum interview.

Transcript
Discussion (0)
Starting point is 00:00:00 On the morning of July 12, 2018, members of the Python community all around the globe woke up, grabbed a cup of coffee, and popped open their laptops. Then, one by one, they discovered a message from their benevolent dictator. Guido van Rossum, the man who invented Python, one of the world's greatest programming languages, maybe the greatest programming language, had written to them all.
Starting point is 00:00:34 So imagine all those Python fans reading these words. I don't ever want to have to fight so hard and find that so many people despise my decisions. I would like to remove myself entirely from the decision process. I'm giving myself a permanent vacation from being benevolent dictator for life. And you will all be on your own. I am not going to appoint a successor. So what are you going to do? Create a democracy? Anarchy? With that simple but earth-shattering note, Guido van Rossum, the man that the Python community had been following for decades, well, he basically just bowed out. His message was titled, Transfer of Power, and it would change the landscape of the Python language forever. But more than that, it called into question how all our programming languages were going to evolve and thrive in the future.
Starting point is 00:01:28 Were languages supposed to be run by one benevolent dictator, giving them shape and coherence? Or, in our open source world, were languages actually more like spoken languages, things that grow and react according to the behavior of a whole bunch of different speakers? The Python community, the fastest growing community of any language out there, was about to find out. I'm Saranjit Barik, and this is Season 3 of Command Line Heroes, an original podcast from Red Hat. Last season on Command Line Heroes, we explored a huge stretch of territory, from gaming to the art of the fail to serverless development.
Starting point is 00:02:14 We even ended up tracking one of NASA's rovers across the surface of Mars. But there is one episode that seemed to really capture everyone's imagination. The story of Grace Hopper. Her work on compilers led to the first high-level programming language, COBOL. We realized afterward that Grace Hopper's story was just one of so many stories of languages shaping the world of development and ops. New programming languages allow us to bridge humans and machines. They open gateways toward amazing new possibilities. So, Season 3 is all about those languages.
Starting point is 00:03:00 We're talking JavaScript, we're talking BASIC, Go, Perl, and yes, we're talking Python. Python is where our journey begins, because by following the tale of Python, we learn a crucial truth about the future of all our programming languages. So after Python's benevolent dictator abandoned his throne, the Python community was, yeah, a bit lost. How do you organize things after a dictator steps down? Somebody suggested they can model their structure after the Presbyterian church. That idea didn't stick. To understand how Python did reorganize and what it means for the future of languages in general,
Starting point is 00:03:40 we have to go back to the origin of the Python tale. Well, I'm writing all this code in C and it's getting kind of tedious. That's the man himself, Guido van Rossum, Python's benevolent dictator. Van Rossum had worked for years at Amsterdam's famous Centrum Visconde and Informatica, where he helped develop the ABC programming language. Here, he's describing the moment he was working in C and saw a need for a brand new language. It still felt like there were lots of bugs and sort of it just was slow going. And I was thinking, hmm, if we had an ABC implementation here,
Starting point is 00:04:23 I would just write that whole login program in 15 minutes. And then I would move on to the account management program or something and see it takes me a week each. I somehow started thinking about coming up with a way to use some of ABC's features in the Amoeba environment. Here's something we discovered in studying the history of programming languages. There's no such thing as brand new. They all borrow from old languages in order to cobble together solutions.
Starting point is 00:04:59 Languages morph, they evolve, they branch. When Van Rossum was getting frustrated with the possibilities out there, he imagined a language that could bridge the gap between C and shell programming. C was often overkill, but at the same time, shell scripts felt too cumbersome. There was a sweet spot between the two, and that was the spot the Python filled. When Van Rossum first released Python in 1991, it was a revelation, for sysadmins especially. Here was a full-featured scripting language,
Starting point is 00:05:31 unlike anything that had come before. The first time that I used Python, I absolutely fell in love with it. That's Emily Morehouse, one of five women currently working as a core developer on Python. I think seeing such a stark difference between a first language like C++ and then moving into something like Python, you are really able to see the elegance of the language and the language design itself. You're not necessarily having to deal with any of the hairy implementation details of memory management. And it was such a great way to build things. having to deal with any of the hairy implementation details of memory management. And it was such a great way to build things so much faster and build things for a much wider variety of applications.
Starting point is 00:06:17 Key to Python's attractiveness was its extensibility. A language like ABC, for example, is monolithic in design. There's no way for a real community to help define how the language will work. By contrast, Van Rossum wanted Python to be open and extensible from the beginning. When approaching software design, you often will have to take either existing software or other software systems and kind of get them all to work together. And one of the very true values of how you can design software is making sure that it's extensible. It sounds like a no-brainer, but not every language has achieved the level of extensibility that Python had right from the start. And the truth is, if a language doesn't have extensibility baked into it, there's a good chance it'll end up collapsing under its own weight as it grows.
Starting point is 00:07:16 Python has been designed in a very interesting way that allows it to be kind of extensible at its core. You can actually like patch different pieces of the system at runtime. So if you want to switch out how modules are imported, or you want to switch out your string type or your integer types, Python allows you to do all of these things fairly easily. At the heart of Python's extensibility is something called C extensions or C modules. And so Python has actually been designed to give you an entry point to other languages. And essentially, if you can, you can write a C extension or a C module that can then bridge to, I mean, hundreds of other languages. You can kind of hack Python. It's all about the user's ability to adapt a language to their own means. So Python, as Guido van Rossum envisioned it, was never going to be limited to one dictator's vision.
Starting point is 00:08:27 His transfer of power memo was a long time coming. Van Rossum understood the power of community influence, the power of bringing everyone under a big tent. Yes, he ended up getting called a dictator, but it was benevolent dictator. I think one of the reasons why Python has become such a diverse community is because of Guido. Python has female core developers now because Guido wanted that change to be made and made it happen himself. Naomi Seder, the chair of the Python Software Foundation, once gave a keynote where she said, Python, come for the language and stay for the community. And that may be Guido van Rossum's greatest legacy. Not just Python, but the Python community he made room for. He made Python seriously extensible, but it was, in a way, socially extensible too.
Starting point is 00:09:26 It always had room for human additions. You have so many different applications of Python that your community is then, by definition and kind of by construct, very diverse. And so it's really, really broadened the community reach. Emily Morehouse is a core Python developer and director of engineering at Cuddlesoft. Once Python hatched, it started to grow like nothing before. I'm looking at a stack overflow chart that shows the amount of chatter they get on each language, and Python's line is rocketing. In 2018, more
Starting point is 00:10:13 people did Google searches for Python than for Kim Kardashian. All that excitement has a jostling for the title of most used language against options like Java, C, and C++. So what's with all that love anyway? To find out, I caught up with developer Michael Kennedy, who lives at the center of the Python zeitgeist. Michael hosts not one, but two podcasts devoted to Python, Talk Python to Me, and Python Bytes. We'll throw some links in the show notes so you can check them out. Michael and I got chatting about how Python really hit its stride. If you look at the analytics and the surveys and stuff like that, it really seems to be that 2012 is a strong inflection point.
Starting point is 00:11:00 And the most significant thing that happened around 2012 is the data science community switched away from things like R, some other stuff to really focus on Python. And ever since that's happened, there's been even more momentum there, more machine learning libraries. A lot of the popular machine learning libraries, for example, are Python first, and then they'll consider other languages. Yeah, that's kind of been my understanding too, is when I think about Python, I know it can be used for web development. I know a lot of people who still use it to build web apps, but I feel like the heart of it nowadays is more in the data science part of things. What do you think led to that happening? Why did the
Starting point is 00:11:38 data science community leave things, or I can't say leave, but moved away from things like R? Right, exactly. Yeah, where'd that come from? So I think there's two things at play in that transition. One of those things certainly has to do with Python being a real, in quotes, real programming language in the sense that you can build simple things. You can build graphs and data analysis tools and whatnot, but you can also build Instagram and YouTube and, you know, all these other.
Starting point is 00:12:09 Whereas things like R. Yeah, quite literally. Those are written on Python. So there are other languages they were using. Like R at the time was a sort of scientific statistics type programming language that did data science-y stuff. But if you wanted to go build a web app to show off your results, well, what are you going to use? Node or Python?
Starting point is 00:12:30 You couldn't stick with it, right? Yeah, that's a good point. So Python has this really nice ability that it, well, basically it's a real programming language, right? So that's number one. Number two is Python is pretty unique in this, what I call, it's a full spectrum language. And what I mean by full spectrum is I can be a biologist or astrophysicist or something,
Starting point is 00:12:54 and I want to explore a little bit of data. I want to load up a CSV file and run some commands and get a picture. I don't need to understand classes, static methods, static main void, compilation, linking. You don't have to go through all the stuff that some programming languages do just to get started. You can do just a couple of lines of code, type a command, and it runs. And yet, you can build things like Instagram and so on. It can grow into this absolutely professional system that you can use, but you're not forced to understand all these deep abstractions that
Starting point is 00:13:25 are meant for large applications right away. You can like adopt them as you need it. Does that make sense? Yeah. Yeah. That makes a lot of sense. So we talked about that inflection point around 2012. And, you know, when I was looking and doing some research about Python, Python is actually one of the world's most Googled Google searched coding languages. Wow. Do you feel like it's really picking up and growing at this point? I do think it's picking up and that it's growing. There's, you know, in those last number of years we talked about, there's certainly more enterprise groups that are using Python.
Starting point is 00:13:57 It used to be, you know,.NET, Java, maybe some C, right? That was the answer. And now Python is starting to make its way in. And I think it's kind of getting side-loaded into those environments somewhat. And by that, I mean the data science folks. It's like, well, obviously we're going to use JupyterLab and all the cool notebook stuff. And that's Python. Data science doesn't have such a legacy code-based story.
Starting point is 00:14:21 If I'm going to start a new project where we're exploring some ad campaign or some science results, like that doesn't have a huge dependency on old stuff. Like models and data expire. So it's more easy for the data science world to kind of switch technologies or stay more current. That's a good point. Yeah, thanks.
Starting point is 00:14:39 Yeah. And it sounds like it's not going to stop growing anytime soon. It sounds like it's going to keep growing and the momentum is still, you know, still going to carry it forward. What do you's not going to stop growing anytime soon. It sounds like it's going to keep growing and the momentum is still going to carry it forward. What do you think is going to influence that growth the most moving forward? I feel like it's this ball kind of rolling downhill. So we have all the libraries and packages you can use with Python.
Starting point is 00:15:00 It's a ridiculous number that we have now. A year or two ago it was 100,000. Now it's 170,000 packages or projects. You can just, you know, in a couple lines of code, oh, I'd like to do machine learning. Someone at the conference showed us an example of here's how we're going to train a machine learning system to be given a bunch of faces of people, choose what type of eye they have. Do they have round eyes? Do they have oval eyes? Things like that.
Starting point is 00:15:28 Apparently this drives the kind of makeup you have or something. Oh, wow. This woman did a great presentation, and she said, and here's the code to train this model, and then to ask it questions. And it was like 15 lines of code from beginning to end. And you have, here's your thing that tells you,
Starting point is 00:15:42 given a picture, what your eyes are like. Oh, my goodness. The momentum of those types of things, like these little, like super powerful things you can just bring in through these, these packages is, is ridiculous. That's so cool. Isn't that crazy? Okay. Let's pause that conversation for a sec.
Starting point is 00:15:59 We're going to hear more from Michael later on, but I want to go back and underline something. It's what makes all those amazing Python qualities possible in the first place. The Python community. A defining part of Python's success is that huge responsive community. At the same time, as we saw with Van Rossum's departure, the size of that community could be overwhelming. I mean, imagine having to carry the hang-ups of an entire language around with you. In a way, attracting such a massive community made the idea of a single dictator for life just untenable. Van Rossum wasn't necessarily prepared for how huge a response his language was going to receive.
Starting point is 00:16:47 But almost organically, community members pulled together Python's mailing list, its news group, its website, and eventually the process for discussing language changes via PEPs. That stands for Python Enhancement Proposals. So despite the dictator title, Van Rossum was building a language that you could really talk back to, a language that users could help build. I'm betting that despite his frustration at that moment of departure, Van Rossum knew that a dynamic community would give more to his language than it could ever take away. My name is Diane Mueller. Diane's the director of community development at Red Hat for the cloud platform. Over the past 30 years, she's witnessed a powerful evolution in the strength of open source communities.
Starting point is 00:17:39 And she's been impressed by Python's community in particular. The Python community has done amazing, they brought in the concept of codes of conduct for conferences, diversity scholarships, all of that sort of stuff. By bringing in the different voices and the different perspectives, we get a better and more innovative project that will live on longer and hopefully work better for more people. Even the mistakes they made, they handled openly and transparently and through, you know, collaboration with the community after, you know, seeing that sort of spirit wither away into a bro culture from Silicon Valley and startups. Python felt like coming back home to the roots of where I got started and the community that had been around back in the day.
Starting point is 00:18:28 So it was pretty inspiring and pretty awesome. Inspiring largely because Python redefined what it means to be part of the community in the first place. I mentioned that Guido van Rossum started championing women in the community, even as he stepped down. But he also helped widen the tent in a more general way. Individuals bring a lot more to the table than just code contributions. Mostly community managers and project leads focus on trying to get people to contribute to their project. And in the Python community, people were really highly encouraging you to work
Starting point is 00:19:06 on documentation, to help run the conferences, to help promote diversity. There was like all sorts of other things you could do to be part of the Python community. So that idea that contribution isn't just about code, it's about participation, it's about learning and education, and it's about a lot about documentation was the way into communities for a lot of people. Of course, we've still create our events for us. For Diane, Van Rossum's decision to officially abdicate his dictator role is part of a global shift. It's moving away from older, monolithic kinds of language building. I think we might have moved on from that model. Though every once in a while I hear someone say,
Starting point is 00:20:13 yeah, I'm the benevolent dictator for life of this project. And I'm like, yeah, I don't think so. Diane Mueller is the Director of Community Development at Red Hat. By the time Guido van Rossum sent that jaw-dropping transfer of power memo, the Python community was a powerhouse unto itself. It's common for projects to adopt new governance models as they grow. And in many ways, as we've seen, these folks were ready to take charge of their own language. But I still want to know, how exactly did that pan out? What happened after Van
Starting point is 00:20:53 Rossum stepped away? Let's go back to our conversation with Michael Kennedy to get some answers. Kind of away from Python, how has the community been doing without him? Well, the community has been okay, but we've been at the highest level in kind of a stasis. The runtime and the language just basically had to go into like a coma. There were proposals for interesting things, and they were sometimes complicated, but sometimes really simple. Like, hey, wouldn't it be great if we could ship Python yearly instead of every 18 months so it's a little more predictable, tie it around the yearly conference, things like that. That couldn't be decided because there was no way to make decisions after he stepped down.
Starting point is 00:21:37 He basically said, I'm going to go on vacation. This is up to you guys. You have to figure out how to keep running this. I'm not even going to tell you how to decide how to keep running it. Like, this is your problem now. That sounds dramatic. But check this out. Remember those Python enhancement proposals?
Starting point is 00:21:55 The PEPs that allow the community to give feedback? Well, PEPs to the rescue. There was a series of them trying to determine new governance models for the Python community. Well, the big news is they've decided on one of those called the steering council, which is like five people. I believe they all have equal votes. And they've recently elected those five. So instead of it being on one person's shoulders, it's on all of them. And one thing that I think is really nice is that we have Guido van Rossum as one of those members. So he stepped away and said, I cannot be the single source of all the pressure of people wanting changes and feedback.
Starting point is 00:22:36 But he didn't completely run away from the language. He's still a core developer and he's on the steering council. So he still has some say, but he doesn't have to take it like on entirely which is pretty cool i'm wondering how that works out in reality because i feel like if i'm on the steering council and i'm sitting next to you know the creator of the language i'd probably tend to agree with whatever he says right exactly like all things being equal like ties go to guido yeah you know i don't know i do know some of the people on the steering council and they've been constant contributors and developers maybe even to at a at a co-level more so than guido for like 15 years so they're also pretty deeply involved and pretty opinionated
Starting point is 00:23:23 so i and invested yeah, certainly invested. So I feel like it's going to be okay. And also, I feel like Guido's probably like, I still want to be involved, but he's probably done trying to impose his will on people because that'll just put him right back into the same thing. I think he's probably going to take a more relaxed position. Okay.
Starting point is 00:23:43 But I'm wondering, do you feel like this model of having a benevolent dictator for life, is that model almost required at the beginning of a language in order to get it up and running in order for it to be radical and have these breakthrough advances? I do. I think stuff mostly designed by committee is not super. So in the early days, so many decisions about how does the language work? Does it use semicolons? How does it do this? All that stuff is really hard to committee decide, right?
Starting point is 00:24:21 But Python is over 25 years old now. It's got so many people involved in it. I think now that this is a pretty good model. They also debated whether or not there should just be a replacement BDFL. Like, who do we elect now to be our king? They decided against that, though. Okay. So if that BDFL position is so important, I'm wondering how long does a community need one? You know, it sounds like Guido kind of decided on his own, hey, this is too much. This is not sustainable anymore. I'm not doing this anymore. But if it wasn't his decision, I'm wondering, is there an optimal time where that person should step down and we should move to something a little bit more democratic? Yeah, there has to be, right? I think that there probably is. It's hard for one
Starting point is 00:25:06 person to still be completely connected with the pulse of the community and technology and the new trends, you know, like let's say 40 years out, right? That would be super difficult. So there's got to be like this switch over. I don't really know when it is, but I feel like it's got to be after you have other people doing more work than the BDFL is doing more core contributors and developers and you're just like well I was on vacation and look at all these new things that happened
Starting point is 00:25:36 and it survived something to that effect it's almost like the community will tell you when it's ready right exactly like the community will tell you when it's ready. Right, exactly. The Python community is still taking on a life of its own. So that's where we'll leave them for now. Michael Kennedy is the host of two podcasts that'll keep on tracking their progression in the meantime. You can check out Talk Python to Me and Python Bites. Have you ever heard the story of Solon, the guy known as the lawgiver of ancient Athens? Pretty cool guy. After Solon established a constitution for Athenian democracy, he went off into a state of voluntary exile. That's because
Starting point is 00:26:22 he knew there was a danger he'd become a tyrant if he stayed in power. I guess Guido van Rossum is a latter day so long, giving us decades of standard practice, which is a bit like a constitution. Here's a guy who set up a brilliant programming language, a language where an open source community could really make it their own. And then he also gave them that transfer of power moment where he told them, you're on your own. I'm no longer your dictator. He made sure that it had to be the community, not himself, that carried the Python mantle forward. In a way, Guido van Rossum's transfer of power memo is a manifesto for all programming languages in an open source world. Because as any language grows its community, it ends up
Starting point is 00:27:12 taking on challenges that only the community can solve. In season three of Command Line Heroes, we're doing a deep dive into the world of programming languages. Languages gain influence because they solve a new problem in some powerful new way. And for the rest of the season, we're uncovering
Starting point is 00:27:33 the superpowers baked into JavaScript, Perl, COBOL, Go, and so much more. Next episode, we'll learn the story
Starting point is 00:27:41 of BASIC and what it teaches us about everybody's first language. If you want to dive deeper into Python or anything else you heard on this episode, head over to redhat.com slash command line heroes. Until then, I'm Saranya Barik. Keep on coding. Thank you. models. And those are important, but at Red Hat, we see them as just a piece of the larger AI infrastructure. And here's what I mean by that. Enterprises are built of hundreds or even
Starting point is 00:28:29 thousands of applications. It's not hard to imagine a future in which those applications are being served by hundreds or thousands of models. Without a common platform for your data scientists and developers, without a way to simplify some really complex workflows as you train, tune, serve, and monitor models, it can get overwhelming pretty quickly. And that's why we've built Red Hat OpenShift AI, a platform where everyone is working together on the same page to build and deploy AI models and applications with transparency and control. Find out how at redhat.com.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.