Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book


Transcript #49: Your technical skills are obsolete: now what?

Return to episode page view on github
Recorded on Tuesday, Oct 24, 2017.

00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:05 This is episode 49, recorded October 24th, 2017.

00:10 I'm Michael Kennedy.

00:11 And I'm Brian Okken.

00:12 And we have yet another six or more amazing news items, actually tons of really cool stuff to share with you.

00:18 But before we get to them, I want to say thanks to DigitalOcean for creating Spaces and sponsoring this podcast to tell you about Spaces.

00:26 Spaces are like S3 but way, way better.

00:29 And check them out at do.co/python.

00:32 Tell you more about that later.

00:33 Right now, I want to go watch some videos.

00:35 Yeah, I know there's a lot of conferences that go on around the world.

00:39 And actually, anybody that's doing a Python conference, I have no problem with trying to highlight those.

00:45 So let us know when they're going on and also when their videos are up.

00:49 And that's what I want to talk about right now is there's a couple conferences who have videos available now.

00:54 DjangoCon and PyGotham both happened recently and both of their videos are available.

01:00 So we've got links to both.

01:01 PyGotham is on, I don't know if it's on YouTube or not, but it is up on pyvideo.org and the DjangoCon 2017 is up on YouTube.

01:12 I've got links to both those playlists.

01:14 I was excited to look at a lot of these and one of the videos I started off with was a a video from DjangoCon called Django vs Flask and it was by DB David Baumgold.

01:27 That sounds fun.

01:28 It actually was interesting because it's somebody that respects both Django and Flask and it was probably one of the best Flask videos I've watched talking about how to deal, kind of how to do some of the things you can do in Django right out of the box but how to do it in Flask and comparing those.

01:47 That sounds like a really cool video.

01:49 It's one thing to go study Django, it's one thing to like learn Flask, but to see the features side by side sounds like a really nice way to... if you're new and you're trying to decide should I go with Flask or should I go with Django, this is like half an hour 45 minutes You'll have probably a really good idea rather than you've got to like spend hours learning each and then decide, right?

02:08 It sounds like he leans... he likes the flexibility of Flask. However, it's obvious that he has respect for both and And he's talking at a Django conference, of course.

02:19 There's some things I didn't even know about, which was cool.

02:21 I didn't know about Flask blueprints, and I didn't also definitely never heard of Flask Marshmallow for APIs before.

02:28 - Marshmallow, yeah, that's great.

02:30 And it covers things like SQLAlchemy, MongoEngine, PeeWee, all the great ODM, ORM, data access layers.

02:37 It's cool.

02:37 - Yeah, but there's so many other great videos up from those two conferences, and I really appreciate that.

02:43 That part of the Python culture that we try to make the conference videos available for people.

02:48 >> Yeah, that's great. I love that these conferences are so quick about getting the videos up.

02:52 The videos are really high quality usually.

02:54 The sound is good, everything's in focus.

02:57 A lot of times it's picture and picture.

02:58 I mean, well done. So that's nice.

03:00 >> What do you got for us, Michael?

03:01 >> Well, I want to pay a little attention to Facebook, because Facebook does a lot with Python actually.

03:07 People will tell you Facebook is written in PHP, and that it uses React, the JavaScript framework which they invented on the front end.

03:15 So it's like PHP plus React.

03:16 And that's interesting.

03:17 But it turns out that I don't work there.

03:19 I don't really know a lot of people there.

03:21 From what I've been able to read, there's a decent amount of Python backend services sort of supporting that PHP front end.

03:29 OK?

03:30 Wow.

03:30 Yeah.

03:30 And so it's pretty cool.

03:31 And there was a tweet from one of the guys there, El Lange.

03:35 I think he works there.

03:36 I'm pretty sure he works there from the reading of the tweet.

03:39 But he was talking about Facebook and said, hey Python 363 was released on Tuesday and I think last Tuesday you covered that which is pretty awesome. This was maybe this was two weeks ago when it was released though they said this tweet was three days after that and said all the machines at Facebook are already running Python 363.

