Latest / Talk Python To Me / #54: Enterprise Software with Python
Transcript
- 0:00How often have people asked what language or technology you work in?
- 0:02When you answer Python, they get a little confused and ask,
- 0:04what can you actually build in Python? What type of apps?
- 0:07Implication being that Python is just a notch above Bash scripts,
- 0:10and that real things aren't built with Python, but rather with Java, C#, Objective-C, and so on.
- 0:15Mahmoud Hashemi and I might be able to help put some real evidence behind your responses.
- 0:19On episode 54, Talk Python To Me, I talk with Mahmoud about his new online course
- 0:24he wrote for O'Reilly called Enterprise Software in Python.
- 0:27You'll hear many real-world examples from his experience inside PayPal,
- 0:31and many more throughout the industry.
- 0:33This is episode 54 of Talk Python To Me, recorded April 4th, 2016.
- 0:55It's about design patterns. Anyone can get the job done. It's the execution that matters.
- 1:00Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem,
- 1:06and the personalities. This is your host, Michael Kennedy. Follow me on Twitter where I'm at,
- 1:11mkennedy. Keep up with the show and listen to past episodes at talkpython.fm,
- 1:16and follow the show on Twitter via at Talk Python.
- 1:19This episode is brought to you by SnapCI and Hired. Thank them for supporting the show on Twitter via
- 1:25at Snap underscore CI and at Hired underscore HQ.
- 1:30The news this week is all about online courses. You'll want to be sure that you're a friend of the show
- 1:34because we have two cool giveaways. Just drop by talkpython.fm and click on Friends of the Show
- 1:40in the navbar to become eligible.
- 1:41Mahmoud is giving away a copy of his online course which normally sells for $149.
- 1:46I'll pick one lucky friend of the show later this week to receive a copy.
- 1:49You can find the links to his course in the show notes for this episode.
- 1:53Speaking of online courses, my Python jumpstart by building 10 apps is out and people are really loving it.
- 1:58I thought I'd join Mahmoud and give away a copy or two this week as well.
- 2:01You can see the details of my course at talkpython.fm/course.
- 2:05Now let's talk about Enterprise Python.
- 2:07Mahmoud, welcome to the show. Welcome back to the show.
- 2:11It's great to be back.
- 2:13Yeah, I really enjoyed the episodes we've done before and this is actually your third appearance.
- 2:18You were on as the main guest in episode four where we talked about the myth of Enterprise Python
- 2:26which was based on an article.
- 2:28That was sort of when this was kicking all off. That's right.
- 2:31Yeah, the 10 myths of Enterprise Python blog posts.
- 2:35That's right. This is like the germ or the seed that generated this course that we're going to talk about, right?
- 2:40It's been a wild and crazy ride. That's right.
- 2:43I bet it has.
- 2:43And then you gave some cool inside information on how you guys think about hiring and junior engineers back in episode 41.
- 2:51And this is going to be episode 54.
- 2:53So I'm instituting a new rule.
- 2:54You're not allowed to come back on the show unless there's a four in the number.
- 2:58That seems like a fine rule to me.
- 3:00I can like, so at least 10 more episodes.
- 3:04I can probably drum up something in that time.
- 3:06Perfect, perfect.
- 3:08All right, so people heard your story back on show four.
- 3:12So we won't go sort of through how you got back into programming, even though that's the question I often ask people.
- 3:17Instead, I'd like to hear how you got into enterprise programming.
- 3:21And what was the step where you went from just, I'm doing programming, I'm doing Python,
- 3:25to I'm now working at a company that has more employees than some small towns?
- 3:31You know, that's actually something that recently I was forced to sort of ponder a lot on, you know,
- 3:38like just had some really deep shower thoughts, as it were.
- 3:42And so, yeah, I sort of fell into it, as I'm sure so many do.
- 3:49Like you get an internship at a company and they assign you kind of, you know,
- 3:55maybe the worst stuff that you can do within three months.
- 3:59Like they want you to do something, but they don't want it to be like, you know, super, super glamorous.
- 4:04They give that to their star engineers who already have full-time positions.
- 4:07So, you know, as an intern, I was doing some really niche log analysis stuff.
- 4:13And so, you know, I actually define enterprise software in my course.
- 4:20And, you know, one of the main things that makes software enterprise isn't that it's high performance or something like that.
- 4:26It's actually that it's very niche, you know, has a very constrained user base that's interested in certain things.
- 4:31And so, you know, I just started out doing really niche applications because I love software introspectability so much.
- 4:38You know, if you tell me, hey, go analyze these logs, go find out what's slowing this application down,
- 4:43that's something that even now I can't really resist.
- 4:46Yeah, that's really cool.
- 4:47Those types of enterprise apps are pretty different.
- 4:51I spent a long time working at a company, I guess probably six, seven years, one of my first jobs,
- 4:57working at a company where I think there was maybe a maximum of 25 employees.
- 5:01And we were writing internal software to do all sorts of cool stuff at this place where we did eye tracking.
- 5:08And we'd write custom apps to sort of, you know, collect various specific studies that the scientists want to do with eye tracking and things like that.
- 5:16And I think we wrote some really powerful and beautiful software, but it was for like 10 people.
- 5:21You know, and so that's, it's not sort of the scalable sort of advertisement driven concept of like Pinterest and hockey curve growth and all that.
- 5:31But it's the people who use that software, like their jobs, like the whole company depends on that software.
- 5:38So it's pretty interesting to live in that space.
- 5:40They don't really have a, they don't really have a choice, you know.
- 5:43So like, I mean, that's kind of what makes a lot of things enterprise.
- 5:48That's sort of the stuff that makes a lot of enterprise stuff kind of bad.
- 5:52But we can probably go into that later.
- 5:54Yeah.
- 5:55The whole battleship gray, I don't need to know design, just because I'm a programmer, that kind of thing.
- 6:00Yeah, that sort of thing.
- 6:01You know, there's no, there's no alternative.
- 6:04So you don't spend any time actually making stuff good.
- 6:07That's one approach some people take.
- 6:09You know, I'm not for that approach personally.
- 6:11Yeah.
- 6:11I think that used to fly, especially in the 90s when you write enterprise software, it could be seriously unusable.
- 6:18But ever since the iPhone came out and people have gotten used to really beautiful, nice computing experiences,
- 6:29they're like, why do I have to go to work and have this horrible computing experience, right?
- 6:32That has, that has actually left its mark.
- 6:35I agree.
- 6:37I mean, there are pros to that and there are cons to that.
- 6:39Now I see a lot of stuff getting polished a whole lot, but the underlying quality is still lacking.
- 6:46So, you know, there are lots of ways to compromise quality.
- 6:49And enterprise will always find a new way.
- 6:52That's right.
- 6:53Yeah.
- 6:54So, you know, I have this, like, you know, hopefully we'll get to cover a little bit about, you know, how to sort of mitigate that with the power of Python.
- 7:02Yeah, absolutely.
- 7:03So, one concept I'd kind of like to introduce near the beginning before we get into the course is just that when you think of enterprise developers,
- 7:11and you can maybe put Python to the side for just a moment and just say, like, across all technologies,
- 7:17a lot of times there absolutely are super smart people writing amazing software, but maybe they're just going to work and they're just doing their job and they're not going and speaking at the conferences and they're not on Twitter constantly blogging and tweeting about, you know, whatever it is that they're doing.
- 7:35They just go do their job and they go away.
- 7:38And so I think that we probably underestimate the impact and the number of people that kind of live in this space because they're not necessarily as vocal.
- 7:48Yeah.
- 7:49And, I mean, I don't know.
- 7:52I'm not really for the cult of personality, like, you know, rock star coder type stuff.
- 7:56I think that, like, every developer has a rock star within them.
- 8:02I know because, I mean, you know, they talk about 10x programmers, like, and some people say, hey, they don't exist.
- 8:09And other people say, hey, they do exist.
- 8:10And it's, like, a little bit like this big foot of developers.
- 8:13And I don't know why it's so controversial, why it has to be like that.
- 8:17Everyone has within them, like, a 10x developer.
- 8:20If you're struck with the right idea, you know, you will work tirelessly and learn so much within the span of just a couple of weeks.
- 8:27And, you know, the rest of the time, like you said, you have a normal work-life balance and you have a day job and that's totally fine.
- 8:34But 10x developers do exist and they're within all of us.
- 8:37That's what I choose to believe.
- 8:38I totally agree with you.
- 8:39I think if you were, like you said, struck with inspiration, you can do almost superhuman type of work.
- 8:48So focused, so effective.
- 8:49And on one hand, it'd be cool if we could always be that focused and effective.
- 8:53But, you know, that's how inspiration works, right?
- 8:56If you both have the time and the energy and the idea all coming together, you could be that 10x developer for that project or whatever.
- 9:04Right.
- 9:05I mean, you won't believe this, you know, looking at my GitHub or my Twitter or whatever, right?
- 9:09But I do think that there is much more to life than just code.
- 9:14So, yeah.
- 9:16Yeah, same here.
- 9:17But I try to keep it basically to technology on Twitter as well.
- 9:21So it's hard to tell.
- 9:22So let's talk about your course.
- 9:26So it's called Enterprise Software with Python, right?
- 9:30And you're distributing this through O'Reilly.
- 9:32Is that right?
- 9:33That's right.
- 9:34So I think that basically because of the 10 minutes of Enterprise Python blog post, they actually contacted me a little bit before we did episode number four.
- 9:45And they're like, hey, would you like to expand upon this and do a project on Enterprise Software?
- 9:53And, you know, I really hemmed and hawed.
- 9:55I'm sort of more of an engineer.
- 9:57I'm a builder, you know.
- 9:58And I have a lot of reservations around education.
- 10:02Like I'm a firm believer in education, but it's very time consuming.
- 10:06My dad, you know, he's a professor of virology, right?
- 10:09I have really high standards.
- 10:11And I know that if I get involved with something like this, I'm going to go all out.
- 10:14And so I hemmed and I hawed.
- 10:16But then I finally, like, you know, decided to make it happen in August of last year.
- 10:22I started working on it.
- 10:23And I chose the video format because of how successful I saw that it was inside the company here.
- 10:31And so it's a video course.
- 10:32In preparation for it, I actually taught over a dozen internal, like, training courses at PayPal.
- 10:39And just covering all sorts of different topics, sort of honing in on the right, the best explanations for various topics in Enterprise Software.
- 10:48And I ended up with this course that is about, I would say, like, it's half and half.
- 10:53It's like half, you know, Enterprise Software, you know, and half, like, how to do it in Python.
- 10:59Python just works really well as an example language.
- 11:02And, you know, the ecosystem is very full-bodied.
- 11:05So, you know, it really fit well.
- 11:08But it has whole segments of it that are not at all Python significant.
- 11:12It's almost like a case study of Enterprise Software.
- 11:16But from, you know, choosing Python as a specific language.
- 11:20That's really cool.
- 11:21So one of the things that you ask in this class, and I guess your class is, like, in your blog post,
- 11:29it was sort of a, people think these things are inappropriate in Python.
- 11:33Let me show you all the ways, the 10 ways, where they've got some false conception, right?
- 11:40Python is just a scripting language or something silly like this that gets in their way.
- 11:46But this is more like, well, we'll talk about those, but let's actually study the whole thing in a more concrete way, right?
- 11:53So one of the questions you sort of started out with, which I thought was interesting, is you said,
- 11:57is Python suitable for the enterprise?
- 11:59And when should you write Python code?
- 12:02Right.
- 12:03And that is, I mean, it's a valid question, right?
- 12:06You're at a company, and, you know, as an engineer, Python, it's a language of choice, you know,
- 12:13which means that, like, engineers are going to choose it.
- 12:15Your boss isn't going to choose it for you.
- 12:17Usually, like, C-level type people do not choose Python for their company.
- 12:23And that's kind of something I'm trying to reverse here.
- 12:27Python has been shown to be, like, tremendously successful for many very large-scale, you know, companies.
- 12:34YouTube, Yelp, Dropbox, and, you know, I believe CERN uses it.
- 12:41It's really all over the place.
- 12:43So, I mean, it shouldn't be as controversial as it is.
- 12:47And so I go down the list of when you, you know, when we've actually seen it used.
- 12:53I'm not saying that, hey, here's where I think you should use it.
- 12:55I'm like, no, here is where it has been used successfully.
- 12:58And then I give a couple of areas where I don't think it's as common, you know, for enterprise development,
- 13:04such as you don't really see it that often in web front end.
- 13:08You know, that's pretty much all JavaScript and JavaScript derived.
- 13:10You know, there's PyJamas.
- 13:12That's not really quite there.
- 13:14There's Brython.
- 13:15And, like, for browser Python, that's not really quite there yet.
- 13:18But, yeah, so, but, yeah,
- 13:22Python is absolutely suitable for the enterprise.
- 13:24And I don't think that it's just generic organizations that don't understand this.
- 13:30Even when we go to conferences and speak with other Python developers,
- 13:35they're kind of appalled to hear that we are, like, you know,
- 13:39shooting for 100 microsecond response times.
- 13:42You know, 100, 200 microsecond response times.
- 13:46You know, as served from CPython.
- 13:48You know, this isn't even PyPy.
- 13:50And so, yeah, I mean, we can hit those enterprise performance type numbers very consistently with some good engineering.
- 14:00And I think that this course lays the groundwork for making that sort of software possible in Python.
- 14:07I totally agree.
- 14:08I think, you know, you brought up CERN, right?
- 14:10I talked to Kyle Kranmer.
- 14:12Right.
- 14:12I listened to that episode.
- 14:13That was so excellent.
- 14:15And I'm just thinking if Python is appropriate to help collect the data from the Large Hadron Collider
- 14:22and win the Nobel Prize for fighting the Higgs boson,
- 14:26it's probably not too bad to, like, monitor your log files or something.
- 14:31The people think they have these amazing, amazing requirements,
- 14:36but a lot of times there's just a bunch of little tools you got to build.
- 14:39And, you know, you don't need, I don't know, some super specialized thing.
- 14:45Yeah, since the last episode, the main project I've been working on is a sort of a key distribution system
- 14:53for securing sensitive data inside of PayPal.
- 14:57You know, trust and security is PayPal's, you know, number one, like, selling point.
- 15:01That's what the brand is associated with.
- 15:03It is the safest way to pay online, that sort of thing.
- 15:06And to keep it that way, you know, we have to be innovating in that space.
- 15:13And so that's basically as low-level a system as you will find inside of PayPal.
- 15:18Like, everything depends on that.
- 15:21And, you know, we expect billions of requests per day,
- 15:26three, two, three billion requests per day.
- 15:28We're already, like, seeing the adoption is happening,
- 15:31but we've seen days of 500 million requests per day.
- 15:34And, you know, the, you know, average median time that we're shooting for
- 15:39is less than two milliseconds for the response.
- 15:43So it's not just for logs or whatever.
- 15:46It is for these critical systems.
- 15:48And it's the main reason that we chose Python was because of its consistency,
- 15:54our ability to measure how the software is performing,
- 15:57and because we can maintain it with a very small team.
- 16:02The security team is not a huge team at PayPal.
- 16:04Application security, I should say.
- 16:06InfoSec, that's a much larger team.
- 16:10But application security is a much smaller team.
- 16:12Wow.
- 16:13That's really amazing that that app written in Python is at the foundation of all those things.
- 16:18Like, billions of requests per day is,
- 16:20that's a number that not so many people deal with.
- 16:23That's really, really cool.
- 16:25And that's written in Python.
- 16:26Is it like an HTTP service, or what's the story there?
- 16:28Oh, yeah.
- 16:29So that's one of the great things.
- 16:31So because of Python's easy, like, I mean, it's not just Python.
- 16:37You know, we have a framework that we've built on top of that.
- 16:40Most of that is open sourced on PayPal's GitHub.
- 16:43It's called support.
- 16:44It's sort of a reference framework.
- 16:47So using a framework, you know, based on that, we have several protocols that we support.
- 16:54HTTP is, like, if you're talking HTTP 1.1, 1.0, is kind of slow to parse.
- 17:01So we go for lower overhead protocols.
- 17:05We're fans of NetString.
- 17:06That's a classic.
- 17:08You know, it even has sort of roots in the crypto community,
- 17:10because DJB, Daniel J. Bernstein, you know, defined it so many years ago.
- 17:15It has a Wikipedia page.
- 17:17It's extremely simple.
- 17:18NetString.
- 17:19And then we have something even lower level than that,
- 17:22which is similar to NetString, but it's called TLV, tag length value.
- 17:26And so you do have to go for, like, lower level protocols there.
- 17:32But because it's Python, you know, we can maintain an HTTP interface
- 17:36for development purposes so that people can mock things out.
- 17:40without having to worry about the details of TLV.
- 17:43I guess if you're going to get two millisecond response time,
- 17:46you're more or less down raw sockets almost, right?
- 17:49Yeah, yeah.
- 17:51No, we don't shy away from raw sockets.
- 17:55We have a little buffered socket that we've written on top of that.
- 17:57But when you want to hit sub-millisecond, deep sub-millisecond times,
- 18:02then you do have to basically be counting the, you know,
- 18:08bytecode instructions that you're going to be, like, executing.
- 18:12So every line does count.
- 18:14You know, every line does have its cost.
- 18:16But Python makes it easy to gauge that cost.
- 18:18And because you can get your features done in time,
- 18:21you can actually start down that performance path much sooner than other stacks.
- 18:24And that's the big selling point for us.
- 18:27Yeah, you can do the testing and experiment and find the right answer
- 18:31probably before the first prototype would be even finished in C++, right?
- 18:36Oh, yeah.
- 18:37I mean, in fact, we have had literal, I mean, I wouldn't call them competitions, right?
- 18:42We're inside a company.
- 18:42We're all one team, right?
- 18:43But, like, we've had cases where that exact stuff was happening.
- 18:48Like, you know, we were done months ahead of time
- 18:51and already, like, iterating on our performance.
- 18:53By the time C++ came around with their stuff,
- 18:56they couldn't even get within an order of magnitude of our scalability.
- 18:59Wow, that's awesome.
- 19:01So let's take it back to the beginning for a moment.
- 19:04You talked about your first enterprise app,
- 19:06and that was kind of that log file monitoring thing, I think, right?
- 19:10Right, right.
- 19:10And you said there was a couple of lessons you learned from it,
- 19:14and I thought they were really good.
- 19:15Maybe you could talk about those a bit.
- 19:17Well, so that first version of that log analysis web front end was actually written in PHP.
- 19:24You know, that was my last PHP project.
- 19:27And, yeah, I got it done in time, but it had some problems.
- 19:32Number one is that, like, it was written in PHP,
- 19:34so, like, maintenance wasn't really, you know, on my side.
- 19:39And then I actually had to keep fixing bugs and running the service.
- 19:44And I basically was left with no time to actually do other projects.
- 19:49And so I didn't want to be the guy that just maintains log analysis tool, you know,
- 19:53so I shut it down after about a year.
- 19:55But, you know, from then on in, I gave a lot more thought to,
- 19:58what is the maintenance curve going to look like?
- 20:01Is this something that I'm going to be able to sort of set aside and move on to new things
- 20:08so I'll always have something new?
- 20:10But that old stuff can keep, like, running.
- 20:12I don't want to be, you know, one of those flash-in-the-pan project sort of guys.
- 20:17You know, I like to build up a lot of different services that I run
- 20:22that help people in real situations.
- 20:25The exact lessons were basically, like, choose your dependencies
- 20:29and avoid doing it all at once.
- 20:31So you can, if you can rely on your organization,
- 20:34I mean, you're working at a large organization.
- 20:36Find ways to rely on the organization.
- 20:39Offload some of that maintenance.
- 20:40And finally, like, that longevity, it doesn't come easy.
- 20:45It's the result of a lot of critical decisions.
- 20:48And it's more than just regular software, I think.
- 20:50Like, you could write...
- 20:53Yeah, there's a lot of soft skills involved.
- 20:54Oh, absolutely.
- 20:55So you could write the software if you were kind of doing this little app on your own
- 21:00and it could do its own little thing.
- 21:03But if it's going to continue to live on and be used,
- 21:06you have to know the sort of invisible connective tissue of the software of your company, right?
- 21:13Like, this is the way things are done.
- 21:14And this is the way it will actually be useful to people.
- 21:17Yes, I should design it this way if it was from scratch.
- 21:19But people don't do that.
- 21:20They do this.
- 21:21And so I'm going to do this other weird thing
- 21:22because then it'll get used for a long time and so on, right?
- 21:25Right, right.
- 21:27Like, I mean, I'm all for going against the grain a little bit.
- 21:31But, and actually innovating, changing things and so forth.
- 21:34But if you try to do it all by yourself or all at once, you're setting yourself up for,
- 21:40I mean, you know, let's be frank, you're going to burn yourself out, right?
- 21:44And you're not going to be able to do those future projects.
- 21:47And that's the whole point, you know, is to continue building things because there's a lot of things to be done.
- 21:52Continuous delivery isn't just a buzzword.
- 22:09It's a shift in productivity that will help your whole team become more efficient.
- 22:13With SnapCI's continuous delivery tool, you can test, debug, and deploy your code quickly and reliably.
- 22:19Get your product in the hands of your users faster and deploy from just about anywhere at any time.
- 22:25And did you know that ThoughtWorks literally wrote the book on continuous integration and continuous delivery?
- 22:30Connect Snap to your GitHub repo and they'll build and run your first pipeline automagically.
- 22:36Thanks SnapCI for sponsoring this episode by trying them for free at snap.ci slash talkpython.
- 22:42Yeah, and you had some really interesting statistics about the types of apps and the numbers of services and so on inside PayPal in your course.
- 23:02And it just makes me kind of laugh thinking like, oh my gosh, this is crazy to think, you know,
- 23:06So when I'm talking about like, how do people within the company work and how does software normally connect?
- 23:12You had like a graph that was basically so dense it was illegible, but showing the interconnections between services.
- 23:19Can you talk about that for a sec?
- 23:20Sure.
- 23:21So PayPal is a service oriented architecture company going back over a decade.
- 23:27It started as a monolith.
- 23:29And there's nothing wrong with that when you're starting something out.
- 23:33Like a monolith is a really good way to get things done.
- 23:36But as you are expanding both in terms of customer base, computers running your software, people working on that software, most importantly,
- 23:48then you, it starts to become a burden.
- 23:51And eventually that hit a technical wall for PayPal where that monolith called WebScr.
- 23:57I think I can talk about that.
- 23:59W-E-B-S-C-R.
- 24:01If you look in some PayPal URLs, you'll still see it.
- 24:03It's a C++ executable.
- 24:06And it reached over a gigabyte and a half.
- 24:11One program.
- 24:13And I don't want to talk about that in the course.
- 24:15It's C++, not Python.
- 24:16So, but it hit like one and a half gigabytes.
- 24:19You can't even put debug symbols in there in order to debug what live issues are going to be.
- 24:24So, it became completely, it got completely out of hand.
- 24:30And they, at that point, like they knew that they had to switch to something more distributed so that they could work on it with more engineers.
- 24:38And so, you have these service-oriented architectures sort of for human reasons.
- 24:44You know, you want to have a user team.
- 24:46You want to have, you know, payments team.
- 24:48You want to have a, you know, front-end team or whatever.
- 24:52There's, you know, and so you have to start segmenting things by layers and domains.
- 24:59And so, at PayPal, we've done this in the extreme.
- 25:03We have one huge product.
- 25:05You know, Google, they have Gmail.
- 25:07They have Maps.
- 25:08And even they have sort of monolithic development structure in a way.
- 25:12But these are all separate products is what I'd like to emphasize.
- 25:16At PayPal, there's not that many different products.
- 25:18It's pretty much PayPal.com.
- 25:20And so, just for PayPal.com, you have over 3,000 service, over 3,000 service endpoints, logical endpoints.
- 25:29You know, there are tens of thousands of machines running the code.
- 25:32And just within the mid-tier, over 3,000 endpoints.
- 25:36And that's, like, you know, representing hundreds of code bases.
- 25:40And so, this is all communicating with a variety of protocols.
- 25:43I've listed off a few already.
- 25:45But it's pretty much those ones.
- 25:46HTTP, you know, RESTful, et cetera.
- 25:50Then you have NetString for some of the lower level, older stuff.
- 25:53That's pretty much, we have one, like, proprietary one that's really old and will never go away.
- 25:58You know, I talk about that in the course, too.
- 26:01There's a sort of design permanence.
- 26:05It's indelible.
- 26:06Yeah, absolutely.
- 26:08But, so, yeah, we have these thousands and thousands endpoints.
- 26:11And they, you know, rely on each other in really complicated ways.
- 26:14And each individual team has to consider how those runtime dependencies and logical dependencies are going to affect the scalability and performance of their application.
- 26:26That's a lot to keep in your mind and sort of juggle, right?
- 26:30Like, if I call this service and that service and this one calls that one, like, what is the latency and scalability considerations I have to actually worry about?
- 26:38Well, I mean, some people don't even get to the point where they're able to worry about that stuff.
- 26:42That's kind of the problem.
- 26:43You know, due to other decisions, you know, they end up, like, you know, constantly having to fix bugs or work around issues.
- 26:52And they don't get to have those important spare cycles to build quality.
- 26:56So, you did talk about scalability a bit in your course.
- 26:59And I thought that was interesting that you said scalability is not itself a feature of software.
- 27:06But it's actually, like, a composition of three or four bits or more sort of atomic units of, like, throughput and so on.
- 27:13Yeah.
- 27:15So, I thought about it a bunch.
- 27:16And I couldn't really find an ontology of what makes up software.
- 27:23What are the aspects of software that really applied to what I saw happening at PayPal?
- 27:28And so, I sort of had to come up with one of my own.
- 27:32So, yeah, we came up with this ontology, talking to coworkers and so forth, of six different software aspects.
- 27:39And so, the first is, like, usability.
- 27:41You know, that has to be first.
- 27:44If your software is not usable, if it doesn't have features to use, then it's really nothing at all.
- 27:50So, you have to have usability.
- 27:52And then, you know, we have availability.
- 27:55That's kind of the reliability.
- 27:56We have the introspectability.
- 27:59So, that's how good your logging is and other instrumentation.
- 28:03Then, we have performance.
- 28:05Everyone, when they think of enterprise software, they think about, like, they think I'm talking about performance.
- 28:10And that's just one aspect here.
- 28:12And within performance, I'm referring to, like, latency, throughput, and utilization.
- 28:17There are many aspects within each of these aspects.
- 28:19But fifth has to be security.
- 28:21Security really makes everything so much harder.
- 28:25I can tell you for a fact that one of the reasons why other companies can move, like, faster than how PayPal, like, moves is because they don't have to worry about locking down access to all these secure resources.
- 28:37Our deploy process is primarily convoluted because of that security consideration.
- 28:43Normal developers do not have access to where their code runs.
- 28:47So, that, you know, brings me to my sixth aspect, which is the agility, right?
- 28:51Your ability to deploy quickly, change things quickly.
- 28:55Everyone talks about, like, oh, everyone on their first day should be able to change one line of code and deploy within one hour or something like that.
- 29:04And I'm like, okay, man, like, you know, one line of HTML, you know, changing the styling of a button or something is very different than, like, one line that impacts everyone's, you know, security.
- 29:17Yeah, that token, that security service you were talking about that does almost a billion requests per day.
- 29:23Two, three billion, yeah.
- 29:25Yeah, that one you don't want, like, the new guy to, or girl, to, like, modify necessarily on the first day.
- 29:33Right, right.
- 29:33And so, I mean, and these six aspects, they're all, like, interconnected, like, better introspectability, we find correlates and causes better performance.
- 29:45And because you can actually see the effect that you can actually see the effect that your changes are having.
- 29:49And so, these six things sort of create, like, software hexagon or whatever, kind of like the project management triangle, which, aka the pick any two, right?
- 30:00Fast, good, and cheap.
- 30:02Like, you can make something that is very usable and you can deploy it very quickly, but maybe its availability is not so great because you don't have a good throttling scheme.
- 30:13It's like you have to choose a balance of these things.
- 30:15And as a result of choosing a good balance of these six aspects, you can build scalable software.
- 30:20Yeah.
- 30:21Very interesting.
- 30:22I think the good, fast, and cheap triad is a very effective mechanism for speaking to people who are not developers and developers as well, but it comes through really well.
- 30:33Right.
- 30:33But, I mean, good is just so nuanced.
- 30:36Fast, that's just a certain amount of time.
- 30:38Cheap, that's just a certain amount of money.
- 30:40Those are easy to quantify.
- 30:41But what does good mean?
- 30:42You have to expand that, and that's where these six aspects come from.
- 30:45So, you sort of set out to define a spectrum of enterprise software, if you will.
- 30:51You said, okay, a thing is not either enterprise software or not enterprise software, but it might live somewhere along a continuum.
- 30:59And you have, like, nine points that would push it one way or the other.
- 31:03Do you want to talk about those?
- 31:05I thought they were really on point.
- 31:06Yeah.
- 31:07Enterprise, it's either enterprise or it's not enterprise.
- 31:09That black and white view is not actually really helpful in helping people find, you know, just corollaries and analogies to the work that they're doing.
- 31:19You know, we want to make something that people can actually relate it to what they are working on.
- 31:24I created a list of these.
- 31:27And, you know, I'll probably release this as a blog post or something like that as well.
- 31:31But I think that this one is one of the free clips that you can view.
- 31:37But just to run down the list real quickly, you can have any number of these and it sort of defines how much, how enterprise your software is.
- 31:46So number one is that it's used by business.
- 31:48Number two is that it's sort of tailor made, like it's custom.
- 31:53And number three is that you have a specific user base, like we talked about before, that it's a, you know, if there's just two or three people using your software, it's going to have a really different development feed and flow.
- 32:06Then you have strict runtime requirements.
- 32:09That's where the performance comes in.
- 32:10You know, that I need this with an SLA 95 percentile of like, you know, two milliseconds, 200 milliseconds, whatever.
- 32:18Then you have that your software is part of a larger system.
- 32:21And so at PayPal, you know, if you have to, we have to integrate not just internally with thousands of service endpoints, but also externally with financial processors and, you know, all of these highly regulated, basically legacy systems.
- 32:37And so that brings me to the next one, which is legacy integration.
- 32:42If you have to integrate with legacy, you know, I just got to give that a special shout out.
- 32:47That's enterprise.
- 32:48That moves you far down the spectrum to the right, doesn't it?
- 32:53Exactly.
- 32:54And, you know, so and that feeds into kind of the design permanence.
- 33:00And so people worry a lot about making the right decisions.
- 33:04And we talk a lot about technical debt.
- 33:07But one person's technical debt is another person's like, you know, just software longevity, you know, software that has to run on airplanes.
- 33:16And satellites and so forth.
- 33:18I mean, it's not technical debt.
- 33:20It's just a different kind of investment.
- 33:24And so design permanence is definitely a hallmark of enterprise software.
- 33:28Because of all of the things involved when you're doing all these integrations, if there are a lot of negotiated timelines and promises being made about, like, you know, delivery dates and so forth.
- 33:39You know, some people will just say, hey, that's just waterfall and that's bad.
- 33:43But that's how a lot of systems have to work when you have these deep dependency trees of software.
- 33:49Like, you know, dependency, I guess.
- 33:51Reli.
- 33:51People relying on you having something done at a certain time.
- 33:56And finally, like, you know, when you are handing software off to another team to be run, you know, if you have a separate operations group, a separate site reliability engineering group, SRE, if you have a separate security group that's going to audit your stuff.
- 34:12If there's all these specialized groups, that's another aspect of enterprise software.
- 34:17And so if you look at these nine different, like, hallmarks, you can see that in consumer ecosystems, which consumer is the opposite of enterprise, these aren't really the case.
- 34:28You know, for instance, specific user base.
- 34:31Usually in consumer software, you're just putting an app on an app store and people will either like it or they won't like it.
- 34:37There's a market.
- 34:38There's choice.
- 34:39You know, a user base that's going to be using my first Python project at PayPal, you know, changes the prices of PayPal.
- 34:46There's a good reason why we don't want thousands of people using that.
- 34:50It basically has 10 users or so who can actually modify the values in there.
- 34:56And they're still using my code, you know.
- 34:59And it's being maintained by a different group.
- 35:02So I consider that enterprise software, even though it only gets hundreds of requests a day at most.
- 35:08It has a specific user base.
- 35:09It's part of a larger system.
- 35:11Legacy integration.
- 35:12Tailor-made.
- 35:13Right.
- 35:13It's tailor-made.
- 35:14I mean, I use Django, of course, but at that time.
- 35:18And but it had to integrate with a lot of these systems and a lot of these human processes in a way that, you know, is just different than consumer software.
- 35:28So just defining something as enterprise based on its performance requirements excludes this other part of the spectrum.
- 35:36And that's not really that great.
- 35:37I'm not saying that that application is the most enterprise.
- 35:40Probably the most enterprise software that can occur to me is the ADA code that runs, you know, on the 737, 747, whatever, you know, airplanes.
- 35:50I mean, that's far more enterprise than I will ever write.
- 35:53It's even more enterprise than like the security stuff, I think.
- 35:56You know, there are lives at stake.
- 35:58So medical software.
- 36:00I consider that enterprise.
- 36:02Yeah, I think I think that's an interesting sort of nine dimensional spectrum that your code can live in.
- 36:09And I think it hits a lot of interesting points.
- 36:12You know, one thing that sort of struck me when you're talking about that with the tailor-made specific user base and thinking about how it fits into a larger system.
- 36:23You know, I think I've heard less of it lately.
- 36:26I don't know why, but for quite a while and still to some degree, people make very strong comparisons to architecture as in a person who builds a bridge, an engineer, maybe a civil engineer who builds a bridge.
- 36:41Sure.
- 36:41And software.
- 36:42And they're like, the civil engineer can build a bridge within 10% of time estimates, materials estimates, and so on.
- 36:50And, you know, people say, well, why can't we do this with software?
- 36:53Well, the reason is software is an immature discipline and we need to get more mature.
- 36:58But I think actually what is totally that totally misses the point.
- 37:01The thing is, it's the tailor-made part, right?
- 37:04Like, right.
- 37:05If the software existed and you could just plug it in, then bridges you can't copy.
- 37:10If you have 100 bridges that are real similar, you got to have 100 times build it, 100 experiences it.
- 37:16Right.
- 37:16But if it's software you use, you just you sell it, you know?
- 37:20Any web dev shop, any studio can give you a very accurate estimate how long it's going to take to set up your CMS if you do not have, like, really high, you know, customization requirements.
- 37:36And, in fact, when people go further, I don't know who's sponsoring these days, right?
- 37:39It's Squarespace or whatever, right?
- 37:41Like, they've automated it.
- 37:44And so the main thing that's different in, like, the real world versus the virtual is the construction aspect, right?
- 37:51So, I mean, there's no, like, special construct – there's very little special construction setup, especially in these smaller applications.
- 37:59If you go look at ERP integrations, I think those still take, like, you know, a decade.
- 38:06I, you know, for better or worse.
- 38:08For better or worse.
- 38:09Yeah.
- 38:10So that is as enterprise as it gets.
- 38:14It's maybe more enterprise than it has to be.
- 38:16But I'm not going to sit over here and, you know, judge about that.
- 38:20Yeah.
- 38:21I think what your sort of list here highlights is you might say these are the requirements we have.
- 38:28But it has to fit into a very unique and largely invisible bigger structure.
- 38:32Right.
- 38:33And it's for a specific user base who's never had this piece of software before.
- 38:36And so, like, there's just so many unknowns and sort of one-offs that these analogies between, well, why can't we build software like we build bridges?
- 38:46Become more obvious when you think about all the stuff going on there.
- 38:49Right.
- 38:50And I think that we do need to think more about it.
- 38:52Like, and we need to talk more about it.
- 38:54I don't really like, you know – this is sort of my reservation about what you said about the iPhone, right?
- 38:59Like, you know, you can't really reduce every aspect of design to whatever Apple is doing.
- 39:05Right?
- 39:05Like, Apple doesn't make very much enterprise software.
- 39:08And, I mean, internally, I'm sure they have many enterprise systems.
- 39:12Don't get me wrong.
- 39:14It's not going to represent a whole industry.
- 39:18It's just one company.
- 39:19Yeah.
- 39:19You know?
- 39:20So, yeah.
- 39:22There's a lot of – I'm all for more variability in designs.
- 39:26Yeah, absolutely.
- 39:38This episode is brought to you by Hired.
- 39:40Hired is a two-sided, curated marketplace that connects the world's knowledge workers to the best opportunities.
- 39:46Each offer you receive has salary and equity presented right up front, and you can view the offers to accept or reject them before you even talk to the company.
- 39:54Typically, candidates receive five or more offers within the first week, and there are no obligations – ever.
- 39:59Sounds awesome, doesn't it?
- 40:01Well, did I mention the signing bonus?
- 40:02Everyone who accepts a job from Hired gets a $1,000 signing bonus.
- 40:06And, as Talk Python listeners, it gets way sweeter.
- 40:09Use the link Hired.com slash Talk Python To Me, and Hired will double the signing bonus to $2,000.
- 40:14Opportunity's knocking.
- 40:17Visit Hired.com slash Talk Python To Me and answer the call.
- 40:20One of the things you talked about in the class that I thought was surprising that you'd bring it up a little ways into it was you said, let's talk about what is Python.
- 40:36You said that this actually has several answers, almost depending on who you're talking to, to some degree.
- 40:42Yeah, it has to.
- 40:44Yeah, pretty deep into the course, I talk about what is Python, and that's because this course is sort of targeted at people who are self-taught, you know.
- 40:53And so maybe they learned programming from Python.
- 40:57They've taken a beginner course.
- 40:58This is an intermediate course.
- 41:00So they've taken a beginner course, and they're looking to get into professional software development.
- 41:04And at that point, you know, the Python that they learned as a beginner, we need to expand that definition, flesh out that definition to work in the professional setting.
- 41:15And, of course, there are also people who are coming to this from an enterprise software perspective, and they are learning more Python from this, and they can use – I mean, I deal with a lot of those – I mean, not deal with.
- 41:24I interact with a lot of those people at PayPal who – I mean, you know, they are expanding their skill set.
- 41:32They know a lot of Java, C++, JavaScript, and they want to learn Python.
- 41:36And so, you know, I give them my definition of Python.
- 41:39And so there are three levels at which, you know, we say Python.
- 41:44So number one is the language.
- 41:46You know, it's the language of choice.
- 41:48It's so clear.
- 41:49You know, some people don't like the white space stuff, but that's part of the language.
- 41:53For many years, that language that we all love, it was directly implemented by more or less just one runtime.
- 42:03You know, like CPython, the reference implementation, was synonymous with Python.
- 42:08I don't run CPython at my command line.
- 42:10I run Python.
- 42:11And so many of the benefits of Python are actually benefits of CPython.
- 42:16When I talk about the consistency and, you know, rich runtime, those things are – many of those are runtime-specific from CPython, implementation from CPython that may be copied in other runtimes.
- 42:30So other runtimes might include, like, Jython, IronPython, PyPy, you know, P-Y-P-Y, and PyPy.
- 42:36And, you know, now there are some other ones, too, Pidgin and stuff.
- 42:40And then, finally, there's the platform.
- 42:43So executives and managers, when you talk about Python with them, they're not really, you know, that interested in what the language looks like.
- 42:51Some of them might be, but that's, you know, kind of micromanager-y.
- 42:55Anyways, they're more curious about how is Python going to help the organization.
- 43:01And so that means Python as a platform, as a community.
- 43:05And there are many benefits to Python there.
- 43:07You know, you have a lot more education adoption, so you have a lot more sort of pre-training when you're doing your hiring.
- 43:13Like, basically, people are coming in already knowing the language.
- 43:16And then you have a big open-source ecosystem, you know, 70,000-plus packages on PyPy.
- 43:24So there's language, runtime, and platform.
- 43:26And when you're having a meeting, it will be most effective if you can be explicit, if you can be clear about which part you're referencing, you know.
- 43:36So those three levels of Python.
- 43:39Yeah, I think even for experienced developers, a lot of times, if you're talking, like, let's say you're talking to a Java person and maybe a Node.js person and a Python person,
- 43:51and they're saying, you know, Python is really good in this way, right?
- 43:55You've got – but there's a lot of comparisons that will be made.
- 43:59And you have to say, are we comparing the language?
- 44:01Are we comparing the implementation with the standard library?
- 44:03Are we comparing the entire ecosystem, including PyPI?
- 44:06Like, before you say this is this feature or it doesn't or whatever, right, like, we need to know what we're talking about.
- 44:11So that was really interesting, I thought.
- 44:13Yeah, with Java, I mean, you know, Java is a language.
- 44:16Python is a language.
- 44:17CPython is a runtime.
- 44:19You know, you might be using an IBM JVM.
- 44:21That's your runtime.
- 44:22And people say – people do compare.
- 44:26This is sort of why I brought it up.
- 44:28They compare Python to Node.js.
- 44:29I'm like, okay, you know, Python is a language.
- 44:32JavaScript is a language of Node.js.
- 44:34Node.js is the runtime.
- 44:35CPython is the runtime.
- 44:37Let's, like, you know, compare these things side by side.
- 44:40So people say Python is slow.
- 44:41I'm like, okay, man, a language can't be slow.
- 44:43CPython is not jitted.
- 44:46You can use PyPy.
- 44:47You can get certain performance benefits.
- 44:49You know, Node.js doesn't support threads.
- 44:53That's, you know, another aspect of the runtime.
- 44:57I think that you could probably make a thread-safe ECMAScript, like implementation or something like that.
- 45:03But I haven't really looked too deeply into it, honestly.
- 45:05I'm sure it's possible.
- 45:06But also not done, right?
- 45:08So one of the things I thought was – yeah, maybe it's been done.
- 45:11One thing that's interesting is sort of the soft skills story here.
- 45:16Like, when you go and talk to executives or managers, it's not just – you don't want to get too technical, right?
- 45:22You want to say, like, we're talking about the ecosystem.
- 45:24We're talking about – take it as a whole, right?
- 45:27And the truth is that businesses are run by people.
- 45:30And your sort of skills to work with these people and convince them and speak their language really matter still.
- 45:35Yeah.
- 45:36So what I usually tell them – and so this is all just expanding that 10 myths thing, just blowing it wide open and approaching it from a more positive aspect.
- 45:44It's not just rejecting myths, right?
- 45:46It's saying, okay, well, what do you talk about instead?
- 45:49And, you know, Python created in 1991.
- 45:53It's like it had a nice, long, slow bake all the way until it sort of hockey-sticked for a lot of web things between 2003 and 2006 or so.
- 46:05And so as a result, you have this, like, really, like, you know, well-tested, well-understood core reference implementation.
- 46:14And you have a huge open source library.
- 46:16It's used in education a lot.
- 46:18And one that I like the most is – I have to tell people, it's organizationally neutral.
- 46:23So a lot of people still haven't heard of Python.
- 46:25You would be surprised.
- 46:26People paid far more than I am.
- 46:29I mean, they haven't heard of it even.
- 46:32And one of the reasons for this is that Python is organizationally neutral, where IBM and Sun and Oracle – or, you know, Sun used to, but IBM and Oracle, like, you know, sell and sold Java.
- 46:44You know, there's no company that is selling Python.
- 46:48You know, there's no joyance of Python.
- 46:51I mean, there's Continuum Analytics.
- 46:53I mean, they're great.
- 46:53You know, there's InThought.
- 46:55But these are, like, you know, pretty small companies.
- 46:57Your company wouldn't have, like, an enterprise license agreement with Python as a thing, right?
- 47:04There are probably some groups that do it.
- 47:07But no, it's not like that.
- 47:09It's not a sold thing.
- 47:10Instead, engineers choose it, and they use it, and they succeed, you know?
- 47:14And you can get support contracts for it, but that's not really the Python way.
- 47:18The other thing that you kind of touched on in that whole section is the idea of a foundational technology.
- 47:26This is – managers especially, but basically everyone has this to a certain degree.
- 47:31Like, people get really anxious about doing things the right way.
- 47:34Basically, everywhere you look in technology, people are telling you that things are changing, okay?
- 47:40This changes it all.
- 47:41This is new, and it's going to change it all.
- 47:43And, you know, I think we all know this, but we don't really get to think about it.
- 47:47It's like a year later, you just don't hear about it ever again.
- 47:50We've been fed this line about software being ephemeral and, you know, tools not mattering, only delivery.
- 47:56You know?
- 47:57This whole ephemeral technology thing, I don't buy it.
- 48:00Foundational technologies are real.
- 48:03So, specifically, like, Linux, BSD, and in general, the POSIX standard.
- 48:07There are people who, if they woke up one day and read the news and said, hey, Linux is over.
- 48:14You know, Linux is gone.
- 48:16They'd be like, well, yeah, what did you expect?
- 48:19I mean, you know, open source.
- 48:21And it's just things are crazy.
- 48:22You know, it's like they could actually buy that sort of reality.
- 48:26But these things are permanent.
- 48:28There's, like, long traditions.
- 48:30There are long histories.
- 48:31We don't usually get time to read into them.
- 48:33But these foundational technologies are real.
- 48:37Another would be the C programming language.
- 48:38And CPython is a really, I mean, Python and CPython are really natural extensions, you know, relying on the C programming language.
- 48:46So, I feel confident, you know, grouping Python with these foundational technologies, largely because C is so foundational.
- 48:54You know, C is not going away.
- 48:57You know, you can take it even further.
- 48:59There are people I know, I mean, highly paid people here at my work.
- 49:02They'll come up to me.
- 49:04They're like, oh, man, but you're like the Python guy.
- 49:06You know, you like new programming languages and stuff.
- 49:09You know what I think?
- 49:10I've heard that this visual programming thing, this is going to be the next big thing.
- 49:16And it's like they see one demo and they think that, you know, procedural programming is going to go away.
- 49:22That, like, top to bottom execution of code is in the future at some point not going to be something viable within their lifetime, within their work span.
- 49:31And it's just such a wasteful conversation to have.
- 49:34I talk about it a little bit in the course, that sort of navel-gazing sort of thing.
- 49:38Which language is the best language?
- 49:40Instead, I try to refocus them.
- 49:42You know, I tell them maintenance is real.
- 49:45And, like, longevity is possible.
- 49:46And the tools and methods matter.
- 49:48You have to use stuff that has been baked.
- 49:50So the underlying spirit of the course is that if you choose your architecture, dependencies, and practices wisely, you know, you can rest easy thanks to these foundational technologies.
- 50:00Yeah, and I think you're more likely to experience or run into the deep history of them at enterprises, right?
- 50:10Like, at a startup, all the code is, what, a year old or whatever, besides maybe the package you grab.
- 50:15But if you go to a company that's been using a technology for a long time, you could go to source control.
- 50:21And the last check-in or the first check-in you would see might be, like, 1995.
- 50:24And that's because you switched version controls and couldn't carry the history over or something like that, right?
- 50:29Right.
- 50:29No, you hit it right on the head, man.
- 50:31I mean, like, I was blown away when, I think it was 2012, beginning of 2013.
- 50:37I was actually, like, curious.
- 50:39This is when I first started getting into the security stuff.
- 50:41I was curious how something was implemented.
- 50:43We needed to re-implement it in Python to enable running on 64-bit.
- 50:46You know, PayPal primarily runs on 32-bit stuff because they have old SOs that are just linked in.
- 50:53They're checked into the repo and stuff.
- 50:55So, I mean, 64-bit was not a thing when PayPal was written.
- 51:00And so, you know, 80% of our, I should say, too, like, 80% of our revenue or something like that is still going through the, quote, unquote, legacy stack, right?
- 51:10But, you know, when you're actually, like, there re-implementing and reverse engineering Max Levchin's code, you're like, wow, software really is actually a lot more permanent than I was taught.
- 51:21So, you know, by the Internet or whatever.
- 51:25Yeah, yeah, yeah.
- 51:25By the person with the latest framework that's super excited about it.
- 51:28Exactly.
- 51:29And so you have to learn to distinguish between a press release and, you know, actual, like, neutral academic whatever, you know?
- 51:39There's press releases and then there's real experience, real education.
- 51:46Yeah.
- 51:46So one of the things you talked about was sort of Greenfield versus Brownfield or, like, brand new software versus legacy software, if you will.
- 51:54Yeah.
- 51:56I think you sort of convinced me that there's more value in these Brownfield apps and people that work on them and can evolve them and really add features and understand them.
- 52:07I deserve maybe more respect than the industry gives them.
- 52:10Yeah, that is definitely the case.
- 52:13It's just a culture thing within technology.
- 52:15The new is always emphasized.
- 52:17But the old stuff is what we're using right now.
- 52:21That's what's working right now.
- 52:22That's what's causing money to move.
- 52:25And disrespecting it and, you know, being productivist about it doesn't actually get us any further in technology progress.
- 52:32You know, we have a lot of people who come in and they try to, you know, plow the whole field under.
- 52:38And, you know, their tractor, their plow, whatever, just, like, you know, hits one rock.
- 52:44And then they declare victory with the small patch that they turned, you know, green.
- 52:50And they, you know, move on.
- 52:52But, you know, and then you end up with this patchwork environment, you know, where it's like, well, that was green.
- 52:58That was greened by so-and-so that long ago.
- 53:01And, you know, that part over there they never reached.
- 53:03And so you just end up with this very untended wilderness.
- 53:07It's interesting.
- 53:09It's a really fun environment.
- 53:10You know, this is why, you know, you can see I get carried away just daydreaming about, like, the complexity inherent in a system as complex as PayPal's.
- 53:20So we don't have a lot of time left in the show.
- 53:22We're sort of getting to the end.
- 53:23But I wanted to maybe talk about some of the stuff farther down, like some of the best practices that you're talking about.
- 53:32One of my thoughts was interesting.
- 53:33It was sort of a pull request, designer view type of experience.
- 53:38Right, right.
- 53:39So the way that the course is structured, you know, is I got an intro and then I defined the basics.
- 53:45I just do some definitions.
- 53:46And then I have this dry segment in the middle about architecture and design.
- 53:49And so those first three parts are, like, I mean, especially the architecture and design part, those are just, like, processes and soft skills that, you know, you can use in the enterprise world.
- 54:00Then we get to, like, the real meat, which is this, like, 12 segment best practices.
- 54:06And this is sort of, like, you know, adjustments to, you know, your knowledge and pointers to how to do things that should be generic for most organizations, most legacy environments, and how you can put Python in them and create new software.
- 54:25So once you get past, like, you know, just, you know, editors, dev tools, issue tracking, you know, how to start a Python project and some design patterns.
- 54:34You know, people always ask me about design patterns.
- 54:37They're coming from, like, a Java and C++ background.
- 54:39And so I threw a segment in there.
- 54:40It's, like, well, design patterns in Python tend to be, like, so small you barely even see them.
- 54:45So I said, here's how to, like, actually look and see Python design patterns.
- 54:50But, you know, eventually, like, so the first half of best practices is building new code.
- 54:54And the second half is maintaining that code and building quality.
- 54:58And I think that the first one of those is code review.
- 55:01And this is one of my favorite segments because, you know, I get to do a little bit of, like, black hat, white hat sort of role playing with myself one weekend.
- 55:10And so one day I just wrote some really bad code that I tried to build in every anti-pattern that a, you know, budding developer will accidentally stumble upon.
- 55:21And I put it up on GitHub.
- 55:23And I just, like, had to sleep on it.
- 55:25I just, like, went to sleep.
- 55:26And the next day I came back and I just, like, tore into myself.
- 55:29I just, I mean, well, that's not true, actually.
- 55:34Like, I did a precise code review stating why there were problems, where there were problems.
- 55:41And I did my best to be nice about it to promote the actual, like, you know, positive interactions you try to have.
- 55:47And so all of that is available on the GitHub repo for the class where I sort of have this example project,
- 55:54which is useful for about a quarter of the class, just as sort of a reference.
- 56:00And so that's GitHub.com forward slash Mahmood forward slash SP metrics, ESPY metrics.
- 56:07Yeah.
- 56:08And I'll link to the link to the show notes as well.
- 56:11Great.
- 56:11Great.
- 56:11And so there's just a pull request in there that I will never merge because it does everything the wrong way.
- 56:17And so I have a bad implementation, all the comments on it, and then a good implementation.
- 56:22And you can, you know, sort of do an apples to apples comparison there.
- 56:26And, you know, it was interesting.
- 56:29Yeah.
- 56:31I think that's something that a lot of enterprise developers who maybe haven't spent a lot of time in open source don't get to really experience a lot.
- 56:38The sort of GitHub pull request style of work, right?
- 56:42That is true.
- 56:42When I started at PayPal, we were using, I think, something you've probably heard of.
- 56:47We were using ClearCase.
- 56:48ClearCase was maybe worse than I could ever imagine for a version control system.
- 56:56You know, it was like every file, like it was a file by file thing.
- 57:00You could get these evil twins.
- 57:01And I just, you know, I know that some people still have to use it.
- 57:04I run into them here in like the valley.
- 57:06And, you know, it's kind of a shame.
- 57:08But, yeah, so we did actually not too long ago get GitHub Enterprise.
- 57:13And I think that it's a much, much healthier way to develop.
- 57:18You know, you have a decent branching strategy to keep things like sane.
- 57:23And then you, this like very useful UI.
- 57:26And I'm sure that like Bitbucket has similar stuff.
- 57:29Yeah, the code reviews is actually exactly what, this is exactly the sort of thing that we do at PayPal as well.
- 57:34And that's one of the reasons I did it because we have an internal DL as part of the community.
- 57:40We have an internal listserv where people can request code reviews from other teams.
- 57:45You know, and so that's one of the services we provide as the Python infrastructure team at work
- 57:49is that we'll code review any Python code you give us.
- 57:52And I just did my best to export that in an organizationally neutral way.
- 57:56Yeah, so you've had a chance to look at both good and bad examples.
- 58:00And you brought them to the class, yeah?
- 58:03Well, and yeah.
- 58:04And so that is like actually one thing you just reminded me, right, is that a big part of the class is evaluating dependencies.
- 58:11I think that that's a great way to learn Python.
- 58:13That's a massive way that I learned Python.
- 58:15Reading Django code.
- 58:16Reading bottle PY code.
- 58:18You know, when I was doing all this web development, actually digging a little bit deeper, you know,
- 58:23Python ships with its source code and you can see your actual code, like what your dependencies are doing, what you're relying on.
- 58:30And so, you know, don't constantly live in the sausage factory looking at how things are made.
- 58:35But take your time to evaluate dependencies because it will help you avoid some really horrible architectural nightmares.
- 58:41At PayPal, I mean, I think we all know about the left pad thing at this point.
- 58:45So anyways, at PayPal, we have a typical Python team.
- 58:48It's small and we always have like 10 things to do.
- 58:53So we have to make choices that favor stability and to make sure that when we finish something, it stays off of our plate.
- 58:59As such, like we're really big advocates of vendoring in libraries.
- 59:03So that means that we copy dependency into the project.
- 59:08This isn't something you'll see a lot in open source projects because there's the Python packaging index, PyPI.
- 59:15But we view like copying in this library at a certain version as sort of the Python equivalent of static linking.
- 59:21Yeah, we do that too with our C libraries.
- 59:23But we build projects with the dependencies built in.
- 59:26And this way, teams can just clone the repository and go.
- 59:29And then when you package an RPM or DEB or whatever, there's no install time dependencies.
- 59:36And so there are minimal side effects.
- 59:37Basically, repeatable deploys are critically important in any environment.
- 59:41And whether you achieve them via RPMs, DEBs, containers, whatever, as long as you have those repeatable deploys, you're going to be in a lot better spot.
- 59:50Yeah, definitely.
- 59:51Repeatable and automated are the key element, right?
- 59:55Yeah, I talk about CI in here.
- 59:57We definitely use Jenkins and so forth.
- 1:00:01I don't know if I'd recommend Jenkins specifically, but another team is running the Jenkins.
- 1:00:05That's the thing.
- 1:00:06We have a group that manages Jenkins for us.
- 1:00:09And so if that's one more thing we don't need to do, that's one more thing of our own that we can do.
- 1:00:13Yeah, that's awesome.
- 1:00:14All right.
- 1:00:15So I think for the course, we'll just have to leave it there.
- 1:00:18We're out of time.
- 1:00:19Let me ask you.
- 1:00:20Oh, wow.
- 1:00:20Yeah.
- 1:00:21Let me ask the questions I ask everyone.
- 1:00:23So first of all, I know I asked you this way back, like a year ago, but maybe it's changed.
- 1:00:28Favorite editor?
- 1:00:29No, I mean, it hasn't changed.
- 1:00:31Emacs.
- 1:00:32I still use Emacs primarily in the console.
- 1:00:36Yeah, because this is interesting because now there's going to be like Ubuntu on Windows, sort of a GNU NT thing.
- 1:00:43So I've actually considered getting a Windows laptop and running Emacs natively in it because we have so many Windows users here at PayPal to help support them.
- 1:00:53Yeah, you'll be able to live the life they have to live and sort of experience it.
- 1:00:56Yeah.
- 1:00:56That was just announced last this week or no, last week at Build.
- 1:01:01So yeah.
- 1:01:02Yeah, yeah.
- 1:01:03Basically, Ubuntu running natively on Windows.
- 1:01:05It's weird to be excited about Windows feature.
- 1:01:07For me, it's weird to be excited about Windows feature.
- 1:01:09I could only get more excited if they told me that they're going to build in Python.
- 1:01:13Maybe they will.
- 1:01:13That would be intense.
- 1:01:14You know, when Windows 10 was under development, I was using the community preview or whatever they called it.
- 1:01:22And they had a user voice set up for you could recommend features and get votes.
- 1:01:26And I recommended that they install Python and ship Python 3 and Python 2 as built in to Windows.
- 1:01:35And I got, I think, over a thousand votes from the community to say, yes, Microsoft, build this.
- 1:01:40Absolutely.
- 1:01:41And sadly, it went nowhere.
- 1:01:43Nowhere.
- 1:01:44I mean, maybe somebody heard it.
- 1:01:46You know, that's one thing with the enterprise.
- 1:01:48Like, you know, there are so many, like, moving parts inside of it.
- 1:01:51You know, you can, just because you don't see anything happen on the surface doesn't mean that people aren't hearing it inside.
- 1:01:56Yeah.
- 1:01:57It doesn't mean it'll go anywhere.
- 1:01:58I'm not, I can't make promises for Microsoft.
- 1:02:00Right.
- 1:02:00Yeah, just the show I just recorded before this one was Steve Dower.
- 1:02:04And he works at Microsoft on doing a lot of really interesting stuff with Python and Visual Studio and Windows.
- 1:02:12And so there's, there's, there's a chance someone will pick it up.
- 1:02:16We'll see.
- 1:02:16We'll keep putting the idea out there.
- 1:02:17I'm hopeful.
- 1:02:19Yeah, absolutely.
- 1:02:21All right.
- 1:02:22And favorite PyPI package?
- 1:02:24What do you, what do you find recently?
- 1:02:26That's awesome.
- 1:02:26This was all, like, this was really, really tough.
- 1:02:29I mean, I don't think I said this last time.
- 1:02:33I mean, G event and Greenlit, we use it so much at work that, like, I just have to give it a shout out.
- 1:02:38G event and Greenlit.
- 1:02:39But, you know, we have Twisted users here.
- 1:02:43Twisted is a very respectable code base as well.
- 1:02:46And, you know, I'll give a little shout out.
- 1:02:48I'm working on a, a stats post that, like, you know, statistics for engineers and whatnot.
- 1:02:53And a lot of that is motivated by a new project I'm working on called Lithoxal, which is sort of next generation logging and instrumentation.
- 1:03:01You know, it's not public yet, but I know that some people on the podcast are probably early adopters.
- 1:03:06And, you know, it's good to get some feedback.
- 1:03:08So, L-I-T-H-O-X-Y-L.
- 1:03:12Awesome.
- 1:03:13Weird name, good library.
- 1:03:14That's awesome.
- 1:03:16We're going to give away a copy of your class, right?
- 1:03:19Absolutely.
- 1:03:19Yeah.
- 1:03:20All right.
- 1:03:20So, if you're listening and you want to check out the course, it is on O'Reilly.
- 1:03:24All you have to do to be eligible to win is be a friend of the show.
- 1:03:29So, visit talkbythumb.fm.
- 1:03:31Go to the nav bar, click friends of the show in your email address, and then we will randomly choose somebody later in the week and give you a free copy of the course.
- 1:03:41If not, how do they find it?
- 1:03:42Like, if people want to check out the course, where do they go?
- 1:03:44So, there are several places to find it.
- 1:03:46So, one major reason I went with O'Reilly is because so many large organizations have Safari.
- 1:03:51And so, I waited until the course propagated to all of the Safari-like installations.
- 1:03:57So, if you have TechBus or, let's see, I mean, you can just go to Safari Books Online and type in Enterprise Software with Python.
- 1:04:05Otherwise, you can go to straight up O'Reilly.com, and it's called Enterprise Software with Python.
- 1:04:11And so, you can just search it.
- 1:04:12I think it may even be Google-able.
- 1:04:13The one thing is it has a price, right?
- 1:04:17If you're someone who can't afford it, just get in touch, right?
- 1:04:21This is something that I'm passionate about.
- 1:04:23And, you know, I want to make sure that everyone has a chance to get into the professional Python software development world.
- 1:04:29Yeah.
- 1:04:30It's a really great course.
- 1:04:32I totally enjoyed going through it.
- 1:04:34So, nice work.
- 1:04:36You have a course as well.
- 1:04:37I do.
- 1:04:37I just released one a month ago, Python Jumpstart by Building 10 Apps.
- 1:04:42And that's been really well received.
- 1:04:44That was cool to do it on Kickstarter.
- 1:04:45And I just announced this week, I think, yes, Monday, that I'm working on a new one called Python for Entrepreneurs.
- 1:04:53And basically, you know, if you've ever built a business, it's only like 30% product.
- 1:04:59It's only 30% technology.
- 1:05:01And there's all this other stuff.
- 1:05:02Like, how do I accept credit cards?
- 1:05:03You know, speaking of PayPal and that sort of thing.
- 1:05:06How do I gather emails and send newsletters?
- 1:05:09And just all, how do I do deployments?
- 1:05:11How do I do SSL?
- 1:05:12All that kind of stuff.
- 1:05:13Oh, yeah.
- 1:05:14It can be intimidating.
- 1:05:14Yeah.
- 1:05:15When you think you've finished your app and whatnot, you know, you're like, okay, well, I'm almost ready to release it.
- 1:05:21No, you're like 30% of what you're done.
- 1:05:22So, I wanted to create a class that would help people close that gap.
- 1:05:25Great.
- 1:05:25Yeah.
- 1:05:26No, I've already, I think, bought a copy.
- 1:05:29And, you know, we're going to actually have a little powwow with the Python community here at PayPal.
- 1:05:34Oh, awesome.
- 1:05:35Well, thank you so much.
- 1:05:36That's great.
- 1:05:36Yeah, it's good stuff.
- 1:05:38Cool.
- 1:05:38Well, Mahmoud, this is fun as always.
- 1:05:41Your original 10 Myths post was super inspirational.
- 1:05:44I think to a lot of people, it certainly was to me.
- 1:05:47And I was really glad to feature as one of the early shows.
- 1:05:50And this is kind of like the rounding out of that story.
- 1:05:53So, everyone go check out his course.
- 1:05:55It's great.
- 1:05:55Yeah.
- 1:05:56Thanks, everyone, for all the support, frankly.
- 1:05:58Yeah.
- 1:05:59I don't think I could have done it without at least some of you.
- 1:06:04That's awesome.
- 1:06:04That's awesome.
- 1:06:04So, yeah, that's great.
- 1:06:06All right.
- 1:06:06See you later, Mahmoud.
- 1:06:07Thanks.
- 1:06:07Yeah.
- 1:06:08Bye-bye-bye.
- 1:06:09Bye-bye.
- 1:06:10This has been another episode of Talk Python To Me.
- 1:06:13Today's guest was Mahmoud Hashemi, and this episode has been sponsored by SnapCI and Hired.
- 1:06:17Thank you guys for supporting the show.
- 1:06:19SnapCI is modern continuous integration delivery.
- 1:06:22Build, test, and deploy your code directly from GitHub, all in your browser with debugging,
- 1:06:26Docker, and parallelism included.
- 1:06:28Try them for free at snap.ci slash talkpython.
- 1:06:30Hired wants to help you find your next big thing.
- 1:06:33Visit hired.com slash talkpython to me to get five or more offers of a salary and equity
- 1:06:37right up front and a special listener signing bonus of $2,000.
- 1:06:41Are you or a colleague trying to learn Python?
- 1:06:43Have you tried boring books and videos that just cover the topic point by point?
- 1:06:47Well, check out my online course, Python Jumpstart, by building 10 apps at training.talkpython.fm.
- 1:06:52You can find the links from today's show at talkpython.fm/episodes slash show slash 54.
- 1:06:58Be sure to subscribe to the show.
- 1:07:00Open your favorite podcatcher and search for Python, which should be right at the top.
- 1:07:03You can also find the iTunes and direct RSS feeds in the footer of the website.
- 1:07:07Our theme music is Developers, Developers, Developers by Corey Smith.
- 1:07:11It goes by Smix.
- 1:07:12You can hear the entire song on talkpython.fm.
- 1:07:15This is your host, Michael Kennedy.
- 1:07:16I really appreciate you guys taking the time to listen.
- 1:07:18Smix, let's get out of here.
- 1:07:21Outro Music
- 1:07:23Outro Music