WEBVTT

00:00:00.001 --> 00:00:07.680
I love to bring you stories of Python being used in amazing places outside the traditional tech silos of pure web development and data science.

00:00:07.680 --> 00:00:14.600
On this episode, you'll meet Robert Kane Repligal, who works on simulation and test software at Richard Childress Racing,

00:00:14.600 --> 00:00:18.780
the NASCAR team that just finished number one and two at the Texas Motor Speedway.

00:00:18.780 --> 00:00:25.820
You'll hear how Python is allowing them to model car behavior, airflow, and much more, faster than others using outdated tools.

00:00:26.480 --> 00:00:31.920
This is Talk Python To Me, episode 281, recorded July 22nd, 2020.

00:00:31.920 --> 00:00:37.600
Wait, wait, wait, wait. Normally, I'd play a little guitar riff right here to kick off the episode.

00:00:37.600 --> 00:00:44.380
But this episode is about racing and race cars, so let's kick it off with a different kind of instrument and note.

00:00:44.380 --> 00:00:51.720
Let's jump into a 2017 Indy Pro Mazda, a furlap around the storied Brands Hatch circuit, and let the engine notes be the music.

00:00:51.720 --> 00:01:21.700
This episode is brought to you by the music.

00:01:21.700 --> 00:01:50.000
Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.

00:01:50.300 --> 00:01:54.060
This is your host, Michael Kennedy. Follow me on Twitter, where I'm @mkennedy.

00:01:54.060 --> 00:02:00.240
Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on Twitter via at Talk Python.

00:02:00.240 --> 00:02:05.780
This episode is brought to you by Sonar Cube and Linode. Please check out what they're offering during their segments.

00:02:05.780 --> 00:02:09.160
This is a really fun episode. You're going to enjoy Kane's story.

00:02:09.160 --> 00:02:15.860
And if you're interested, you can find the full five-minute video that Drive Around Brands Hatch at talkpython.fm/hatch.

00:02:15.860 --> 00:02:17.900
Kane, welcome to Talk Python To Me.

00:02:17.900 --> 00:02:19.080
Thanks. Glad to be here.

00:02:19.080 --> 00:02:25.020
Yeah, it's awesome to have you here. I get to bring two of the things that I'm really passionate about together, racing and Python.

00:02:25.020 --> 00:02:25.860
All right.

00:02:25.860 --> 00:02:31.260
And you've got some really cool stories to tell, I could tell already. So I'm looking forward to having you on the show.

00:02:31.260 --> 00:02:33.260
Thanks for having me. I'm excited about it.

00:02:33.260 --> 00:02:39.200
Yeah, it's going to be a lot of fun. And I guess, as usual, let's just start at the beginning. How do you get into programming in Python?

00:02:39.600 --> 00:02:50.280
Well, it's a pretty long story. But I started off with, do you remember the basic game, Gorillaz? It was like Windows 3.1 and you threw the bananas that blew up.

00:02:50.280 --> 00:02:50.860
Yeah.

00:02:50.860 --> 00:02:51.280
Yeah.

00:02:51.780 --> 00:03:12.060
That's where I started. A friend of mine showed me how to get in there and hack the explosion side so I could never lose to my brother. So that was the intro. It at least got me started on looking at logic and reading code. And then my next project was actually programming my HP calculator. I don't know if you ever used one of those.

00:03:12.300 --> 00:03:16.700
You know, I got to admit, I was always a TI sort of person.

00:03:16.700 --> 00:03:17.140
Yeah.

00:03:17.140 --> 00:03:25.380
I didn't have the HP when I had the TI. Even I had one of those big widescreen TI-93s that had a Cordy keyboard in it. It was crazy.

00:03:25.380 --> 00:03:25.980
Oh, yeah.

00:03:25.980 --> 00:03:27.100
But yeah, I remember.

00:03:27.100 --> 00:03:37.600
No, this one goes back to the reverse Polish notation and everything else that everybody hated. But you were shamed if you had a TI in mechanical engineering. So everybody had HPs.

00:03:37.600 --> 00:03:47.100
But yeah, so I did a couple of scripts with that stuff, just mostly playing around. At Auburn, we studied Fortran 77. This was back in 96.

00:03:47.100 --> 00:03:48.680
You were in engineering?

00:03:48.680 --> 00:03:49.300
Yes.

00:03:49.300 --> 00:03:50.140
In mechanical engineering?

00:03:50.140 --> 00:03:51.600
I studied mechanical engineering in Auburn.

00:03:51.600 --> 00:04:00.240
Yeah. I was in chemical engineering for a year and I wanted to take C++ and they told me, no, no, no, you have to take Fortran. It's going to be the most important language you ever learned.

00:04:00.240 --> 00:04:07.200
Yeah. Yeah. And the older generation of mechanical engineers are still diehard Fortran.

00:04:07.200 --> 00:04:07.880
Interesting.

00:04:07.880 --> 00:04:18.920
One of the teams I worked with a few years ago, their simulation was actually written mostly in Fortran. And I mean, you can't argue with the processing speed of numerical calculations, which is all the sim really is.

00:04:19.100 --> 00:04:20.580
So yeah, it smokes.

00:04:20.580 --> 00:04:33.560
By the time I was like a sophomore year, I had moved on to MATLAB and most people were using MATLAB for their coursework and projects and things like that. So yeah, I was a big fan of MATLAB for a long time.

00:04:33.660 --> 00:04:56.240
And then all my graduate work, I did my master's at Purdue with a focus on vehicle dynamics and all my master's work was done in MATLAB. So got a pretty good amount of experience in that. I really like the scripting languages. I've done some Objective-C stuff and felt out of place, you know, with compiled code and not being able to really dig into it after using MATLAB for so long.

00:04:56.340 --> 00:05:00.620
So yeah, you can't just open up those APIs and have a look at them, right? They're binary.

00:05:01.020 --> 00:05:18.580
Right, right. Yeah. And so a lot of the problems that we work on in this industry, you have to explore the data a ton before you know what you're even going to do with the project. So the scripting is good for me. My coworkers that are the C-sharp and C++ guys shame me and tell me I'm not a real programmer, you know, so.

00:05:18.700 --> 00:05:38.680
But it's all in good fun. And I continued using MATLAB as I started my career. Ford Motor Company had pretty much all their stuff in MATLAB at the time. When I left Ford and went to Hendrick Motorsports to be the race engineer for the 24 car with Jeff Gordon, I was sadly, sadly depressed to not be given a license for MATLAB.

00:05:38.680 --> 00:05:44.040
So, I mean, they were doing everything in Excel and they were the ones who SIM runs in Fortran.

00:05:44.040 --> 00:05:44.420
Right.

00:05:44.420 --> 00:06:00.100
So it was the simulation, they used Excel as a GUI and then had this backend of Fortran piped in to run it. So it was pretty interesting because having the power of Excel where I can just click here and do some calculations was pretty useful.

00:06:00.100 --> 00:06:09.820
Yeah. Excel is really powerful like that, right? Except it's hard to follow the logic of it if you've got this formula that leads to that, which is back over there. And then there's a conditional, which jumps here.

00:06:09.820 --> 00:06:11.920
Oh, it's impossible. It's impossible.

00:06:11.920 --> 00:06:12.160
Yeah.

00:06:12.160 --> 00:06:24.940
I cringe when somebody sends me a big Excel sheet with all kinds of formulas all over the place. The logic of the structure of it is what makes sense. And I am not a fan of VBA, so I don't like getting in the backend of that either.

00:06:24.940 --> 00:06:34.640
But yet moving into the, you know, racing stuff, we'll spend a million dollars to try to make five horsepower, but we can't spend $2,000 on a MATLAB license to solve analytical problems.

00:06:34.640 --> 00:06:46.560
Yeah. I think that's the, I mean, that's the racing take on that story, but you hear and see that story all over the place. Like companies spending millions of dollars or there's millions of dollars of efficiencies to be gained, but like, no, no, no.

00:06:46.560 --> 00:06:56.560
You're going to use this crappy old computer that doesn't work that well. It's all locked down or you're going to not get a license to this thing or that thing because for whatever reason, it's right.

00:06:56.560 --> 00:07:01.780
It blows my mind how some of these, these sort of organizations can be like Pennywise pound foolish.

00:07:02.300 --> 00:07:24.940
Yeah. Yeah. And it's like, I had just finished simplified vehicle simulation optimization program as my masters. So I see the power of not even having to figure out what you want the car to do. You give the simulation, these limits of things that you want for the balance and for the travels and things. And you just say, go. And it finds the setups that will get you those vehicle outputs.

00:07:25.260 --> 00:07:32.020
And it's like, wow, that's still not really being done in the same way as what I was doing way back when.

00:07:32.020 --> 00:07:39.280
So when you're talking about simulations, is this like tire pressure, ride height, cambers, like the mechanical setup or something else?

00:07:39.280 --> 00:07:53.540
No, it's a full model, physical model of a vehicle. So the big modeling package right now is Demola, which is built on Modelica and it handles all the dynamics and vehicle parts, but there's still a lot more to it.

00:07:53.540 --> 00:08:06.120
When you want to have a nice GUI interface, you want to be able to output files. There's a whole realm of difficulty in putting this stuff together. It's pretty impressive that a lot of the teams develop their own in-house.

00:08:06.120 --> 00:08:36.100
Yeah.

00:08:36.100 --> 00:08:51.000
Get out of racing, actually, after I left Hendrick. Didn't really know what I wanted to do. You know, the schedule is just brutal in NASCAR. It's 38 events. And my last year on the road with a 24, we had 22 tests. So I was in town 31 hours a week.

00:08:51.000 --> 00:08:51.480
Wow.

00:08:51.780 --> 00:09:13.080
And I was in the shop working. And I mean, I was not having a good relationship. We were having problems. And it just got to the point where I got moved into the R&D group where I did only about half as much travel and got to work on some pretty cool projects doing experimental, I guess I should say, exhibition races.

00:09:13.780 --> 00:09:21.240
So, like, Dale Jr. Decides he's going to run the three car in Xfinity with his dad's old Wrangler paint scheme.

00:09:21.240 --> 00:09:21.600
Right.

00:09:21.740 --> 00:09:37.040
And they would work out a deal with Hendrick to make that race happen. And so I'd still get to do some race engineering, but I was mostly doing beta testing and breaking things because I had a reputation for being able to break any sim release.

00:09:37.040 --> 00:09:48.480
So they all went through me before it got released to the guys, you know, that were going to the track. So, but I still wasn't programming much. But through that, I got a lot of experience with user experience part of it.

00:09:48.480 --> 00:10:15.520
Like, just making suggestions to the simulation group of, hey, can we add this little calculator thing over here? And can we add this would be really useful for the race engineers at the track. And maybe I'm lazy, but I like software to work very easily and fluidly. And I hate doing a lot of clicking. And if it takes 75 clicks for me to get the sim to run, I am not a happy guy, you know?

00:10:15.520 --> 00:10:16.360
Yeah, exactly.

00:10:16.360 --> 00:10:43.860
But then moving on after that, I kind of did an about face and started doing lighting design for concerts. And I wasn't happy with the software that was available for that. So this is where I delved into the Objective-C part using Xcode with Course Composer and doing some video projection stuff and pretty fun stage lighting, motion lights, had some pretty cool little gimmicks. I always got frustrated at shows where they had lights and video, but the color schemes clashed.

00:10:43.860 --> 00:10:52.180
So I programmed mine where the projection mapping would follow the complementary color set of the lighting design.

00:10:52.180 --> 00:10:53.520
Oh, that's clever. That's cool.

00:10:53.860 --> 00:11:06.080
Yeah. And then I ran into the problem where not, you know, sometimes I would just do the projection stuff and there would be another lighting designer, but they wouldn't have an output that they could give me easily to receive what their color scheme was.

00:11:06.440 --> 00:11:18.500
So I started using a digital camera and I had an app that I had built for my iPad where I could pick from the video image and it would decode what that color of those pixels were.