03:58 That's cool. Three days and they said that 36.3% of their Python apps are based on 36 already.

04:07 How about that? That's great, man. I love three six now. I do too. The f-strings are just so delightful.

04:13 Yeah. And so this is super interesting. And what's more interesting is I would say, 20. Oh, gosh, I'm forgetting the numbers off to just send you guys to the video, and let you pull the numbers out. But a couple years previously, Facebook was not friendly to Python three, basically, they had just gotten access to Python two, seven from two, six.

04:34 Okay, that was the big upgrade.

04:37 And the all the recommendations reduce Python 2, the onboarding processes said, hey, when you get here, you should you're expected right in Python 2, etc, etc.

04:47 And this guy named Jason Fried, not of 37 signals fame, but different Jason Fried, took over the process of trying to shift the organizational culture to valuing Python 3 as the default and making the people that do Python 2 look kind of outdated and funky.

05:06 So there's this really great presentation called Rules for Radicals, Changing the Culture of Python at Facebook.

05:11 And it's step by step, it's a step by step playbook basically of how he transformed the culture to where we're in this place where you say Python 3.6.3 was released on Tuesday, Facebook machines are now running it.

05:26 And that tweet comes out on Friday, right?

05:29 So this is not from, this is not like, well, Facebook's a startup, it can always do like, no, it was this huge organization transformed through like clear, simple, repeatable steps.

05:40 So I think this is just a really cool evidence of Jason Fried's work and well done, Jason and everyone at Facebook.

05:46 Yeah, and I can't wait to watch this video.

05:47 Thanks for linking to it.

05:48 Yeah, it's super cool.

05:49 It was at Pi, Ohio, a couple years ago.

05:53 And in more modern Python news, Ubuntu 17.10, which just came out and I upgraded one of my servers recently to it. It says Python 2 is no longer installed by default and Python 3.6 has been upgraded to 3.6. How about that? That's great. Another step forward. Alright, so modern Python is on the march. And 3.3 is end of life by probably by the time this comes out. It's already end of life so if you have something on 3.3 it is time to move up and if you're gonna move up don't go to 3.4 go to 3.6. Speaking of new technologies there was a pretty good article and it's not Python specific but called "Your technical skills are obsolete, now what?" And this is it's actually a pretty fun article about you know since you and I are both big proponents to people keeping their skills up-to-date and learning new things I thought it fit in nice and this article is focused on how to do that while at work to not try to eat into your home life to beef up your skills. I think there's a lot of people who feel kind of in a tough situation because they see all these new technologies coming out and they hear presentations or people say, "Oh, the stuff that you're doing is so old and crappy.

07:05 You should be doing whatever whiz-bang new thing it is." These recommendations or this excitement, probably rightly so, but it comes from people who are young.

07:13 Maybe they don't have kids or they're single and they have a lot of free time and to spend an extra two hours after work on some project is like no big deal if you're young and you got lots of free time and energy but if you know you're getting dinner for the kids and you've been up early driving to school and you got to work with homework it's just like it's a whole nother level right? I think it's a great idea to try to fit that into your to your work if you can. One of the things is I really like that he starts off by talking about the reasons sometimes good reasons why companies stay with an old technology however I mean if Facebook can switch in a few days what's your company's excuse? That's right. Seriously though there's sometimes there's good reasons to not jump on the bandwagon right away. So he goes through some steps of identifying obsolete and problematic technologies and trying to do some research on potential replacements and then trying to get buy-in from your management and hopefully to try to get some time for yourself or maybe you and some other people to do a pilot project exploring this process. Yeah the main message of this was look if you want to find a way to learn new skills, you need to fit it into work often, right?

08:25 Unless you just want to really put in a lot of energy to learn something outside of work.

08:28 But if you're going to try to fit into work, go and identify a problematic area of your technology stack and see, like, create a plan on how to solve that problem with the new technology by you, thereby you learn the new technology by solving the problem.

08:44 So you're actually adding value, not just saying, "Please send me to training.

08:47 You can send me in six weeks, six months, whatever, right?" So then he does talk about how to pose those questions and talk to your manager about making the change.

