Latest / Talk Python To Me / #255: Talking to cars with Python
Transcript
- 0:00Modern cars have become mobile computer systems with many small computers running millions of lines of code.
- 0:06On this episode, we plug a little Python into those data streams.
- 0:10You'll meet Shea Newton, who is a Python developer and who has worked on autonomous cars and is currently at ActiveState.
- 0:17This is Talk Python To Me, episode 255, recorded February 25th, 2020.
- 0:23Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
- 0:43This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy.
- 0:47Keep up with the show and listen to past episodes at talkpython.fm.
- 0:52And follow the show on Twitter via at Talk Python.
- 0:54This episode is sponsored by Datadog and Clubhouse.
- 0:57Please check out what they're offering during their segments. It really helps support the show.
- 1:01Shea, welcome to Talk Python To Me.
- 1:03Hi, thank you for having me.
- 1:04It's great to have you here. And by have you here, I mean literally have you here.
- 1:09I've done a few recordings on location in Portland, but this is live from the Talk Python studio, right?
- 1:15Yeah, great setup. I'm happy to be here.
- 1:18Yeah, thanks. I'm really happy to have you here as well.
- 1:20It's going to be a lot of fun to talk about cars.
- 1:22When I grew up, cars were these like dirty, greasy things.
- 1:27I hated work on cars.
- 1:29Like probably I would have done different stuff with my life if I didn't hate working on cars so much.
- 1:33I actually used to race motorcycles and we would rebuild engines and we would take them apart.
- 1:38And it was ridiculous.
- 1:39Those things had to be rebuilt like every month the way they worked.
- 1:43Luckily, it was not very expensive, the parts.
- 1:45So I didn't really hate mechanics, but I don't know, I always just would bang my hand.
- 1:48Yeah, yeah.
- 1:49I just didn't like working on cars. I always admired people who could, but I was really good at computers.
- 1:54And now cars are computers?
- 1:56Yeah, yeah.
- 1:57Is that how it is?
- 1:57Yeah, I think people are out there hacking in the grease and in the computer of their car too.
- 2:02Yeah.
- 2:03Yeah, yeah.
- 2:04Super cool.
- 2:04Yeah, absolutely.
- 2:05So that's the topic for the show today is to talk about talking to your car with Python, which I think is going to be real fun actually.
- 2:12Yeah, yeah.
- 2:12Nice.
- 2:13Now, before we get to that, of course, let's start with your story.
- 2:15How did you get into programming in Python?
- 2:17Yeah, I went to the University of Idaho for a computer science degree.
- 2:21It was just something that was itching the back of my brain that I wanted to learn how to do.
- 2:26And yeah, I jumped straight into it.
- 2:28Today, I work for ActiveState as a developer advocate, and I'm actually just kind of out spreading the word a little bit about what cool things that they're working on.
- 2:37Yeah, well, tell us what a developer advocate does.
- 2:40Yeah, good question.
- 2:42Yeah, so some of the day-to-day for me is reaching out to open source communities, maintainers, just about ways that ActiveState can work with them, about the cool things that they're doing.
- 2:54Developer advocate, reach out, talk to the community, talk to open source maintainers.
- 2:59My impression is that there's like these different roles that developer advocates play, and they can vary really dramatically.
- 3:07Sometimes that's giving speeches at like conferences or user groups.
- 3:10Maybe it's like, I'm going to travel on site to a customer site, and they're trying to adopt some technology, and I'm going to sit with them, almost be like a drop-in consultant expert.
- 3:22There's also the ones who maybe write blog posts or whatever, like all of the above.
- 3:28I don't know what you're doing.
- 3:30Yeah, a little bit of all that.
- 3:31There's some blog post writing.
- 3:32I was just at the Developer Week 2020 conference in Oakland.
- 3:35I'll be at Interop in Austin later this year.
- 3:38Yeah, just kind of toes in a lot of the communication sides of the work.
- 3:43Yeah, it's not the main topic, but what do you think the qualifications are?
- 3:46And also, I should maybe just throw out there, back in episode numbers, escaping my mind, I did an episode with Paul Everitt, Matt Makai, Cecil Phillip, about being a developer advocate for their different companies.
- 4:00So if people really want to dive into it, they can go check that out.
- 4:03But what do you think the qualifications are?
- 4:04How do you go from, yeah, I can get this code to compile, or I can write a website in Blask.
- 4:11Now I'm representing the company as like an expert.
- 4:14Yeah, yeah.
- 4:15In a public forum.
- 4:16In a public way.
- 4:17I think part of it is an empathy for the developer.
- 4:20I think there's the technical know-how, but there's two sides of like what even developer advocate might mean.
- 4:26So there's advocating to the developer from the company, but there's also advocating for the developer internally.
- 4:31Almost being a channel from the community back to the team.
- 4:35Yeah, and saying this is the kind of thing that's important.
- 4:36This is the kind of thing that people are actually needing to use it for, the problems that they've come up against.
- 4:42And I think that that's something that I like to bring to the job.
- 4:46Well, it sounds like a really fun job.
- 4:47Thanks, yeah.
- 4:49Now, you told us you got into programming at Idaho, University of Idaho.
- 4:54What, University?
- 4:55Yeah, University of Idaho.
- 4:56University of Idaho.
- 4:57Okay, cool.
- 4:57And how about Python?
- 4:59How'd you come to that?
- 4:59So even kind of in the earliest days, so that curriculum was kind of based on C and C++.
- 5:05But as I moved through the program, Python just showed up as the glue that held things together along the way.
- 5:11And quick scripts, rapid development for things that we were working on outside of class, independent projects.
- 5:17And the longer I was in the world of programming, the more Python showed up as this glue between things.
- 5:25And sometimes I was able to devote a whole project to it.
- 5:28And sometimes it was just one-off things that I learned as I went.
- 5:32This is an interesting take.
- 5:33I definitely think that Python is much more applicable because it can consume or glue together these other things, right?
- 5:41Yeah.
- 5:42I was just talking to somebody and they were talking about, it's really cool that we can take Python and we can then hide away really old Fortran code for linear algebra.
- 5:52Or we can hide away the C library that nobody really wants to work with.
- 5:55But we can use the C API to create a package around it and no one has to know.
- 6:00But it's like 50-year-old tested code that nobody can get to work, but it doesn't matter.
- 6:05I think that's so powerful.
- 6:06Yeah.
- 6:07I think that another thing that's interesting is, well, my sort of hypothesis is that companies that say that they develop in maybe Go or C or some other language, if you ask them if they are also using Python, I'm almost certain that they'll all say, oh yeah, Python 2.
- 6:25You know?
- 6:25Right.
- 6:26Yeah.
- 6:26It's just there.
- 6:27It's just so ubiquitous.
- 6:29Nice.
- 6:29Yeah.
- 6:30Yeah.
- 6:30It's very cool.
- 6:30So you just saw it showing up everywhere.
- 6:32You're like, I probably need to know this.
- 6:34Yeah.
- 6:34I need to get much better.
- 6:36Yeah.
- 6:36Yeah.
- 6:37A little bit like you have to know JavaScript if you're going to work on the web.
- 6:40Yes.
- 6:41Yeah.
- 6:41Yeah.
- 6:41Absolutely.
- 6:42Super cool.
- 6:43Okay.
- 6:43So that's a little bit about you.
- 6:45There's a couple of angles I want to take here all around talking to cars with Python.
- 6:52First, let's start with science fiction.
- 6:55Yeah.
- 6:56That's kind of not science fiction.
- 6:58Sure.
- 6:59I mean, it feels like science fiction.
- 7:00So to me, when I was in school, when I was in college, you know, I took just a couple of
- 7:05programming classes for some requirements, not a CS degree, but to me, it felt like artificial
- 7:11intelligence.
- 7:12It was people working in Lisp and they were trying to pass the Turing test.
- 7:16Like if you have a chat, literally a text chat with my program and you are tricked into
- 7:22thinking it's a real human, well, then it must be real.
- 7:25Right.
- 7:25Yeah.
- 7:26And that, you know, never really worked very well.
- 7:29One.
- 7:29Two, it was not very impressive.
- 7:31Right.
- 7:32And then, you know, it felt like AI was never really going anywhere.
- 7:37And then all of a sudden, you know, we rented a Tesla, not too long, just for a few days.
- 7:43And it was just driving around on its own in traffic.
- 7:46Like that is really far from.
- 7:48Yeah.
- 7:48It's incredible.
- 7:49I can have a text chat.
- 7:50That kind of works.
- 7:51Yeah.
- 7:51Right.
- 7:52It's so that's why I say science fiction, because I feel like, you know, that part of science
- 7:56fiction is kind of arrived.
- 7:59Yeah.
- 7:59We're seeing a lot of incredible advances.
- 8:01And I think that machine learning and artificial intelligence is accelerating that.
- 8:06Absolutely.
- 8:06Yeah.
- 8:07And you think Python is.
- 8:08It's the de facto way to go about that for sure.
- 8:11Really?
- 8:11Yeah.
- 8:12In my mind.
- 8:12Yeah.
- 8:13For yeah.
- 8:14handling data for machine learning.
- 8:16I mean, the libraries are out there.
- 8:17It's just super powerful tool for that.
- 8:19Now, you did a little bit of work around this kind of stuff.
- 8:22Can you give us a sense of just like what kind of libraries might be involved or like what
- 8:25kind of even just what kind of code do we better write?
- 8:28What kind of sensors are there?
- 8:29Like what's that world look like as a developer?
- 8:31Oh, yeah.
- 8:32For cars specifically.
- 8:33For Python, there's a layer on top of Ross called Rosspy, which is an incredible platform
- 8:41for talking to sensors and collecting data.
- 8:45So sensor data, get a view of the world around you or actuating controls on a robot that Python
- 8:52has.
- 8:52So Ross is the robot operating system.
- 8:54Yeah.
- 8:54Yeah.
- 8:55And Rosspy is the Python API for talking to Ross.
- 8:59Yes.
- 8:59So part of the way this might work is you just treat the car like a robot.
- 9:05Yeah, absolutely.
- 9:06I think that we can, as our cars, like you said, get more and more like computers.
- 9:11And as we want computers to drive them, they're just robots.
- 9:15Yeah.
- 9:16Yeah.
- 9:16Well, you know, jumping just a little bit ahead to some of the stuff, we'll come back to this
- 9:21self-driving a bit more maybe.
- 9:22But we were talking earlier about just can we quantify how much this is true or not true
- 9:30about whether cars are like computers.
- 9:32And if you go by lines of code, it's definitely in the realm of computers.
- 9:36Absolutely.
- 9:37Lots and lots of lines of code.
- 9:38Random modern car, what would you say?
- 9:40Yeah.
- 9:42Too many to count.
- 9:43Too many for one person to manage.
- 9:45So I did a quick search earlier.
- 9:47And I, you know, according to Google, I'm not sure exactly what it's basing this on.
- 9:52But it says that the modern car with their infotainment and their cloud stuff and all
- 9:58that sort of thing, it says uses basically a hundred million lines of code.
- 10:03That's boggling.
- 10:03Yeah.
- 10:04Yeah.
- 10:04So that apparently comes from Wired.
- 10:06So to give you a sense, that's 5% as much code as all of Google as a company, like all
- 10:14of their services.
- 10:15Yeah.
- 10:15That's wild.
- 10:17We also looked, and if you look at Windows 10, Windows is not typically accused of being
- 10:23like a thin, bloat-free operating system.
- 10:27I mean, neither is macOS either, really.
- 10:29But it's definitely not considered like a lightweight, like mini operating system, right?
- 10:35Yeah.
- 10:35Yeah.
- 10:35It's the real deal.
- 10:37Well, Windows 10 has 50 million lines of code.
- 10:40So the modern car, we're not talking self-driving Tesla or nothing.
- 10:44We're talking like Kia or something, right?
- 10:46Yeah, absolutely.
- 10:46A hundred million lines of code.
- 10:47That's a serious bit of programming.
- 10:50Yeah.
- 10:50It's the, yeah.
- 10:51Incredible effort of decades.
- 10:54Yeah.
- 10:54So it's pretty interesting just to think of how much computation is going on.
- 10:59Also, I think I heard somewhere that there's not just like a central computer, but there's
- 11:04a bunch of little micro computers and they need to interact with each other, right?
- 11:08Yeah, absolutely.
- 11:08Absolutely.
- 11:09Little computers all over the car that are talking to each other in their own sort of protocol
- 11:15or the CAN protocol, which is the premise for that.
- 11:18I wonder if car technology had been adopted later.
- 11:21You know, how much would this just look like microservices with discovery?
- 11:25Yeah.
- 11:25Yeah.
- 11:26Great, great question.
- 11:27Right.
- 11:27Because it's not JSON buzzing around the wire, is it?
- 11:30No, no.
- 11:31No, it's just raw bytes.
- 11:32Yeah.
- 11:33Which is fine for performance and stuff, but I have no idea what the connectivity, like the
- 11:38network cabling between these little micro computers are.
- 11:41But there's a ton of computation going on in these cars, right?
- 11:44Yeah, absolutely.
- 11:44Every, I mean, from the big stuff, like pushing the brake pedal to the little stuff, like turning
- 11:50on an overhead light, everything is in a modern car is letting it so, the car's aware of it
- 11:56in many places when you do things like that.
- 11:58Right.
- 11:58I mean, traditionally, older cars, maybe there's some little micro controllers in like an eight
- 12:03set, eight track cassette player or something.
- 12:06But when you push on the brake, that pushed directly on a lever, which pushed on some hydraulics,
- 12:10which then pushed on a cap, the brake cap, whatever they're called.
- 12:13See, I don't work on cars.
- 12:15And it makes it stop, right?
- 12:16Creates friction, heat goes in the air, car stops.
- 12:18But now, not so much.
- 12:21I mean, it's like all the stuff that you do, turning on windshield wipers, like my car is
- 12:27fly by wire, right?
- 12:29Yeah.
- 12:29Like I push on the brake, I push on the gas, and it interprets what that should mean for
- 12:34it to go.
- 12:34Yeah, absolutely.
- 12:36It does.
- 12:36So there's a lot of data zooming around, right?
- 12:39Oh, yeah.
- 12:39Yeah.
- 12:40Yeah.
- 12:40So you gave a talk on this at Portland PDX Python meetup, right?
- 12:46Yeah, yeah.
- 12:47Yeah, that's cool.
- 12:47And I'll definitely link to the video that was recorded there.
- 12:51And I'll link to that video there.
- 12:52But you had this graph of like all the data going along as just a Kia, some kind of Kia
- 12:59Nero or something.
- 12:59It was accelerating, right?
- 13:01Yep, yep.
- 13:01Just the data that you have to, the noise you have to filter through.
- 13:05And just what the bytes look like as you're looking at activity grow.
- 13:09Yeah.
- 13:10Right.
- 13:10Yeah.
- 13:10Super cool.
- 13:11Let's talk about that for a while.
- 13:12Let's talk about talking to cars.
- 13:15Surprising, not surprising?
- 13:16I don't know.
- 13:17It's a little surprising to me, I guess.
- 13:19But cars generally have the same architecture for like their communication protocols and their
- 13:25hardware and stuff, right?
- 13:26My understanding is that cars at least have to have an interface for this OBD2 port, whether
- 13:33that's an international or a federal standard, I can't remember.
- 13:36But a way for things like emissions tests to plug in and pull the vehicle for data, very
- 13:43specific data.
- 13:44So there's that.
- 13:45And most cars are still using this CAN protocol and this CAN bus.
- 13:49I think that that's pretty much the standard over these things.
- 13:52Right, right, right.
- 13:53And I suspect that's largely due to the suppliers and the OEMs.
- 13:58If you're going to make a car, you don't make the brakes from scratch necessarily.
- 14:01Maybe you buy them from Bosch or you buy them somewhere else.
- 14:04And those things will have to be interoperable.
- 14:06And they do.
- 14:07And there's also a history of things already having safety qualifications.
- 14:11So the work that's involved in having a new technology brought into a car is incredible.
- 14:16And so if something already exists that has the safety rating for it, it can be very cost
- 14:23effective to just maintain.
- 14:24Right.
- 14:25It's almost like medical, right?
- 14:26It's like once this thing's approved, it's a huge barrier to dethrone it or whatever because
- 14:32you've got to take anything new.
- 14:33I can imagine that.
- 14:35So OBD, onboard diagnostics, if you get your registration renewed in a lot of places in Oregon,
- 14:42where we are in California and probably places in Europe, you've got to yearly, every couple
- 14:48of years, have your car evaluated to see how well it's doing.
- 14:52Yeah.
- 14:52So those places, when I had a car that burned fuel, I don't know anymore, but I did.
- 14:57We would go there and they would plug it in and they would put me in this little closet
- 15:01thing and say, wait, wait for five minutes.
- 15:03So the car would like run and stuff would happen.
- 15:05And then they would unplug it and they would say, okay, you can go or you can't.
- 15:08You know, you got to go get this thing fixed or whatever.
- 15:11So that's kind of some of the stuff that we're talking about, right?
- 15:15They're plugging into the same thing that we could talk to you with Python.
- 15:17Yeah, absolutely.
- 15:18So the talk that you mentioned was specifically about using that OBD port to pull your vehicle
- 15:25for information, unpack and get a better look at it.
- 15:28Things like your emissions tester is plugging into that port using the accessible data.
- 15:33There's also, I think the insurance companies are doing some driver monitoring.
- 15:38Yeah, absolutely.
- 15:39My daughter recently went through this.
- 15:41She's going to be 20.
- 15:42She's 19 now.
- 15:43And she bought her own car and her insurance was surprisingly expensive for her.
- 15:49She's like, whoa, this is pricey.
- 15:52But her insurance company did offer like, we will send you this dongle thing.
- 15:55You can plug into your car and it will monitor all sorts of things.
- 16:00It'll monitor your braking rate, your acceleration rate, your turning and like all these things.
- 16:04And then we'll give you a price based on analytics.
- 16:08Yeah.
- 16:09How well do they think you drive?
- 16:10To me, I was like, there's no way that's going in my car.
- 16:12Yeah.
- 16:13Like, forget this.
- 16:14Like, I'm an adult.
- 16:15I don't need that thing.
- 16:16But it turns out it was only there for two months.
- 16:18And then they said, okay, we've got enough information.
- 16:21You can return it now.
- 16:23Okay.
- 16:23So it's like a-
- 16:24Evaluation or something.
- 16:25An evaluation period.
- 16:26It's not like you permanently, at least for her company, you didn't permanently install it.
- 16:29But yeah, they were plugging, I guess, into the same data.
- 16:33Yeah.
- 16:33That's my impression.
- 16:34There's a lot of applications for it.
- 16:37I think just looking at the Wikipedia page or something, it's a little, makes my eyes glaze
- 16:42over a little bit because it's so specific and particular.
- 16:46But there's also companies, there's one that I remember called Kama AI, I think that gives
- 16:52you a tool to plug in there and it helps visualize and represent that data in a little less eye
- 16:58glaze over way.
- 16:59Yeah.
- 16:59Okay.
- 16:59Yeah.
- 17:00Super cool.
- 17:00This portion of Talk Python To Me is brought to you by Datadog.
- 17:05Let me ask you a question.
- 17:07Do you have an app in production that's slower than you'd like?
- 17:10Is its performance all over the place?
- 17:12Sometimes fast, sometimes slow?
- 17:14Now here's the important question.
- 17:16Do you know why?
- 17:17With Datadog, you will.
- 17:19You can troubleshoot your app's performance with Datadog's end-to-end tracing.
- 17:23Use the detailed flame graphs to identify bottlenecks and latency in that finicky app of yours.
- 17:28Be the hero that got that app back on track at your company.
- 17:32Get started today with a free trial at talkpython.fm/Datadog.
- 17:38If we're going to talk to it, it's one thing to get a package, a little IoT thing from whatever insurance company.
- 17:45They say, find the hole that looks like this and jam it in.
- 17:47It would do crazy things.
- 17:49It would beep at you if it detected a bad driving experience.
- 17:52You're like, beep, beep, beep.
- 17:54Oh, no.
- 17:55There goes money permanently.
- 17:57Anyway, instead of that, if we want to talk to it, when I'm thinking OBD2 or CAN bus, I'm not thinking USB-C or Bluetooth or wireless as the plugin.
- 18:09So how do I plug in something that talks Python into this?
- 18:13Yeah.
- 18:13So basically with the right cables, you can set it up to just go from the USB on your computer.
- 18:20When I developed this program, it was just using Ubuntu 18 Linux machine.
- 18:24Plugs to, what is it, RS-232, something like that.
- 18:28Like the serial port equivalent.
- 18:30Yes.
- 18:30And then that converts to the specific OBD2 port.
- 18:33And from there, my kind of half joke is that talking to the car with Python is as easy as any other IO.
- 18:42Like if you've ever written to a file, opened a file and written to it and read from it, that's the equivalent of what you have to know how to do for communicating with your car.
- 18:51Okay.
- 18:51Once you get that all connected, that sounds pretty easy.
- 18:53You just open up something different to talk to the port that it's on or something.
- 18:57Exactly.
- 18:57Yeah.
- 18:58So in Python, the way you talk to files, create a with block.
- 19:02Open, you give it the file name.
- 19:04What is it, like with car?
- 19:05Or like, how do you do it?
- 19:06Yeah.
- 19:08What's the libraries for talking to the car?
- 19:10Yeah.
- 19:10So talking to the car, there's just a library called Python Can that's made to interface with Can Networks.
- 19:17And you just call open on it.
- 19:19Yeah.
- 19:19Okay.
- 19:20Awesome.
- 19:20So it really is kind of similar.
- 19:21Open, right.
- 19:22Yeah.
- 19:22Yeah.
- 19:23And then is it kind of like streaming data?
- 19:25You just say I'm reading from it and as soon as it sees a byte, it just kicks it out?
- 19:28Or how does it work?
- 19:29Something like that?
- 19:31You can pull for specific information or you can listen to streaming data and grab, I think it's called a PID.
- 19:37I'm not sure if that's the same process ID or not.
- 19:40But yeah, you can ask it for information and you can listen for information.
- 19:44So the example program that I'd written up asks for the standard, the version number of the standard that you're looking at in your vehicle.
- 19:51I see.
- 19:51Yeah.
- 19:52So you got to figure out what the communication protocol version is.
- 19:55Yes.
- 19:55So you know what the message is.
- 19:56Because things change.
- 19:57Yeah, for sure.
- 19:58And when you're dealing with the low real estate of bytes packed on the wire, things are subject to change in ways that break the math to unpack them.
- 20:07So you have to be careful.
- 20:08Okay.
- 20:08Yeah.
- 20:09So a lot of what's exchanged are hand data frames.
- 20:13Is that what they're called?
- 20:14Yeah.
- 20:14So these are like eight byte packets and you just have to figure out what they mean?
- 20:19Yeah.
- 20:19That's where kind of the standard comes in handy.
- 20:23So typically it will say you have these eight bytes and in order to do what you need to get out a floating point number, there's a bit shift operation and a division and some scalar to multiply it by.
- 20:36The first two bits indicate the message type.
- 20:39Yeah.
- 20:39The second two bits indicate like where it's or something like that.
- 20:42Yeah, totally.
- 20:43Where you got to go and like it's ultra packed.
- 20:45Yeah.
- 20:45Yeah.
- 20:45Yeah.
- 20:46Okay.
- 20:46I'm telling you, if this was created today, this would just be Jason.
- 20:50Yeah.
- 20:50Yeah.
- 20:52But it's built in a time.
- 20:53I don't know when this first came out, but it's got to be like 80s.
- 20:57Oh, I think it goes back further than that.
- 21:00You think so?
- 21:00Okay.
- 21:01Yeah.
- 21:02The computing power, they probably like, you know, we can't send the name over.
- 21:06We can send a bit.
- 21:07Yeah.
- 21:07That's where we're going to set the bit.
- 21:08Interesting.
- 21:09So there's probably some higher level APIs and packages as well that given one of those frames or information.
- 21:16There are.
- 21:17My example was just the program I'd written was just a hands-on go do it yourself.
- 21:22Hack on your car or listen to what your car is saying.
- 21:24Python does have an OBD package for doing this stuff specifically.
- 21:30If you want to level up and start collecting that data or writing your own applications for it.
- 21:35Right, right, right, right.
- 21:36Well, that sounds pretty awesome.
- 21:38I can imagine a bunch of fun use cases.
- 21:41Now, you said that maybe Tesla doesn't work with this format because some of the, at least it maybe doesn't have one of these ports, for example, potentially, because the purpose is gather like emissions data.
- 21:55Yeah.
- 21:55If you don't have emissions, you're like, well.
- 21:57I remember some press coming out a while ago about at least one model of Tesla that people noticed that there wasn't an OBD2 port for.
- 22:05And yeah, from what I could understand is that they didn't have to pass emission standards.
- 22:10So there was no reason to enforce it.
- 22:12Right.
- 22:12That they had that where other cars do.
- 22:14But I think recent Teslas, they've decided to incorporate it back.
- 22:18I see.
- 22:18Just to have some compatibility.
- 22:20I'm sure the native internals in Tesla are probably much more modern.
- 22:25Yeah.
- 22:26Yeah.
- 22:26There was some company, I think Japan, did like a teardown of a Model 3.
- 22:32It was like a car OEM manufacturer.
- 22:35Like they made transmissions or brakes or something.
- 22:37And they realized that for Tesla cars, there were many, many more parts that were from Tesla rather than third party parts.
- 22:46Interesting.
- 22:47And basically their self-driving technology was all like Tesla chips and whatnot.
- 22:52And they were basically concluding like Tesla is like six to seven years ahead because instead of waiting for all these OEMs to come along, there's like, no, they're just building it.
- 23:02And there's nobody they depend upon.
- 23:04That's why we are built like on this house of cards type of thing for all of our suppliers.
- 23:09So yeah, yeah.
- 23:10Pretty interesting.
- 23:11I'm sure there's different ways you can talk to Tesla as well.
- 23:14But these car companies, they don't like you to talk to their software.
- 23:16So some are pretty protective.
- 23:19There's the public CAN bus that's easy to tap into that has the OBD2 port.
- 23:23And then there's private CAN networks that are a little more invasive to get into.
- 23:27Okay.
- 23:27They're not publishing in easy to find places how to unpack those bites.
- 23:32But there are cars like I think Lincoln has a car called the MKZ that you can buy a kit for.
- 23:40And I think it's actually like supported by Lincoln or they, yeah.
- 23:44Endorsed somewhat.
- 23:46Endorsed somewhat.
- 23:47And it's for by wire control.
- 23:49It's for just hooking it up for autonomous vehicle testing.
- 23:52So at least Lincoln has seemed to have opened the door to this kind of stuff.
- 23:56Wow.
- 23:57That's pretty interesting.
- 23:57I guess you have to have something that will actually do the steering on the steering wheel.
- 24:02Like it's got to have a little bit of like lane assist or something.
- 24:05Yeah.
- 24:05Yeah.
- 24:06That's an interesting thing.
- 24:07Or how else are you going to make it like turn the wheel and press the brakes?
- 24:09There's one of the two organizations in Europe is doing, or last time I checked, was doing testing with actual robots in the car.
- 24:17So like an actual kind of humanoid shaped thing that would turn the.
- 24:21It pushes its leg.
- 24:22Yeah.
- 24:22It pushes the gas.
- 24:23Yeah.
- 24:23Yeah.
- 24:24It rotates the arm where there's a rotating front thing.
- 24:27Yeah.
- 24:29There's a lot of approaches to it.
- 24:30I think a lot of people are getting creative on how to do it, especially in cars where they don't necessarily have permission by the manufacturer to do it.
- 24:38They're like, you know.
- 24:39We don't need to get some of those expensive cars.
- 24:41We're going to get used, whatever, and just put the robot in it.
- 24:44Yeah.
- 24:44And it'll be fine.
- 24:45Well, it sounds kind of crazy, but at the same time, right, that cars are meant to be operated that way.
- 24:51Yeah.
- 24:51And so pretty high fidelity for driving.
- 24:53Interesting.
- 24:55Yeah.
- 24:55Well, I remember when I bought my car, we had to sign that we would not affect or modify or attempt to circumvent any bit of the software.
- 25:05Yeah.
- 25:06So if you change this, one, your warranty is voided.
- 25:09Two, we're going to be real angry.
- 25:12Yeah.
- 25:12Yeah.
- 25:12The anti-lock brakes, the lane assist, the airbags, all that stuff.
- 25:18They're like, stay away.
- 25:19Oh, yeah.
- 25:20It's a big, big do not try at home kind of situation.
- 25:23Like, the stakes are very high.
- 25:24Yeah.
- 25:25But there's some stuff, like, definitely reading the data, it seems like it's kind of okay.
- 25:30Oh, yeah.
- 25:30So as far as do not try at home, trying to affect a change in your car or, you know, cutting a cord and tapping into the private canvas or something like that's something I wouldn't recommend as an at-home thing, right?
- 25:43But, yeah, the data from the OBD2 port is just public access.
- 25:48It's just read data or request something specific.
- 25:52But, yeah, it's your data.
- 25:53It's something that they're doing, that they're obligated to do.
- 25:57Yeah.
- 25:58And it's yours to take.
- 25:59Yeah, I mean, obviously, the insurance companies are doing it without real permission.
- 26:02So what kind of use cases do you see here?
- 26:06Like, there's the diagnostic side of things.
- 26:09There's the insurance side of things.
- 26:11But I feel like there's probably some fun data science that you could do there.
- 26:15Yeah, it's got to be.
- 26:16Yeah, it does seem like for the data curious, there's a lot of interesting data to collect.
- 26:21About your own driving patterns, about the fuel efficiency of your car.
- 26:24I just learned about some communities of people that are just trying to maximize their car for fuel efficiency with interesting fins and that kind of thing.
- 26:32And probably the data around how your car is behaving from something like this port would give you a little more insight into optimizing for things like that.
- 26:40Yeah, I would think so.
- 26:41I mean, that's definitely one of the first use cases I imagined was, well, maybe we could create our own little dongle that would create that data.
- 26:48Then we'd throw it into pandas and we'd start answering interesting questions and maybe even some ML models to say, people who drive like this, like, this is the most important thing for fuel efficiency.
- 27:00Yeah.
- 27:00Besides not just stomping on the gas, stomping on the brakes, right?
- 27:03But, like, maybe there's something that people are not totally clear about for certain vehicles.
- 27:09Or, I don't know, it just seems like a fun little research project.
- 27:11Yeah, I agree.
- 27:12I'd be fascinated to see where that stuff, where a project like that would go.
- 27:16It seems like often when you set machine learning to a task, the things that it finds for you are wild and surprising.
- 27:23Yeah, they can be totally surprising.
- 27:25So, yeah, I think it'd be fun to do some data science.
- 27:28What do you think about IoT type stuff?
- 27:30Like, what kind of devices could we build and then stick on that port, right?
- 27:34Like, Raspberry Pi, maybe?
- 27:36Well, with the right cables, you can hook up a Raspberry Pi for sure.
- 27:41I mean, like I said, that Linux computer I had, you can...
- 27:43You have power in the car, so you just wire that, like, to your, you know, maybe to a fuse or over to just, like, plug it into the cigarette lighter.
- 27:51Yeah, yeah.
- 27:51Who uses those anymore.
- 27:52One of the incredible things about Python is that basically it just works everywhere, right?
- 27:57I mean, it's the community and the development of the language has been awesome, and it's multi-platform.
- 28:03And so, if Python can run on it, you can listen to what your car is doing.
- 28:06I wonder if you could get MicroPython or CircuitPython to work.
- 28:10That's a whole other level of small.
- 28:12That goes from Raspberry Pi to $5 microcontroller.
- 28:14It seems to me like one obvious requirement, which I honestly haven't done enough with, but I think it would work, is if you just had USB support for that adapter, right?
- 28:26Yeah.
- 28:26And, you know, I have a CircuitPython, I don't know, it's laying right here somewhere, and it has a little micro USB to, like, communicate with the computer and, like, to, like, write code on it and stuff.
- 28:35So, potentially.
- 28:36Yeah, yeah.
- 28:37Potentially.
- 28:38Yeah, something to collect on.
- 28:40Yeah.
- 28:40Okay.
- 28:41Well, yeah, I think it would be super fun.
- 28:43I'm not sure I want to mess with my car or not, but it definitely sounds like if I was looking for a cool little IoT project, you know, this is something that it might be really cool to plug into.
- 28:54Yeah, yeah.
- 28:55I think just listening, getting a feel for what the data looks like, just at that level, is kind of fascinating to me.
- 29:01But then starting to unpack and look at the way your vehicle talks.
- 29:05But, yeah, then taking it to an application would be, yeah, could be a great direction.
- 29:11You know, if people are looking for, like, a science fair project.
- 29:14Oh, yeah.
- 29:14Or something, like, all right, well, we're going to ask, you know, some of the parents to install this on their car.
- 29:19Well, so you don't have to install anything.
- 29:22So you don't have to put software on your car.
- 29:24No, I mean, like, just plug in the thing into the port.
- 29:26Oh, gotcha.
- 29:26Yeah, yeah, yeah.
- 29:27Just that on its own is a little spooky, like, yeah.
- 29:30Yeah.
- 29:30You're like, I don't really want to put that in my car.
- 29:32I'm sure there's some parents, though.
- 29:34They're like, but my kid wants to do data science.
- 29:36Yeah.
- 29:36We'll plug this into the car and see what happens.
- 29:39I heard something a while ago that it might be spookier to plug a USB into your car sometimes.
- 29:45I don't remember what vehicle it was, but somebody installed Doom to play on their little console.
- 29:50On their little infotainment console?
- 29:52Yeah, because you could just put something that said runmecar.exe or something.
- 29:56Yeah.
- 29:57Yeah, it must be like a specific infotainment center or a specific car.
- 30:02Yeah.
- 30:02That was some easy, quick way.
- 30:05Yeah.
- 30:05So just plugging in anywhere in your car has some, your car's listening and it's trying
- 30:10to decide if it's something it needs to do something about.
- 30:12A lot of times it figures out, is it like some sort of audio device it can play and put
- 30:16up on the screen or whatever?
- 30:17And if it has a runme.exe and it's going to run it, that's a little confusing.
- 30:22Yeah.
- 30:23I bring that up just because I think that plugging in and listening to the port for your diagnostics
- 30:29is like no more invasive than it would be to...
- 30:33I would suspect it's less, right?
- 30:34If that port is read-only.
- 30:36Yeah.
- 30:36Right?
- 30:37As opposed to...
- 30:39It's a really good point.
- 30:40I mean, it's definitely a little nerve-wracking to plug any USB thing into anything else.
- 30:45Yeah.
- 30:46Yeah.
- 30:46Because you don't know, right?
- 30:48It could have, you know, Windows has that, like, it'll try to like boot up certain types
- 30:53of things if it's in there and probably Mac does as well.
- 30:56And yeah, you don't want to put that in untrusted places.
- 30:59Super cool.
- 31:00So let's maybe dive into a little bit more about the RossPi stuff.
- 31:04So with the diagnostics thing, you can definitely, you know, see what's happening, right?
- 31:10The brakes were applied, the car did this or that and so on.
- 31:14With RossPi, it's more like, like we said, like kind of like a robot, right?
- 31:18Yeah.
- 31:18Yeah.
- 31:19So I think a lot of companies that are doing research and development or maybe even just
- 31:24development for autonomous vehicles and robots are using Ross.
- 31:29It is really powerful for data collection.
- 31:31So what we've been talking about so far really is just about collecting and analyzing and visualizing
- 31:36and drawing inferences from data, right?
- 31:39Yeah.
- 31:39But RossPi probably could also take actions.
- 31:42For sure.
- 31:43For sure.
- 31:43It could.
- 31:44And I think the power of like RossPi over just Ross is the ability to kind of rapidly
- 31:51develop in much shorter amount of code and also to hook into these like super powerful
- 31:58machine learning and data analytics libraries.
- 32:00I could write this from scratch and see, or I could pip install Terrace plus this and then
- 32:06we're off to the races.
- 32:07Yeah.
- 32:07Do you think a lot of people out there are using like RossPi plus OpenCV, like computer
- 32:14vision stuff or things like that?
- 32:16Or is it got to have some sort of sensor, right?
- 32:18And vision seems like some of the options.
- 32:20Oh yeah.
- 32:21Yeah.
- 32:21I think because Ross is open source, there's a lot of people developing for specific sensors.
- 32:28And so a lot of times when a new sensor is out or some new form of vision, you'll see
- 32:32development and incorporating into the Ross ecosystem.
- 32:35I see like LIDAR or something like that.
- 32:37Yeah, for sure.
- 32:37Okay.
- 32:38Yeah.
- 32:38Did you ever get to play LIDAR?
- 32:40Yeah.
- 32:40I've played with some LIDAR.
- 32:42It's kind of fun.
- 32:43Maybe tell people what that is.
- 32:44I don't know.
- 32:45Yeah.
- 32:45That's a great question.
- 32:46What does it stand for?
- 32:47Why does it not just blind everybody around him, right?
- 32:50If it's lasers?
- 32:50Yeah.
- 32:51Yeah.
- 32:52That's funny.
- 32:53I've had LIDARs on my desk and I've hacked around and watched myself on the visualization,
- 32:58but I don't know a lot about them.
- 33:00I think that it's...
- 33:01So it's like basically, if I understand it, it shoots out like a spanning beam of lasers
- 33:06and then it looks at the reflections on what lights up and can tell like distance and sort
- 33:11of 3D sensing.
- 33:12Yeah.
- 33:12Yeah.
- 33:12So the sophisticated LIDAR sensors do have multiple layers and they spin 360 degrees
- 33:17and you can get these beautiful renderings of the environment.
- 33:21But there's simpler ones that are more of a 2D thing.
- 33:23Okay.
- 33:24Or just a particular field of view that are just getting obstacle distance.
- 33:28It's like 20 degrees left.
- 33:30There's a thing here.
- 33:31Exactly.
- 33:31There's a gap for this distance, which might be all you need if you're like trying to develop
- 33:36a little, like a Roomba or something.
- 33:38A Roomba doesn't care.
- 33:39Yeah.
- 33:40Up, down or whatever, perspective or hills.
- 33:42It's just like, I'm stuck on a cliff.
- 33:44Like, no, you're not.
- 33:44You're on a shoe, but also a hump yard.
- 33:46It doesn't really distinguish a whole lot.
- 33:48Yeah.
- 33:49Yeah.
- 33:49And I think that some of those sensors, LIDAR is one that can be prohibitively expensive
- 33:54when you really get all the bells and whistles, but like a simple field of view sensor might
- 33:59be a lot less expensive.
- 34:00And so you can put it into a consumer electronics like a Roomba.
- 34:03Right, right, right.
- 34:04Yeah.
- 34:05So if you wanted to, I guess, so if people wanted to play more with the self-driving aspect or
- 34:10they don't really want to just hook this to a car and understand what the car is willing
- 34:14to tell them, but they want to put on all these sensors, maybe there's smaller devices that
- 34:19they could play with.
- 34:19And they could probably skip the OBD altogether.
- 34:22Yeah.
- 34:23use straight RossPi.
- 34:24For sure.
- 34:24RossPi is one of their first kind of example projects, just gives you a list of the hardware
- 34:30you need and some recommendations for soldering iron and a couple sensors that are affordable
- 34:36to make your own self-driving kind of cardboard box with a phone in it, you know.
- 34:41That's cool.
- 34:41It's totally cool.
- 34:43It's a pretty expensive self-driving box for cardboard.
- 34:45Yeah.
- 34:46The phone's the expensive part.
- 34:47Exactly.
- 34:48But no, it's amazing what you're able to do.
- 34:50And so hacking into these other systems or creating your own like that, like that RossPi
- 34:55example, you can experiment with pathfinding algorithms.
- 34:58You can experiment with computer vision.
- 35:00Yeah.
- 35:01There's lots of fantastic stuff built in to Ross and accessible with RossPi.
- 35:08This portion of Talk Python To Me is sponsored by Clubhouse.
- 35:11Clubhouse is a fast and enjoyable project management platform that breaks down silos and brings teams
- 35:16together to ship value, not features.
- 35:18Great teams choose Clubhouse because they get flexible workflows where they can easily customize
- 35:23workflow state for teams or projects of any size, advanced filtering, quickly filtering
- 35:29by project or team to see how everything is progressing, and effective sprint planning,
- 35:34setting their weekly priorities with iterations and then letting Clubhouse run the schedule.
- 35:38All of the core features are completely free for teams with up to 10 users.
- 35:42And as Talk Python listeners, you'll get two free months on any paid plan with unlimited users
- 35:48and access to the premium features.
- 35:49So get started today.
- 35:51Just click the Clubhouse link in your podcast player show notes or on the episode page.
- 35:55So there's two projects maybe that are worth like giving a shout out to.
- 36:01One that I recently learned about, I think it's pretty new.
- 36:04It's called Donkey Car.
- 36:05Oh yeah, that's a cool one.
- 36:07Yeah, so it's an open source DIY self-driving platform specifically for small cars, like
- 36:13little remote control cars you could pick up with your hand or even holding your hand.
- 36:17So it's an RC car plus a Raspberry Pi plus Python.
- 36:21In the Python side, that's Tornado, Keras, TensorFlow, and OpenCV.
- 36:26Oh wow.
- 36:27That looks really cool, doesn't it?
- 36:28Yeah.
- 36:29So if people are out there thinking of, oh, like maybe I'll try something, like that comes
- 36:34with a really simple API.
- 36:35And it says you can do things like make your own car that'll drive itself or drive a car
- 36:41with your phone or laptop or record images or train a neural net to drive a car on different
- 36:46tracks.
- 36:46Like maybe you drive it, then you say, see, do that.
- 36:49Yeah.
- 36:50Yeah, I think that that's fantastic.
- 36:51And the fact that it's kind of a nice out of box experience and you don't have to worry
- 36:56about getting something wrong and wiring it yourself.
- 36:58Yeah, they have a bunch of cool examples.
- 36:59You know, if I was like an engineering professor or something, I'd be super excited about all
- 37:04the stuff they got going on there.
- 37:05So the API is pretty simple.
- 37:07I looked at it.
- 37:08You just import Donkey.
- 37:12And then you create a vehicle and then you just like grab the camera and you tell it
- 37:16to do things and stuff.
- 37:17It's a really nice API.
- 37:18Wow.
- 37:19Another one that you brought up as we were talking before we hit record was this idea of programming
- 37:26a Roomba.
- 37:26Yeah.
- 37:27Right.
- 37:27I'm not sure everyone listening knows what a Roomba is.
- 37:30Like a Roomba is one of these little self-driving, self-navigating, self-vacuuming, vacuum driving.
- 37:35I think they're driving.
- 37:36Yeah.
- 37:36I mean as much as a vacuum drives.
- 37:38Yeah.
- 37:38We have one of those.
- 37:39My wife loves it periodically.
- 37:41It'll get stuck on stuff.
- 37:42She'll ask me to like dig it out, dig it back to its home so it's okay.
- 37:45But those are getting pretty sophisticated and you can control those and program them right
- 37:50now?
- 37:50Yeah.
- 37:51I mean this is another good question of what's officially endorsed by the company but I've
- 37:55had some friends.
- 37:56Don't want to return it after this maybe.
- 37:59Yeah.
- 38:00That have hacked on it.
- 38:01And it's cool because you have this baseline of performance that you're able to see with
- 38:05your vacuum and how it handles the obstacles in your house.
- 38:08But then you can also try out different pathfinding approaches and just see how it works.
- 38:14Right.
- 38:14It would be cool to put, I don't know how much of a, like a sensor array that that thing
- 38:19has on it.
- 38:20It feels like, I know the old ones, it was kind of a blind thing feeling its way through
- 38:25the room.
- 38:25It had like, it would go bonk, bonk into the wall.
- 38:27Like, okay, I guess that's a chair.
- 38:28We'll just like work our way.
- 38:31I think the newer ones are a little more advanced because we'll get like a map of where it cleaned.
- 38:35Oh, wow.
- 38:36Yeah.
- 38:37Like a 3D top down.
- 38:38It's like, oh, here's the top down view of where it thought the table was, you know?
- 38:43Oh, cool.
- 38:44It's much more advanced.
- 38:45So maybe you can get into those as well and get access to that information.
- 38:48Oh, yeah.
- 38:49I think that that, that'd be a great project.
- 38:51Yeah.
- 38:51Seeing where the Roombas have come, what sensors are there.
- 38:54Yeah.
- 38:54That'd be super fun.
- 38:55So I'll link both the donkey car.
- 38:57Well, that's easy, donkey car.com, but I'll link to it anyway.
- 38:59And then this Roomba Python API.
- 39:02So not only do you get a program it, you get a program it in Python.
- 39:06Yeah.
- 39:06Yeah.
- 39:08That's, that's pretty cool.
- 39:09When you think about the self-driving cars, like how computationally intensive do you have
- 39:14to be just to do those types of things?
- 39:17Can you have like a really, they said Raspberry Pi safe.
- 39:19or a donkey car, but maybe you have to only run simple algorithms.
- 39:22I don't know.
- 39:22You know, do you need GPUs?
- 39:24I know Nvidia is working on a self-driving car.
- 39:26Yeah.
- 39:27I mean, I heard that at some point.
- 39:28I think it's just as much as they're able to fit.
- 39:32I think that whatever's available, they'll use.
- 39:35And I think that a lot of the argument for using low-level languages is trying to get as
- 39:40much speed as possible.
- 39:41Right.
- 39:42Because if you could take a higher res image, then that means a lot for figuring out what's
- 39:47out there.
- 39:47Absolutely.
- 39:48Yeah.
- 39:48Cool.
- 39:49All right.
- 39:50Well, I don't know.
- 39:51I'm, I'm inspired to work on something.
- 39:52I'm not sure I'm going to go hack my Roomba button.
- 39:55Maybe.
- 39:56Maybe.
- 39:58Yeah.
- 39:59It sounds really fun.
- 39:59And also now I want to know if my car has one of those ports.
- 40:02Yeah.
- 40:02I'll have to go check it out and see.
- 40:04All right.
- 40:05Well, this is really fun to talk about these things and we'll link to some of the stuff
- 40:08out there.
- 40:08I'll link to your talk.
- 40:09Maybe just give us a quick catch up on ActiveState while you're here as well.
- 40:13You know?
- 40:14Yeah.
- 40:15I've had a, I think it was Pete on to talk about machine learning libraries and stuff
- 40:20a while ago, but I haven't talked about ActiveState for a while.
- 40:22So we hear a lot about Anaconda and those types of distributions.
- 40:26It feels to me like ActiveState plays kind of in that realm.
- 40:30Yeah.
- 40:30And traditionally, ActiveState has been distributions in the same kind of vein as Anaconda, right?
- 40:38Okay.
- 40:38Just a big collection of popular packages that you don't have to worry about pip installing
- 40:44and that kind of thing.
- 40:44Okay.
- 40:45For Python and for Perl also.
- 40:47But now we're putting together a self-serve version of that.
- 40:52So you might think, oh, the ActivePython distribution has a lot of the great stuff I need, but there's
- 40:59500 packages in it and I only need 40.
- 41:02Right.
- 41:02Okay.
- 41:02So you can go in to the platform and say, these are my 40 packages that I'm interested in,
- 41:07pre-build it, test it for these OS and architectures.
- 41:12And then anybody who wants to use my project can pull it down and just have everything good
- 41:16to go.
- 41:17Okay, cool.
- 41:17And you can pick like different versions of Python or can you even configure how say Python
- 41:23is compiled or like what level?
- 41:25Yeah.
- 41:26Yeah.
- 41:26So there's multiple versions of Python.
- 41:30I think we're up to 3.8 or 3.9 now, like up to date with modern Python.
- 41:34Thousands of packages available.
- 41:37We're still in beta.
- 41:38So there's some flux in what builds and the information about the combinations of builds
- 41:44that you're trying is valuable to us and will make things better.
- 41:48Okay.
- 41:48Yeah.
- 41:48It sounds like a good project.
- 41:49And you're working on some ROS things there as well.
- 41:54It sounds like a village install isolated things.
- 41:57ROS is something that I think is one of the powerful things about the future of this platform
- 42:02that we're doing.
- 42:03ROS is a project that's notoriously difficult to install and difficult to update.
- 42:08I've spent multiple days getting ROS configured the way I need it.
- 42:12And so the vision behind what ActiveState is doing is that configuration is done on this
- 42:19builder of the ActiveState platform.
- 42:21You just pull it down.
- 42:22It's set up already for you.
- 42:24The same way a distribution would.
- 42:26Yeah.
- 42:26It's a little bit like Docker.
- 42:27I think of it as more of a pip amp than a full-on Docker.
- 42:31Okay.
- 42:31There is some runtime isolation.
- 42:32Yeah.
- 42:33I was thinking more of the, it comes in a way that you know that it's going to be set up
- 42:36to work.
- 42:36Yeah.
- 42:37Not so much the isolation side of Docker.
- 42:38Gotcha.
- 42:39Yeah.
- 42:39It is.
- 42:40So the power for, some of the power behind it for ROS, I think, is the same that applies
- 42:46to current things that we currently support like SciPy and NumPy that have C dependencies
- 42:51that you can get tangled trying to build them on your machine.
- 42:54So the builder on the platform tests and builds and gives it to you for your specific platform
- 43:01so that you don't have to untangle that.
- 43:02And the future of what the platform will be able to do is things like ROS, where it's just
- 43:08a pull it down.
- 43:09It works for you rather than having to do any of that yourself.
- 43:12Well, that sounds nice.
- 43:13Yeah.
- 43:14I mean, it's the fun part of programming, not the unfun part.
- 43:17It's funny.
- 43:18Like we have this expectation that when we install things like Spotify, it just works for us,
- 43:24right?
- 43:24That's pre-bundled, pre-built.
- 43:25But when it comes to like our developer environment, we still have to build everything from scratch.
- 43:30Like there's still this funny thing where developers are just going, okay, I have to build my new
- 43:35thing, right?
- 43:35So I think the idea is we get to a place where your dependencies are, you can install as easily
- 43:41as you could your browser.
- 43:42Yeah.
- 43:42Well, that's pretty cool.
- 43:43When is that coming?
- 43:44Or like...
- 43:45Oh, so the platform's live now and we're building up our catalog of Python and Perl for macOS,
- 43:52Windows and Linux.
- 43:53And the package list is growing and the potential for the language list to grow too.
- 43:58Yeah.
- 43:59Yeah.
- 43:59Yeah.
- 43:59Cool.
- 44:00All right.
- 44:00Well, let me just close this out with a couple of high-level questions about cars real quick
- 44:04here.
- 44:04So I opened the whole conversation as in science fiction is like here is now just science or
- 44:12engineering in some regards of self-driving cars.
- 44:15But we're still not out there where just self-driving cars are cruising around.
- 44:19Like I just read this morning, somebody had projected like a human onto the asphalt in the
- 44:25salt.
- 44:25And like Teslas were stopping that.
- 44:27Yeah.
- 44:27Yeah.
- 44:27Like we're always...
- 44:28There was a great article about salt circles around cars.
- 44:31Yes.
- 44:31Yes.
- 44:32I've seen like a car painted in it and it didn't get out.
- 44:35I can't cross the line.
- 44:36So yeah.
- 44:37Yeah.
- 44:37It's like the elephant that's tied down with a little tiny stake, right?
- 44:41But that's where the car version...
- 44:42Anyway, so having more experience than many people, what are your thoughts on this?
- 44:46Like, are you just amazed at where it is?
- 44:49Do you think we're going to get to the science fiction level of it or...
- 44:53Yeah.
- 44:54I think that I am amazed by what we're capable of with this technology.
- 44:59I think for me, aside from what we're capable of in our technology, I think because this is
- 45:05all so new and because there are things like 100,000 lines of code and we're coming from
- 45:09a system that has a foundation in building on safety assurances, there's a question that's
- 45:15still, I don't think, fully answered, which is how safe is safe enough for this new stuff?
- 45:20I think that some of the auto manufacturers are concerned about that.
- 45:23Certainly state and local governments are concerned about that.
- 45:26Like what...
- 45:27How safe is safe enough for it to be on the roads of our city, right?
- 45:30And I think that those...
- 45:31Right now, in my mind, that's one of the most significant challenges to AV technology.
- 45:37Yeah.
- 45:37And I think we might have to just get used to a different kind of safe.
- 45:41Yeah.
- 45:41So what I'm thinking is, if there's a person who is videoed being just run over by a self-driving
- 45:50car in some horrific way, even if there are 10% fewer wrecks and 100,000 people are not hurt,
- 45:57if there's a graphic example, right?
- 46:00That's going to stick in people's mind.
- 46:02That's going to run on news and people are going to go, cars are unsafe.
- 46:04We can't have this.
- 46:05And like, maybe they are unsafe somewhat, but they're less unsafe than like people driving
- 46:11cars.
- 46:11Potentially.
- 46:12I don't know if that's true, but it just might take us a different type of...
- 46:17We might have to all get used to it differently, right?
- 46:19That's a really interesting point.
- 46:21And I think that at the beginning, especially like when people are still trying to decide whether
- 46:25or not they are willing to trust this technology.
- 46:29Will you get in the car?
- 46:31Yeah.
- 46:31Like in that Uber that no one's in?
- 46:32It's really important for the community of people developing this technology not to violate
- 46:38the public's trust.
- 46:40And I think that really catering or just really keeping the public in mind is an important part
- 46:46of how the industry moves forward.
- 46:47I think if they're going to maintain the trust of the people that they'd like to be in these
- 46:52cars.
- 46:52Yeah.
- 46:52I also think it's a huge challenge to have a heterogeneous world, right?
- 46:58It's one thing to imagine a world with really clear painted lines and tons of self-driving
- 47:02cars that all communicate like, hey, I'm over here.
- 47:04I'm intending to turn or whatever.
- 47:06But if there's grumpy drivers at rush hour in there with them, like that's a whole different
- 47:13level of complexity.
- 47:14I like to think that each of the auto manufacturers with their own sort of machine learning decision
- 47:20making, there's going to be like different attitudes of Fords versus, you know, GMs or
- 47:26something, right?
- 47:26Like the Fords are grumpy on the freeway.
- 47:27The Cadillacs are super aggressive.
- 47:29Yeah.
- 47:30You can never merge when there's a Cadillac.
- 47:32Yeah.
- 47:33How interesting.
- 47:34Yeah.
- 47:35You know, it's probably true, right?
- 47:36Like if they have different models running, they're going to make different decisions.
- 47:39Yeah.
- 47:39Absolutely.
- 47:40Interesting.
- 47:40Well, we'll see if they learn.
- 47:44All right.
- 47:44Well, I guess, you know, probably that's a good place to leave it for the conversation.
- 47:47But I'm both somewhat hopeful for this technology.
- 47:51I'm mostly just really, really impressed with it.
- 47:53Although I'm not one of those people like I can't wait for self-driving cars to come because
- 47:57I hate driving.
- 47:58I like driving.
- 47:58I don't mind it.
- 47:59I actually don't have to commute that much.
- 48:00So it's no big, I guess maybe that's why I don't hate it.
- 48:03Yeah.
- 48:03But I do think it's interesting technology and it really blows my mind coming from the
- 48:07Turing test chat bot thing.
- 48:09Oh, yeah.
- 48:10Yeah.
- 48:10I was just learning a little bit about Eliza when I, like, I think it was written in the
- 48:1460s.
- 48:15Yeah.
- 48:15Yeah.
- 48:15That's like, I think that was one of the ones I was thinking of.
- 48:18Sure.
- 48:18Nice.
- 48:19All right.
- 48:20Now, Shay, before you get out of here, you got the two final questions.
- 48:23Yeah.
- 48:23If you're going to write some Python code, what editor do you use?
- 48:25Yeah.
- 48:26So I'm a VS Code person and I have had great experiences with both Vim and Emacs.
- 48:33And those were kind of driven by pair programming.
- 48:36I like to be able to jump in and pair.
- 48:38And so I've learned for the people that I was typically pairing for.
- 48:40And something that is a little easier barrier to entry like VS Code makes it much easier for
- 48:46me to pair regardless of preference usually.
- 48:49Right.
- 48:49And the tooling for Python.
- 48:50It's tough to jump in on Vim or whatever if you're not familiar with it.
- 48:53Yeah.
- 48:53I mean, just go like, all right, now exit.
- 48:56Yeah, exactly.
- 48:56Exactly.
- 48:57Yeah.
- 48:57And the tooling for Python for VS Code is solid.
- 48:59Yeah.
- 48:59I've never had a complaint there.
- 49:01Cool.
- 49:02All right.
- 49:02Good one.
- 49:02And then notable PyPI package?
- 49:04Yeah.
- 49:04So notable in a couple of ways for me is the DocOpt package.
- 49:08So it's for sure my most used library just because it takes scripts that I write and programs
- 49:15that I write up to the next level of usability on the command line.
- 49:18But the other thing that's incredibly notable to me is that it's like maybe a project that's
- 49:23reached enlightenment.
- 49:24It's been quiet for two plus years or something.
- 49:27Yeah.
- 49:27Like it's just stable.
- 49:28But it's okay that that's happened?
- 49:29Yeah, for sure.
- 49:30Yeah.
- 49:30Like there's like warnings out there that you shouldn't use a package if it's been quiet
- 49:34for a certain amount of time, if there's not enough activity.
- 49:36But I think there are some rare ones out there that are just stable.
- 49:40Right.
- 49:41It's done.
- 49:41Yeah.
- 49:42It's rare in the software world and it's kind of done.
- 49:45Yeah.
- 49:46Awesome.
- 49:46Well, that's a very good one.
- 49:47Cool.
- 49:48Well, you know, thanks for being on the show.
- 49:50People are excited about this.
- 49:52Maybe they want to go get some diagnostics information in a car or they want to try out
- 49:55some of the self-driving AI magic.
- 49:58What do you say?
- 49:59Yeah.
- 49:59I say jump in.
- 50:00Ross is a great place to start.
- 50:02Talking to a robot, talking to a car isn't harder than file IO.
- 50:06If you can do that, you can talk to robots.
- 50:09That's pretty impressive.
- 50:10Awesome.
- 50:10All right.
- 50:10Well, thank you for being here.
- 50:12Thanks for being on the show.
- 50:13Absolutely.
- 50:13Thanks for having me.
- 50:14You bet.
- 50:14Bye.
- 50:14Bye.
- 50:16This has been another episode of Talk Python To Me.
- 50:19Our guest on this episode was Shay Newton, and it's been brought to you by Datadog and Clubhouse.
- 50:24Datadog gives you visibility into the whole system running your code.
- 50:28Visit talkpython.fm/datadog and see what you've been missing.
- 50:32Feel throwing a free t-shirt.
- 50:33Clubhouse is a fast and enjoyable project management platform that breaks down silos and brings teams
- 50:39together to ship value, not features.
- 50:41Fall in love with project planning.
- 50:42Visit talkpython.fm/clubhouse.
- 50:46Want to level up your Python?
- 50:48If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
- 50:53Or if you're looking for something more advanced, check out our new async course that digs into
- 50:58all the different types of async programming you can do in Python.
- 51:01And of course, if you're interested in more than one of these, be sure to check out our
- 51:05Everything Bundle.
- 51:06It's like a subscription that never expires.
- 51:08Be sure to subscribe to the show.
- 51:10Open your favorite podcatcher and search for Python.
- 51:12We should be right at the top.
- 51:14You can also find the iTunes feed at /itunes, the Google Play feed at /play,
- 51:18and the direct RSS feed at /rss on talkpython.fm.
- 51:23This is your host, Michael Kennedy.
- 51:25Thanks so much for listening.
- 51:26I really appreciate it.
- 51:27Now get out there and write some Python code.
- 51:29I'll see you next time.
- 51:29Bye.
- 51:30Bye.
- 51:30Bye.
- 51:30Bye.
- 51:31Bye.
- 51:31Thank you.