00:11:18.720 --> 00:11:22.300
And then I had a little color matching deal that would match it up.

00:11:22.300 --> 00:11:27.160
So even if I didn't have that data coming in, really, I was solving problems. That's what I do. Right?

00:11:27.300 --> 00:11:28.200
Yeah, that's awesome.

00:11:28.200 --> 00:11:33.420
This portion of Talk Python To Me is brought to you by SonarCube.

00:11:33.420 --> 00:11:35.100
Here's something I get asked a lot.

00:11:35.100 --> 00:11:39.560
Once you've mastered the basics of Python, how do you keep building your skill of the language?

00:11:39.560 --> 00:11:47.900
Not everyone is lucky enough to have a well-versed mentor who can take the time to look over new commits and guide them in mastering the more subtle aspects of Python.

00:11:48.420 --> 00:11:51.100
That's where SonarCube static analysis comes in.

00:11:51.100 --> 00:11:56.220
SonarCube finds bugs, vulnerabilities, code smells, and security hotspots in your code.

00:11:56.220 --> 00:12:04.420
Every issue is presented in the context of the code with a detailed description of why it's a problem and code examples to guide you in making the fix.

00:12:04.420 --> 00:12:07.800
It's powerful, fast, and accurate out of the box.

00:12:07.800 --> 00:12:09.420
Oh yeah, and it's free.

00:12:09.420 --> 00:12:15.320
So learn more and download SonarCube today at talkpython.fm/sonar.

00:12:15.440 --> 00:12:19.080
That's talkpython.fm/sonar, S-O-N-A-R.

00:12:19.080 --> 00:12:22.840
Yeah, so I got back into racing.

00:12:22.840 --> 00:12:27.700
Obviously, the pay is pretty good compared to normal engineer's pay.

00:12:27.700 --> 00:12:29.540
So they drug me back in.

00:12:29.540 --> 00:12:35.020
I did a technical director role at a small team and then was still doing the lighting on the side.

00:12:35.020 --> 00:12:44.640
But then I moved on to, I got invited while I was still racing, I got invited to be an associate professor at UNC Charlotte, University of North Carolina, Charlotte.

00:12:44.640 --> 00:12:45.340
Oh, awesome.

00:12:45.340 --> 00:12:46.760
In mechanical engineering?

00:12:46.760 --> 00:12:51.020
It was in, they actually have a mechanical engineering motorsports division.

00:12:51.020 --> 00:12:52.320
Oh wow, that's pretty specific.

00:12:52.320 --> 00:12:52.840
That's awesome.

00:12:52.840 --> 00:12:53.280
Yeah.

00:12:53.280 --> 00:13:02.700
And so they try to prepare the students for getting out into the actual race industry, which is pretty much centered here in Charlotte, especially for NASCAR.

00:13:02.980 --> 00:13:10.160
Yeah, that's sort of the world headquarters for NASCAR, like Indianapolis is for Indy and maybe UK is for Formula One.

00:13:10.160 --> 00:13:10.500
Yeah.

00:13:10.500 --> 00:13:19.300
And I mean, it helps physically for all the teams to be close together because there's a lot of turnover between different teams and all.

00:13:19.300 --> 00:13:23.780
And, you know, as you go, not have to move all over the country to go to different places.

00:13:24.080 --> 00:13:27.440
It's just the length of my commute changes for what team I'm working with.

00:13:27.440 --> 00:13:28.640
Funny.

00:13:28.640 --> 00:13:29.360
Yeah.

00:13:29.580 --> 00:13:43.500
But so I started thinking a lot on designing this new vehicle dynamics class and how what I was seeing in other industries with this data science movement and machine learning stuff is that it's going to be the way of the future.

00:13:43.500 --> 00:13:45.680
I mean, there is no doubt about it.

00:13:45.680 --> 00:13:55.220
The gains that we're able to make by applying machine learning algorithms to this data is just leaps and bounds of what anybody could do in an Excel spreadsheet.

00:13:55.220 --> 00:13:58.160
And it's fast and it's fast to develop.

00:13:58.160 --> 00:14:13.580
And somebody can have a super great idea, but the three other engineers that are going to be using this tool, they want some small aspects of it changed, like how you break up the track, where you're looking at cornering forces and things.

00:14:13.580 --> 00:14:20.500
And so I felt like I wanted to make the class a lot like the vehicle dynamics class I took in my master's program.

00:14:20.500 --> 00:14:23.000
And it was heavily numerical based.

00:14:23.000 --> 00:14:23.860
It was all MATLAB.

00:14:24.000 --> 00:14:29.040
And so I just said, well, it's been a few years since I used MATLAB, but I'm sure it can't be hard to relearn.

00:14:29.040 --> 00:14:40.820
So while I was on a full travel schedule again, I was staying up till one and two in the morning, just making toy projects and doing tutorials and trying to get my class together.

00:14:40.820 --> 00:14:48.140
Cause I only had two months to have not only skills enough to teach the material, but I had to write the whole course.

00:14:48.140 --> 00:14:50.000
I had to write all the homework assignments.

00:14:50.000 --> 00:14:51.360
I had to write all the tests.

00:14:51.360 --> 00:14:51.720
Wow.

00:14:51.880 --> 00:14:55.780
And I think I was getting like four hours of sleep there for that two months period.

00:14:55.780 --> 00:15:02.520
And then when I finally had the class done, I slept for like 24 hours straight and it doesn't help.

00:15:02.520 --> 00:15:04.480
You still just wake up tired, you know?

00:15:04.480 --> 00:15:05.020
Wow.

00:15:05.020 --> 00:15:06.440
But I had a lot of great feedback.

00:15:06.440 --> 00:15:09.520
You know, they had never even had a MATLAB class.

00:15:09.520 --> 00:15:12.120
Any of the students, they don't teach that in the department.

00:15:12.440 --> 00:15:14.520
And so they were all learning from scratch.

00:15:14.520 --> 00:15:18.800
And one of my TAs, he loved it so much.

00:15:18.800 --> 00:15:23.100
He took my class the first semester and then was my TA the second semester.

00:15:23.100 --> 00:15:26.920
And he came to me like halfway through his semester.

00:15:26.920 --> 00:15:38.560
And he's like, I almost had my whole thesis research work redone in MATLAB because he was trying to use Excel to process engine data that was recording at like a thousand hertz.

00:15:38.560 --> 00:15:41.240
You know, 50 channels at a thousand hertz.

00:15:41.240 --> 00:15:44.760
He had these spreadsheets that were just massive.

00:15:45.260 --> 00:15:47.280
And I mean, Excel can't handle that.

00:15:47.280 --> 00:15:47.720
Yeah.

00:15:47.720 --> 00:15:49.640
The document too large or whatever.

00:15:49.640 --> 00:15:51.240
Like it only does five minutes at a time.

00:15:51.240 --> 00:15:51.700
Who knows?

00:15:51.700 --> 00:15:52.180
Yeah.

00:15:52.180 --> 00:15:55.120
And he redid it and he was just so proud of himself.

00:15:55.120 --> 00:16:02.360
And I mean, I was proud for him because that is a big thing to take the semester you're about to graduate and just start at ground zero.

00:16:02.360 --> 00:16:02.920
Yeah.

00:16:02.920 --> 00:16:07.000
But to have the skill to be able to do that and make it happen is pretty good.

00:16:07.000 --> 00:16:13.500
He actually ended up taking a job at Caterpillar designing huge diesel engines for the earth moving equipment.

00:16:13.500 --> 00:16:14.160
Okay.

00:16:14.160 --> 00:16:14.660
Yeah.

00:16:14.720 --> 00:16:14.840
Yeah.

00:16:14.840 --> 00:16:16.560
Caterpillar is doing a bunch of stuff with Python.

00:16:16.560 --> 00:16:17.900
Oh, yeah.

00:16:17.900 --> 00:16:18.300
Yeah.

00:16:18.300 --> 00:16:20.760
Actually, Caterpillar is one of our sponsors too.

00:16:20.760 --> 00:16:22.500
I don't know if you knew that for our team.

00:16:22.500 --> 00:16:23.460
No, I didn't know that.

00:16:23.460 --> 00:16:23.960
Yeah.

00:16:23.960 --> 00:16:26.220
They were telling us, I met with some of the guys.

00:16:26.220 --> 00:16:34.500
We were comparing machine learning notes and he was telling us about their division that does all the reliability testing and things.

00:16:34.500 --> 00:16:37.220
So they have all their trucks instrumented.

00:16:37.660 --> 00:16:49.580
And as they're going out, they're beaming the data up to a satellite and beaming it back to their data science department and processing it and trying to figure out when these engines are going to fail in a certain way.

00:16:49.580 --> 00:16:50.020
Wow.

00:16:50.340 --> 00:16:50.580
Yeah.

00:16:50.580 --> 00:16:56.800
It's pretty impressive how industry has really latched onto the data science, but racing still lagging behind, I feel.

00:16:57.200 --> 00:16:58.980
But we still haven't got to my Python.

00:16:58.980 --> 00:17:00.440
Well, you know, one of the things...

00:17:00.440 --> 00:17:01.240
That's right.

00:17:01.240 --> 00:17:02.700
Bo, just one quick comment.

00:17:02.800 --> 00:17:06.280
I think the type of software that you're talking about is really interesting challenges.

00:17:06.280 --> 00:17:10.840
I got to work in this for a while as well, where it's event-based, like human event-based.

00:17:10.840 --> 00:17:11.400
Yeah.

00:17:11.400 --> 00:17:11.800
Right.

00:17:11.800 --> 00:17:20.440
We're going to go to the track and on Saturday, the software has to work because we're going to run the simulation in the morning and apply it in the afternoon.

00:17:20.440 --> 00:17:24.920
And if it doesn't work, it's not like, well, we'll fix the bug next week or we'll push that to the next sprint.

00:17:24.920 --> 00:17:28.200
Like, yeah, that was the Daytona 500 and it didn't work.

00:17:28.200 --> 00:17:28.840
So you missed it.

00:17:28.840 --> 00:17:29.120
Oh, yeah.

00:17:29.120 --> 00:17:29.780
Tell me about it.

00:17:29.780 --> 00:17:31.660
I mean, and it's even worse than that.

00:17:31.660 --> 00:17:40.540
What I always tell all the young engineers that I've trained is there's really two things you need to do to be successful in the racing industry as an engineer.

00:17:40.540 --> 00:17:48.500
The first thing and foremost is you need to remember that the decisions you're making on this car are going to potentially affect somebody's life.

00:17:48.500 --> 00:17:50.740
I mean, much less you could crash the car.

00:17:50.740 --> 00:17:52.340
You could crash the car and hurt the driver.

00:17:52.340 --> 00:17:53.360
You could kill the driver.

00:17:53.360 --> 00:17:59.700
You could crash the car so bad that parts go through the catch fence and hurt fans, which has happened before.

00:17:59.700 --> 00:18:04.840
And so I always try to make sure that they understand the impact that they could have.

00:18:04.840 --> 00:18:13.300
But when it comes to the key talent that you need, it's measuring disappointment because it doesn't matter how hard you try.

00:18:13.560 --> 00:18:23.080
You can show up to the racetrack with the fastest car and be the fastest in every practice and qualify on the pole and lead the most laps of the race.

00:18:23.200 --> 00:18:28.660
And then by no fault of your own, cut a tire, plow into the fence and your whole weekend.

00:18:28.660 --> 00:18:33.200
Now, no matter how good it was to that point, you're a failure now.

00:18:33.200 --> 00:18:35.180
You know, and yeah, absolutely.

00:18:35.180 --> 00:18:35.800
Yeah.

00:18:35.800 --> 00:18:39.780
I see a lot of the young people really have a problem battling with depression.

00:18:39.780 --> 00:18:44.400
And I mean, I tell this story as kind of a joke in a way, but it's serious.