08:56 But he kind of ends with, "If your boss says no, then you at least have some extra skills that you can apply to your next job." And I'd like to shim in there and say, "I think you should use it to start a conversation with your boss or your management chain about that you care about the company, you care about increasing the skills of both yourself and the others on your team, And how can you go about doing that and why?

09:21 Why the no?

09:22 Like, is it bad timing?

09:24 Or do you just have a bad proposal?

09:26 Or too much time spent?

09:28 Anyway, I think that you should try to not throw your company under the bus right away and try to work a little harder.

09:34 So I think actually the video you linked to with the rules for radicals probably fits right in here too of trying to change your company.

09:43 Yeah, absolutely.

09:44 You don't just, like Jason didn't just go, well, they said Python 2, so I'm going go find a startup, forget this, right?

09:49 He actually changed Facebook, which is even more impressive.

09:52 - And then a book that a little tiny, it's a little tiny read, book I read a couple years ago, it's called Team Geek, that has some great advice on this.

10:01 And it says that things like changing your process, you probably ought to limit it to under 50% of your time.

10:08 I would say stronger, I would say 10 to 20% of your time at most trying to fix things.

10:14 And then the other thing is, There's a nice section on, sometimes it's easier to ask for forgiveness than permission.

10:21 You can try to get your manager buy-in, but also, if you're not spending much time on it, you might be able to just change some things and make it better.

10:28 Like one of those disclaimers, "My advice cannot be taken as legal advice "and you should seek your own legal counsel." - Yeah, your conditions may vary, but I think it's really good advice and this article is really practical, especially for people who are not trying to spend extra hour a day outside of work learning something.

10:47 So that's really cool.

10:48 I feel like there's a lot of slack in big organizations already.

10:53 You get put into a lot of meetings.

10:56 You have a lot of, I don't know, there's time between the actual work that seems to get done.

11:01 And if you can just wall off like a little bit of that for learning and working on a project, it could be like a skunk work thing, I'm trying to prototype something different, or I'm just learning something.

11:11 But if you could like say find an extra half hour a day to be studying something in the context of your work that you're trying to learn, that actually could make a huge difference over a couple months.

11:21 So that's usually pretty good to do.

11:22 I completely value in my employees somebody that really wants to increase their skill set and also cares about saving the company money and making things better.

11:34 So at the very least, your management chain should know that you care about that too.

11:38 They should care about that.

11:40 People who care about this stuff and who are actively working on it, those are the type of people you want.

11:44 The ones that don't complain, that are just going to like work on that old 20 year old technology, like that's fine that they're great employees and they're doing that, but that's, that's not going to push you guys forward.

11:54 So definitely, I think people should see this as a positive.

11:57 Awesome.

11:58 Speaking of making and making things better, DigitalOcean has made online cloud storage for apps much, much better with their new thing called Spaces.

12:07 So check out spaces at do.co/python.

12:11 And the idea is it's a similar service to Amazon S3, right?

12:15 You have a just a cloud storage, you can have either private or public things stored up there on huge, huge amounts of data.

12:24 If your app has a process, a bunch of pictures, and you got to store the picture somewhere instead of jamming them in the database, put the gigs of pictures up in spaces.

12:33 And it's really easy to adopt because it uses the same API's as s3.

12:39 So tools like the transmit app I use on my Mac, I just pointed at the URL for spaces and I tell it an s3 thing and it just works.

12:47 So that's super cool and easy to do the pricing is so much better than s3 $5 a month flat for 250 gigs of storage, a terabyte of outbound bandwidth, which would be like $90 alone on S3. And then it's just one cent per gigabyte instead of nine. So definitely, definitely check it out. I'm using it for this podcast and many other things. The audio you're listening to came over it. So how about that? It's super easy to use. And it's a great deal and very predictable.

