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