00:18:44.540 --> 00:18:50.240
And it's easy to get disgruntled and like think of yourself as a failure in this industry.

00:18:50.240 --> 00:18:50.680
Yeah.

00:18:50.680 --> 00:18:51.740
I can imagine.

00:18:51.740 --> 00:18:54.300
I mean, you have to set your expectations right.

00:18:54.300 --> 00:18:55.300
Stuff's going to happen.

00:18:55.300 --> 00:18:56.660
Things are going to go wrong.

00:18:56.660 --> 00:18:57.040
Right.

00:18:57.040 --> 00:18:58.540
Sometimes your fault, sometimes not.

00:18:58.540 --> 00:19:04.980
Sometimes finishing in the middle is something you've got to be proud of and not like seen as a failure or whatever.

00:19:04.980 --> 00:19:05.200
Right.

00:19:05.200 --> 00:19:12.980
Like it just I think it does take that mental sort of not necessarily toughness, but just setting the expectations in a real way.

00:19:12.980 --> 00:19:13.680
Absolutely.

00:19:14.000 --> 00:19:15.280
It seems really frustrating.

00:19:15.280 --> 00:19:16.300
Like you spend the whole weekend.

00:19:16.300 --> 00:19:18.020
Someone takes you out in the first corner of the race.

00:19:18.020 --> 00:19:19.800
It doesn't matter how good your simulation was.

00:19:19.800 --> 00:19:20.280
Nope.

00:19:20.280 --> 00:19:22.600
You you're packing it up and you're going back home.

00:19:22.600 --> 00:19:23.120
Yeah.

00:19:23.120 --> 00:19:23.460
Yeah.

00:19:23.460 --> 00:19:27.500
And there's a few other aspects of it, too, where I mean, we're a team.

00:19:27.500 --> 00:19:28.060
Right.

00:19:28.060 --> 00:19:41.200
So if one guy gets down on the team and you're riding back to the hotel in your your minivan and he makes some comments about how bad practice was that day or something that affects everybody around you.

00:19:41.620 --> 00:19:46.560
And so having that positive mental attitude is the only way to be successful.

00:19:46.780 --> 00:19:51.640
And I mean, I've definitely learned a lot through my career, which is why I try to share that.

00:19:51.640 --> 00:19:53.540
But in my earlier days, it was rough.

00:19:53.540 --> 00:20:00.020
I was not a good teammate and would say harsh things and I would have harsh things said to me.

00:20:00.020 --> 00:20:00.280
Yeah.

00:20:00.440 --> 00:20:03.580
But back on the Python track, since we still haven't made it there.

00:20:03.580 --> 00:20:09.460
So after I had my son, I couldn't do working on a race team full time and teaching classes.

00:20:09.460 --> 00:20:14.780
So I had to quit the UNC Charlotte job and I loved it and love my time with MATLAB.

00:20:14.780 --> 00:20:17.920
But then I lost my license because I was on an educational license.

00:20:18.380 --> 00:20:23.660
So I had to look at the landscape of like, what do I want to do at Richard Children's Racing?

00:20:23.660 --> 00:20:34.780
We had some legacy licenses at the time, but they were so old that going back and relearning what the syntax changes were was not really something that I had any interest in.

00:20:35.020 --> 00:20:38.740
And now we've actually upgraded and we have plenty of MATLAB licenses as well.

00:20:38.740 --> 00:20:42.900
But I've put so much effort into my Python experience and I just love it.

00:20:42.900 --> 00:20:43.780
I mean, it's clean.

00:20:43.780 --> 00:20:44.120
Yeah.

00:20:44.120 --> 00:20:45.280
My code is beautiful.

00:20:45.280 --> 00:20:46.600
I love PEP 8.

00:20:46.600 --> 00:20:47.920
I love black.

00:20:47.920 --> 00:20:48.340
Oh, yeah.

00:20:48.340 --> 00:20:53.720
And just not even having to think about the white space and how I do my continuation lines.

00:20:53.720 --> 00:20:56.300
And I mean, just every aspect of it.

00:20:56.300 --> 00:21:05.500
I really, the most surprising thing to me is that Python didn't show up on my radar during my entire career up until three years ago.

00:21:05.500 --> 00:21:06.560
Yeah, that is pretty interesting.

00:21:06.560 --> 00:21:06.860
Yeah.

00:21:06.860 --> 00:21:09.120
Because just nobody in my industry used it.

00:21:09.120 --> 00:21:19.480
But yeah, so I've kind of gone full tilt on the Python kick, probably done 20 or 25 online courses and everything that's on the Kaggle page.

00:21:19.480 --> 00:21:21.660
Been working on the fast AI.

00:21:22.420 --> 00:21:28.340
I think you interviewed Jeremy Howard, who is just an amazing teacher, has an amazing teaching style.

00:21:28.340 --> 00:21:29.820
You can't not like the guy.

00:21:29.820 --> 00:21:30.480
Yeah, awesome.

00:21:30.480 --> 00:21:31.880
Yeah, I don't think I have interviewed him.

00:21:31.880 --> 00:21:32.300
I should.

00:21:32.300 --> 00:21:34.300
But yeah, fast AI is cool.

00:21:34.300 --> 00:21:34.760
Yeah.

00:21:34.760 --> 00:21:35.620
And clean.

00:21:35.620 --> 00:21:39.680
And I was already using PyTorch and it works on top of PyTorch now.

00:21:39.680 --> 00:21:40.640
Okay.

00:21:40.640 --> 00:21:43.980
So maybe give me a perspective now that you're three years in.

00:21:43.980 --> 00:21:47.000
You're not new to the Python world at all anymore.

00:21:47.000 --> 00:21:49.260
Some of the stuff we're going to talk about that you've been doing, it's incredible.

00:21:49.260 --> 00:21:51.500
But it's still pretty fresh in your mind, I suspect.

00:21:51.980 --> 00:22:03.460
Coming from this commercial MATLAB, every little aspect of a library, every toolkit I want to use is like another $1,000 in a negotiation with a purchasing side of my company.

00:22:03.460 --> 00:22:11.160
Versus if you can find it on GitHub or on PyPI and it works decent, now that's another thing you can do.

00:22:11.160 --> 00:22:15.040
It feels like the world is more open to just doing what you want to solve your problem.

00:22:15.040 --> 00:22:23.820
Well, and I think to put that even further, I would say that the competition level is really interesting with open source.

00:22:23.820 --> 00:22:31.000
Because as you see some new idea come out, you might see a package start and then another flower pops up somewhere else.

00:22:31.480 --> 00:22:35.980
And the contributors look at each other's work and they're like, okay, I'm going to come work on yours now.

00:22:35.980 --> 00:22:36.260
Yeah.

00:22:36.260 --> 00:22:42.040
You know, and just like abandon that space if somebody comes out with like a better approach to solving some issue.

00:22:42.040 --> 00:22:47.880
And I think that that is a powerful thing that these commercial softwares can't compete with.

00:22:47.880 --> 00:22:48.600
Right, exactly.

00:22:48.600 --> 00:22:53.060
And they definitely can't compete with all the free help that people give.

00:22:53.060 --> 00:22:53.500
Yep.

00:22:53.500 --> 00:22:54.120
Absolutely.

00:22:54.120 --> 00:22:55.560
That's really, really interesting.

00:22:55.760 --> 00:22:59.540
So let's talk really quickly just about like some high level stuff in racing.

00:22:59.540 --> 00:23:04.820
I want to keep it a little bit focused just so we can spend a lot of time on the Python that you're riding, the simulations you're doing.

00:23:04.820 --> 00:23:08.980
But just give us a sense of what type of data you're collecting.

00:23:08.980 --> 00:23:17.820
You know, is this during the race you're tracking like tire wear or is it speeds or are you trying to simulate when you should pit?

00:23:17.820 --> 00:23:19.660
Like what kind of stuff are you guys doing?

00:23:19.660 --> 00:23:21.520
Yeah, pretty much most of that.

00:23:21.520 --> 00:23:23.540
We're limited during the race.

00:23:23.880 --> 00:23:30.600
NASCAR has, they issue us a data logger and it is nothing that you can really mess with.

00:23:30.600 --> 00:23:32.320
And it only has certain channels.

00:23:32.320 --> 00:23:36.480
So we're only allowed to have a few channels during the race, you know, GPS location.

00:23:36.480 --> 00:23:39.560
So lat, long, elevation type stuff.

00:23:39.560 --> 00:23:41.380
A few basic driver things.

00:23:41.380 --> 00:23:45.160
So you'll have brake pressure, throttle position, and steering wheel angle.

00:23:45.160 --> 00:23:47.760
Everything he's doing, he controls with those three things.

00:23:47.760 --> 00:23:53.340
So, I mean, other than shifting gears, but most of the time we don't even shift gears on track because you get to fourth gear.

00:23:53.340 --> 00:23:55.340
And that's where you stay for the whole lap.

00:23:55.340 --> 00:23:56.580
Unless you're on a road course, yeah.

00:23:56.580 --> 00:23:57.160
Yeah.

00:23:57.160 --> 00:24:08.120
But during tests, we might have a small test where we just have like 50 instruments where we're actually tracking damper travels for the suspension, all kinds of engine things.

00:24:08.120 --> 00:24:10.120
Air flows through the radiators.

00:24:10.120 --> 00:24:14.620
Air flows through brake ducts, you know, if we're running out of braking track.

00:24:15.040 --> 00:24:19.220
We have these things called wheel force transducers that are like the top of the line.

00:24:19.220 --> 00:24:20.940
They're the most expensive sensor.

00:24:20.940 --> 00:24:27.520
So you typically actually detune your car when you go test with this because you don't want to risk hitting the wall.

00:24:28.240 --> 00:24:34.240
But it measures the three directions of force, three directions of torque, tire pressure, tire temperature.

00:24:34.240 --> 00:24:37.440
And so there's quite a few sensors on just that one tire.

00:24:37.440 --> 00:24:43.800
You know, we'll use pitot tubes mounted to the roof to track airflow across the top of the roof.

00:24:43.800 --> 00:24:45.600
So we can look at the pressure difference there.

00:24:45.600 --> 00:24:49.680
There's inside the engine, there's just a hundred things that you could do.

00:24:49.900 --> 00:24:54.020
So the data system, the data person job is pretty demanding as well.

00:24:54.020 --> 00:24:55.380
Yeah, it sounds like it.

00:24:55.380 --> 00:24:59.240
But the system we use for the races is pretty small.

00:24:59.240 --> 00:24:59.940
It's pretty lightweight.

00:24:59.940 --> 00:25:00.900
So it's not a big deal.

00:25:00.900 --> 00:25:01.200
Yeah.

00:25:01.200 --> 00:25:04.120
And then, I mean, not to mention we go to the wind tunnel.

00:25:04.120 --> 00:25:09.340
I don't know if you've seen the wind shear wind tunnel, which is what we use most of the time, but it's a...

00:25:09.340 --> 00:25:09.900
Yeah, I don't think so.

00:25:09.900 --> 00:25:11.200
Maybe tell people about it.

00:25:11.200 --> 00:25:11.400
Yeah.

00:25:11.400 --> 00:25:11.840
Yeah.

00:25:11.840 --> 00:25:15.580
It's a 180 mile an hour rolling road wind tunnel.

00:25:15.580 --> 00:25:18.440
Like a treadmill, but that goes 180 miles an hour.

00:25:18.620 --> 00:25:22.320
It's a treadmill with a $300,000 stainless steel belt.

00:25:22.320 --> 00:25:23.120
Oh my goodness.

00:25:23.120 --> 00:25:23.500
Okay.

00:25:23.500 --> 00:25:30.160
You know, and so there's force pads under the belt to measure the weight on the tires.

00:25:30.160 --> 00:25:36.200
And you're also trying to capture the wind speed through the radiator and that kind of test too.