13:16 So do.co/python and check out DigitalOcean Spaces. Let's talk about visualizing things as well here. So the last week you brought up that deep dive inside of garbage collection. That was a super good article and I really appreciated getting a look at how the reference counting GC worked, about how the actual mark and sweep garbage collector that would solve the cycle problem worked, how Python uses that combination of them, and a lot of the really nice details about at this number it behaves differently if it's bigger or smaller, right? These little cutoffs are always fun to know. There are many different garbage collection algorithms of which reference counting and mark and sweep are just one. And so this guy named Ken Fox, it's not a brand new article or anything, but it's really a cool follow-up. Wrote this thing called "Visualizing Garbage Collection Algorithms." And yeah, I think this is, if you liked the last article, you should definitely check out this one. The little videos on visualizing this are, they're kind of mesmerizing. I kind of want to like leave one up on my screen or something. They're great. Yeah, exactly. If If you could have a screensaver of visualized GCs, it would be beautiful.

14:24 (laughs)

14:26 We need that company that made the toasters, the flying toasters, we need them to make that, right?

14:30 - Even though I covered it last week, I'm trying to remember.

14:32 The Python is both a reference counting collector and a mark sweep collector, right?

14:37 - Right, so by default, Python tries to use reference counting.

14:41 So every time you have a pointer to an object, it increments the counter, and then once that counter goes back down to zero, then it just deletes it.

14:49 The problem with all reference counting collectors are, if you have any form of cycle, that's straight up a memory leak right there, right?

14:57 Parent, child, child, parent, boom, never goes to zero, never deleted.

15:01 That can be a huge problem.

15:02 And so there's ways to solve that.

15:05 Usually that's some other kind of managed garbage collector, right?

15:09 And that's why they bring in the market sweep one, 'cause it goes and finds these cycles and gets rid of 'em.

15:14 - One of the questions I have that I don't expect you to have the answer, I'm curious about it, is if fragmentation becomes a problem within Python or not.

15:22 - I think it does, I think it does.

15:24 You can actually see it in the picture.

15:25 So let's go through the five visualized here.

15:28 So there's actually five different types of GC.

15:30 There's no GC, which just means we're just gonna allocate and not clean up stuff.

15:35 Hopefully we won't spend too much memory and that'll be fine.

15:38 Like that's actually a super efficient way as long as you have enough memory.

15:43 And it might sound outrageous, but Apache, the Apache web server actually creates small pools of memory per request and then just throws them away and doesn't try to manage that memory.

15:52 Dirt is, so, you know, I guess in like small doses that could work, there's the reference counting one and that's Python's first past, as we talked about.

15:59 There's a mark and sweep collector, which goes and says, I'm going to start all the known pointers that I have follow them, the things they point to, dah, dah, dah, right.

16:09 Follow all that sort of transitive closure of pointers and indicate or mark everything that is not garbage.

16:17 So it's like a not garbage finder and whatever it doesn't find, well, that's garbage.

16:21 And then there's some stuff more like Java and .NET and those types of things that are mark and compact collectors.

16:29 All right, so Python, you asked about the fragmentation.

16:31 It doesn't, as far as I know, it doesn't move the memory around and change where the pointers point.

16:37 After it does a collection, it just cleans up the cycles, right?

16:40 And so if you had a 10 byte object in between two things, it got cleaned up, that 10 bytes is just a hole.

16:47 Maybe you can fill it, maybe you can't.

16:49 But the compacting ones, those will squish the memory back together.

16:53 And what's interesting about the compacting ones is allocation in a compacting collector is insanely fast.

16:59 Probably faster than C++ or C because you don't have to traverse that list of open slots where your new memory might fit.

17:07 You just always allocate at the end because you've compacted it down, right?

17:11 So allocate means increment a pointer by, you know, you want 10 bytes, you increment the pointer by 10, done.

17:17 Right, so it's pretty interesting.

17:19 There's a couple of kinds.

17:21 And so this goes through and visualizes all of these, and you can actually see the effect, and you can see the fragmentation that you were talking about in the reference counting one.

17:28 But it's pretty cool, this set of visualizations.

17:32 - Definitely.

17:33 - You know, I feel like I should be using Pathlib more than I do, and I just do os.path.join and that sort of stuff that are the older style of working with paths in Python.

