Latest / Talk Python To Me / #270: Python in supply chains: oil rigs, rockets, and lettuce
Transcript
- 0:00On this episode, we're going to weave a thread through three different areas of Python programming
- 0:04that at first seem unlikely to have that much in common, yet the core will be the same throughout.
- 0:09I think this is a really cool lesson to learn as you get deeper into programming
- 0:13and a great story to highlight it. We're going to meet Raveen Kumar, who wrote Python code and
- 0:19data science tooling for oil rig tool manufacturers, a rocket company, and a hip
- 0:24multi-location restaurant chain. This is Talk Python To Me, episode 270, recorded June 17th, 2020.
- 0:32Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem,
- 0:50and the personalities. This is your host, Michael Kennedy. Follow me on Twitter, where I'm at,
- 0:55mkennedy. Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on
- 1:00Twitter via at Talk Python. This episode is brought to you by Sentry and Linode. Please check out what
- 1:05they're offering during their segments. It really helps support the show. Raveen, welcome to Talk
- 1:10Python to Me. Thanks. Glad to be here. I'm glad to have you here. We're going to take a bit of a tour
- 1:14through the manufacturing space, and I think it's going to be a lot of fun. Yeah, I think so as well.
- 1:20See how the two connect. I didn't see it at first, but we'll talk about that, I'm sure.
- 1:23Yeah, we absolutely will. Yeah, so you've worked with, you know, I think a little bit different than
- 1:29a lot of software engineers. You've worked with physical things plus software. Yes, yes. So much
- 1:36so that I'd say none of my jobs, the software matter. Nobody bought the software at any of my jobs.
- 1:40People bought the physical thing, so. Right. You didn't have like a user funnel or anything like that?
- 1:45Not for the software. Software was particularly all internal, so it's just a different dynamic.
- 1:49Exactly. Yeah, I spent a lot of time actually building internal software as well, and it's
- 1:54actually pretty rewarding and pretty fun, I think. I think so too. Yeah. Now, before we get to that,
- 1:58though, let's jump in with your story and your background. How did you get into programming
- 2:02in Python? If we go programming, I guess I didn't have much of a choice. My dad was a network engineer
- 2:07in the 70s and 80s and 90s, so when I grew up, there were computers all around. In fact,
- 2:12there was just a computer when I was a kid, and to get to video games and things like that, I had to
- 2:16type stuff into a DOS 3.1 terminal. So my parents always tell me, you see toddlers these days
- 2:20like touching buttons on iPads and things like, or no buttons, but touching the screen on iPads and
- 2:24getting through it. That was, I guess that was me as a kid. So before I knew what computers were,
- 2:28I was using them. And so that just progressed through my teenage years. I wouldn't call that
- 2:33programming. I'd say more of it was just scripting, like changing a value here, changing a value there,
- 2:37using a terminal and things like that. The programming in Bonafide came at my first job.
- 2:42I think that's when I really started diving in.
- 2:44Even though you don't call it programming. And for me, I spent my high school years
- 2:49and early college, I guess, as well, being a really big fan and fanatic of computers.
- 2:57Okay.
- 2:58We would do all sorts of stuff on the internet. And back when getting on the internet was
- 3:02actually a challenge, you'd have to find a way to dial it to somewhere.
- 3:06Yeah. You'd have to, you know, somehow set up Telnet on Windows back then, you know, like
- 3:13use like a bunch of weird tools to like piece it together. And I just loved it so much, but I never
- 3:18really thought of myself as a programmer, but looking back, developing that comfort with computers,
- 3:24just being like quote, good with computers made becoming a programmer much easier because it's,
- 3:30it wasn't like, Oh, well, these computers are weird things. It's like, no, no, I love them.
- 3:34I just never thought I could really program them, but apparently this is how you do it.
- 3:37And it's not so bad.
- 3:38Yeah, that's exactly right. It's the same experience I had.
- 3:41Yeah. And I think typing in the little games actually takes it to the next level, right?
- 3:44But you mentioned floppy disks. I remember having stacks of like 3.25 or 3.5, whatever it was,
- 3:51floppy disks, those little hard ones, you know, floppy on the inside with a hard shell, I guess.
- 3:56Yeah.
- 3:57Just to get one program on, onto the computer. Like I know people nowadays who maybe didn't really
- 4:02have to live through those in practical ways, like a game you might want to play. That could
- 4:06have been like 20 disks and you'd have to set there and it would say, now put in disk seven of,
- 4:10you know, 20. Like, okay, right, right, right, right. Here we go. What a crazy time, huh?
- 4:15Yeah. It's so funny. You mentioned that. Cause that's, that was my dad's,
- 4:17that was maybe my first programming job is my dad would give me a stack of like the six red hat
- 4:22disks, flop floppy disks. Or like if it was 3.1, I think it was like eight or nine. And he'd be like,
- 4:26all right, you're just going to sit here. And when it says, push the disk, you're going to push this
- 4:30button, grab that out and put the next one in. I would just sit there for like an hour as a kid,
- 4:34just watching the screen and watching like the loading bar and everything going. And then he'd
- 4:38be like, insert floppy too. And I would put that one in. Then my dad would come check on me. Did
- 4:41you do it? Did you not do it? And that's my, maybe my, the first, like the first set of tasks that I
- 4:46remember where a supervisor was telling me to, to program this computer.
- 4:49Yeah. Yeah. You were, you were working on computers. That's pretty crazy. And now that's like 10
- 4:53seconds to download that. Totally different world. It's a fantastic world, but, yeah,
- 4:58very different. All right. So this is how you got started in programming. How about Python?
- 5:03So Python is probably bifurcated in the same way. I think I remember seeing bits and pieces like Python
- 5:07one, even on some of, I used to use Mandrake Linux, which I don't even think is a thing anymore,
- 5:12but I had Python on there. But again, it was scripting. It was, I remember it was like something
- 5:17to set up at the background or whatever, and Python would set the color. So I went into Python
- 5:21script and would change the color. So it went from, from gray to green. What I liked as a teenager,
- 5:24green or whatever. Python again, bonafide came in at my first job. And when I was thinking through
- 5:29programming languages and I remember like Python, a lot of people say Python's easy reason. I remember
- 5:34it was the easiest one to use and read. So I just picked that one and it, it's stuck.
- 5:39Yeah. Yeah. I would say you've been definitely doing a lot of stuff with Python after that.
- 5:44How about today? What are you doing day to day?
- 5:46So day to day, I have maybe two things I do with Python. So I have the, I have the paid job.
- 5:50I work at sweetgreen and I use Python to understand how I'll say, I'm going to say
- 5:55restaurants work and entrees and salad production goes and we'll get, I'm sure we're going to get in
- 6:00all that, but it's a very data science-y focused area of Python. And outside of paid work, I'm a
- 6:07contributor to IREs and PyMC, which are two Bayesian libraries written in Python. So outside of work,
- 6:13I'm spending a lot of time on GitHub and working with a bunch of these folks, a bunch of folks
- 6:17around the globe to make these packages that are widely used by the Bayesian community.
- 6:21Right. So give us the high level story of how Bayesian analysis and whatnot factors into Python
- 6:29and data science. Like I had Max Klar on for a while. We talked about it in a little more depth,
- 6:35but that was a while ago.
- 6:36Yeah. So high level, Bayesian maybe seems like a cool new thing, but it's actually super old.
- 6:41The guy, Thomas Bayes, he was born in around the 1700s in England. So it's way even before
- 6:46computers existed. And he had this particular idea of probability. That's not the one that's taught in,
- 6:52at least in American schools. It's where your data is what you know and is fixed and everything else
- 6:57about the world is random versus the train of thought that usually goes on as frequentist mentality,
- 7:02where your parameters in the model are fixed and your data is random, your dice rolls are random,
- 7:06your coin flips are random and things like that.
- 7:08The reason it comes into Python is that the formula is very simple. It's just four terms,
- 7:12but it turns out it's super hard to solve by hand and you actually can't solve it by hand
- 7:16very well for a large class of problems. But if you combine some clever algorithms
- 7:20and the Bayes theorem together, you can start doing very, very complex things. So Python has a,
- 7:26I'd say, active and robust ecosystem where a lot of people are taking these algorithms,
- 7:30implementing in Python and making these nice libraries around them. So normal people like
- 7:34yourselves can use Bayes theorem and not have to think about it too much.
- 7:37Right. It doesn't feel necessarily like statistics. It feels like a data science,
- 7:41a librarian.
- 7:42Yeah, exactly. Yeah. Maybe making Bayes theorem data science is the tagline I should use.
- 7:47Yeah, yeah, for sure. That's a good way to put it. So tell me if this sort of understanding is
- 7:52correct. It feels to me like Bayes analysis is a little bit better at making predictions when you
- 7:58can't run and like say the training on a bunch of data that you already have, right? It's like one
- 8:03thing to say, well, we've got 60,000 mammograms and we know the outcomes of all of them. So let's
- 8:08train up a model on it. It's another to say, we're trying to build a rocket. We've never done that.
- 8:14We need to predict how it's going or how it's, you know, make predictions about how like the supply
- 8:19chain is working and whatnot. Is that good general rule of thumb or am I off the mark there?
- 8:23That's the way that I got into Bayes theorem was as I was getting into Python, I saw these cool
- 8:27people doing stuff with neural nets and AB testing and all that. But they're like, oh, you're Google
- 8:31and 10 million people have visited your site in the last like one hour. Or you've got this image with a
- 8:37ton of information in it and you've got 10,000 of them and they're all labeled. And I was sitting here
- 8:40at the time at SpaceX and I was like, I've only got like 30 rocket launches. Like I don't have
- 8:45actually the funny way to put this is if you go to scikit-learn, there's a flow chart of machine
- 8:48learning workflows. And it's like, if you have less than like a thousand samples, you need to get more
- 8:52data. I'm like, what am I going to do? Launch at 900 more rockets? Like I can't AB test rockets. So
- 8:57stumble into Bayes theorem. Yeah, that's awesome. And I remember there was this interview, this famous
- 9:02interview from Elon Musk after the third rocket failure. Yeah, I think the interview was on the fourth
- 9:09rocket launch, the first successful one that they had. He was saying, basically, this was our last chance,
- 9:15right? We can't just keep launching these many, many million dollar rockets and failing or just
- 9:20having them blow up indefinitely, right? It's not like a government funded thing where we're just
- 9:26going to do it until you get it working, right? So you can't take that many shots at it.
- 9:30That's true of all manufacturing. So, and I should make the general disclaimer that I'm not representing
- 9:35any of the companies that I'm talking about. I happen to work for them and I'm an individual. So
- 9:38these are all my experiences and opinions, but that's generally true of all manufacturing is
- 9:42we're used to trying in Python or even programming general. You can try things out,
- 9:46get an exception and just try it again, like no harm, no foul. But in manufacturing,
- 9:50it takes a lot of time and money to make these things. And it's hard to go to your boss and say,
- 9:53I actually need to make 10,000 of these randomly to figure out which 100 of them work.
- 9:57He or she will just be like, get out. We don't, we don't have the budget for that.
- 10:01You can't just make a hundred, salads or whatever wrong just to see whether the customers like
- 10:05them or not. That's not a good way to build a physical business.
- 10:08Yeah, absolutely. So we're going to touch on some of your experiences in a couple of industries.
- 10:12We won't go into anything proprietary at SpaceX or anything like that, but we can talk a little
- 10:17bit as like some of the tools and stuff, maybe some of the workflows. But before we do, you know,
- 10:22you mentioned that you work on a couple of open source libraries. Do you want to talk about those
- 10:26two, each one for a little bit? Just give people a background and how they fit into this whole
- 10:30supply chain data science story?
- 10:32Yeah, exactly. So I work on, like I said, Pimesee and Arby's. Those are both,
- 10:36Bayesian libraries. The Bayesian way of doing statistics and the, and the tooling around
- 10:41it is fits very well with the type of work that I need to do in ways that like neural networks
- 10:46and random force and those don't always. But I mean, in particular too, I want to say the,
- 10:50the communities around those libraries, when we talk about Python, not just as a language,
- 10:54but as a community was, was extremely nice. So, I just, I find it professionally rewarding.
- 10:59I find it, I need it professionally, but then it's also just been rewarding to go in and give
- 11:03back to these libraries. I think it's nice people forget, but Python's not a corporation. Like
- 11:07it's not like all these people making it, make money or even, even the library. So I'd use Python
- 11:12for a while and I felt like, you know what I need, this is the way that I can, I can give back
- 11:17and be a part of it more than just using it at work.
- 11:19Yeah. I think that's really good. I wish more companies had a more direct belief that they should
- 11:25go back and support libraries like this, but it's still really good that, you know,
- 11:29companies at least let people like you work on them because I've seen contracts or arrangements
- 11:34where it's basically like, I don't know, it, it seems almost like it should be illegal,
- 11:39but it's like everything that you think, everything that you imagine, everything that you might touch,
- 11:46even if you're not at work, we own that, right? That's us. That's ours. You know,
- 11:51if you have an idea for a new product, that's anywhere near where you work conceptually and you have it,
- 11:56even if you're not at work, you know what, because you're employed by us, that's our,
- 12:01right? That seems just crazy to me, but I've seen stuff like that. And you could see how those kinds
- 12:05of arrangements would limit open source contributions.
- 12:08Yeah. No, that it was actually a primary consideration in my, my last job search here,
- 12:12particularly when I was going to Sweetgreen, the interviews that like the FANG companies that are the
- 12:15famous ones, but some of the contracts were worded like that, that any program, anything you do is our
- 12:19property. When I had the conversation with my prior boss at Sweetgreen, I don't think people know this,
- 12:24but Sweetgreen is becoming a very technology focused company. Actually it is a very technology
- 12:27focused company and I was just increasing that way.
- 12:29Tell me a little bit about it. Cause I don't, I don't know if Sweetgreen is something I'm aware of,
- 12:34or at least it's in the Pacific Northwest.
- 12:35Okay. Yeah. So Sweetgreen is a restaurant company is probably what most people see it as.
- 12:40The mission of Sweetgreen at a high level is to connect people to real food. So the purpose of
- 12:44the company is not necessarily technology. The purpose of the company is to get healthy food
- 12:49to people like sort of a, an inaccessible way. And part of that access more and more is,
- 12:54is technology. So part of that access is you are easily able to order off an app and get that
- 12:59delivered to you at your house. And so it's a very low friction experience. That means that
- 13:03you can order healthy food, wherever you're at, not just Domino's or some of the fast food brands,
- 13:08but also this is the part that I'm in. It also means that we're making it in an efficient manner.
- 13:13Like we're not wasting a lot of food, which I'll talk about in the supply chain stuff later. We're not
- 13:17under preparing food. So when you order, you don't have what you want. And that's where the data
- 13:21science-y sort of components come in is using the math and the data to make sure that we have the right
- 13:25amount of healthy food. So every day when you, Michael want to get whatever you want,
- 13:29it's there and it's available and you can get it at your convenience. That's the idea. And technology
- 13:33just happens to be a huge enabler in that particular space.
- 13:37Yeah. I definitely could see how that, that works. So you were talking about the contracts and some of
- 13:42these overly possessive, I don't know, possessive. Yeah, yeah, yeah, exactly. So sweet greens a little
- 13:50bit more open to letting you work on things that basically support the business anyway.
- 13:55They let me write it. They let me write it as prior arts in my contract and they were accepting
- 13:58that. And so I was like, all right, this is a company that seems to really want to give back
- 14:01to the community and things like that in their mission. But they, enough so that they let me
- 14:06word it in a contract, which is what mattered to me. And I was real thrilled about that.
- 14:09I don't get to spend a ton of time developing like per se, like I still have a ton of work to do at
- 14:12work, but they were not aggressive about it, which was very, very nice. And I appreciate that.
- 14:17And that's why I work at sweet greens.
- 14:18I, yeah, I think that's a really cool thing. And more companies should be doing it because ultimately it's
- 14:24only going to help them if the tools that you use are better. And if you work on them in your
- 14:29spare time, it's not like you're charging them for, you know, that PR that you did on the weekend.
- 14:35Yeah.
- 14:35They should just see that as a bonus, right? I guess. But yeah, it's, I know where the
- 14:39basic idea of, Hey, you can't go create these other things while you work here. I mean, that kind
- 14:45of makes sense in some sense. You can't go create a competing company and like incubate it until you're
- 14:49ready. But at the same time, you know, it's corporations don't own people.
- 14:53No, no.
- 14:55They shouldn't anyway, right? So like, but a lot of them kind of treat it a little bit like that,
- 14:58which is crazy.
- 14:58Yeah. And I would say for the corporations that are listening, like I'm more compelled to work at,
- 15:02like, let's say Microsoft or some of these organizations, like particularly Microsoft these
- 15:05days, because it seems like they're allowing the developers to work on open source and things like
- 15:09that. And that is a huge pro to me as a tech worker to go to a company that supports the
- 15:15community and doesn't just take, take the code and hide it away in their private repositories.
- 15:19Yeah, absolutely.
- 15:20This portion of Talk Python To Me is brought to you by Sentry. How would you like to remove a little
- 15:27stress from your life? Do you worry that users may be having difficulties or are encountering errors
- 15:33with your app right now? Would you even know it until they send that support email? How much better
- 15:38would it be to have the error details immediately sent to you, including the call stack and values of
- 15:43local variables as well as the active user stored in the report? With Sentry, this is not only possible,
- 15:49it's simple and free. In fact, we use Sentry on all the Talk Python web properties. We've actually
- 15:55fixed a bug triggered by our user and had the upgrade ready to roll out as we got the support email.
- 16:01That was a great email to write back. We saw your error and have already rolled out the fix.
- 16:05Imagine their surprise. Surprise and delight your users today. Create your free account at
- 16:11talkpython.fm/sentry and track up to 5,000 errors a month across multiple projects for free.
- 16:17And if you use the code talkpython, all one word, it's good for two free months of Sentry's team plan,
- 16:24which will give you up to 20 times as many monthly events and some other features. So create that free
- 16:29account today.
- 16:32So one thing I wanted to do is we're sort of thinking about some of these ideas here. I wanted
- 16:36to kind of get your opinion looking back on an episode I recently had. I recently had Jacqueline
- 16:41and Emily on to talk about careers in data science, this book that they wrote. And it's a super good
- 16:46book, like sort of outlining the different types of companies that you might work at. And I could see
- 16:51Sweetgreen being like one of the prototypical types of companies as well as SpaceX and other ones.
- 16:58And in there, they said, look, data science is kind of three different areas, you know, three, maybe,
- 17:05maybe you could find different distinctions, but they broke it into like different areas. Look,
- 17:08there's this, this group of people that does analytics, where they create dashboards and reports to deliver
- 17:15data. Or there's people that do machine learning that create models and put them into production. And then there's
- 17:20decision science, which basically helps make product recommendations like Netflix and whatnot. And it sort
- 17:27of sounds like you've been a little bit in the analytics side of things, at least with that
- 17:33categorization.
- 17:33So I would say my career has progressed through these. I did analytics at the start because it's the
- 17:38easiest one and the most obvious one. I tried at the companies I was at, I tried using machine
- 17:45learning in an NOV, which is my first company and SpaceX, but didn't wasn't really good fit there.
- 17:51What the constant threat has been has been decision science for me, particularly the thing I do the
- 17:55most now is use programming data to help somebody make a decision. It could be a person in the
- 18:00restaurant. It could be an executive. It could be someone at my level, but how do I take all the
- 18:06information we have and package it in a way that helps that one person make a more informed decision
- 18:10about whether to buy, whether or not to buy, whether to do this, whether to do that.
- 18:14Yeah. And I guess also one of the main themes is sort of the supply chain side of things, right?
- 18:19So let's maybe just set the stage of the three different places where you went through some of
- 18:24these experiences, right? So you started out in heavy manufacturing where you were working
- 18:29at a company that built tools for oil and gas exploration or something like that, right?
- 18:34Yeah. Yep. That's exactly right.
- 18:36Okay. And then this little company in LA called SpaceX.
- 18:39Yeah. I don't know if a lot of people have heard of it. It hasn't been on the news, but yeah.
- 18:43It's a rocket company.
- 18:44Fourth of July all the time. Pretty awesome. And then Sweetgreen now.
- 18:48Yeah.
- 18:48So maybe give us a sense of the types of stuff that you did at each of those companies,
- 18:54just like the high level stuff.
- 18:56And I think it follows like my career progression and sort of what the framework that you laid out
- 19:00earlier. So first job was NOV. And that's of course, when I was the most junior with Python,
- 19:03that was largely just analytics. How many parts have we made yesterday? How many parts did we make
- 19:08today? What parts did we not make yesterday that we needed to make today? I'd say this was the nexus
- 19:13of my programming. The company NOV is like a fortune 100 large company. It's been around for 150 years.
- 19:19So people are used to doing things the way they've been doing them for a long time. So
- 19:22I was in charge of this manufacturing operation and you would have the list of 20 things you needed to
- 19:27make yesterday from the Oracle system. You would have the list of 20 things that you need to make
- 19:32today. And some of those would be the same and some of those wouldn't. And what would happen is that
- 19:36person would print out, would have yesterday's list from yesterday. They would print out today's list.
- 19:40And with a highlighter, they would put them down on a table and highlight the ones that they finished and
- 19:44the ones that they didn't finish. And that's the way they would build their reporting to say,
- 19:48here's what I completed. Here's what I didn't complete. And I was looking at those like, no way.
- 19:52You can do this with, you have to do this with programming. Like you're spending 10 minutes on
- 19:57this a day. My job is to make you more efficient. And there's 20 or 30 people doing this across the
- 20:01company every day. Like let's just write a Python program that just imports this, does a set subtraction
- 20:07and from yesterday to today. And that's where you go. And that was the first application that I had
- 20:12was programming can be used in this context to just make things so much more efficient,
- 20:16less error prone, and just get these, help these folks do the thing that matters,
- 20:20which is build parts and not sit there with a highlighter all day.
- 20:23Right. And that's not a super deep programming challenge per se, right? I mean, set and set
- 20:29subtractions even built into Python, right? Yeah.
- 20:32But at the same time, having that automated, having that real-time visibility, having it,
- 20:39you know, be sure that you're not missing something. That's great.
- 20:41Yeah. It's huge. And I'd say, even if you don't listen to the rest of this podcast or any other
- 20:46episode of Talk Python, like there is a huge amount of work that you can just do with the Python that's
- 20:51pre-installed on your computer and the standard library, like import CSV. And there's a ton of
- 20:57work that can be done and a ton of utility can be added just with that. I think Scott Hanselman had
- 21:01this blog post that I really like called Dark Matter. He has this thing called Dark Matter
- 21:05Developers. It's a type of thing, like there's so much of this work that's just out there and people
- 21:09are thinking about neural nets and Bayesian and, and, pytest and all these like,
- 21:13not big things, but like all these tools and stuff you can use.
- 21:16Computer science-y, like sort of advanced developer tools and companies and infrastructure and whatnot,
- 21:21right?
- 21:22Exactly. Yeah. And you can just do so much just by typing Python in your terminal and getting the
- 21:27standard library and just going like, don't feel like you have to jump into everything all at once.
- 21:30Like there is a ton of opportunity just at that level. And I call it like Python scripting almost,
- 21:35maybe not even programming just a single Python file.
- 21:38Right. It might not even have a function.
- 21:39Yeah. Doesn't even need to have a function. This one didn't have a function. It was import CSV,
- 21:43got the CSV and says distraction and print to a terminal. And that was it.
- 21:46That is super cool. I do think that there are so many of these scenarios or low hanging fruit of,
- 21:53you know, this thing, I do it all the time. It's error prone. It's slow. And if I didn't have to do it,
- 22:01life would be better or if it would just automatically happen. And I've actually seen some of those things
- 22:06in my business around, say, running the online courses and stuff, there were some things where it was
- 22:11so painful. I'm like, you know, this takes me two to three hours to get a course ready to just
- 22:16go through and find like, how long is each video? Right. And put it into the database.
- 22:20Yeah.
- 22:21All these things. And, you know, I was thinking, well, should I like find a contractor, somebody who would
- 22:26go through and do all these things? And then like, what is wrong with me? Why don't I just
- 22:29both try to write a program? And now all of these types of things, they take seconds, maybe,
- 22:35and it's automatic and it never makes an error. And it really was, you know, like you said, 10 to 20
- 22:41lines of code. And so there's things, even if you're a programmer, sometimes you just don't think like
- 22:46that actually, I could automate that. And then it would be without error and it would be instant,
- 22:52basically. And so there's a ton of low hanging fruit, but especially if you're getting into programming,
- 22:57I think there's a lot of options for those.
- 22:58Yeah. And I would say this is where I got hooked on Python, because when you start with Java, for
- 23:02example, the first thing you hit with is like his main thing. And so I think Brett said this in one
- 23:06of the podcasts, Python fits the human brain. Why my human brain at the time was particularly
- 23:11manufacturing. Like what the hell is, what is main? Like, I don't, why am I even dealing with this?
- 23:14Whereas with Python, I could jump straight into, okay, I've got this list and I've got this list and I can
- 23:18subtract them. And it fit my way of thinking. And I've just found that Python has just been like that.
- 23:23That's like just enough when you need it. And that was really the ramp into that particular
- 23:27language and why I've been in it so long.
- 23:30Well, you look at the growth of Python and I think the reason, you know, people compare different
- 23:35languages like, well, Java, it's statically typed and has these interfaces and it does this. And
- 23:40Python is like this, it's, you know, dynamically typed, but it can have optional type and you could
- 23:44treat it. Right. I think you can get over, you think people can overanalyze that. I think
- 23:49a large reason why Python is so popular is that story you just told repeats thousands of times a
- 23:56day. And, you know, you were like, this is not that complicated. I just need to do this simple
- 24:02thing. It's going to let me do this thing, but I'll bet you the stuff you write now is way more involved,
- 24:07right? Like it's slowly pulled you in and it didn't make you learn all the computer science things like
- 24:12interfaces and compilers and linkers and classes just to do that thing. But probably at some point,
- 24:18you're like, Oh, we probably need a function so I can vary this, or maybe I want to use this other
- 24:22places. So let's make it a package. And like, it slowly drags you in deeper and deeper. And I feel
- 24:28like so many people get started, not even thinking of I'm a developer. They get started as I didn't need
- 24:33to do computing. And like, once you're pulled into Python, then you're kind of in its gravitational
- 24:38field or whatever. Yeah. Mine was, I'm just tired of doing this stuff in Excel. So how can I do this
- 24:43outside of Excel? And Python was like that next, next step.
- 24:47So you talked about the automate the boring stuff a little bit. We get back into that some more,
- 24:50but setting the high level, SpaceX, what kind of things were you doing there in the supply chain?
- 24:55Yeah. So NOV, my job was to just deal with one manufacturing area. It's this part goes in,
- 25:00this part goes out. When I got to SpaceX and progressing Python more, my job was now to think
- 25:05about the entire supply chain. I don't think about one part anymore. My job is to think about every part
- 25:10that goes on to, in this case, the rocket, and figure out when they need to get to the right place at the
- 25:14right time. So my thinking went from a small area to a very, very wide, wide area. And where that,
- 25:21where Python came to fit with me on that one is it wasn't just set subtraction anymore. Now I needed to,
- 25:26I had to think at a higher level. So think about when you guys see a rocket on one of the,
- 25:30the live streams at SpaceX or whatever, you guys see one rocket, but the way I see a rocket
- 25:34at a big level is I'm just going to go through this real quick. There's with the last dragon launch,
- 25:38there's the dragon capsule to make a dragon capsule. You need a trunk and sorry, to make the whole
- 25:42dragon. You need it to trunk in the capsule. That's just the top. Then the second stage is
- 25:46that middle piece and you need an engine and you need that second stage tank. And then for the
- 25:51booster, the bottom part that's got grid fins, there's four of them, there's legs, there's,
- 25:55there's multiple stages. And so suddenly this one rocket starts turning into like a hundred pieces.
- 26:00The pieces are huge. The smallest piece that I had to plan with my software was the size of a
- 26:04refrigerator. And then the rocket gets to 15 stories from that. So how do I take not only this one
- 26:10rocket, but every single rocket that SpaceX is building and help someone play what I like to
- 26:15call rocket Tetris, both in time and in space that like this piece, this humongous piece is going to
- 26:20be here. So we need to move that, this humongous piece here. Then we have the space to move this
- 26:24other piece here and over somewhere else. We're moving in all these other things and like link
- 26:28together all of these, this basic enormous rocket that has to come together. And my job there.
- 26:34I'm sorry. That was, it sounds like an amazing optimization problem because you've got this huge
- 26:38factory, but the rocket pieces have to be assembled in different areas, but also you've got to have
- 26:43the individual parts arrive on time. You've got to have enough of them, but you can't just go buy
- 26:48like three extra engines. Yeah. Right. Yeah. They take a while to make. Turns out it takes, it takes a bit
- 26:53of time to make a rocket. So you've got to think ahead. Yeah. Yeah. It was, and this is an
- 26:58interesting one because, and this is, I should mention this Python wasn't doing any optimization,
- 27:01but what Python would do is I built this tool that one of my friends there now, you can put in all
- 27:06these inputs and it comes up with what, what the linkages of, of what's called the, I'm
- 27:11not wording this. Like I'll use the programming term, but the dependencies, the graph of, the graph
- 27:15of dependencies, when certain things would happen, if you have certain lead times and certain,
- 27:18certain constraints and whatever. So he would run the program. He would see that with this particular
- 27:23set of inputs, with this lead time and this assembly and this, and this, we're not scheduled to have
- 27:27a rocket launch until like February or something like that. And he goes, Oh, that's not going to work.
- 27:31We need to get it earlier or we need, or whatever. And so he would then change some inputs because he
- 27:36has the human knowledge, put that into the calculator. The calculator would then do the same graph
- 27:41explosion and time explosion. And he would get a new set, new set of outputs and be like, okay,
- 27:45I can work with this. I can't work with this. So it was him working back and forth with the program
- 27:49to run through the scenarios. And then once he had the scenarios that fit the objectives, he would then
- 27:54bring it up to, to the managers and things like that. So the program, he was like the human optimizer,
- 27:59but he would use the program to quickly lay out the Tetris board of what things would look like.
- 28:03Right. Right. Well, I'd say maybe you identify that there's something unexpected that actually
- 28:07seriously delays the production, right? Like, Oh, there's a specialized hose that takes, you know,
- 28:12liquid, whatever, right over here. And it actually, that's the thing that takes so long to get or to,
- 28:18it's the one thing that holds up a big part of the construction. And so let's make sure there's no
- 28:22delays on that.
- 28:23Yeah, exactly. You would see, that's called the critical path in manufacturing. It's what is,
- 28:26what is going to take you the longest time and delay the whole project. You're always trying
- 28:30to keep an eye out for those types of things. If we go back to the code itself, I think we had
- 28:35talked about the earlier example, it was just sets and I was like, good to go. Just the built-in types.
- 28:39But now I, there's no built-in types for rocket. So Python grew up with me, or I grew into Python.
- 28:44And like, now I could define an object that was like, here's this booster object. Here's the
- 28:48interstage object. Here are the attributes associated with it. And I could start like,
- 28:52again, like what Brett Cannon said, I could start writing Python. I could start writing a layer of
- 28:56abstraction on Python itself that fit my rocket brain and the way I think about rockets and the
- 29:00way we thought about rockets and just using objects, classes, methods, modules, and like that next layer
- 29:06of Python. At this point too, it's, this is all deterministic planning. You know, what's going to
- 29:11happen precisely, or you at least assume, you know, what's going to happen precisely. So with the
- 29:14earlier example, you knew which was, what was completed and what you needed to do.
- 29:18Deterministic. At SpaceX as well, the software I had built was deterministic. You just say that
- 29:22it's going to take 10 days and that's the assumption you're rolling with, or it's going to take 15 days
- 29:25and that's the assumption you're rolling with.
- 29:27Yeah. Yeah. Very cool. And you know, maybe just stepping back for a second, like,
- 29:32what do you think about what SpaceX has been able to accomplish?
- 29:35I mean, I think it's amazing. I am super happy and super fortunate to have been
- 29:38an employee of the company and been there with the time I've had. So one of the best experiences of my
- 29:43life for sure. And I think if we go into space a little bit, I think everyone listening to this
- 29:47podcast should know that within the next decade, you could be an astronaut. Like the goal of the
- 29:51company is to make you an astronaut where you could go into space yourself, either for maybe
- 29:56either sort of made these moon missions that the one that this one Japanese person has bought. But
- 30:01the point of the company is to get to Mars, like get a million of us to Mars. And so it's super
- 30:06inspiring to think about. There's a group of people that you can, that most people here could be a part
- 30:10of that can, you can contribute to that mission and get yourself there.
- 30:14I mean, it's such a wild thought to think, I don't know how many people have gone into space,
- 30:16but it's got to be in the hundreds, you know, historically speaking. Right. And to think,
- 30:21you know, that's just, we're going to double it. It's just one flight.
- 30:26This portion of Talk Python To Me is brought to you by Linode. Whether you're working on a personal
- 30:31project or managing your enterprise's infrastructure, Linode has the pricing, support and scale that you
- 30:36need to take your project to the next level. With 11 data centers worldwide, including their newest
- 30:41data center in Sydney, Australia, enterprise grade hardware, S3 compatible storage, and the next
- 30:48generation network, Linode delivers the performance that you expect at a price that you don't.
- 30:53Get started on Linode today with a $20 credit and you get access to native SSD storage, a 40 gigabit
- 30:59network, industry leading processors, their revamped cloud manager at cloud.linode.com,
- 31:04root access to your server, along with their newest API and a Python CLI. Just visit talkpython.fm
- 31:11slash Linode when creating a new Linode account, and you'll automatically get $20 credit for your next
- 31:17project. Oh, and one last thing they're hiring. Go to linode.com slash careers to find out more.
- 31:22Let them know that we sent you.
- 31:23I think the real magic to me of what SpaceX has been able to do, one, it's kind of interesting to
- 31:31see a private company just come along and do that. But the real magic to me has been the reuse and the
- 31:38landing, right? Not the, we're going to take this thing and just throw it away every time.
- 31:42But it becomes, you know, not something that's destroyed, but something more like a 747.
- 31:47Yeah, well, think of it like a programming coma. Every time you run your program, it just deletes itself. How many programs would you write?
- 31:54All your Python programs were self-destructing. It'd be a lot harder to get this stuff done. And I guess while we're on the rocket industry in general, like I come from the supply chain, but Python is used extensively throughout the entire rocket industry. Like it's used to calculate trajectories of rockets. It's used to calculate the mass of rockets, which is particularly important because you got to get it in a space. It's used in so many contexts across so many disciplines in the rocketry industry across so many companies that I think all the core developers of Python should be pretty, pretty proud. I don't know if Guido was thinking that his ABC programming language would be used to make rockets.
- 32:11It's kind of a far stretch, but it's happening every day.
- 32:28Yeah, that's really awesome. Yeah, I think Python is being used for a lot of things that nobody predicted it would be used for.
- 32:35Yeah, definitely.
- 32:37It's a good fit. I'm not saying it's not a good fit necessarily.
- 32:40It's just like...
- 32:40It's a great fit.
- 32:41I think actually, historically, one of the challenges of going from Python 2 to Python 3 that the core developers, and Guido said this himself a little bit when I talked to him quite a while ago on, I think it was episode 100 even, probably.
- 32:56Anyway, one of those shows I had him on quite a while back said something like, one of the big challenges was we underestimated how foundational Python and its libraries were for so many people.
- 33:09They thought, oh, well, we'll make this change to Python 2, upgrade it, and people will just adapt and didn't realize like whole banking systems are built on top of the details of this light or these, all these are super important libraries that actually support so many different things, depended on the exact details.
- 33:25And making these relatively minor changes was a lot harder because of those sort of dependencies.
- 33:30Yeah, I'd say you're the victim of their own success there, right?
- 33:33Yeah, exactly.
- 33:34Exactly.
- 33:35So I think a lot of people don't really have that much of a visibility to the true scope of how much is built with Python and how much depends upon these libraries that people have created.
- 33:44I would agree.
- 33:45Yeah, absolutely.
- 33:46Yeah, I found an interesting place.
- 33:48I don't know if you've heard of it called the Open Source Aerospace Computing.
- 33:52Okay.
- 33:53And it's for simulated rockets.
- 33:54It's got a bunch of different Python modules to do so, like six or seven different things for like simulating high power rockets and different stuff.
- 34:02I'll put that into the show notes.
- 34:03People can, you know, it's, that sounds really fun.
- 34:05That is fun.
- 34:06I'm going to take a look.
- 34:07That's awesome.
- 34:07I didn't realize that.
- 34:08See, I'm learning stuff right now about Python and in the aerospace industry and on this podcast.
- 34:13Exactly.
- 34:15All right.
- 34:16So over there, you had these complex but deterministic calculations.
- 34:21Yeah.
- 34:22And it was SpaceX and they're doing super, super cool stuff.
- 34:25I looked over on SpaceX.
- 34:27I think this is a few months ago.
- 34:29The last time I looked though, they had 92 different job openings for Python.
- 34:33Yeah.
- 34:34That speaks to itself.
- 34:35How much that language is used.
- 34:37Yeah, absolutely.
- 34:38There wasn't a lot of visibility into exactly what was happening there, but that's not 92 positions.
- 34:43That's 92 different roles they're trying to fill, which might be more than one person for each one.
- 34:48So pretty, pretty interesting.
- 34:49And then now you're working more in the forecasting world with Sweetgreen, right?
- 34:55So I would say in this, I still do all the level one stuff that I do.
- 34:59Maybe the set instruction.
- 35:00I think of it more like a pyramid.
- 35:02I still do a lot of that.
- 35:04I think when people talk about data science, you get this idea that like, oh, everyone's out there doing amazing data science.
- 35:08I don't know if your panel mentioned this at all, but most data scientists spend a lot of time cleaning data and automating the boring stuff.
- 35:13It's surprisingly little amount of time is spent, you would guess, in the cool math portion of it.
- 35:19So it's more like a pyramid for me.
- 35:20I still have a huge wide base of like automate the boring stuff because that's super important and easiest way to get value.
- 35:26I still have a middle layer that's there of deterministic type of calculations.
- 35:30And now through self-learning and through the help of the Beijing community, particularly the Pimesky and Arby's guys who've been so nice to train me up over time.
- 35:38And let me join.
- 35:39I'm doing some amount of data science-y tasks.
- 35:42Some of that's forecasting.
- 35:43Some of that we do is optimization.
- 35:46It's across the board.
- 35:47But it's really, again, the point isn't whatever way we can use data to help connect people to real food is we're going to do that.
- 35:53If it's automate the boring stuff, we're doing that.
- 35:55If it's a forecasting model, then we're going to figure out how to do that.
- 35:57But the idea is, how can we use programming and technology to fulfill this physical mission?
- 36:02It almost seems like the food story would be harder than the space story, which, sorry, a bit of a cough today.
- 36:11So it sounds a little contrary, right?
- 36:14Like space and space science seems so hard, but food spoils, right?
- 36:19Like if it's five days instead of three days, maybe you can't eat that, right?
- 36:23Yeah.
- 36:23So this is, if we ignore the space or food part of it, if we just talk supply chain for a second, which interesting enough is I don't have any degree in programming.
- 36:31All my degrees are mechanical and supply chain.
- 36:33SpaceX, the demand was relatively certain because you don't have that many rocket launches.
- 36:38There's a lot of nuances and stuff like that, but there's only so many customers.
- 36:40At Sweetgreen, there's like tens of thousands of people that could come into any of the locations on any day.
- 36:46So it becomes a much more challenging problem to figure out which salads people are going to want or which ingredients people are going to want when they walk into any speaking location across the nation.
- 36:57So, and to your point, you can't just prep everything because it'll spoil and it'll all go bad.
- 37:02And then you're not connecting people to real food.
- 37:03You're just wasting food, which is the absolute opposite of what we want.
- 37:07So how do you just get the right amount of everything?
- 37:10And that is very, it's very non-deterministic.
- 37:12I'll tell you that.
- 37:13People, people's salad preferences are not deterministic.
- 37:16I can't, I can't predict what you, what someone would want on any given day.
- 37:20Yeah.
- 37:20Or when there's going to be some event that you didn't realize, right?
- 37:24Like WWDC happens to be right near one of the restaurants or something like that.
- 37:28Mm-hmm.
- 37:29Yeah.
- 37:29Interesting.
- 37:30So what are some of the tools you're using over there to make these estimations?
- 37:35Yeah.
- 37:35So this is a lot where when we talk about Bayesian stuff, this is, and not that everything we do there is Bayesian, but like the Bayesian scope of data science lets me work with smaller data sets and more uncertainty.
- 37:46So it lets me, it lets us figure out with uncertainty bounds, how much of a particular thing might be used on a day.
- 37:52Like that's an example of a type of problem that I could solve at Sweetgreen.
- 37:56There's actually in supply chain, there's this idea, this model called this, the single period model or the salvageable model.
- 38:01What it is, is the classical example from, from actually 1888 is you're a news vendor, like you're a news girl, a news boy, and you can buy so many newspapers in the morning.
- 38:10You can buy 10, you can buy 15, you can buy 20, but by the end of the day, you have to sell them all because if you don't sell them, they're trash.
- 38:16No one's going to buy a day-old newspaper.
- 38:17So given that-
- 38:19Oh, did you read that one newspaper with the headline?
- 38:21You should really get that one from three years ago.
- 38:23It was super good.
- 38:24No, that doesn't happen.
- 38:25Turns out, yeah, it doesn't happen very much.
- 38:27So how do you decide how many newspapers to buy?
- 38:29Because they cost you money.
- 38:30Maybe they cost you 25 cents to buy and you can sell them for 75 cents.
- 38:34What's the optimal amount to buy?
- 38:35And traditionally, the way this problem is solved is like, oh, well, you just sell, you just have 10,000 days of demand.
- 38:40And you just take the average and that's how many newspapers you buy.
- 38:43But now you spend 10,000 days making suboptimal or inoptimal decisions.
- 38:47So what Bayesian stats lets me do is like, well, if I have five days of newspaper demand, okay, even though it's not a lot of data, I can say that with 17, 20, 21, and 22 and 25 sales, I should maybe buy 20.
- 38:59But the uncertainty bounds are there could be 16 sales, there could be 28 sales, and I can make a decision of what to do there.
- 39:04And as you get more and more data, if there's certainty in your demand, that distribution will shrink over time.
- 39:09And that's the real trick for me with Bayesian type of analysis is I can work with small data sets.
- 39:16I preserve uncertainty, which is critical in business decision making, right?
- 39:19I don't want to go in there and say the mean is going to happen and the mean doesn't happen because the mean is never going to happen, almost ever, never happens.
- 39:24So I want to go in there and say it'll be somewhere between this and this value.
- 39:27And the part that we haven't talked about is that Bayesian stats in particular, you build a very nuanced model to capture what you know in your head.
- 39:35So random force and neural nets, there's very little you can do besides just tuning some hyperparameters.
- 39:40The algorithm is relatively fixed.
- 39:42But with Bayesian models, you can say I'm a news vendor and I have demand for New York and demand for Boston.
- 39:47And I know which day of the week it is.
- 39:49And I know that on event days, we might sell more newspapers.
- 39:51And you can build this graph, which is the probabilistic programming language part of it, of probabilities that helps you get a more, I'll say precise estimate, even though that's not the right statistical term, but helps you build a more nuanced model that gets you to a better estimate.
- 40:06And that's the real power in it for me is the uncertainty and the ability to encode human dependencies into the programming language.
- 40:15In this case, into PyMC3, for example.
- 40:17Right, right.
- 40:18Well, and preserving that uncertainty and communicating that is super important, right?
- 40:22Because it's one thing to say, we think we're going to meet this deadline or sell this many salads or sell this many cars.
- 40:32And you go to plan around it, if that's, well, here's the number and there's a small variation.
- 40:37Yes.
- 40:38Here's the number, there's a huge variation.
- 40:39Like, you want to approach that from an investment perspective, super different.
- 40:43Exactly.
- 40:44That is the key portion.
- 40:45That's the thing that like standard linear regression does not get me.
- 40:47It gets me the mean, but it doesn't tell me how far off I might be.
- 40:50Yeah.
- 40:50Yeah, for sure.
- 40:51So it sounds to me like you've been doing a lot of research into this whole Bayesian side of things.
- 40:58Maybe even book level research?
- 41:00Yeah.
- 41:01So I've kind of just fell into the pool of Bayesian research.
- 41:04The open source story is I saw PyMC and RVs and I figured, hey, why don't I just open a pull request for like two typos?
- 41:10And Chris Fonsbeck was so nice to merge it immediately.
- 41:13I was like, this feels great.
- 41:14This is awesome.
- 41:15I'm just contributing to open source.
- 41:17And then they just kept going more and more.
- 41:18And they started letting me contribute more and more code.
- 41:21And I've just been talking to those guys.
- 41:23And over the two years, me and a couple of the other guys who work on PyStan, RVs and PyMC3.
- 41:29So all of these are Python Bayesian libraries.
- 41:31We're like, you know what?
- 41:32We think we can write a book that explains how to use Python to use Bayes theorem with a much more modern twist on it.
- 41:39So you've got a lot of Bayes theorem books from like the 80s or the 90s and things like that.
- 41:45You've got a couple of introductory books.
- 41:46So Osvaldo Martin.
- 41:47And those original ones have to be like super theoretical, right?
- 41:50So it's interesting.
- 41:51They're theoretical prior to the 90s because there were not very many algorithms to solve Bayes theorem at the time.
- 41:57You were constrained to what were called conjugate models that you could solve by hand.
- 42:00I don't know if you talked about this in the other podcast, but this algorithm called MCMC sort of hit the streets in the late early 90s.
- 42:06It was a just bust the door down on computational Bayes theorem.
- 42:09Like turns out this particular algorithm, if you use it in particular ways, just works really well.
- 42:14And since then, people have just been making it better and better and better.
- 42:17And so there's actually different variations of this now called like Hamiltonian myocardial.
- 42:21And within that, there's a subset called the no U-turn sampler that just do great on solving, not solving, but doing Bayesian inference.
- 42:28But there's not a lot of a, we think there's a gap where we can write this book to help people understand how to use it in a more, more advanced ways.
- 42:37So for reference, Advaldo Martin wrote this book called Bayesian analysis and Python.
- 42:41He's actually one of the co-authors on this other book.
- 42:43It's an introduction to how to use Bayes theorem in Python.
- 42:46And so if you don't know anything about Bayes theorem, I would just say, go buy this book and you can start learning Python and start learning Bayes theorem sort of in the same book.
- 42:54But it's an introductory level.
- 42:55So he only goes so far.
- 42:56There's more layers to Bayes theorem.
- 42:58Things like Gaussian processes, Bayesian regression trees, decision analysis that we're covering specifically in this intermediate level book that we're hoping to publish by February.
- 43:08Awesome.
- 43:08Yeah.
- 43:09So you have a new book that you've co-authored, Bayesian modeling and computation and Python.
- 43:13And I got a, just a super brief look at it.
- 43:16It looks pretty interesting.
- 43:17It looks like it's pretty approachable.
- 43:20It's got a lot of nice graphs and pictures and a little bit of theory, but then here's the library call that you make to do that thing.
- 43:27And so it looks like it has this really nice practical aspect to it.
- 43:32So yeah, I hope the, hopefully the book takes off and does really well because it looks useful.
- 43:35Thanks.
- 43:36Yeah.
- 43:37Yeah.
- 43:37I will put a link to something, whatever you think is the right thing to link to in the show notes so people can sign up to get notified or whatever.
- 43:45Okay.
- 43:46Yeah.
- 43:46I'll come up with something.
- 43:47Yeah.
- 43:47Perfect.
- 43:48So one of the things I think that was interesting, I want to kind of dive into a little bit with you here is a lot of the things that you talked about were pretty straightforward, at least in the early days.
- 44:01You talked about automating, you talked about automating, like basically comparing CSVs and getting a nice output and whatnot.
- 44:08Yeah.
- 44:09And so much of the talk out there is, you know, here's the cool architecture of what Google is doing, or here's how Instagram upgraded their huge Django production from Django 1 to 2 and Python 2 to 3.
- 44:25Yeah.
- 44:25Yeah.
- 44:25And so on.
- 44:26And people focus on that and I think they get excited about it.
- 44:30But at the same time, so many people can just solve these little problems for themselves, right?
- 44:34With, and really, it doesn't have to be these huge engineering efforts to get a lot of value out of it, right?
- 44:39Yeah, I agree.
- 44:40Yeah.
- 44:41I think there's just a lot of opportunities for people who are non-programmers to sort of level up what they're doing with a little bit of Python.
- 44:47So, yeah, it sounds like your story, the arc of your story tells that as well.
- 44:51I tend to think, I think, yeah, you're right.
- 44:53There's a lot of publicity and press around the big things, huge installations, like the massive side sorts of stuff.
- 44:59I think of it like cooking or whatever.
- 45:00You see like the chef's table on Netflix and it's like all the people that are like the best and whatnot.
- 45:04That's what you see a lot in blog posts and articles and on Hacker News and whatnot.
- 45:08But there's a whole class of people like me that are like making mac and cheese on a stove and we're just fine.
- 45:14Like the stove's the same.
- 45:16But it's good mac and cheese.
- 45:17But it's good mac and cheese, yeah.
- 45:17You get better over time, yeah.
- 45:19So you don't, I would say, I hope people don't get intimidated when they start seeing terms like, and I use pytest all the time now, but they don't.
- 45:24They see Docker, pytest, Packaging, PyPI, like all these acronyms and stuff that are now prevalent for good reason, but they're now prevalent.
- 45:32I hope they realize that, you know, you can just fire up a Google Colab these days and just get your basic thing done.
- 45:38And that, like, you are an A-OK programmer.
- 45:40Like, that is awesome.
- 45:41You're creating value.
- 45:42And that's what matters.
- 45:43Not that you have a multi-cluster Kubernetes thing at the edge with instant retry fails or, you know, all these terms that get thrown out, like, these days.
- 45:52Yeah.
- 45:53And the whole reason I bring it up is I feel like there's a lot of people who are newer to the programming space.
- 45:58They see these big, impressive stories of technology and whatnot, and they feel like, well, what I'm doing isn't good enough.
- 46:06How do I go learn Kubernetes so that I can also do it the right way?
- 46:10And, well, the right way is very different.
- 46:14We were talking about racing before we hit record.
- 46:16Yeah.
- 46:16If you're in F1 and you have an insanely competitive environment, like, what you're going to need to do to make the brakes work is very different than if your minivan is going to go on a road trip, right?
- 46:29Like, you would never go and do what they do in F1 to your minivan because it just doesn't make any sense.
- 46:35And so, like, I think I just want to encourage people to just a lot of time, not everyone, but a lot of folks to remember they're not Google, they're not Facebook, they're not LinkedIn.
- 46:43And so these simple solutions are not necessarily just a compromise that they can make.
- 46:49They might be actually the better solution than what some of these fancy tech companies are doing for their situation.
- 46:53I actually want to word that even stronger is the right way is what works for you to do the thing you need to do.
- 46:58And the thing that Google is doing most likely is the wrong way for you.
- 47:02Because if you're not at Google, like, terabyte scale, like, doing what they do for your Excel file is not what you need.
- 47:08Like, if you're running Hadoop on your Excel file, definitely the wrong way.
- 47:11Don't fire a PySpark to analyze your Excel file.
- 47:14Like, there's a right way.
- 47:1510,000 entries or whatever, yeah.
- 47:17Yeah, exactly.
- 47:18So don't always take what Google and Instagram and everyone are doing as the right way for your situation.
- 47:23Definitely inspiration for what the language can be and that there's really no, in my opinion, no barriers on what Python can do.
- 47:28But I would say don't get intimidated.
- 47:30Like, look around, see what's around you that's automatable or boring or that you just find tedious.
- 47:36And just start with that.
- 47:38And if all you do is make that script, then that's a Python success story in and of itself.
- 47:42And you should be proud of that.
- 47:43Absolutely.
- 47:43Absolutely.
- 47:44Now, another thing that I want to talk about really quickly before we wrap this up.
- 47:48I've had this experience and I know that to some degree you have as well.
- 47:53It sounds like those three environments are super different.
- 47:56It sounds like helping people work with predicting or understanding what tools they've made in their supply chain and what ones they still got to produce.
- 48:06Going to working with predicting rocket construction, going to predicting salads.
- 48:11Like, it sounds like as a preparation or as a set of skills you need to learn to go work with rockets versus salad.
- 48:18It seems like that's really, really different.
- 48:21Right?
- 48:22But in practice, I would bet that the actual coding and the tools are not as different as it would sound.
- 48:28Yeah, I think there's just a lot of commonality.
- 48:31And so this is another inspiration I want people to take is that the things that tech companies do, you can absolutely bring those into your business.
- 48:39Like, almost every, I want to go as far as to say almost every business at this point could use Python.
- 48:45So don't feel like just because you're not working at Google, Facebook, or one of those large companies that you can't find a use for programming at your job.
- 48:51And that's the experience that I found.
- 48:53NOV is an example.
- 48:54That company's been around again for 150 years.
- 48:56So they've been building stuff way before computers were even a thing, at least electronic computers.
- 49:00And definitely before Python was around.
- 49:02But still at that company, there was an opportunity to use Python to make that company that much more efficient in certain ways.
- 49:09And that same skill set then translated to what people think is the more high tech company, which is SpaceX.
- 49:13Like, the same basic idea of taking data, processing it away, and then placing it in front of users in a way that they can think about it was relevant at SpaceX.
- 49:22And to be frank, after SpaceX, I didn't realize that it would be useful in the restaurant industry.
- 49:26But after a couple interviews, I realized, holy crap, it's the same ideas, the same tools, the things that I've been working on are things that this company is already doing.
- 49:35The manager that I now work for had already been using Python for two years to do a very similar sort of stuff.
- 49:39So even for me, I had to make that mentally, but hey, the stuff that the Python that I use in manufacturing companies is the same style and thinking that I can use at a restaurant company.
- 49:49And it's equally valid.
- 49:50And it works out super well.
- 49:52So I could just like, quote unquote, import my knowledge of environments and JupyterLab and Bay Serum and all the things that I picked up along the way to use at Sweetgreen.
- 50:00It's so interesting because it, you know, looking in from the outside, it seems like it would be absolutely not the case.
- 50:06But it really is.
- 50:08And like you said, you almost have to live through it to experience it.
- 50:12The one example that I have of that is I did training, software developer training, in-person training for quite a while.
- 50:17And in the course of a month, I had taught a course to developers at a hedge fund in New York City who were doing high speed trading type of stuff.
- 50:28And I also taught a course to engineers at Edwards Air Force Base.
- 50:33And after those two experiences, I'm like, you know what?
- 50:35These people need to know like 90% the same thing.
- 50:39It's just that little 10% where you take that knowledge and apply it to, you know, low latency stocks, stock trading versus reliable airplanes or whatever it is you're trying to do.
- 50:50But like mostly what you need to know is actually really, really similar, which blew my mind.
- 50:56And, you know, I would have the same experience between like restaurants and rockets, right?
- 51:02Yeah.
- 51:02And even for me, like for Python, it's the stuff, the Python you need to know for web development.
- 51:07Like a lot of it is the same Python you need to know for data science.
- 51:10And so like that's been a huge plus for me in using Python was like, okay, I know Python for data because that's what I do.
- 51:17I now need to build a web app for something.
- 51:19Like I need to build a static blog for myself.
- 51:22Cool.
- 51:23The stuff that I use for data science transfers to static hosts, like static sites and web hosting because it's Python.
- 51:29Like I don't have to learn a new language.
- 51:32I just, I can transfer within the community and it's just so flexible to jump from one area to another.
- 51:36You talked about Instagram doing their, Instagram is a company that's doing as a social media site.
- 51:41And the Python that's being used there is very similar to the Python that I use.
- 51:45That's weekly.
- 51:46Now to your point, like they've got that 10% of specialization or whatever,
- 51:49but it's so good to know that I can take this language and this set of knowledge and move between different organizations.
- 51:55It's awesome to be quite honest.
- 51:57Yeah.
- 51:57As a person who has those skills, you know, looking for different jobs.
- 52:00It's, it's super cool.
- 52:01I suspect there's probably some cool lessons that could cross pollinate across these industries that hasn't yet.
- 52:08Just because, you know, most people maybe haven't made that connection.
- 52:11And even if you have that theoretically, you don't actually have the interactions across the industries that much, but I bet there are.
- 52:17That's actually, so this is one reason I actually really like this podcast in particular is because you go across all these industries.
- 52:22Like I've been listening to these like, oh, that they do that in web development.
- 52:25Like that's, that's a, that's a great idea.
- 52:26I want to just take that idea and like do it over here.
- 52:28Like we're doing that.
- 52:30We're doing that.
- 52:31This is a good idea.
- 52:32Awesome.
- 52:33Thanks.
- 52:33I guess maybe that we're just about out of time.
- 52:37Maybe one more question that I'd like to ask you sort of a high level closing things out is, you know, what, what do you find exciting in the world of programming and Python these days?
- 52:47Like what's amazing right now?
- 52:49You know, I'd say the thing I like about Python the most is, is the community of people.
- 52:53When I started using Python, I wasn't thinking about the community, but as I got more and more into the programming language, just the people you tend to meet like yourself here, but I'm meeting people online who are friendly and helpful and are just great people to interact with.
- 53:06When I, when I used to go to conferences, because right now I can't go to conferences for reference where this is a middle of COVID, but like, it's so exciting to go to SciPy and see all of these folks that are excited about what they're being, what they're able to do.
- 53:19Like detect earthquakes, find cancer, do RNA sequencing or whatever, and share like that knowledge of moving, moving.
- 53:26So I honestly think moving the world forward.
- 53:28I really enjoy just being part of these, these doers that are sitting around using Python to do a thing and do the thing they're passionate about and make that thing better.
- 53:35And then even so much to even explain it to me, who's an idiot about biology and things like that, but explain it to me in a language as Python that I know.
- 53:42And that is the most fascinating, exciting thing to me.
- 53:44And I really love being a part of that.
- 53:45Awesome.
- 53:45I love the way you put it, that, you know, just be part of all these doers.
- 53:49Yeah.
- 53:49Building stuff and making things happen with Python.
- 53:52It's very cool.
- 53:52I think the thing that inspires me really is like, I can almost just imagine anything and then I can find people doing that with Python and polished libraries that make it accessible to many more people.
- 54:04Right?
- 54:04Like I said, Oh, well, what about like rocketry and like, you know, rocket stuff with fire.
- 54:09Here's like, Oh yeah, here's like five or six libraries for simulating that just so you can test it before you actually do your real, I mean, it's just like, you know, you name it and it's probably out there.
- 54:18That's so cool.
- 54:19I mean, you were talking about this earlier, but I've definitely met people using Python and F1 at a conferences.
- 54:23I was like, what are you doing here?
- 54:24You work for Red Bull?
- 54:25Like, why are you at this tech programming conference?
- 54:28Like, Oh, we use Python all the time.
- 54:29We do stuff with that phone car.
- 54:30It's like a classic example.
- 54:32Yeah.
- 54:32I would love to dig into what people are doing and like high-end racing F1 IndyCar and stuff with Python.
- 54:39And it's going to be hard to find someone able and willing to talk about it because those groups are so secretive.
- 54:44But yeah, the technology behind those types of events and engineering projects.
- 54:49I mean, the engineering behind F1 cars, they have hundreds of employees.
- 54:53Oh yeah.
- 54:54It's crazy.
- 54:55So much stuff is built from scratch.
- 54:56Yeah, yeah, exactly.
- 54:58Someday maybe I'll be able to talk about that, but it's tricky.
- 55:01If someone wants to be on the show and they work in that space, let's chat.
- 55:05So anyway, all right.
- 55:06Well, it's definitely an exciting time to be in programming and Python.
- 55:10And all the stories you've told here are definitely a part of it.
- 55:13So before you're out of here, though, I've got the two final questions for you.
- 55:17When you write some Python code, what editor do you use?
- 55:19Okay.
- 55:19I'm going to cheat a little bit here because we talked about three levels.
- 55:22So if I'm at level one, which is my early start, I just use Vim and Tmux because I just need a script.
- 55:26Single file and I'm done.
- 55:27If it's a complex program like RVs or PyMC3, PyCharm is my go-to.
- 55:31And then if it's exploratory analysis, JupyterLab.
- 55:35So I'm in one of those three writing Python.
- 55:37Yeah.
- 55:37Awesome.
- 55:38And it's probably not exclusive with the last two.
- 55:40Like maybe sometimes PyCharm fits, sometimes Jupyter fits, depending on what you're doing, right?
- 55:45The Venn diagrams are fuzzy.
- 55:46Sometimes it's one or the other.
- 55:47There's a lot of blurry spaces.
- 55:49Maybe even both.
- 55:50Who knows?
- 55:50Yeah.
- 55:51And then notable PyPI package throughout the two that you work on, right?
- 55:55PyMC3 and RVs.
- 55:56Yep.
- 55:57But I think the one I want to call a shout out to is X-Ray.
- 55:59I think that package can use a lot of publicity.
- 56:03I think it's an awesome package because it basically takes Pandas and makes it more than 2D.
- 56:07It makes it multidimensional.
- 56:08And I think the developers are doing just a great job over there building that out and making it awesome.
- 56:13And community-wise, we use it in RVs.
- 56:16And those developers have been nice enough to jump on Google Hangouts with us and talk to us and give us tips for what we should do.
- 56:24So plus one to the library and plus one to the people that are putting it in open source for everyone else to use.
- 56:29That's cool.
- 56:29So it's a little bit like Pandas, but more n-dimensional, 3, 4, 10-dimensional type stuff.
- 56:34Yeah.
- 56:34Pandas with more dimensions.
- 56:35Yeah.
- 56:36And n-dimensions.
- 56:36As many dimensions as you want.
- 56:38As many dimensions as fits in memory.
- 56:39I've actually heard a lot of recommendations for X-Ray lately.
- 56:43I think it's getting a lot of traction.
- 56:44So that's awesome.
- 56:45Cool.
- 56:45All right, Revan.
- 56:46Thank you so much for being here and telling your story.
- 56:48People are interested in this whole supply chain plus Python, maybe Beijing as well.
- 56:54Final call to action.
- 56:55What should they do?
- 56:56There's two ways.
- 56:57If you have a job, just see where you can automate the boring things, as he said.
- 57:01And if you don't have a job, or even if you do have a job, just get into open source.
- 57:04There's so many things you can do in open source.
- 57:06You don't have to be a Python expert.
- 57:07You don't really even have to know tons of Python.
- 57:10You just have to have the willingness to want to join in and be a positive contributor.
- 57:14And that's the magic that keeps all of this going, is the community efforts of good people
- 57:20that are just putting their work out there and trying to move the ball forward.
- 57:23Yeah.
- 57:23And I also want to say, your story is the story of you don't have to start huge.
- 57:29You can start small with little bits of automation, and you'll see where it takes you.
- 57:32Exactly.
- 57:33Yep.
- 57:33It's pretty much life-changing, to be quite honest.
- 57:36I know.
- 57:37I hear you.
- 57:38That's awesome.
- 57:39All right.
- 57:40Well, thank you so much for being on the show.
- 57:41It was great to chat with you.
- 57:42A lot of fun.
- 57:42Thanks, Michael.
- 57:43You bet.
- 57:43Bye.
- 57:44This has been another episode of Talk Python To Me.
- 57:47Our guest in this episode was Ravine Kumar.
- 57:49It's been brought to you by Sentry and Linode.
- 57:52Take some stress out of your life.
- 57:54Get notified immediately about errors in your web applications with Sentry.
- 57:59Just visit talkpython.fm/sentry and get started for free.
- 58:03Start your next Python project on Linode's state-of-the-art cloud service.
- 58:08Just visit talkpython.fm/Linode, L-I-N-O-D-E.
- 58:12You'll automatically get a $20 credit when you create a new account.
- 58:15Want to level up your Python?
- 58:17If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
- 58:22Or if you're looking for something more advanced, check out our new Async course that digs into
- 58:27all the different types of Async programming you can do in Python.
- 58:30And of course, if you're interested in more than one of these, be sure to check out our
- 58:34Everything Bundle.
- 58:35It's like a subscription that never expires.
- 58:37Be sure to subscribe to the show.
- 58:39Open your favorite podcatcher and search for Python.
- 58:42We should be right at the top.
- 58:43You can also find the iTunes feed at /itunes, the Google Play feed at /play,
- 58:47and the direct RSS feed at /rss on talkpython.fm.
- 58:52This is your host, Michael Kennedy.
- 58:54Thanks so much for listening.
- 58:55I really appreciate it.
- 58:56Now get out there and write some Python code.
- 58:58I'll see you next time.