00:25:36.200 --> 00:25:39.600
And you don't want to mess with that belt because it's very expensive.

00:25:39.600 --> 00:25:42.600
But 180 miles an hour is the...

00:25:42.600 --> 00:25:44.400
I believe it's still the fastest wind tunnel in the world.

00:25:44.400 --> 00:25:44.900
Wow.

00:25:44.900 --> 00:25:46.320
That's pretty awesome.

00:25:46.620 --> 00:25:50.680
And I love when we do a wind tunnel test because I only live about three miles from

00:25:50.680 --> 00:25:53.160
the wind tunnel and I live 40 miles from the shop.

00:25:53.160 --> 00:25:58.800
So it's much nicer commute, but then I don't get to listen to as much podcast.

00:25:58.800 --> 00:25:59.840
Yeah, that's true.

00:25:59.840 --> 00:26:00.980
That's definitely a drawback.

00:26:00.980 --> 00:26:02.980
But yeah, a three mile commute is pretty sweet.

00:26:02.980 --> 00:26:03.320
Yeah.

00:26:03.460 --> 00:26:07.780
So one of the things that you actually have been spending a lot of time lately is applying

00:26:07.780 --> 00:26:12.280
Python and scikit-learn to this wind tunnel data, right?

00:26:12.280 --> 00:26:12.800
Oh yeah.

00:26:12.800 --> 00:26:22.000
We had an aerodynamicist leave at the end of 2018 who managed the wrangling of all the data

00:26:22.000 --> 00:26:29.400
from the raw wind tunnel data into what our sim needs to ingest to do all of its calculations.

00:26:29.400 --> 00:26:32.840
And he kind of left all of a sudden.

00:26:33.100 --> 00:26:35.180
And so I wasn't that busy.

00:26:35.180 --> 00:26:37.120
And so I was just like, hey, pick me.

00:26:37.120 --> 00:26:38.840
And so I took it over.

00:26:38.840 --> 00:26:43.920
And I have to say that the system that they were using for all this wind tunnel data in

00:26:43.920 --> 00:26:44.900
Excel was a nightmare.

00:26:45.560 --> 00:26:51.860
And so our manufacturer, General Motors, had been working with a company to develop a new

00:26:51.860 --> 00:26:53.760
fitting algorithm to fit this data.

00:26:53.760 --> 00:26:56.940
You have to imagine this data is four dimensional.

00:26:56.940 --> 00:27:03.380
So you have two travel things on the body that tell you the attitude of your car.

00:27:03.380 --> 00:27:06.740
And then you have the yaw angle that your car is to the wind.

00:27:06.740 --> 00:27:07.940
And then you have roll.

00:27:07.940 --> 00:27:08.480
Right.

00:27:08.480 --> 00:27:08.820
Okay.

00:27:08.820 --> 00:27:10.820
So it's a 4D fit problem.

00:27:10.820 --> 00:27:14.680
So they're kind of struggling with getting the accuracy that we were trying to demand.

00:27:15.200 --> 00:27:21.560
And their system, the workflow was pretty hairy and a lot of manual cutting and pasting and

00:27:21.560 --> 00:27:23.120
putting it into a form that you needed.

00:27:23.120 --> 00:27:28.200
And I got so fed up with it, with this wind tunnel a few months ago that I said, you know

00:27:28.200 --> 00:27:28.420
what?

00:27:28.420 --> 00:27:30.740
There's another guy who's helping with this now.

00:27:30.740 --> 00:27:35.160
Hey, you start with their stuff and try to do it, mash it through.

00:27:35.160 --> 00:27:39.820
And I'm just going to write a new script in Python and let's see who finishes and what

00:27:39.820 --> 00:27:40.540
the results are.

00:27:40.540 --> 00:27:44.840
And so, you know, at first I was really nervous because it was like the first time I was

00:27:44.840 --> 00:27:49.100
the first time I had tried to fit a four dimensional surface like that in Python.

00:27:49.100 --> 00:27:55.920
And at the end of the second day, I had improved the accuracy of the fit by five times.

00:27:55.920 --> 00:27:56.480
Wow.

00:27:56.480 --> 00:27:57.900
In some parts of the map.

00:27:57.900 --> 00:27:58.840
And just...

00:27:58.840 --> 00:28:00.320
500% improvement.

00:28:00.320 --> 00:28:00.880
That's insane.

00:28:00.880 --> 00:28:01.340
Yeah.

00:28:01.340 --> 00:28:05.080
I'm like, you know, but where it missed, it missed really bad.

00:28:05.080 --> 00:28:06.500
It wasn't bad everywhere.

00:28:06.500 --> 00:28:06.860
Okay.

00:28:07.040 --> 00:28:08.940
But where it missed, it was really bad.

00:28:08.940 --> 00:28:14.100
So I might've had, we talked wind tunnel terms in terms of counts, which is the coefficient,

00:28:14.100 --> 00:28:18.880
but they might have an error at some point of the map of 80 counts.

00:28:19.240 --> 00:28:23.880
And I might have an error of one count or two counts at that same point.

00:28:23.880 --> 00:28:30.500
And so the support vector regression algorithm inside Git Learn is phenomenal and so easy to

00:28:30.500 --> 00:28:31.040
work with.

00:28:31.040 --> 00:28:33.900
And it fits super fast for the amount of data that we're using.

00:28:33.900 --> 00:28:39.180
But yeah, I think another interesting aspect of that project is the other aerodynamicists

00:28:39.180 --> 00:28:44.420
I was working with who kind of went on and got the headaches of the other package.

00:28:44.580 --> 00:28:45.600
You take the bumpy road.

00:28:45.600 --> 00:28:46.120
Yeah.

00:28:46.120 --> 00:28:50.640
When he came back, well, I had been doing it for almost three years at that point,

00:28:50.640 --> 00:28:51.680
two and a half years.

00:28:51.680 --> 00:28:56.960
So I had suffered enough, but yeah, he came back and I showed him what I was doing.

00:28:56.960 --> 00:29:02.740
And he was struggling with his sheet that he uses in the wind tunnel of his Excel sheet locking

00:29:02.740 --> 00:29:03.840
up and things like that.

00:29:03.840 --> 00:29:09.220
And so we had a few discussions back and forth about MATLAB versus Python and everything else.

00:29:09.600 --> 00:29:14.800
And I showed him the code for the aero map fitter that I built.

00:29:14.800 --> 00:29:16.160
And he was like, I'm sold.

00:29:16.160 --> 00:29:17.720
That looks so easy.

00:29:17.720 --> 00:29:19.360
That looks so easy.

00:29:19.360 --> 00:29:26.700
And so he actually jumped on board and has been working on this project to replace his thing.

00:29:26.700 --> 00:29:30.220
And he finished it last week and used it for the first time in the wind tunnel last week.

00:29:30.220 --> 00:29:32.120
So kudos to him.

00:29:32.120 --> 00:29:34.160
That's a pretty good advancement.

00:29:34.160 --> 00:29:35.140
Yeah, that's a big achievement.

00:29:35.140 --> 00:29:35.540
Yeah.

00:29:35.540 --> 00:29:37.440
In a two month span, you know.

00:29:37.440 --> 00:29:37.760
Yeah.

00:29:37.760 --> 00:29:38.500
Wow.

00:29:38.500 --> 00:29:42.960
But he also had a good teacher, I guess, since he calls me up.

00:29:42.960 --> 00:29:46.900
But one thing that you talk about on the show a lot is the imposter syndrome.

00:29:46.900 --> 00:29:52.560
And I have to say that that hits me right in the heart because every project I do,

00:29:52.560 --> 00:29:54.680
I've got to learn something new to finish the project.

00:29:54.680 --> 00:30:00.920
And it's like, when will I ever know enough to just sit down and not have to pull up the

00:30:00.920 --> 00:30:03.780
documentation on some package or something?

00:30:03.780 --> 00:30:07.080
And it kind of gets to you after a while.

00:30:07.080 --> 00:30:09.080
You get stuck on some pandas.

00:30:09.080 --> 00:30:10.640
I forget what it's called now.

00:30:10.640 --> 00:30:16.940
It's like, it's where pandas is trying to make, pandas thinks you're trying to make a copy of data.

00:30:16.940 --> 00:30:21.140
But what you're really doing is pointing to the same spot in memory.

00:30:21.140 --> 00:30:21.540
Right.

00:30:21.760 --> 00:30:27.380
So you're going to run into problems when you change the one thing and now the other thing changes.

00:30:27.380 --> 00:30:31.540
And that kind of stuff is hard to get your head around when you come from the MATLAB space.

00:30:31.540 --> 00:30:33.620
So he has lots of errors like that.

00:30:33.620 --> 00:30:39.960
But, you know, having my coworker come to me and show me what he's struggling with and me let, you know, just have that.

00:30:39.960 --> 00:30:40.580
Wow.

00:30:40.580 --> 00:30:42.020
I remember struggling with that.

00:30:42.020 --> 00:30:43.120
Here's how you fix it.

00:30:43.120 --> 00:30:43.560
Yeah.

00:30:43.700 --> 00:30:49.880
And that really takes away a lot of the imposter part when you can provide so much help so quickly without any effort.

00:30:49.880 --> 00:30:55.640
That's a great point because so often you're pushing the edge of the envelope, trying to do more and more with your current skill set.

00:30:55.640 --> 00:30:58.060
So you always are pushing against that edge and always.

00:30:58.060 --> 00:30:58.540
Right.

00:30:58.760 --> 00:31:00.800
You got to feel that like that struggle.

00:31:00.800 --> 00:31:03.820
But then you get a chance to look back and help others.

00:31:03.820 --> 00:31:04.780
You're like, oh, actually.

00:31:04.780 --> 00:31:05.740
This is easy.

00:31:05.740 --> 00:31:07.800
I clearly see what you need to do.

00:31:07.800 --> 00:31:10.660
I remember this was hard, but it doesn't feel hard anymore.

00:31:10.660 --> 00:31:11.220
Yeah.

00:31:11.220 --> 00:31:11.680
Great.

00:31:11.680 --> 00:31:17.560
Well, and, you know, in the racing industry, I mean, I have data that I'm processing that comes directly from NASCAR.

00:31:17.560 --> 00:31:20.500
I have the track data that's coming from multiple sources.

00:31:20.500 --> 00:31:23.560
I have the wind tunnel data that's coming from source.

00:31:23.940 --> 00:31:33.740
Your joke about, I think it was you or Brian said the joke about 80% of a data scientist's job is wrangling data and getting it into the right form.

00:31:33.740 --> 00:31:34.020
Yeah.

00:31:34.020 --> 00:31:38.480
And 20% is them complaining about spending so much time wrangling the data.

00:31:38.480 --> 00:31:42.920
I definitely have been accused of that because I will complain.

00:31:42.920 --> 00:31:46.360
But again, you have all these different sources that you don't control.

00:31:47.080 --> 00:32:00.440
And so when you have a sheet, a data file being delivered to you that changes size in all different aspects, every week, depending on the track, it has different widths and different lengths and all this stuff.

00:32:00.440 --> 00:32:04.220
And dealing with that by hand is just a nightmare.

00:32:04.220 --> 00:32:07.420
So Python's been a definite blessing with regards to that.

00:32:09.480 --> 00:32:12.340
This portion of Talk Python To Me is brought to you by Linode.

00:32:12.340 --> 00:32:21.280
Whether you're working on a personal project or managing your enterprise's infrastructure, Linode has the pricing, support, and scale that you need to take your project to the next level.

00:32:21.280 --> 00:32:35.940
With 11 data centers worldwide, including their newest data center in Sydney, Australia, enterprise-grade hardware, S3-compatible storage, and the next-generation network, Linode delivers the performance that you expect at a price that you don't.

00:32:36.080 --> 00:32:52.000
Get started on Linode today with a $20 credit and you get access to native SSD storage, a 40-gigabit network, industry-leading processors, their revamped cloud manager at cloud.linode.com, root access to your server, along with their newest API and a Python CLI.