17:43 And that's worked with me, but this article by Doug Hellman that you pull out here, this is pretty cool and it makes a solid case for Pathlib.

17:50 - Yeah, actually, and so I went back and like, when did Pathlib come in?

17:54 And suppose it came in, introduced in Python 3.4, so it's a Python 3 new thing.

18:00 It's an object-oriented system to work with paths.

18:04 So paths as objects.

18:05 And like we're pointing to Doug Hellman's Python module of the week, the Python 3 version, and it's pretty good, it's a very quick read to skim over all the sort of stuff you can do.

18:19 Yeah, I learned things just the other day, thinking, oh my gosh, I've been using OS too much, I should use this more.

18:25 - Yeah, for sure.

18:26 And I was really blown away at the way you use the division to hack the visual, right?

18:33 - Like the way you use the divider, like forward slash, so you can have like one path forward slash the other path and it just joins them as if it was this thing slash that thing in the actual string, right?

18:43 - And you can over, I use that division operator with either path objects or just some quote strings and characters and quotes to add things to your path.

18:53 And I didn't know that it had glob in there, so that's pretty cool.

18:56 And iterdir, iterdir for like iterating over files in a directory, that's pretty nice.

19:02 - Right, one of the things that's annoying about os.path is if you wanna actually create directories or delete them or stuff, there's like all these unrelated ways.

19:11 Like you go out to other areas, you know, like os.mkdir rather than os.path.mkdir, just funky inconsistencies.

19:19 And this like brings it all together.

19:20 You can like create and delete directories and things like that.

19:23 - And then there's some top level stuff for concrete paths that are shortcuts like path.home and path.cwd that just work whether you're on Windows or a Linux-based POSIX system.

19:36 - Yep, that's really nice.

19:38 Cool, yeah, so definitely, speaking of learning new things, here's something people can learn.

19:42 This is great.

19:43 So we talked about visualization before, but can computers see?

19:47 - Yeah, sure.

19:48 - I think they can.

19:49 I mean, cars, we're surprisingly close to a world where cars can drive on their own.

19:55 Are you ready?

19:56 - Yeah, I'm totally ready.

19:56 - Yeah, I mean, we've got a whole bunch of deep learning stuff happening.

20:00 NVIDIA made a car, I think we talked about this before, where they just had it observe humans and they made it go drive.

20:07 And they don't know how it knows how to drive, but it can, things like this, right?

20:10 They didn't teach it to drive, it just learned.

20:13 And so I wanna highlight this thing called Luminoth, an open source computer vision toolkit.

20:19 So this is a new computer vision toolkit for Python and it uses deep learning to understand computer vision.

20:27 So basically, its main job right now is to work on object detection and classification, but they're trying to do a lot more with it, like that was the first problem they solved.

20:37 So it's built Python, it uses TensorFlow and Sonnet, which is Google's deep learning framework and deep mind's graph library.

20:45 So these are really cool.

20:48 This is the same thing that Google is using very likely for things like its AI that just beat Go, Or, it had beat Go before, but they just announced that there's a new AI that beat Go without anyone teaching it how to play Go.

21:02 So that's the news this week as well, by the way, although I don't have a link to the article.

21:07 So you can super easily train this thing.

21:10 It's like a couple of lines of code, and then you can start asking it to find stuff in objects.

21:15 And it'll say, "That's a bike.

21:16 That's a hand.

21:17 That's a person.

21:18 The face is over here.

21:19 No, that's three people." Things like that.

21:22 cool and it uses this modern state-of-the-art algorithm called region-based convolutional neural networks, R-CNNs.

21:32 Even comes with GPGPU support and it's cool.

21:36 They even are going to send pre-trained checkpoints for objects that is already pre-classified with some really large data sets from other challenges.

21:45 >> Oh wow, that's great.

21:46 >> Isn't that cool?

21:47 want to go and create a project that does some sort of image classification or identifies objects in images, check this out.

21:54 Because if it comes with pre-trained algorithms already, and you have a similar type of data as what they already trained it on, you might be able to just pick this up and use it.

22:04 Yeah, well, one of the examples it shows is detecting dinosaurs in a picture.

