Transcript #150: Winning the Python software interviewReturn to episode page
00:00 Hello and welcome to Python Bytes where we deliver Python news and headlines directly to your earbuds.
00:05 This is episode 150 recorded September 25th, 2019. I'm Brian Okken.
00:11 And I'm Michael Kennedy.
00:12 And this episode is brought to you by Datadog. Check them out at pythonbytes.fm/datadog.
00:18 More on what they have to offer later. But Michael, right now I kind of sense a theme.
00:24 Are you looking for a new job? Are you hiring somebody? Or what's going on?
00:27 I'm going to cover a couple of topics about getting better at interviews.
00:31 You know, I kind of hope I never have to apply for a job or go to a job again in my life.
00:37 So no, I'm not actually on the hunt for that.
00:40 But I do have a couple of friends who are looking for jobs.
00:44 And you know, I'm just a little sympathetic to the challenges and whatnot.
00:49 So I want to kick us off with a thing called how to stand out in the Python coding interview.
00:56 This comes from James Timmons on, and he wrote it on real python.com.
01:01 So it's kind of a Python version of the stuff that it seems like the tech industry thinks you should know.
01:10 And I feel like it's a little bit better.
01:11 I feel like the tech industry says, Oh, you know, which is better, a bubble sort or a quick sort?
01:16 You know what?
01:17 I don't care.
01:17 I call sort on the list and we're good.
01:20 You know, I don't maybe sorted like you could debate dot sort versus sorted, but who cares, right?
01:26 Like, this is not a problem we need to keep solving.
01:29 And yet it feels like in the interview process it falls back to, well, they asked about big O notation, they asked about algorithms of that type, they asked about a data structure, like when would I use a doubly linked list versus a single linked list?
01:44 And like, ah, I can go build a Python web app with SQLAlchemy and talk to Stripe and charge a credit card, but I forgot when I use a single linked list, right?
01:56 single direction like list.
01:57 But that seems like what people are testing.
01:59 So here's an article that sort of covers those kinds of questions, but specifically for the Python developer.
02:07 And I think it's pretty decent.
02:09 So it's meant to help you kind of navigate that space of Python and show you that you have some knowledge of the built-ins and of the language and things like that.
02:19 And you can kind of write decent code.
02:21 So it covers a handful of things with a bunch of other stuff mixed in there.
02:26 So how do you use enumerate to iterate both over a view of like collection to iterate both with indices and values.
02:33 And if you've been doing Python for a long time, that's obvious.
02:36 We do that a lot, but if you come from a language like C plus plus or Java or something that doesn't have this all of a sudden, well, then it's really weird.
02:45 And you don't know to use it.
02:46 So it's good to have that in there.
02:47 Debugging with breakpoint formatting with F strings F yes.
02:51 For that one.
02:52 That's great.
02:54 All right.
02:55 Sorting lists.
02:55 I talked about that, like you don't have to care about the algorithms, but knowing how to sort stuff is really nice generators and it's pressure on memory.
03:03 Default values and dictionaries using the counter class and then just some standard library stuff.
03:09 And I think knowing all those things kind of puts a nice Python spin on that level of Python interviewing.
03:18 Do you do any interviewing?
03:19 I haven't actually applied for a job for several years.
03:22 Do you do it in reverse though?
03:23 Do you hiring?
03:23 I mean, like interview people for it there.
03:25 - Yeah, definitely a lot.
03:26 And I help out with other teams too when they're hiring.
03:29 And like, for some reason, people know me as this person that knows Python.
03:32 So I'll do the Python interview part.
03:35 But yeah, a lot of this stuff is stuff that I look for.
03:38 If you actually say for I in length, the interview's over.
03:42 Just, you don't know Python then.
03:44 - Yeah, I mean, maybe if you're hiring for, like I'm hiring a developer and it doesn't, they don't have to know Python, but they're going to be doing it.
03:50 So we're going to help them along.
03:51 And they are, they're really good at Java.
03:53 You could probably mentor them over.
03:55 But if your goal is to hire an experienced Python developer and they don't know for item in collection, like, yeah, you're done.
04:03 - Yeah, but I'm a pretty fair person.
04:05 I talk through stuff.
04:06 People can always recover.
04:07 If you freeze up, don't worry about it, just flow with it.
04:10 I think people should interview more, even if they're not looking for a job, just to keep up their interview chops.
04:16 It's good.
04:17 - Yeah, nice, I agree.
04:18 - Speaking of being nice to people, we have a bit of news, and even though I didn't even actually know this was an issue.
04:23 So there was an announcement made that the PSF, the Python Software Foundation, updated its code of conduct.
04:30 And apparently the PSF had one code of conduct for the PSF and things it was sponsoring, and a different one for PyCon US.
04:38 And now there's just one.
04:40 So that's the big news.
04:42 And we've got links to the code of conduct and the enforcement guidelines and reporting guidelines.
04:47 And we hear about codes of conduct occasionally and stuff.
04:50 And in the past, I've thought, why do I have to care about this?
04:53 I mean, just don't be a jerk and try to be a nice person.
04:56 Isn't that enough?
04:57 And for the most part, yes, but if that was all there was to it and there weren't any problems, then we wouldn't need these.
05:05 And clearly we need them.
05:07 Things come up.
05:08 So I think it's good for people to go, it's not a long read.
05:11 I think people should read them, especially before you go to an event to make sure you know what's up with that.
05:17 The other thing that's nice to look up is what is the reporting mechanism?
05:21 So if you see somebody violating these, or basically just somebody being a jerk, what do you do about it?
05:28 Who do you contact?
05:29 And so that's good to just sort of, at least have read it once so that if it happens, you can look it up and figure out what to do.
05:35 - At least know what it is.
05:37 And you're kind of putting yourself in a space where you gotta know even a little more about it maybe, huh?
05:42 - Right, so one of the things is that it covers things that the PSF sponsors also, sponsored spaces.
05:48 This includes a couple different, two or three of the Python meetups around the country.
05:52 They're not sponsoring us yet, although we probably should hit them up for that.
05:56 But we are doing a meetup here in Portland West coming up next month.
06:01 And yeah, we probably ought to think about this of what to do if something happens.
06:05 So yeah, Michael and I will probably talk about this and before the actual meetup.
06:10 - Yeah, we'll figure it out.
06:11 What's the date of the meetup again for people?
06:12 - Oh my gosh, I should know this.
06:14 It's like the second Tuesday in October.
06:17 So that's like the sixth or the eighth or something like that.
06:20 - That would be the eighth.
06:21 - The eighth, yeah. - Yes, eighth.
06:22 Awesome, all right.
06:23 Well, for those of you who could make it, that'd be great to see you out there.
06:26 All right, now, speaking of great stuff, before we get on to more interviewing on my theme here, I wanna tell you about Datadog.
06:32 So Python Bytes is sponsored by Datadog.
06:34 They're a modern cloud-scale monitoring platform that brings things like metrics, logs, and traces all into one place.
06:41 Their tracing client includes auto-instrumenting support for things like Django, Flask, Postgres.
06:47 That means you get visibility into what your entire application is doing, not just maybe a trace out of your Python app or profiling just your Python app, but you can troubleshoot slow requests and optimize your code within a few minutes.
06:59 So start monitoring your dynamic environment with a free trial and Datadog will send you a free t-shirt as well.
07:05 Just get over to pythonbytes.fm/datadog to get started.
07:09 So this previous one that I talked about, Brian, It was very much focused on sort of these, almost these data structure algorithm versions.
07:19 And it said, here's the Python equivalent of some of these conversations you might have.
07:23 This next one, I don't know how long it would take you to go through all this stuff, but it would take you a good long while.
07:29 This is by Ben Rogagen, I'm gonna say, sorry about that if I got that wrong, goes by Seattle Data Guy.
07:38 So it talks a little bit about some of the silly stuff like FizzBuzz and some of the traditional classical, I don't know, silly algorithm problems like give us the mth Fibonacci, et cetera, et cetera.
07:49 And some things that you might study and so on.
07:52 But then there's a bunch of videos.
07:55 And I don't know how many videos.
07:56 There are many, I would say at least 75 videos on different topics.
08:02 And these are like 15 minute videos.
08:04 So there's some on algorithms, there's some on data structures, there's some on big O notation, dynamic programming, string manipulation, system design, operating systems, threads, object-oriented programming, design patterns, SQL, and more stuff.
08:19 So if you are in the process of trying to learn these things to get one of these jobs or nail one of these interviews, you've got homework.
08:26 - Oh, okay. - That's a lot, huh?
08:27 - This is frightening though.
08:28 Yeah, awesome that this resource is here.
08:30 Especially you can like pick a part where you, you know, had trouble with, or maybe after an interview even, and go, "Wow, I got asked this stuff and I didn't understand it, so maybe go review it then.
08:41 I was just watching all of the different algorithms, sorting algorithms, I love videos of sorting algorithms.
08:46 - I know, the visualizations, yeah.
08:48 There's a big graphic of like 20 different sorting algorithms all sorting next to each other at the same time, right?
08:54 Something like that. - Yeah.
08:56 - It's mesmerizing.
08:57 And also, I would say there are maybe 15 pages of comments, and the comments get kicked off like, I think we really need to face a reckoning in our profession.
09:07 And the reckoning is this.
09:08 we require an overload of stuff that's simply not important on the job just to get through the interview process and land a position.
09:16 So basically, you've got to go through all these algorithms, kind of like I said.
09:20 And then in the end, you do a lot of Googling, stack overflow, and you find packages on awesome Python, and then you install them and you roll.
09:27 There's a huge discussion about why that is, what we can do about it, and so on.
09:31 So I think it's great.
09:33 You should also check out the conversation in the comments.
09:35 On the other end of it, just a devil's advocate, one of the reasons I know people do pick up algorithm type questions is because they work in a specific space domain and it would be obvious to ask about that.
09:49 But if they don't really, if they know they can train you on their domain, they have to ask you about stuff that is something generic and that's where the algorithm stuff is.
09:59 I still think it's bad.
10:01 Things like, what should you use, a bubble sort or quick sort?
10:04 That's a dumb question.
10:05 But if you have things like, I don't know, fizzbuzz is kind of silly, but you should know it by now.
10:10 And some of the other things, it's hard to come up with good questions that are fair for anybody coming at it.
10:17 So also, keep in mind that.
10:19 - Yeah, you know what I would much rather see is something live and in the tooling and environment that that person likes to work in.
10:28 So if I was interviewing somebody, it seems to me like I might set up like a Zoom call and we do screen share and say, hey, I would like you to create this kind of website and have it, you know, have a route that passes data to the view method or whatever, right?
10:44 Like if it's a web job, or I'd like you to have a program that reads a JSON file and prints out these things and just say, okay, now go, let's do it.
10:55 Talk me through building this app and spend 15 minutes.
10:57 You can tell if somebody is comfortable in the language and comfortable in their tools, or they have just no idea.
11:02 Like, I know that's what fizzbuzz is supposed to solve, but if you can't load a JSON file, which is like three lines of code, and it just works with dictionaries after that, you probably are not really capable in Python.
11:14 So I would much rather see something like that, like a small task that's not super domain-specific, it's not really deep into some library that you could ask over all of these crazy things, and it seems like it'd be effective.
11:26 So I don't know, that's my thoughts.
11:28 - Definitely, cool.
11:29 So one thing that does, I would really hope I don't get asked in interviews, is about is regular expressions.
11:36 Because those things are like right only.
11:39 - No, no, simple regular expressions are fine.
11:42 - Okay.
11:42 - In regular expressions defense, they're very useful to concisely say something, some string kind of matches some other string within, you know, anyway, people know what regular expressions are for, hopefully.
11:55 If you're gonna interview, you probably should look it up.
11:58 - But one of the hard things though is if you, this is, I'm gonna introduce a project by Anthony Sotile, Sotile, Sotile, oh, anyway, sorry Anthony.
12:09 Sotile, called re-assert.
12:12 And so what this is, it's just a new matcher that does better tracebacks for when the match fails.
12:21 And so this is really helpful if you've got, if you wanna do, use regular expressions for a test for part of your test for your application.
12:31 This string should say, "Hello, Michael, welcome to my website." And I know that the name's going to be different, so I'm going to use a regular expression to parse out the name.
12:40 How do I make sure that that matches and have a useful answer when it doesn't?
12:46 And that's where reassert comes in.
12:49 And it's pretty fun, and it's a fairly new project, so the documentation's a little on the light side.
12:55 So I did what I often do with new projects is I jumped into the test code and looked at the test code for this to find out how it was used. And it's kind of fun. Like for instance, we're going to put in a show notes, an example of just matching foo with fob and how that if you use just re.match, it just returns a none. >> No match.
13:17 >> Yeah, so it's not going to tell you anything. But if you use the matches object within the re assert project, it gives you more detail of why it doesn't match.
13:30 So I think this is for very specific use cases.
13:34 It's very cool.
13:34 I love it because one of the really frustrating things about regular expressions is you say, here's the thing and it should match this.
13:42 And it says, nope, doesn't match.
13:44 Why don't you match?
13:46 And this is really cool.
13:47 So if, if you compare foo to fob, like foo is a regular expression, fob is value for static characters.
13:54 It just matches, you know, just tries to find that substring basically.
13:57 And the error is right here at the B it didn't match the F match the O match, but the B didn't match and that's super helpful.
14:04 That's great.
14:04 And there's a bunch of examples in, especially in test code, but yeah, so check it out and good job, Anthony.
14:10 You know, there's a bunch of awesome Python lists these days, Brian.
14:15 We've got awesome ASGI.
14:18 We've got awesome Python applications from Mahmoud.
14:21 And we've talked a bit about Python typing and type hints and whatnot.
14:26 So of course there's an awesome Python typing awesome list.
14:30 Okay, nice.
14:31 Yeah, it's a collection of awesome Python types, stubs, plugins, and tools for working with them.
14:36 So in terms of the tools, there's the static type checkers.
14:40 There's stub packages, which define the types that go with other packages, which is pretty interesting, like typeshed.
14:50 So instead of actually putting the types in the libraries, you can put them in these libraries that go next to your library, and it will actually pull that.
14:58 It has stuff for Python 3.6, 3.7, standard library, like data classes, and all of those things.
15:05 So yeah, it's pretty interesting.
15:07 Put them in a PYI file, and it will carry the types over to--
15:13 there's an example of data classes.py that'll apply the types to data classes.py.
15:18 Oh, cool.
15:18 So it's got a bunch of those.
15:19 TypeShed is probably the biggest one there.
15:22 It's got tools.
15:23 This is like a super category of many other ones.
15:26 But one I thought you might like is PyTest mypy.
15:28 So mypy static type checker plugin for PyTest.
15:31 I think we covered that one at some point.
15:33 - Yeah, I think so.
15:34 - Yeah.
15:35 And then cool articles like how to type check Django and Django REST framework.
15:39 So which is a whole tutorial on doing that.
15:41 Apparently Django has a bunch of magic and it makes type checking it extra hard.
15:45 So there's just a bunch of things like that in there that I thought people might, if they're getting into this Python typing space, it's a lot of good stuff to go check out.
15:53 - And some of the, like even linters, 'cause some people, I mean, you try one and it's confusing.
15:59 Well, try another one.
16:00 Maybe it fits better for what you're doing.
16:01 - Yeah, there's a bunch of like eight and some, I think some black stuff and things like that in there.
16:05 - Okay, cool.
16:06 I haven't really worked with stubs yet.
16:08 I think that's something I wanna try soon, so.
16:10 - Yeah. - Neat.
16:11 - Same here.
16:12 What do you got for our last one?
16:13 - Last one, oh, so we have actually, In the space of looking at people writing articles and speaking and stuff, we kind of do that a lot.
16:22 We run across quite a few people that list developer advocate as their job title.
16:27 And I don't really know exactly what that is.
16:30 And I've asked a couple people and not quite understood it still.
16:35 You did like an entire episode on it, didn't you?
16:37 - I did, I did.
16:38 - Okay.
16:39 - I'm gonna see if I can pull up the number.
16:40 The number is, I'm not sure what the number is.
16:41 I gotta figure it out.
16:42 I'll look, keep going.
16:43 This is from Dustin Ingram, an article called Developer Advocacy Frequently Asked Questions.
16:49 And the disclaimer he puts is that he is a developer advocate for Google.
16:55 So other companies and other people might experience different things.
16:59 But first off, just what is it?
17:01 And he says he helps represent the Python community at Google in his sense, in his case, but really at whatever company somebody is working for.
17:10 to get more involved with the Python community and then also try to represent the Python community within the company and represent the company in the community, that kind of both ends of it.
17:21 He has a chance to work on different packages that he cares about. In Dustin's case, he works with the PyPI and with packaging and other things. Speaking at conferences, of course, that's what we assume. That's what I assume. But there are apparently some that don't do much speaking and conferences and some that just do like one or two a year, which that sounds fun.
17:40 The thing that I think really sounds fun is being the user zero for new products or features for a company.
17:46 Yeah, that's pretty cool.
17:47 With the bent of thinking about Python users and whether or not they like it and things like that.
17:52 He's got a whole list of different things that they do, but actually this sounds like a lot of fun to me.
17:58 Actually be kind of cool.
17:59 I think this would be a great job.
18:00 Yeah, I interviewed a couple of folks back on Talk Python.
18:05 It was a lot of fun to do that episode.
18:08 And yeah, I think it sounds like a great job.
18:11 It's one of those jobs where you get to, you basically get to explore technology.
18:16 Obviously, when you work for one of these companies, it's in the slant of that.
18:20 So the three people I interviewed, Cecil Phillip from Microsoft, Paul Everett from JetBrains, and Matt McKay from Twilio, they all kind of work around their space.
18:28 But I don't know, I think it sounds great.
18:31 Like if you just like researching new stuff and playing with new ideas and talking to people, I would definitely do it.
18:36 - I kind of assumed that they even address the work-life balance.
18:40 There's some people that do like to travel a lot, so you can do that, and some people that don't.
18:45 I thought that maybe that was just required for a DA, but--
18:48 - Maybe, I'm not really sure either.
18:50 But work-life balance is interesting, right?
18:53 Because a lot of times those folks would be working from home when they're not gone.
18:56 They might have more time with their family, more flexibility to go to their kid's soccer game, but then make it up in the evening.
19:03 Whereas people go to office every day, maybe not so much.
19:07 - Definitely, I guess it depends on your life, right?
19:09 - That's right, what do you call balance?
19:10 Okay, so you got any extra stuff you wanna share?
19:13 We already gave a shout out to our Portland West meetup that you were doing out by your office.
19:19 - That's all I wanted to shout out, how about you?
19:21 - Yeah, that's on meetup.com, so people can check that out.
19:24 Nothing major, there was some interesting news.
19:26 We covered a while ago that some of Kenneth Wright's projects were being moved around.
19:33 And the biggest domino in that whole space was requests.
19:38 Can't remember exactly who jumped in, but someone from the PSF jumped in and said, "Hey, we'll take it.
19:42 "We'll take care of it." And this thing called some project that the PSF runs that can take care of these types of projects when they become important and are teetering on being unowned or whatever.
19:54 So there's a huge discussion on Reddit about how it actually has moved over.
20:00 So it actually has moved over to the PSF for one.
20:03 And so now the place for requests on GitHub, for example, is github.com/psf/requests.
20:10 That's wild.
20:11 But there's a huge discussion around it on Reddit and take that for what it is, it's Reddit.
20:17 Like it's kind of a, you get both sides type of place, but I think people find it interesting.
20:22 - I didn't really know that there was, actually there's quite a bit of stuff.
20:26 There's a few projects under PSF.
20:28 I imagine that will grow bigger now.
20:30 - Yeah, I would think so as well.
20:31 - Black is there, that's interesting.
20:33 - How interesting.
20:34 Are you ready for some laughs?
20:35 - I am.
20:35 - This one might hurt us a little bit.
20:37 This is good.
20:38 As in from laughing so hard.
20:40 - Okay.
20:40 - This one is called to our attention by Colin Martin.
20:43 And it's a set of web development merit badges.
20:48 Go ahead and pull up the link for where you can see the badges 'cause you gotta see the picture that goes along with each badge.
20:54 Let's take them like row by row.
20:56 - Okay.
20:56 - I'll do the first one.
20:57 Each has a big circle and it's got like something in it.
21:00 This one has a giant A, and it says, so you get this badge if you changed a DNS record and everything worked just fine.
21:07 This one, I love this one.
21:10 There's a forward slash bracket A dash brain bracket bracket and it says, comprehended someone else's regex.
21:17 - Yeah, exactly, definitely.
21:19 - And you just have a little bit of a webbed.
21:21 Another one is like an expander thing, says built an accordion from scratch.
21:24 - I've done that.
21:25 - I think you've done this next one, - And one in the next row.
21:29 - So colon WQ for exited vim.
21:32 - Exited vim, I love it.
21:35 You wanna do the next two?
21:36 - Yeah, so, aw crud.
21:39 Somebody, you get it if you accidentally created your own CMS.
21:43 And then a little painter.
21:44 I like the little painter with the acorn hat.
21:46 - Yeah, it's like a French design painter.
21:48 - Yeah, pulled off, you get this if you pulled off a design you didn't think you could.
21:52 Well, that's actually kind of nice.
21:54 - Yeah, this is nice.
21:55 This next one is for the consultants out there.
21:56 It's like a mallet banging down like a judge.
22:00 And you get this one if you told a client or boss, no, we're not doing that.
22:05 - Yeah, that's awesome.
22:05 - Then there's one with like some crazy matching symbols.
22:09 It says you wrote an HT access redirect that included a capture group.
22:13 And then this one's pretty funny.
22:15 You have a minus CSS pink and a plus CSS green.
22:19 It says you refactored a large portion of CSS and you didn't break anything.
22:23 - Oh yeah, that's good.
22:25 There's some good ones.
22:26 You want to just pick out a couple more?
22:28 We can't do one thing.
22:28 - Yeah, merged master into a six-month-old branch.
22:32 - I love that one.
22:33 There's like two arrows going sideways, two arrows going down.
22:36 It says centered an element horizontally and vertically.
22:39 - Oh, nobody can have that one.
22:41 - That's so hard.
22:42 - It's not possible, I don't think.
22:43 - I don't think it is either.
22:44 - I like the dude laying down on the ground, says you pushed to production on Friday and didn't roll it back over the weekend.
22:51 - Here's an undecadent one.
22:55 - How did a neglected site get hacked and spammed?
22:58 - Oh yeah.
23:00 - And then another one, there's a guy sleeping on a laptop and it says, "Solved a bug by taking a nap." - That's awesome.
23:08 There's a semicolon for debugged something for over an hour where the fix literally was one character.
23:14 - Awesome, yeah.
23:16 All right, let's leave the rest for the listeners out there to go check out.
23:19 You just gotta see the pictures.
23:20 These are brilliant.
23:21 - These are great.
23:22 - Yeah, the first time I read it, Like, I was, my stomach hurt, it was really good.
23:28 All right, well, speaking of good, this was a fun show.
23:30 Thanks, Brian. - Thank you.
23:31 - You bet, talk to you later.
23:33 - Thank you for listening to Python Bytes.
23:34 Follow the show on Twitter @pythonbytes.
23:37 That's Python Bytes as in B-Y-T-E-S.
23:40 And get the full show notes at pythonbytes.fm.
23:43 If you have a news item you want featured, just visit pythonbytes.fm and send it our way.
23:48 We're always on the lookout for sharing something cool.
23:50 This is Brian Okken, and on behalf of myself Michael Kennedy. Thank you for listening and sharing this podcast with your friends and colleagues.