00:32:52.000 --> 00:33:00.020
Just visit talkpython.fm/Linode when creating a new Linode account and you'll automatically get $20 credit for your next project.

00:33:00.020 --> 00:33:01.320
Oh, and one last thing.

00:33:01.320 --> 00:33:02.100
They're hiring.

00:33:02.100 --> 00:33:05.200
Go to linode.com slash careers to find out more.

00:33:05.680 --> 00:33:06.520
Let them know that we sent you.

00:33:06.520 --> 00:33:09.420
I can imagine.

00:33:09.420 --> 00:33:13.020
And, you know, the version of the software changes or you go to the track the next time.

00:33:13.020 --> 00:33:17.940
They're like, oh, we've changed the format of this or we've added a column or taken away a column.

00:33:17.940 --> 00:33:19.040
And you're just like, oh, great.

00:33:19.040 --> 00:33:20.100
Here we go.

00:33:20.100 --> 00:33:20.960
Yeah, constantly.

00:33:20.960 --> 00:33:23.080
Oh, and they always would add the column.

00:33:23.080 --> 00:33:24.460
They don't add it at the end.

00:33:24.700 --> 00:33:31.980
So, in Excel, where you had all your formulas related to that cell, now that cell is not the same data anymore.

00:33:31.980 --> 00:33:34.340
And you got to go through and change all your formulas again.

00:33:34.340 --> 00:33:35.540
And, oh, man, it's just...

00:33:35.540 --> 00:33:38.060
Like halfway through the session, it's changed or something.

00:33:38.060 --> 00:33:38.340
Yeah.

00:33:38.340 --> 00:33:41.940
Or, you know, it's a data stream.

00:33:42.160 --> 00:33:44.260
So, maybe the data is just not coming in anymore.

00:33:44.260 --> 00:33:45.280
Like, it just...

00:33:45.280 --> 00:33:45.980
You missed a packet.

00:33:45.980 --> 00:33:46.380
Yeah.

00:33:46.380 --> 00:33:47.440
Like, what do you do then?

00:33:47.440 --> 00:33:50.660
And, you know, or there's a big section of blank.

00:33:50.660 --> 00:33:50.920
Yeah.

00:33:50.920 --> 00:33:58.080
So, dealing with that with pandas is just a dream come true because it has like the drop NAs that just gets rid of all the NAs.

00:33:58.080 --> 00:34:03.400
Or, you can replace all the NAs with a zero or whatever kind of makes sense for whatever that entity is.

00:34:03.400 --> 00:34:10.820
And especially for the amount of data that we're processing from a race event where the data is all being recorded at 20 hertz.

00:34:10.820 --> 00:34:11.240
Right.

00:34:11.240 --> 00:34:11.920
For hours?

00:34:11.920 --> 00:34:16.180
It's a four-hour event with 10 channels at 20 hertz.

00:34:16.180 --> 00:34:19.640
Oh, and NASCAR releases all 40 cars data.

00:34:19.640 --> 00:34:21.200
So, everybody had...

00:34:21.200 --> 00:34:23.600
So, you don't just have your two cars that are in the race.

00:34:23.600 --> 00:34:25.820
You've got the 40 cars that are in the race.

00:34:25.820 --> 00:34:26.720
That's interesting.

00:34:26.720 --> 00:34:29.200
And do you do a lot of analysis on the competitors' cars?

00:34:29.200 --> 00:34:29.940
Yes.

00:34:29.940 --> 00:34:30.700
I can imagine.

00:34:30.700 --> 00:34:31.220
Yes.

00:34:31.220 --> 00:34:32.300
Quite a bit.

00:34:32.300 --> 00:34:33.520
We're actually...

00:34:33.520 --> 00:34:41.520
Right now, what I'm gearing up to do is do a full suite of dashboards to try to get the hands into...

00:34:41.520 --> 00:34:45.520
Or the data in a usable format into the hands of the less technical people.

00:34:45.520 --> 00:34:49.000
Or even the technical people who just don't have Python experience.

00:34:49.000 --> 00:34:53.020
It's been hard for me to provide them with it.

00:34:53.020 --> 00:34:58.820
It's mostly them sending me work orders where it's like, hey, can you run this on these files?

00:34:58.820 --> 00:35:00.420
I need this report.

00:35:00.420 --> 00:35:00.720
Yeah.

00:35:00.720 --> 00:35:01.460
Give me the report.

00:35:01.460 --> 00:35:02.040
Yeah.

00:35:02.040 --> 00:35:03.920
And so, you had done...

00:35:03.920 --> 00:35:05.020
I guess it's been a couple months ago.

00:35:05.020 --> 00:35:07.380
You had the guy from Streamlit on.

00:35:07.380 --> 00:35:07.680
Yeah.

00:35:07.680 --> 00:35:09.000
Adrian on from Streamlit.

00:35:09.000 --> 00:35:09.240
Yeah.

00:35:09.240 --> 00:35:09.720
Adrian.

00:35:09.720 --> 00:35:10.000
Yeah.

00:35:10.400 --> 00:35:13.000
And I had been working with Plotly and Dash.

00:35:13.000 --> 00:35:19.580
And I think for the end polish product, maybe you can make it look nicer with Dash still.

00:35:19.580 --> 00:35:22.080
But you have to do all the CSS programming.

00:35:22.080 --> 00:35:24.200
I mean, who really wants to do all that stuff?

00:35:24.200 --> 00:35:31.080
So, I actually downloaded Streamlit today for the first time and started working with this afternoon.

00:35:31.580 --> 00:35:35.720
And I've already got a dashboard built that is functioning with the lap data.

00:35:35.720 --> 00:35:36.500
Oh, that's cool.

00:35:36.500 --> 00:35:37.680
Plotting out lap times.

00:35:37.680 --> 00:35:39.240
And I mean, it is just...

00:35:39.240 --> 00:35:40.000
It is...

00:35:40.000 --> 00:35:40.300
Wow.

00:35:40.300 --> 00:35:41.320
What a simple thing.

00:35:41.320 --> 00:35:41.800
Yeah.

00:35:41.980 --> 00:35:46.260
So, for those folks who haven't heard about Streamlit or didn't listen to that episode,

00:35:46.260 --> 00:35:47.680
I'll give my take on it.

00:35:47.680 --> 00:35:48.740
You can give your take on it.

00:35:48.740 --> 00:35:53.720
So, the idea is you take something that would be just a top-to-bottom regular script.

00:35:53.720 --> 00:35:54.840
Maybe it has functions.

00:35:54.840 --> 00:35:56.000
Maybe it doesn't.

00:35:56.000 --> 00:35:59.020
And you want to turn that into an interactive website.

00:35:59.020 --> 00:36:01.240
That sounds like a very far bridge to cross.

00:36:01.240 --> 00:36:07.080
But the way Streamlit works is it does a bunch of magic to give you stuff that you just put into your script.

00:36:07.300 --> 00:36:14.060
And then it turns that into interactive dashboards with sliders and drop-downs and search fields and all kinds of stuff.

00:36:14.060 --> 00:36:17.060
And integrates with Plotly and other tools as well.

00:36:17.060 --> 00:36:17.280
Yeah.

00:36:17.280 --> 00:36:18.260
It's pretty slick, right?

00:36:18.260 --> 00:36:19.460
It's really slick.

00:36:19.460 --> 00:36:25.200
And one of the things that I'm surprised Adrian didn't really touch on, or maybe he did and I just didn't recall,

00:36:25.200 --> 00:36:27.660
it works similar to...

00:36:27.660 --> 00:36:29.500
I do a lot of stuff in Jupyter Notebook.

00:36:29.500 --> 00:36:31.120
So, I'm always wanting to review my data.

00:36:31.120 --> 00:36:38.020
So, I create a data frame and then it's df.head so I can see and make sure that it's in the right form and stuff.

00:36:38.020 --> 00:36:41.080
And Streamlit does that and it puts it on your webpage.

00:36:41.080 --> 00:36:45.740
So, you don't even have to tell it st.table or whatever.

00:36:45.740 --> 00:36:48.580
You just put the data frame, you know, just data frame.

00:36:48.580 --> 00:36:50.340
And then, bam, it's on your page.

00:36:50.340 --> 00:36:50.760
Nice.

00:36:51.020 --> 00:36:58.760
Anything that is a variable that is on a line by itself, it just assumes you want it to put that output to the HTML.

00:36:58.760 --> 00:37:00.780
And, I mean, how awesome is that?

00:37:00.780 --> 00:37:04.700
I mean, this is like the best, laziest package I've ever seen.

00:37:04.700 --> 00:37:08.020
Productivity, productive laziness or something like that.

00:37:08.020 --> 00:37:09.300
There's got to be a term for it.

00:37:09.300 --> 00:37:09.800
Yeah.

00:37:09.800 --> 00:37:16.460
And working with it for the few hours that I did and to already have a dashboard that doesn't look great,

00:37:16.460 --> 00:37:19.780
but is functioning, I think is pretty impressive.

00:37:20.440 --> 00:37:21.640
Yeah, yeah, it definitely is.

00:37:21.640 --> 00:37:29.420
So, this is something you could publish for people to interact with more real-time data or so they don't have to bother you.

00:37:29.420 --> 00:37:34.000
They can go do the slider themselves or select the thing themselves and they get the answer, right?

00:37:34.000 --> 00:37:35.240
Yeah, exactly.

00:37:35.240 --> 00:37:42.860
And sometimes too many opinions is too much, definitely in racing, because everybody's making decisions from partial information.

00:37:43.000 --> 00:37:57.020
But I still think getting tools like that into as many hands in front of as many eyeballs as possible has got to be an improvement of somebody noticing something that the other people haven't noticed yet.

00:37:57.160 --> 00:37:58.340
And hey, what's with this?

00:37:58.340 --> 00:38:00.160
Or hey, look at this correlation.

00:38:00.160 --> 00:38:11.740
You know, if you do this output metric versus your finishing position and you see a trend of spring rates and things, having all those people poke around at this stuff, because we do have,

00:38:12.100 --> 00:38:18.700
I think our simulation has 634 user inputs right now.

00:38:18.700 --> 00:38:24.500
So, and some of those aren't, some of those are not stuff that you touch all the time.

00:38:24.500 --> 00:38:25.360
A lot of them aren't.

00:38:25.560 --> 00:38:30.760
But there's about 275 things that you set in the model to actually be able to simulate a car.

00:38:30.760 --> 00:38:34.300
And it gets worse every day because things keep getting added to it, right?

00:38:34.300 --> 00:38:35.060
So-

00:38:35.060 --> 00:38:35.360
Right, right.

00:38:35.360 --> 00:38:38.060
Different knobs you can turn, different adjustments you can make.

00:38:38.060 --> 00:38:38.580
Yeah.

00:38:38.580 --> 00:38:40.060
And everything's interactive.

00:38:40.060 --> 00:38:41.760
It's a dynamic system.

00:38:41.760 --> 00:38:43.140
It's not a dynamic part.

00:38:43.140 --> 00:38:49.180
You can't change this spring and change, you can't change one thing and get any benefit.

00:38:49.180 --> 00:38:51.500
You have to change a system of parts.

00:38:51.500 --> 00:38:51.920
Right.

00:38:52.020 --> 00:38:59.220
You change the springs to make them softer, that changes the ride height, which changes the aerodynamics, which changes the wind pressure or whatever, right?

00:38:59.220 --> 00:39:00.020
Like it's all-

00:39:00.020 --> 00:39:00.480
Exactly.

00:39:00.480 --> 00:39:01.620
It's like a whack-a-mole.

00:39:01.620 --> 00:39:03.680
You change one thing, it's going to change a bunch of others.

00:39:03.680 --> 00:39:04.080
Yeah.

00:39:04.080 --> 00:39:05.080
Yep, exactly.