22:08 Yeah, that's awesome.

22:09 So you could build a home security.

22:11 Yeah, it'd be useful so that you could find out if a dinosaur's at the door.

22:15 Don't open it.

22:16 No, it's a dinosaur.

22:17 - That'd be great.

22:18 Like if you could come, for some reason I'm fixated on doorbells.

22:22 If you come up with a doorbell that like rings differently based on what it detects.

22:26 If it detects a kid, like one of your kid's friends is at the door, it could make one kind of noise.

22:32 If it's a UPS guy, it can like make a package noise.

22:35 I mean, wouldn't that really be a cool product?

22:37 - Yeah, like a really big happy sound if it's a pizza delivery guy.

22:40 - Yes.

22:41 Pizza.

22:42 (laughing)

22:43 You've got nails.

22:44 Yeah, that sounds like a very good business.

22:46 Let's do that.

22:47 All right, anyway, if you guys are into image recognition, check this out.

22:51 It's a cool project, Illuminoth.

22:53 It's fairly new.

22:54 You got a bonus for us, right?

22:55 - Yeah, I was gonna put this as one of my picks, but it felt kind of, anyway, there's a bonus article called The Cleaning Hand of pytest, and it's somebody else's experience of what it was like to work in Unit Test and Nose after using pytest.

23:11 And I feel a little, actually, I don't feel bad at all, But at the end, he links to my book, which is good.

23:17 So check that out.

23:19 - Ah, that's nice.

23:20 That's a nice validation.

23:21 That's cool, yeah, the cleaning hand of pytest.

23:22 That sounds really fun.

23:23 - How about you?

23:24 What's up with you?

23:25 - Well, not a whole lot going on.

23:26 I wanted to highlight two things.

23:28 You mentioned the various PyCons going on and PyTennessee 2018 is coming up.

23:33 So if you're anywhere near Nashville and you wanna go to a PyCon, you don't wanna wait until May to go to the big, big PyCon in Cincinnati.

23:42 I think it's somewhere in Ohio this year.

23:44 You can go in February 10th and 11th, you can go to one in Nashville, Pi Tien.

23:49 So check that out, that's really awesome.

23:51 - That'd be fun.

23:52 - Yeah, I was thinking of trying to go, but it turns out that my wife's already out of town that week, and with children, we can't both be out of town the same week.

24:01 So that sort of squashed that.

24:04 The other thing really quick is I wanted to point out, a movie, it's not super new, it's like a couple years old, but I think people in this audience will really appreciate it.

24:11 Are you into gaming, Brian?

24:12 - No.

24:13 - I'm not either, and so I'm kind of oblivious to this world and what has happened to it in the last five years, but there's this movie called All Work and All Play, it's available on Netflix, I linked to the trailer, and it is a really interesting look inside what has been going on in the world of professional gaming.

24:31 So if you're into that, there's basically, they had the World Championship of Gaming, they had it in Poland, and there's some big upsets and surprises, and I think they said hundred thousand people attended in person. I mean it's like insane. So if you haven't been paying attention to this, this movie is pretty eye-opening. So this is people playing video games? This is a competition of League of Legends players. I think there were six teams. Okay. Six or eight, no eight teams I think. And then these are people watching the games being played live in person. So you're not a gamer either? We found two nerds talking to each other and both of them are not gamers? No, not really. I mean my... What are the odds. I know it's pretty low I guess. My pastime is to work on software projects. That's my game is like solving software problems not you know made-up game problems. Every now and I'll play an iPad game or something but nothing major.

25:23 Yeah okay well cool. All right well thanks a lot. You bet and I'll catch you next week. Thanks everyone for listening. Bye.

25:32 Thank you for listening to Python Bytes. Follow the show on Twitter via @PythonBytes bytes that's Python bytes as in b y t e s and get the full show notes at Python bytes dot fm if you have a news item you want featured just visit Python bytes dot fm and send it our way we're always on the lookout for sharing something cool on behalf of myself and Brian Okken this is Michael Kennedy thank you for listening and sharing this podcast with your friends and colleagues

Back to show page