Contact Us

How Python Saved My Life with Dr. Larry Gray | EP.7

In episode 7 of Hidden Layers, Ron chats with KUNGFU.AI's Director of Engineering, Dr. Larry Gray. Dr. Gray introduces us to the topic of computational thinking, walks us through his journey to AI, talks about how AI will disproportionately impact minors, and delves in on Python and what it means to him. Learn about how to prepare for an AI driven future, how to apply computational thinking in your own life, and how critical it will be to manage bias in AI going forward.

Resources:  

Get notified when Dr. Gray's book is ready for pre-order and get a free copy of Chapter 1: lawrencegray.com/mastering-python-book

The impact of generative AI on Black communities: https://www.mckinsey.com/bem/our-insights/the-impact-of-generative-ai-on-black-communities

Dr. Gray's Udemy Course - Python Programming for Absolute Beginners: https://www.udemy.com/course/easy-python-programming-for-absolute-beginners-r/

Ron Green: Welcome to Hidden Layers, where we explore the people and the tech behind artificial intelligence. I'm your host Ron Green, and I'm excited to be joined today by Dr. Larry Gray to discuss computational thinking and its growing importance in this new age of AI. Dr. Larry Gray works as a director of engineering at KUNGFU.AI and received his Ph.D. from Johns Hopkins University School of Medicine. He's deeply committed to open source and is a major contributor to the Yellow Brick project. He's also a board member of NumFocus. He's renowned for his dedication to the Python language and ecosystem, and he extends his expertise beyond the industry by teaching and developing courses at Georgetown University, where he holds a position as an adjunct professor and program director for data analytics. Welcome Larry!

Dr. Larry Gray: Thanks for having me.

Ron Green: Okay, so you've got a new book coming out later this year on computational thinking. Let's kick off with a definition of computational thinking to kind of ground the rest of the conversation.

Dr. Larry Gray: Yeah, sure. So the way that I envision computational thinking, it is first, ideal of problem solving, right? And the way that you approach problem solving. And the way that this is set up is that you try to look at your problem into modular ways and to break things apart into manageable tasks. And so if you're able to do this and keep going deeper and deeper and making things smaller and smaller, you get down to a problem that is a single problem that can be solved, right? And once you have that single problem, you can build back up into a more complex system. So this type of thinking, it's not generally taught to non -computer science majors, but I think it's practical and useful for those outside of computer science.

Ron Green: I totally agree. I actually had a really interesting experience in my early undergrad years, where I was in my first computer science course, and I'd done a little bit of programming. And I got stuck on the very first assignment. And I remember going to the grad student helping us. And in a very sort of socratic method, he helped me break down the problem and decompose it into smaller subproblems. And I'll never forget, a light went off. And from that moment on, I really never struggled with decomposing problems again. It was almost like he opened a door to a whole new world that I didn't know existed. And it was really, I think, a foundational experience for me. I didn't know what was called computational thinking back then. But I think that's a bit of a new term. So with the focus on Python in your career, you also believe pretty strongly that Python is a unique language, a unique high order language that may be perfectly suited for computational thinking. Maybe talk about that a little bit.

Dr. Larry Gray: Yeah, so it all begins with the syntax of Python and along with readability. So whenever you see Python compared to languages such as C, Java, whatever, you can immediately pretty much figure out that things say, have you seen print hello world and see it looks weird? Have you seen print hello world in JavaScript? It looks weird. But if you see it in Python, without having any knowledge, you say, well, probably it prints hello world. And so the syntax becomes easier. And just some of also the conventions that are built into Python and the way things are spaced. Python is a space based language. So things are spread out and they look easy to read, which is one of the things that's highly important is that she can actually go between lines of code and read it in a way that it's fluent and it seems to logically get pieced together. So the focus on this and why it's good for computational thinking is it allows you to easily understand the code that you're working on. And if you're able to do that and break it down to single problem statements, it's easier to build that back up into complex solutions.