00:39:05.080 --> 00:39:18.260
And you'll have crew chiefs that'll come to you, you know, in eight minutes left in practice and want to change these five things and expect you to know how to set the other things to keep your car from crashing into the ground.

00:39:18.260 --> 00:39:20.080
So it better run quick.

00:39:20.080 --> 00:39:20.560
Yeah.

00:39:20.560 --> 00:39:20.660
Yeah.

00:39:20.820 --> 00:39:22.120
So how do you run these things?

00:39:22.120 --> 00:39:26.380
Is it computationally slow or do you just have a lot of hardware or is it not actually that bad?

00:39:26.380 --> 00:39:28.060
Yes.

00:39:28.060 --> 00:39:32.320
So it depends.

00:39:32.320 --> 00:39:33.280
There's a different aspect.

00:39:33.280 --> 00:39:38.340
There's the full dynamic model and that needs to solve at a thousand hertz.

00:39:38.900 --> 00:39:39.900
So that's a lot of data.

00:39:39.900 --> 00:39:49.140
So that's a lot of data, a lot of decisions being made for how all these parts are moving on the suspension and everything, how the car is sliding with the tires across the pavement.

00:39:49.600 --> 00:40:08.160
That I won't say is slow, but it's way slower than a steady state model, which is getting rid of all the dynamics, basically using a set of data inputs that are super simplified and only solving at 10 hertz.

00:40:08.720 --> 00:40:10.020
So you don't get the same answer.

00:40:10.020 --> 00:40:11.700
So you don't get the same answer.

00:40:11.700 --> 00:40:12.200
Right.

00:40:12.200 --> 00:40:17.640
But like in a case where you need to make a decision really quick and like right now, that is a great tool to have as well.

00:40:17.640 --> 00:40:18.060
Right.

00:40:18.160 --> 00:40:30.700
If you can get an answer that you're 90% sure of in the next 14 seconds, that is way better than getting an answer that you're 95% sure of in 42 minutes.

00:40:30.700 --> 00:40:31.080
Yeah.

00:40:31.080 --> 00:40:32.020
It's exponentially.

00:40:32.020 --> 00:40:40.240
As you get your accuracy, you pay with money, you pay with computational time, you pay with losing the engineer's focus.

00:40:40.240 --> 00:40:47.160
The longer he has to sit there twiddling his thumbs, like he's daydreaming about what he's going to do when the track closes or whatever, you know?

00:40:47.160 --> 00:40:47.480
Right.

00:40:47.480 --> 00:40:51.320
It's easy to lose yourself when you're running 200 sims a week.

00:40:51.320 --> 00:40:52.220
Yeah, I can imagine.

00:40:52.220 --> 00:40:52.520
Wow.

00:40:52.520 --> 00:41:01.420
So one thing I've been thinking about as we're talking is all these different inputs, trying to notice what correlations there might be.

00:41:01.420 --> 00:41:04.180
You have access to a lot of the different cars and whatnot.

00:41:04.180 --> 00:41:09.460
It seems like there's probably a lot of machine learning stuff that you could potentially apply here.

00:41:09.540 --> 00:41:12.140
Like what's the story of machine learning in your world?

00:41:12.140 --> 00:41:13.880
I think it is the future.

00:41:13.880 --> 00:41:23.340
So when I say we have a lot of data, most of our projects, it's not what most people like big data guys would think is big data.

00:41:23.340 --> 00:41:32.940
We don't have a lot of places where we can do like deep learning applications because we just don't have enough of the data that fits in this box.

00:41:32.940 --> 00:41:35.460
We're trying to get very specific answers.

00:41:36.100 --> 00:41:44.100
And even though you have a race with four hours of data, there's a ton of data in there that's completely worthless because the caution came out.

00:41:44.100 --> 00:41:44.800
Right.

00:41:44.800 --> 00:41:53.080
You can't feed that to a training system when over two different races where one part you did that stint with no yellow flag.

00:41:53.160 --> 00:41:56.480
Obviously, higher pressures and temperatures will change.

00:41:56.480 --> 00:41:58.020
The amount of fuel used has changed.

00:41:58.020 --> 00:42:00.100
All those things are just like they're not comparable, right?

00:42:00.100 --> 00:42:00.580
Yeah.

00:42:00.580 --> 00:42:03.980
There's a few places that we've used some deep learning.

00:42:03.980 --> 00:42:04.460
Okay.

00:42:04.460 --> 00:42:05.840
Some photo stuff.

00:42:06.200 --> 00:42:09.120
General Motors provides a photographer to the track.

00:42:09.120 --> 00:42:11.060
Well, during the pandemic, they don't always.

00:42:11.060 --> 00:42:17.500
But they provide a professional photographer to the track to take pictures of all your other cars, all the cars on track.

00:42:17.500 --> 00:42:24.040
So you can say, well, here's their attitude on track and here's our attitude and we're doing it wrong because they're faster than us or whatever.

00:42:24.840 --> 00:42:30.140
But over a weekend, you have about 7,000 photos taken and to go.

00:42:30.140 --> 00:42:41.500
And of course, it comes in with the file name of whatever the camera is set up to produce, which is pretty much meaningless when you want to find all the pictures of the 18 car.

00:42:41.500 --> 00:42:42.280
Right.

00:42:42.280 --> 00:42:49.760
And so you have to look at skim through all these thumbnails of these mixed cars because everybody's on track at the same time.

00:42:49.760 --> 00:42:51.660
So it's not like they're grouped together in any way.

00:42:52.260 --> 00:43:07.700
So one good application is to use NeuralNet to, yeah, I guess I should say convolutional NeuralNet to look at these photos and write new file names and organize them into folders and just take the manual drudgery out of that kind of thing.

00:43:07.700 --> 00:43:08.220
All right.

00:43:08.220 --> 00:43:18.720
Maybe even create a dashboard that says, I want to look at this car and I need to look at it from the side so that I can understand how much it's like tilting forward or whatever, right?

00:43:18.720 --> 00:43:19.120
The rake.

00:43:19.120 --> 00:43:20.840
So show me that.

00:43:20.840 --> 00:43:21.960
Show me that for this car.

00:43:22.120 --> 00:43:23.460
You could probably build that with Streamlight.

00:43:23.460 --> 00:43:24.420
That's a great idea.

00:43:24.420 --> 00:43:25.480
I think I'll build that next week.

00:43:25.480 --> 00:43:26.820
There you go.

00:43:26.820 --> 00:43:30.320
What's crazy is like, I mean, you're joking.

00:43:30.320 --> 00:43:41.660
It theoretically could be a couple of weeks, whereas like 10 years ago, that was like, we're going to need 50 years and a million dollars of research and like a bunch of PhDs.

00:43:41.660 --> 00:43:43.340
And now it's like, maybe we'll do that in this little app.

00:43:43.340 --> 00:43:43.760
Yeah.

00:43:43.760 --> 00:43:44.680
Our cute little app.

00:43:45.160 --> 00:43:45.600
Yeah.

00:43:45.600 --> 00:43:50.480
So a lot of the performance stuff, we have enough data during the race to use some deep learning.

00:43:50.480 --> 00:44:00.100
But I really think the simpler just regression analysis and classification analysis types of things where you're looking at data.

00:44:00.100 --> 00:44:06.380
You take all the metrics of output of these different cars and you split it up around the track.

00:44:06.380 --> 00:44:11.720
And then you train a fairly simplified model on what do the fast cars have in common?

00:44:11.720 --> 00:44:13.480
What do the slow cars have in common?

00:44:13.480 --> 00:44:18.020
And let's not be like the slow cars because there is so much data.

00:44:18.020 --> 00:44:20.300
It's hard to say what knob does matter.

00:44:20.300 --> 00:44:22.820
What knob is the crucial thing?

00:44:22.820 --> 00:44:24.700
So that's the direction we're going.

00:44:24.700 --> 00:44:26.200
And I'm excited about it.

00:44:26.200 --> 00:44:33.800
Building some new skills and being given the opportunity to apply them in so many different aspects of the job is just huge.

00:44:33.800 --> 00:44:34.380
Keep it.

00:44:34.380 --> 00:44:35.140
Keep me motivated.

00:44:35.140 --> 00:45:05.120
Keep me motivated.

00:45:05.120 --> 00:45:12.440
Or ditch that unused subscription for our course bundles, which include all the courses and you pay about the same price as a subscription once.

00:45:12.440 --> 00:45:19.740
For details, visit training. talkpython.fm/business or just email sales at talkpython.fm.

00:45:21.680 --> 00:45:22.820
Yeah, I can imagine.

00:45:22.820 --> 00:45:29.220
And racing is one of those things that's pretty interesting because there's a lot of bespoke engineering that happens.

00:45:29.220 --> 00:45:31.820
Like one-off custom engineering.

00:45:31.820 --> 00:45:32.420
Yeah.

00:45:32.420 --> 00:45:35.560
There's a team of people that are building stuff and adjusting stuff.

00:45:35.560 --> 00:45:38.860
It's not like, well, these are the three things I can get from the parts store.

00:45:38.860 --> 00:45:39.820
I'm going to stick on here.

00:45:39.820 --> 00:45:42.820
Like, you guys are like, well, it would be better if it was like this.

00:45:42.920 --> 00:45:44.540
Let's go build that and try it.

00:45:44.540 --> 00:45:44.900
Right.

00:45:44.900 --> 00:45:45.020
Right.

00:45:45.020 --> 00:45:45.600
Yeah.

00:45:45.600 --> 00:45:49.200
And our hands have been tied quite a bit recently with the rules package.

00:45:49.640 --> 00:45:51.660
And we can't do a lot of that anymore.

00:45:51.660 --> 00:45:55.720
All the parts have to be submitted to NASCAR ahead of time.

00:45:55.720 --> 00:45:58.060
And then they judge whether they like it or not.

00:45:58.060 --> 00:46:02.680
And if it's too different from anybody else, they won't approve it.

00:46:03.140 --> 00:46:06.840
So it turns into a bit of a cat and mouse game where you're trying to sneak stuff around.

00:46:06.840 --> 00:46:14.760
And every once in a while, you'll see somebody get caught with something, some unapproved part, and they get a $100,000 fine and their hands slapped.

00:46:14.760 --> 00:46:15.320
Yeah.

00:46:15.320 --> 00:46:16.660
You know, but that's a real deal.

00:46:16.660 --> 00:46:17.860
Yeah, I can imagine.

00:46:17.860 --> 00:46:19.540
Every little bit is an edge.

00:46:19.540 --> 00:46:21.620
And, you know, you got to push it to the limit.

00:46:21.620 --> 00:46:22.560
Yeah, for sure.

00:46:22.560 --> 00:46:35.240
But I think a lot of people take for granted how much tech is in NASCAR because they look at the somewhat antiquated cars with a rear suspension from a 1956 Chevrolet pickup, and they can't understand.

00:46:35.240 --> 00:46:49.300
But the science behind trying to make a 3,500-pound car with a truck suspension go fast is actually pretty impressive because, I mean, the Formula One car is absolutely designed to be unbelievable race cars.

00:46:49.300 --> 00:46:50.800
But we're not allowed to do that.

00:46:51.200 --> 00:46:58.380
So you have to use a lot of weird tricks and things to get these things to go fast and handle well.

00:46:58.380 --> 00:47:00.000
And so it's a little bit different.

00:47:00.000 --> 00:47:04.880
I think from an engineering standpoint, the jobs in the different series is quite a bit different.

00:47:04.880 --> 00:47:07.140
I think NASCAR and IndyCar are pretty similar.

00:47:07.140 --> 00:47:10.320
You see people going back and forth between those series.

00:47:10.320 --> 00:47:12.080
You don't see a lot of Formula One guys.

00:47:12.080 --> 00:47:17.680
Yeah, both of those series have the somewhat spec aspect to it, right?

00:47:17.680 --> 00:47:20.660
Like a lot of rules about we're kind of going to agree on this part.

00:47:20.660 --> 00:47:26.200
IndyCar goes here or IndyCar is the same chassis as all Dallara chassis or something like that, right?

00:47:26.200 --> 00:47:26.820
Right.

00:47:26.820 --> 00:47:27.240
Yeah.

00:47:27.240 --> 00:47:30.080
But I think the jobs are quite a bit different too.

00:47:30.080 --> 00:47:36.340
If a race team has 300 employees, they might only have 25 engineers in NASCAR.

00:47:36.340 --> 00:47:44.960
In Formula One, if they have 300 employees, my understanding is that almost 300 of them have an engineering degree.

00:47:45.120 --> 00:47:45.500
Exactly.

00:47:45.500 --> 00:47:50.400
And they're back there building carbon-carbon adapters or for who knows what, right?

00:47:50.400 --> 00:47:51.120
Yeah.

00:47:51.120 --> 00:47:56.260
And I think that we had a few Formula One people come in and work at Richard Childress a few years ago.

00:47:56.760 --> 00:48:02.960
And the parts that they had worked on, they were incredibly talented at that aspect.

00:48:02.960 --> 00:48:09.480
But like in NASCAR, because you have fewer people, you can't just be a tire guy, really.

00:48:09.480 --> 00:48:18.940
Like as a race engineer, you need to be over the full spectrum of working on every aspect of this car to even hope the thing is going to go fast.

00:48:18.940 --> 00:48:19.280
Yeah.

00:48:19.280 --> 00:48:25.560
And if you had 30 or 40 people all working on the little details, it'd be better, but our budgets just aren't there.

00:48:25.560 --> 00:48:26.560
Right, right.

00:48:26.560 --> 00:48:28.900
I don't know what the NASCAR price is.

00:48:28.900 --> 00:48:29.640
Maybe you tell me.

00:48:29.640 --> 00:48:34.360
To run an IndyCar, I think, is about $15 million per year.

00:48:34.360 --> 00:48:35.920
Run a Formula One car.

00:48:35.920 --> 00:48:42.060
You know, Ferrari and Mercedes are spending like $300, $400 million a year.

00:48:42.060 --> 00:48:42.920
Yeah.

00:48:44.120 --> 00:48:46.600
That's a 10X or 20X difference.

00:48:46.600 --> 00:48:50.360
That means a really different constraints if you can operate with those two numbers.

00:48:50.360 --> 00:48:50.960
Yeah.

00:48:50.960 --> 00:48:57.180
There's nobody spending $100 million that I'm aware of running, you know.

00:48:57.180 --> 00:49:02.940
You have to keep in mind, too, that the Formula One cars, they're only running two cars.

00:49:02.940 --> 00:49:03.480
Yeah.

00:49:03.480 --> 00:49:04.000
Right?

00:49:04.000 --> 00:49:07.820
And so they have all that resource and they're still only running two cars.

00:49:07.820 --> 00:49:09.180
So they're only paying two drivers.

00:49:09.180 --> 00:49:13.400
You look at a Hendrick Motorsports or something and they have four drivers that you're paying.

00:49:13.480 --> 00:49:15.740
The driver's the most expensive part, for sure.

00:49:15.740 --> 00:49:19.760
Besides maybe that adapter that measures the wheel that you don't want to crash.

00:49:19.760 --> 00:49:20.320
Yeah.

00:49:20.320 --> 00:49:21.980
No, the driver.

00:49:21.980 --> 00:49:25.340
Most drivers are still way more expensive than that.

00:49:25.340 --> 00:49:27.540
But when they win, it's worth it, right?

00:49:27.540 --> 00:49:28.060
Right.

00:49:28.060 --> 00:49:28.560
Yeah.

00:49:28.560 --> 00:49:31.600
I haven't looked at much of the budget stuff in a long time.

00:49:31.600 --> 00:49:36.280
What I'll say is there's a huge gap in what kind of team you're running.

00:49:36.280 --> 00:49:41.020
The guys that are out there running 35th to 40th are doing it pretty cheap.

00:49:41.400 --> 00:49:47.040
The cars themselves aren't ridiculously expensive because it's old tech and there's, you know,

00:49:47.040 --> 00:49:48.540
we can't do carbon bodies.

00:49:48.540 --> 00:49:53.060
I mean, we have some carbon parts, but teams don't have autoclays where they're making a

00:49:53.060 --> 00:49:54.060
monocoque, right?

00:49:54.240 --> 00:50:01.380
But I think that going on the budget, I think the last number I heard, it was about $150,000

00:50:01.380 --> 00:50:03.600
a week, you know, an event.

00:50:03.600 --> 00:50:08.500
So if you do, as good as I am at math and science, I'm terrible at basic math.

00:50:08.500 --> 00:50:15.220
So whatever 150,000 times 38 is, is a pretty decent number.

00:50:15.220 --> 00:50:15.780
Yeah.

00:50:15.880 --> 00:50:16.800
5.7 million.

00:50:16.800 --> 00:50:17.420
Yeah.

00:50:17.420 --> 00:50:17.780
Nice.

00:50:17.780 --> 00:50:18.360
Yeah.

00:50:18.360 --> 00:50:20.180
So there's a big difference there.

00:50:20.180 --> 00:50:20.640
Yeah.

00:50:20.640 --> 00:50:20.980
Yeah.

00:50:20.980 --> 00:50:21.340
For sure.

00:50:21.340 --> 00:50:24.220
You know, but there's a lot of benefits to keeping your costs down too.

00:50:24.220 --> 00:50:24.520
Yeah.

00:50:24.520 --> 00:50:24.940
Oh yeah.

00:50:24.940 --> 00:50:28.760
Because when you're looking at the sponsorship and you're trying to make the sponsor dollar

00:50:28.760 --> 00:50:33.040
go as far as possible, you know, being much cheaper is better.

00:50:33.040 --> 00:50:33.640
Yeah.

00:50:34.020 --> 00:50:37.460
Well, and it means that the sport could be more vibrant, right?

00:50:37.460 --> 00:50:39.980
Like if one team drops out, another can come in.

00:50:39.980 --> 00:50:42.380
It's not like they have to come up with half a billion dollars.

00:50:42.380 --> 00:50:42.780
Right.

00:50:42.780 --> 00:50:43.360
Right.

00:50:43.360 --> 00:50:44.540
Or something insane, right?

00:50:44.540 --> 00:50:47.620
And an engineering factory and all that kind of stuff.

00:50:47.620 --> 00:50:49.860
So yeah, it's definitely an interesting angle.

00:50:49.860 --> 00:50:53.340
So let's maybe just wrap up our show on this, which has been really, really fun.

00:50:53.540 --> 00:51:01.000
Just to maybe get your thoughts on this idea of open source and Python, both for ramping

00:51:01.000 --> 00:51:05.480
up the capabilities, but also opening up the possibilities, right?

00:51:05.480 --> 00:51:09.120
You don't have to buy expensive licenses to custom modeling software and whatnot.

00:51:09.120 --> 00:51:14.960
How do you see that affecting the advantage of your team or the industry in general?

00:51:14.960 --> 00:51:15.320
Yeah.

00:51:15.320 --> 00:51:16.900
I think it's going to be the way of the future.

00:51:16.900 --> 00:51:20.180
I mean, I don't see why you would buy a MATLAB license now.

00:51:20.180 --> 00:51:20.520
Yeah.

00:51:20.880 --> 00:51:26.980
Definitely, if you're having young engineers coming in that haven't ever used MATLAB and

00:51:26.980 --> 00:51:31.440
to have that be your standard, I feel like the learning curve of MATLAB is just much more

00:51:31.440 --> 00:51:31.780
difficult.

00:51:31.780 --> 00:51:37.680
Getting it all right, getting things to work, especially the file input, output aspects that

00:51:37.680 --> 00:51:38.680
I always struggle.

00:51:38.680 --> 00:51:44.020
I had a ton of experience with MATLAB and I still struggled with, oh, I've got an XML I've

00:51:44.020 --> 00:51:44.440
got to get.

00:51:44.440 --> 00:51:46.140
Okay, well, how do I even do that?

00:51:46.140 --> 00:51:48.140
And, you know, or JSON or something.

00:51:48.660 --> 00:51:53.840
And with pandas, you just, it's one line and it interprets what you, what it thinks you

00:51:53.840 --> 00:51:54.760
mean it to be.

00:51:54.760 --> 00:51:57.200
And it, I think it's going to be the wave of the future.

00:51:57.200 --> 00:51:59.820
And for race teams, free is always better.

00:51:59.820 --> 00:52:02.380
Cheap is not always good, but free is better.

00:52:02.380 --> 00:52:02.760
Right.

00:52:02.880 --> 00:52:09.220
And the other angle is you can bring in people who are not potentially trained, you know,

00:52:09.220 --> 00:52:14.540
brought up through the engineering side or the math and MATLAB side of things, right?

00:52:14.540 --> 00:52:19.300
You could find somebody who was working at a startup, but is passionate about this and they're

00:52:19.300 --> 00:52:21.340
really good at Python and data science.

00:52:21.340 --> 00:52:24.520
They could maybe make that transition over potentially.

00:52:24.920 --> 00:52:25.540
Yeah, absolutely.

00:52:25.540 --> 00:52:30.940
I mean, that's what I was saying before, the science of what you do, it doesn't matter if

00:52:30.940 --> 00:52:37.020
you're, if you're working at Caterpillar or a race team or, you know, a toilet paper factory,

00:52:37.020 --> 00:52:42.900
the way that you're studying the data, all the data science stuff, it applies to every field in the,

00:52:42.900 --> 00:52:43.900
in the universe.

00:52:43.900 --> 00:52:49.360
So that's absolutely true that you could bring in some excellent programmers.

00:52:49.360 --> 00:52:53.580
The one thing I will say, and we have some excellent programmers that are the ones who

00:52:53.580 --> 00:52:56.260
actually do our simulation department and everything.

00:52:56.260 --> 00:52:59.560
And, but they don't necessarily come from a racing background.

00:52:59.560 --> 00:53:03.920
And the one thing I'll say, like I said, I was passionate about UX.

00:53:03.920 --> 00:53:09.340
The biggest thing we fight with them is trying to get them to do it the way we want.

00:53:09.340 --> 00:53:09.780
Right.

00:53:09.780 --> 00:53:11.660
Not the easiest way to code.

00:53:11.660 --> 00:53:12.160
Yeah.

00:53:12.720 --> 00:53:14.960
Because I need flexible tools.

00:53:14.960 --> 00:53:19.260
I need a lot of buttons and things to be able to manipulate this the way I want.

00:53:19.260 --> 00:53:24.800
And it's like one of our programmers, he was doing a job for me and he delivered it to me.

00:53:24.800 --> 00:53:26.280
And I'm like, what is this?

00:53:26.280 --> 00:53:28.700
This is nothing like what we discussed.

00:53:28.700 --> 00:53:30.540
Like, where is this part of it?

00:53:30.540 --> 00:53:31.480
And where is this part?

00:53:31.480 --> 00:53:33.040
How did you not include this?

00:53:33.040 --> 00:53:35.140
And he's a Spanish guy.

00:53:35.140 --> 00:53:37.020
I won't try to mimic his accent.

00:53:37.020 --> 00:53:38.560
He's an ex-Formula 1 guy too.

00:53:38.560 --> 00:53:39.700
Brilliant programmer.

00:53:39.700 --> 00:53:41.420
But he explained it to me.

00:53:41.780 --> 00:53:46.480
He said, well, when we talked about the project, you explained a lot of things and I didn't see why they were needed.

00:53:46.480 --> 00:53:48.580
Here's what you need to understand.

00:53:48.580 --> 00:53:54.680
If you hand me a banana and tell me to eat it and don't tell me to peel it, I will eat it unpeeled.

00:53:55.240 --> 00:53:59.300
But no, he's a great guy.

00:53:59.300 --> 00:54:01.300
And we're doing a lot of good work right now.