Ron Green: Yeah, I couldn't agree more about Python being sort of an ideal language for people first getting in to either programming or thinking about computational thinking. The the lack of curly brackets and semi-colons is just such a bonus. Well, you also have Larry a very unique personal journey and you've been you've been very generous and sharing this. I know you've given presentations at Strangeloop and other places about this. Can you talk a little bit about your academic journey and kind of how you how you arrived at this passion for computational thinking?

Dr. Larry Gray: Yeah, so my story really begins, there's an impetus for everything that happened for me. And that impetus was the diagnosis of me being bipolar.

Ron Green: And what year was that? How old were you?

Dr. Larry Gray: That was in 2013. So about 10 years ago. And prior to that, in order to understand my story fully, you have to understand what I was doing prior to this. I was admitted to Hopkins. I was working on the world class problem. In my heart or hearts, I felt that I was going to get a Nobel Prize because I was discovering something that was pivotal for my field. I was going to be able to diagnose the genetic disorder and also treat it. And I was heading that direction. Sadly, my grandmother passed away and it was pretty rough for me. I went through a lot of grief because for her and me, I grew up extremely poor and she looked close to me out in the country. And it was so different of a space for me than being in a small town. There were fruit trees everywhere. There was always cake and cookies in the kitchen. There was just hard candy that only grandmas and grandpas have around. And there was vegetable gardens and watermelon and all the stuff going. And she was one of the kindest person I ever met. And the values that she loved, I were kindness and gratitude. And that's what I love my life by now, by those principles. And so it was a big deal for me. But that grief slowly changed into depression. And at first I thought it was something manageable that I can just, naturopathically, go and work out. Like I can just exercise. I can just...

Ron Green: Yeah, just your willpower.

Dr. Larry Gray: Yeah, just your willpower. I can lead a clean life and that would get it. But it just got worse and worse. And this is kind of contradictory. Here I am, a researcher. I was against taking medication, despite the fact that I was in a laboratory trying to discover treatments for other disorders. Kind of weird. But I wanted to brave its moments of my life is that I decided I was going to take medication in order to treat this. My treatment regimen ended up being over a course of 10 years. I was on like 15 different medications. Nothing seems to work. But during this period, I got my PhD, which was very hard. I was... My cognitive ability had decreased so much that for my dissertation, I spoke my dissertation to my wife line by line. And it took me like three minutes in order to formulate a sentence.

Ron Green: And then you had to dictate it because it was the only way you could get out of your mind at that point

Dr. Larry Gray: get it out. And so I went on and I realized that I was struggling so much in a laboratory and that I wanted to move into something that was a little bit more energizing and I decided to go into computational biology. I would do more computational work. And during that time I got introduced to Python and immediately those problems that I was having with my cognitive ability start to alleviate. I couldn't do anything else. There was nothing in my life I wasn't, you know, I had trouble sleeping. I was, every element that comes with being in the press of state was just so inhibiting me but I could sit down and actually write Python code. And slowly I started seeing these executive functions coming back. Like the more and more I studied it, the more and more I became to learn how to approach problems, it started working and over the years I started getting better. You know, this is also in conjunction with medication but I really contribute my, what I like to say, Python saved my life wholeheartedly. Like I truly believe that because it let me rehabilitate my thinking. All right. And so that was just a, my point that I became like a huge advocate for Python and for learning how to think differently and how to approach problems differently and use a language to do that. So in my book I really emphasized that this isn't just for technical people. This is for everyday people. It could be for social worker that you can change the way that you think about how you solve problems because in the future we're going to really be problem solvers. That's the jobs that we're going to hold. And so how you approach thinking about problems is going to be important and Python could be that tool in order to help you achieve success.

Ron Green: So it sounds like Python enable, it was almost like a ladder to get out of the hole you were in. It gave you the power to get out of that by, do you think it was through the simplifying and forcing you to break things down into sort of bite -sized components in the way that you're talking about computational thinking?