00:54:01.300 --> 00:54:08.920
He's building a data store to be a server-based data store for all these dashboards to be able to work flawlessly across.

00:54:08.920 --> 00:54:10.200
We're all over the country, right?

00:54:10.200 --> 00:54:15.200
So you need to have a good data system and you need to keep that data synced.

00:54:15.440 --> 00:54:19.980
So if somebody does an analysis and posts it up, it needs to change on everybody's computer.

00:54:19.980 --> 00:54:20.480
Right.

00:54:20.680 --> 00:54:31.980
But the synchronization part is tough problems still with if you have a database and there's 18 people across the company editing the same setup, like how do you merge all that stuff?

00:54:31.980 --> 00:54:35.740
And so that has been the bane of my existence for a long time.

00:54:36.020 --> 00:54:40.520
Yeah, I'm sure to keep all that data in sync and you're going to run a report and expect an answer out of it.

00:54:40.520 --> 00:54:45.860
You want to run it against the same data because otherwise you want to run it on sale data and all that kind of stuff, right?

00:54:45.860 --> 00:54:46.360
Oh, yeah.

00:54:46.360 --> 00:54:47.360
Yeah, absolutely.

00:54:47.360 --> 00:54:53.600
Well, thank you so much for sharing your story about how you're using Python and over at the race team.

00:54:53.600 --> 00:54:55.060
That's just fantastic.

00:54:55.060 --> 00:54:57.960
Now, before we get out of here, though, I've got to ask you the final two questions.

00:54:57.960 --> 00:54:58.600
Oh, yeah.

00:54:58.600 --> 00:55:02.600
If you're going to write some Python code, what editor do you use?

00:55:02.600 --> 00:55:07.520
If it's an analysis project, I almost always start with Jupyter Notebook.

00:55:07.520 --> 00:55:08.000
Okay.

00:55:08.000 --> 00:55:09.660
Jupyter or Jupyter Lab.

00:55:09.660 --> 00:55:11.100
Which one are you on right now?

00:55:11.100 --> 00:55:11.700
Jupyter.

00:55:11.700 --> 00:55:12.180
Okay.

00:55:12.180 --> 00:55:18.380
And that lets me do my old MATLAB, like searching around where I can print out the data.

00:55:18.380 --> 00:55:23.860
And just it's a visual thing for me to understand how the flow of this analysis needs to go.

00:55:23.860 --> 00:55:35.140
And then generally what I'll do is once I get done, I'll merge that all into one cell and put it in VS Code for when it's ready to actually be used on a regular basis.

00:55:35.140 --> 00:55:41.100
That way I don't have to go through and click all the cells and, well, this thing was out of order and this thing was, you know.

00:55:41.100 --> 00:55:41.420
Yeah.

00:55:41.420 --> 00:55:43.820
The Jupyter is a gift and also a curse.

00:55:43.820 --> 00:55:44.220
Yeah.

00:55:44.220 --> 00:55:54.900
It's a little bit like Excel in that regard that it has like these implicit go-tos, not because the control flow, but because you could go back three cells, run that thing and then jump down five cells and run the next one.

00:55:54.900 --> 00:55:59.380
And it looks like in order, like they happened in order, but no, you've got to read that little execution number.

00:55:59.380 --> 00:56:04.820
Then there's missing numbers that you don't really know what they maybe did, but there's no more evidence of them.

00:56:04.820 --> 00:56:06.580
It's very tricky in that regard.

00:56:06.580 --> 00:56:10.140
So I think productizing straight Python files makes a lot of sense.

00:56:10.140 --> 00:56:10.560
Yeah.

00:56:10.560 --> 00:56:11.240
Yeah.

00:56:11.240 --> 00:56:13.380
So that's my typical workflow.

00:56:13.380 --> 00:56:14.140
Yeah.

00:56:14.140 --> 00:56:14.840
That sounds good.

00:56:14.840 --> 00:56:16.380
And then notable PyPI package.

00:56:16.380 --> 00:56:26.120
I know everybody's heard about Black, but for anybody who uses Jupyter, there's another package called Black Cell Magic that lets you apply Black's formatting inside a Jupyter notebook.

00:56:26.120 --> 00:56:27.220
And so.

00:56:27.220 --> 00:56:28.100
Oh my goodness.

00:56:28.100 --> 00:56:34.460
So that keeps even like my workbook, things that never make it to production, at least formatted right and looking nice.

00:56:34.460 --> 00:56:40.680
And then I can't say enough about OpenPixel, which is an Excel, a Python Excel interface.

00:56:40.680 --> 00:56:46.140
It provides all the functionality of cell colors and borders.

00:56:46.140 --> 00:56:54.000
You could program it all just by typing it out instead of clicking through 8,000 Excel pop-up windows and things.

00:56:54.000 --> 00:56:54.600
That's cool.

00:56:54.600 --> 00:57:00.460
And this gives you, this is like your bridge to all the people who have legacy Excel stuff laying around or they want to work in Excel and they're like Excel.

00:57:00.460 --> 00:57:01.240
And they're like, here you go.

00:57:01.240 --> 00:57:03.040
You're like, ah, I'm not doing VBA.

00:57:03.040 --> 00:57:03.500
Hold on.

00:57:03.580 --> 00:57:03.980
Yeah.

00:57:03.980 --> 00:57:04.400
No.

00:57:04.400 --> 00:57:09.780
And when a crew chief can only use Excel, you have to pass them an Excel sheet at the end of the day.

00:57:09.780 --> 00:57:10.140
Yeah.

00:57:10.140 --> 00:57:11.560
So that has been a blessing.

00:57:11.560 --> 00:57:19.680
And then the one thing I found out today when I went and downloaded, when I was going through the documentation on Streamlit is they have a new Streamlit for Teams coming out.

00:57:19.680 --> 00:57:20.680
I don't know if you've seen that.

00:57:20.680 --> 00:57:20.960
Yeah.

00:57:20.960 --> 00:57:24.360
That's going to have one click server deployment for your app.

00:57:24.360 --> 00:57:25.200
So you can work.

00:57:25.200 --> 00:57:25.920
That's going to be sweet.

00:57:25.920 --> 00:57:27.060
Work together and everything.

00:57:27.060 --> 00:57:29.380
So definitely check that out if you haven't.

00:57:29.380 --> 00:57:29.660
All right.

00:57:29.660 --> 00:57:30.000
Awesome.

00:57:30.000 --> 00:57:31.100
Very good recommendations.

00:57:31.100 --> 00:57:31.720
Okay.

00:57:31.720 --> 00:57:32.600
Final call to action.

00:57:32.600 --> 00:57:33.920
People are excited about this stuff.

00:57:33.920 --> 00:57:36.780
Maybe making Python a bigger part of their engineering story.

00:57:36.780 --> 00:57:37.460
What do you say?

00:57:37.460 --> 00:57:38.160
I like it.

00:57:38.160 --> 00:57:38.920
They got to do it.

00:57:38.920 --> 00:57:40.160
It's a friendly environment.

00:57:40.160 --> 00:57:42.500
Great places to learn all over the internet.

00:57:42.500 --> 00:57:43.820
Also mostly free.

00:57:44.260 --> 00:57:49.800
And I guess the other thing I'd like to say is just shout out to all my teammates in case anybody listens to this.

00:57:49.800 --> 00:57:53.600
They probably hear me talk about Python enough, but we won.

00:57:53.600 --> 00:57:56.240
We finished first and second in the race on Sunday.

00:57:56.240 --> 00:57:58.580
So shout out to Austin Dillon for.

00:57:58.580 --> 00:58:00.320
What event was that?

00:58:00.320 --> 00:58:01.140
It was Texas.

00:58:01.140 --> 00:58:02.200
Texas Motor Speedway.

00:58:02.200 --> 00:58:02.680
Yeah.

00:58:02.680 --> 00:58:02.860
Cool.

00:58:02.860 --> 00:58:03.420
All right.

00:58:03.580 --> 00:58:04.020
Congratulations.

00:58:04.020 --> 00:58:08.360
And I guess it's cool to know a little bit of Python was behind the scenes there, huh?

00:58:08.360 --> 00:58:08.960
Oh, yeah.

00:58:08.960 --> 00:58:09.380
Yeah.

00:58:09.380 --> 00:58:10.040
Winning races.

00:58:10.040 --> 00:58:10.700
Right on.

00:58:10.700 --> 00:58:15.800
And I will mention that there's another race tomorrow night, Thursday, on the NBC Streaming Network.

00:58:15.800 --> 00:58:16.260
Cool.

00:58:16.260 --> 00:58:17.400
In Kansas.

00:58:17.400 --> 00:58:19.160
So definitely check that out.

00:58:19.160 --> 00:58:19.620
Right on.

00:58:19.620 --> 00:58:20.060
Awesome.

00:58:20.060 --> 00:58:21.960
Well, Kane, thanks again for being on the show.

00:58:21.960 --> 00:58:23.780
It was really good to hear your story.

00:58:23.780 --> 00:58:25.420
And it's inspiring what you're doing.

00:58:25.420 --> 00:58:25.760
Yeah.

00:58:25.800 --> 00:58:26.940
Thanks so much for having me.

00:58:26.940 --> 00:58:28.840
I really enjoyed it and love the show.

00:58:28.840 --> 00:58:29.500
Yeah.

00:58:29.500 --> 00:58:30.060
See you later.

00:58:30.060 --> 00:58:30.480
All right.

00:58:30.480 --> 00:58:30.640
Bye.

00:58:30.640 --> 00:58:34.660
This has been another episode of Talk Python To Me.

00:58:34.660 --> 00:58:37.800
Our guest on this episode was Robert Kane Replical.

00:58:37.800 --> 00:58:40.820
And it's been brought to you by SonarCube and Linode.

00:58:40.820 --> 00:58:46.380
SonarCube finds bugs, vulnerabilities, code smells, and security hotspots in your code.

00:58:46.380 --> 00:58:47.440
Try it out today.

00:58:47.440 --> 00:58:48.480
It's free to use.

00:58:48.480 --> 00:58:52.920
Just visit talkpython.fm/sonar and click download to get started.

00:58:52.920 --> 00:58:54.920
That's S-O-N-A-R.

00:58:55.240 --> 00:58:56.800
Or just click the link in your podcast player.

00:58:56.800 --> 00:59:01.560
Start your next Python project on Linode's state-of-the-art cloud service.

00:59:01.560 --> 00:59:04.340
Just visit talkpython.fm/Linode.

00:59:04.340 --> 00:59:05.880
L-I-N-O-D-E.

00:59:05.880 --> 00:59:09.180
You'll automatically get a $20 credit when you create a new account.

00:59:09.180 --> 00:59:11.300
Want to level up your Python?

00:59:11.300 --> 00:59:16.160
If you're just getting started, try my Python Jumpstart by Building 10 Apps course.

00:59:16.160 --> 00:59:21.260
Or if you're looking for something more advanced, check out our new async course that digs into

00:59:21.260 --> 00:59:24.340
all the different types of async programming you can do in Python.

00:59:24.640 --> 00:59:28.280
And of course, if you're interested in more than one of these, be sure to check out our

00:59:28.280 --> 00:59:28.960
everything bundle.

00:59:28.960 --> 00:59:30.880
It's like a subscription that never expires.

00:59:31.280 --> 00:59:34.920
Be sure to subscribe to the show.

00:59:34.920 --> 00:59:39.520
This is your host, Michael Kennedy.

00:59:39.520 --> 00:59:47.740
This is your host, Michael Kennedy.

00:59:47.740 --> 00:59:49.240
Thanks so much for listening.

00:59:49.240 --> 00:59:50.280
I really appreciate it.

00:59:50.280 --> 00:59:52.040
Now get out there and write some Python code.

00:59:52.040 --> 00:59:56.000
Thank you.

00:59:56.000 --> 01:00:25.980
Thank you.