Dr. Larry Gray: Yeah, single thoughts. I could focus on a single thought and that enabled me, my brain could wrap around that. And then immediately I would build upon that. The way that I thought before, which I still do, is I, what may be a great researcher, I can go in, see a problem, and I didn't need to know all the pieces, but I could actually come up with a solution. But that was wasn't like computational thinking. It was just-

Ron Green: It was almost instinct or- Instinct.

Dr. Larry Gray: Instinct, intuition. And I lost that ability to do that. And so I had to rebuild a certain way to actually be very logical in the way that I approached problems. I still loved, I slowly regained that ability to look at whole problems and come to some solution or hypothesis about how to test the test that. But Python definitely is a savior.

Ron Green: Have you run across anybody else? I know you teach a lot in person and online. Do you, have you run across anybody else who's had a bit of a similar experience like that?

Dr. Larry Gray: Well, I have come across one person that said that they were dealing with depressive issues and that what's really happening them get through everything is, is Python. And so there is some, some people out there and I know there's probably more that have been exposed to that. So I don't have any other like evidence of this, but there's, I think the, the way that what they've learned about Python and the areas of the brain of just programming what it affects is within these regions, executive function and things like that. So it makes sense that if these areas of the brain are being stimulated by Python and learning how to think in this way, that in these other regions that programming is actually affecting, it makes perfect sense that Python can actually activate those neural pathways.

Ron Green: Right, right. So let's talk a little bit about the intersection of computational thinking and AI in the coming field. I'd love to hear your thoughts on what, you know, a minute ago you said you think computational thinking, problem solving is going to be core to the sort of AI driven world we're going into. So let's talk a little bit about that. Why do you think it's important for people, even in non-technical fields, to start embracing computational thinking?

Dr. Larry Gray: Yeah, so I'm really excited about AI. Given there are going to be some issues and disparities that are come about from its adoption, I think humans are going to have an amazing life. And that's because they will augment us and allow us to be problem solvers. So you can imagine the social worker that spends a lot of her time doing casework instead of actually doing social justice that she's meant to do and solve problems for people. You can have AI do the casework for you. I think it's going to allow us to do more human intelligence and more creativity. It's going to free us up to do things that are really human.

Ron Green: Completely agree.

Dr. Larry Gray: And so we have emotional, like the use for emotional intelligence is going to increase. The use for being able to socialize with people and do very social interactions are going to increase. And these are the things that are not readily and easily duplicated by AI. And so those skills are going to have to come to the forefront. And it's going to be great because I think people, as a people, we want more challenging, more complex issues to solve. And so those are the things that are taken away because, as we know, that AI will probably reduce 80% of process oriented jobs. So we're left with higher order thinking jobs. And I think that we can use tools like Python to prepare people to do those types of higher order thinking jobs, or at least learn that approach.

Ron Green: I completely agree. I share your optimism. I think that there are going to be, you know, there are going to be a lot of people who have their jobs disrupted and there will probably be jobs that are completely eliminated. But AI is also going to enable, I think, entirely new categories of capabilities that, you know, some you can kind of imagine. Some I think we have no idea because it's such a powerful tool and it's just we're at really a day one in that exploration.

Dr. Larry Gray: I think this is going to be a, we're in a great place. I think us at KUNGFU.AI are in a great and unique position that we get to envision how the world is going to be and we can provide solutions for that new world.

Ron Green: Right, right.

Dr. Larry Gray: Before it happens, like what is this world going to look like to now? And now we can provide those types of solutions and this has been able to do that as those that are able to envision what the future will look like are those that are going to be successful and been able to make a big difference.

Ron Green: What about minority groups? What about people who are maybe less fortunate and maybe already marginalized? I mean, there's a real danger there, right? About AI potentially increasing the discrepancy and the disparity there. Have you thought about that much?

Dr. Larry Gray: I've thought a lot about it lately and it made me really, really sad. I think being coming from a very educated background, I tend to forget that everyone is not educated. It just becomes because I'm around Ph.Ds all the time. And so you tend to not believe that. And for those jobs that are going to go away, are highly occupied by blacks. Like those jobs that are moving away. And these are jobs that are meant to catapult them into higher paying jobs. But if they're eliminated, there's no path in order to get to these higher paying positions. And what they predict and study by McKinsey is that there's going to be like a 45 billion dollar wealth gap that's going to emerge over the next 10 years along racial lines from black and white, the difference. And it's going to be devastating. And so solutions for that is me thinking we need to get Python in the hands of people now of kids or people to think differently because I was trained as a scientist. I was trained on scientific thinking. Right. And I do that naturally, but not everyone has that exposure. And so if we can get people to think differently and think about the world in a different way of how they solve their everyday problems, and this isn't just a, they could actually maybe get a leg up on the types of jobs that are going to be coming down the pipeline. And this is going to be, so my role now is to be more making people more aware of this. Because I wasn't aware. Right. There's an awareness that needs to go along with blacks in technology. So of executives in technology right now, about only 3% are black. So there's a huge difference. And so one of the solutions is to get more blacks into positions in technology. Things like that. And so just not being aware in how privileged I am, like I look around and it's like, man, I'm an AEI and I'm black and I'm in a leadership position. Like I'm probably less than a half percent of all people out there. And so that kind of drives me to be, to have some sort of conviction that this, there should be more awareness around this topic.

Ron Green: Well, and you've done an enormous amount of mentoring and teaching and giving back to the community, open source. I mentioned earlier you have an entire introductory course on Python. We'll put a link. We'll put a link in the show notes for that. Are you seeing more people from different backgrounds increasingly come into your circle teaching Python, or has it remained relatively steady state over the years, as far as the background of people you're seeing coming in?

Dr. Larry Gray: So the background that I'm seeing, I'm seeing like at Georgetown, I see a lot of minorities that are coming in, especially in the data science space. One of the issues is that in this case, they come in less prepared than most students. And so that's a challenge that we have to face whenever we're hiring interns, we're hiring people is that someone might come in with a little less skills than others, but it's definitely an increase in a number of minorities that are trying to enter this. I see this, I'm mentoring like four people right now and they're all African American males that just seek me out and say, you know, I really need some direction. And so there's a demand and there's a, I, the reality of it that I tell them is going to be a struggle. I know when I first tried to get my first job, it took me nine months to get someone to believe in me, right? And, and try to convey that to them that it's going to be a struggle. But as much as I never, I really don't think about race a lot, but others actually see me and think this is someone that I can kind of go to and knows what I might be struggling with or whatever.

Ron Green: Yeah, what they may have.

Dr. Larry Gray: Yeah, might have been going through.  So I've opened myself to that experience.

Ron Green: That is just fantastic. I think it's incumbent upon all of us, getting that first job in the tech business or whatever career you're trying to switch into, getting that first role is so difficult. And I think it's critical for people like us to pay it back and help people enter this. And in fact, you and I see this all the time, Larry, where there are people who are trying to break into the AI world, break into data science or AI or machine learning, and it's just such a steep learning curve. They don't know where to start. And I think your course on Python is the perfect entry because with that, you'll learn the dominant language that's used within our field and you'll learn the basics of computational thinking, which I think are critical. Okay, well, I'd love to, in today's episode, with asking you just kind of our standard wrap-up question, which is on a personal level, if you get to have AI automate something for you, make your life better day to day, what would you pick?

Dr. Larry Gray: A snowblower. Without question, something that I can just, even if it was remote control and it, I don't care. Like that's the vein of my existence is having to shovel snow. I love it. So getting something out there that truly, truly like a Roomba for my driveway.

Ron Green: I love it. I love it. Well, that's probably in the near term. I think that's totally achievable. Well, Larry, thank you so much for coming on. This was a total blast and I really appreciate you taking the time.

Dr. Larry Gray: I really enjoyed being here.

Ron Green: Thank you.

By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.
X Icon