Learn Python with Talk Python's 270 hours of courses

#140: Level up your Python with #100DaysOfCode challenge Transcript

Recorded on Tuesday, Nov 28, 2017.

00:00 How do you learn libraries or even parts of Python itself that you don't have actual work projects to try them out on?

00:05 Whether that's SQLAlchemy, Slack bots, or Map APIs, actually building projects, small and large, with them is really the only way to gain true competency.

00:14 Well, you might try one of the 100 days of Python code challenges that have been going around.

00:21 This week, you'll meet Bob Belderbos and Julian Saccaria, who created PyBytes.

00:26 They've done a few 100 days of code challenges and are here to share their experience and even some concrete examples.

00:33 This is Talk Python to Me, episode 140, recorded November 28, 2017.

00:52 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.

00:59 This is your host, Michael Kennedy. Follow me on Twitter, where I'm @mkennedy.

01:03 Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on Twitter via at Talk Python.

01:10 Talk Python to Me is partially supported by our training courses.

01:14 Have you heard about the 100 days of code challenge?

01:16 It's a challenge where you write code for an hour a day for 100 days.

01:20 It's helped many developers finally master programming.

01:24 But it can be hard to know what to study or have resources to focus on.

01:28 That's why we wrote not one, but two 100 days of code courses.

01:33 100 days of code in Python, which covers mostly pure Python.

01:37 And 100 days of web in Python, which covers a whole spectrum of web frameworks and concepts.

01:43 If you've been thinking about taking the 100 days of code challenge, be sure to visit training.talkpython.fm and check out our courses.

01:50 They are the 100 days of projects and lessons with a tidy bow on top just for you.

01:55 Bob, Julian, welcome to Talk Python.

01:58 Hey, Mike. Thanks for having us.

02:00 An honor.

02:01 It's great to have you here and see you at least on Skype.

02:03 Bob, we had such a great time at PyCon.

02:06 Indeed. It was very nice meeting you.

02:08 Yeah, it was great to hang out.

02:09 And I think that was really my favorite part of PyCon is just meeting all the people and the experiences outside the talks in the conference rooms.

02:16 But it was a good time.

02:18 And Julian, next year maybe you can make it.

02:20 Who knows?

02:20 Oh, man. Totally jealous.

02:22 It is a very long way from Australia.

02:24 I'm going to try for 2018.

02:26 Oh, that's awesome.

02:27 Yeah, I've done that flight from Sydney.

02:28 It's a commitment.

02:29 It's not pleasant.

02:30 Let's just say that.

02:31 No, but look, if you're going to Australia, you come from my direction to yours.

02:36 It's a wonderful place to visit.

02:37 So maybe I'll get down there someday.

02:39 So we're going to talk about code challenges.

02:42 You know, Twitter has been afire with this concept of 100 days of code.

02:47 Basically, people who are learning something new or pushing their boundaries in some way.

02:52 Like, I'm going to do this for 100 days.

02:55 And I'm going to commit publicly to doing it.

02:57 And, you know, sort of testify to social media, if that is a thing that I've done my days at work.

03:02 Right.

03:03 And so we're going to have a good sort of retrospective on this one that you did and maybe talk about another one that you guys are doing as well.

03:11 Before we get there, though, let's start with your story.

03:15 How did you get into programming in Python?

03:16 Julian, go first.

03:17 All right.

03:18 So it's actually kind of funny.

03:20 I'm really, if you're familiar with PyBytes, I'm the relative newbie compared to Bob.

03:25 So I actually started with C++ in high school.

03:29 But Python-wise, I don't actually work with Python every day.

03:32 It's not what I do for a job, which has made it incredibly difficult.

03:36 Right.

03:37 It was actually Bob who pushed me.

03:38 So I was trying to calculate some overtime when I worked in the field for Oracle.

03:44 And, yeah, he said, why don't you create a Python app to track that?

03:48 And that was it.

03:49 As soon as I started doing it, bang, I was like, this is so cool.

03:53 This is so much easier than smart pointers in C++ or, you know, whatever.

03:58 Exactly.

03:59 I'm like, well, now I don't have to log in and use the Oracle tool.

04:02 I can use my own.

04:02 Beautiful.

04:03 Yeah, it was great.

04:04 And then from that, it's just one thing after another and then PyBytes.

04:08 Yeah, awesome.

04:08 And what do you do day to day for work?

04:11 Do you work at Oracle still?

04:12 No, no.

04:13 So I resigned about a year and a half ago and I now work for Amazon Web Services.

04:18 Oh, exciting.

04:19 What do you do there?

04:20 It's a bit hush-hush, but I work in one of the data centers.

04:23 So it's a lot of fun.

04:25 So if anything goes down, it's probably me.

04:28 No, I'm just kidding.

04:28 We'll put your Twitter account on this page.

04:33 And as soon as AWS, like Asia goes down, you're going to just hear about it.

04:37 Yeah, sure.

04:38 I'll get an email from you as well.

04:39 Yeah, that's right.

04:40 Nice.

04:42 All right, Bob, how about yourself?

04:43 I started programming about 10 years ago.

04:46 I was working in a financial department and we had to close the month every month.

04:53 And tasks got a bit boring.

04:54 So I started to use Excel and macros to automate the stuff.

04:58 At the same time, I discovered web design and making web pages, which I was very passionate about.

05:04 So I self-taught programming, went back into Sun and later Oracle as a support engineer,

05:10 started to build web tools for the engineers to solve their cases more rapidly.

05:17 Well, I was doing that in Bash.

05:18 Give us an example of like a tool you might make and the problem that it solves.

05:22 An example of a tool?

05:23 Yeah, yeah.

05:23 Like what kind of tools would you make?

05:25 Like what kind of problems and how would you help people solve them?

05:27 Yeah, that was cool because there was one day in the chat room, somebody said like,

05:32 well, we're getting all these diagnostic bundles from servers and we don't have any tool to do diagnostic on them.

05:38 It's like these lucky moments when you see an opportunity and you can build something big.

05:43 So I started to develop a tool to diagnose these bundles and have a web GUI for engineers to help solve the issues.

05:53 And that tool became pretty big with hundreds of engineers using it.

05:57 And that got me into it.

05:59 And it's still in Python?

06:00 No, that wasn't PHP.

06:02 And later work then was in Perl.

06:05 And that got a bit of a mess.

06:07 So in 2012, I looked at other options, stumbled upon Python, found it very clean and nice.

06:16 And I never looked back.

06:18 So I've been using it for five years now.

06:21 If you look at the graphs of the popularity of Python and the growth of Python,

06:25 there's an amazing article from Stack Overflow called The Incredible Growth of Python.

06:30 And that's super amazing.

06:31 But if you look at where the graph turns sharply up, that's in 2012.

06:35 So you're partly to blame or to credit for that.

06:38 That's awesome.

06:39 Yeah, man.

06:41 So you just like languages with Ps, right?

06:43 PHP, Perl, Python?

06:45 I do like JavaScript a little bit as well.

06:48 Maybe we can put a silent P in there.

06:50 Speaking of Ps, let's talk about PyBytes.

06:53 This is so similar to the name of my other podcast.

06:57 That was so funny.

06:59 There's all these weird coincidences, right?

07:00 There were no Python podcasts.

07:01 And then I released this one like days before podcast init comes out.

07:05 And they're like, we're the first one.

07:07 Wait, no, we're not.

07:08 Why?

07:08 And then, you know, we both released like a similar thing.

07:11 I feel like it was just about the same time, right?

07:13 It was around December last year, I think, right?

07:16 Exactly.

07:17 I think we were in November.

07:18 It was just like crazy.

07:20 So P-Y-B-I-T dot E-S, right?

07:23 Yep.

07:24 It reveals one of the locations, Spain.

07:28 Exactly.

07:28 That's where you are.

07:29 Yeah.

07:30 So you guys tell everyone about it.

07:32 It's a pretty cool resource.

07:33 So PyBytes is a blog where pretty much the bare minimum, we share our passion and love for Python.

07:39 That's it.

07:40 It started because of that.

07:42 Bob and I, we always struggled to work on projects together because of the sheer time difference, time zones, different jobs now.

07:49 And it was just ridiculous.

07:51 So we eventually just bit the bullet and said, you know what?

07:53 Why don't we start a blog together on Python?

07:55 So he knew a lot.

07:57 I didn't know a huge amount.

07:58 And we felt that that gap between our knowledge levels would be an awesome concept for a blog.

08:05 He could do the more complex stuff and I could do the really beginner stuff as I'm learning it.

08:10 So as Bob would be learning some crazy complex concept, he would write these amazing articles on it and I'd be scratching my head going, what the hell are you talking about?

08:21 And then I'd take something that was quite simple to Bob and I would write that in super layman's terms so that anyone could read it and understand it.

08:31 And we had this sort of double whammy approach.

08:33 I think that's really, yeah, that's a super cool idea because I think there's huge value in people who are new to a particular technology like you described yourself, talking about their experiences, explaining what they're learning.

08:45 And there's so many people who are learning what you're learning that they're not necessarily looking for the high end expert analysis of meta classes.

08:53 They want to know how to write a function with default values or, you know, something like this, right?

08:57 And so that's super helpful.

08:58 But then on the other hand, a lot of times that comes up a little bit short and not actually having the right depth, the really the best answer.

09:07 And it feels like you guys could team up on that.

09:10 Did it work that way, Bob?

09:11 Yes.

09:11 And I think it's a nice dynamic between beginner level and Julian making stuff really accessible.

09:19 And me sometimes tackle maybe a bit more advanced topic.

09:23 So, yeah, I think it's a great combination.

09:25 And, yeah, funnily, yesterday we did a code challenge and we made a new one.

09:31 And Julian sent me the beginning and I then tweaked it.

09:35 And he said, well, that's way advanced.

09:37 You do like sort with lambda.

09:39 And that's cool because for some folks, some of the audience do need that more advanced level.

09:45 But some of the folks are still with for loops and variables.

09:48 And, yeah, you really have to take a step back.

09:52 And I think Julian is great at that.

09:53 He made some very accessible articles like on what is a class or how to write a for loop.

09:59 And you notice that a lot of beginning Pythonistas need that.

10:03 That's for sure.

10:04 It's really easy to sort of zoom past the introductory stuff and get to like the excited internals.

10:10 Like, here, let's disassemble this and look at the bytecode and see what it's doing.

10:14 It's like, no, maybe not so much.

10:17 And we got to take a step back.

10:19 Cool.

10:20 So how did you guys meet up?

10:22 You guys are let's talk about some crazy time zone shifting.

10:25 Like the world we live in is so amazing.

10:27 So, Bob, what time is it?

10:28 11 p.m.

10:29 11.15 almost.

10:31 Yeah.

10:31 Julian, what time is it?

10:33 It's 9.15 a.m. on Wednesday.

10:35 Oh, you guys are all wrong.

10:36 It's 2 in the afternoon on Tuesday.

10:38 And you are in the future.

10:39 We made it.

10:40 So that's pretty.

10:41 Yeah, exactly.

10:42 Yes, we got at least 12 more hours.

10:44 So how did you guys meet up across all this time and space?

10:47 So we actually haven't met, believe it or not.

10:51 Probably think I'm lying, but we haven't met in person.

10:53 Back in Sun Microsystems where we both worked, Bob actually, out of the blue,

10:58 randomly wanted to use some machines that I was looking after.

11:02 And we had this conversation and we just, I guess, ended up emailing back and forth.

11:07 And now we're practically married.

11:10 It's crazy.

11:11 Yeah.

11:12 You guys have like deadlines every single day.

11:15 You have to agree on code and whatnot, right?

11:17 Yeah.

11:18 Daily on the phone.

11:19 That's awesome.

11:19 So a lot of Skype or other VoIP stuff and GitHub and things like that.

11:25 Yeah.

11:25 WhatsApp works well for talking.

11:28 And we use Slack also with some more folks of our community.

11:33 And yeah, GitHub for coding.

11:36 Yeah.

11:36 We use a lot of tools.

11:37 It's a great time to live in.

11:39 It totally is.

11:39 For Slack, do you guys have like a PyBytes community?

11:43 Yes.

11:43 That people can join?

11:44 Yes.

11:45 All right.

11:45 Tell us about that.

11:46 So that came around code challenges, which we will discuss in a bit.

11:51 We started to ask people to join Slack to ask questions and share their experiences on the code challenges.

11:58 And yeah, it's a great asset to build a community and get inputs and help people.

12:06 Yeah.

12:07 I think that's really nice.

12:08 So we can put a link to that in the show notes if people want to join up.

12:11 Yeah.

12:11 It'd be cool.

12:12 It's actually really cool because we invited people as they were doing pull requests and the challenges.

12:18 And they're the most dedicated people, right?

12:20 And so we're bringing them in and you get one or two people every few days.

12:24 And now we have this community in there where we sort of back away sometimes.

12:28 And these guys and girls, they just, they help each other.

12:31 They answer their own questions and they have these conversations.

12:33 We'll come back.

12:34 I'll be at work all day and my watch is going nuts with hundreds of messages coming through.

12:38 And I'm thinking, what am I missing out on?

12:40 What's happening?

12:41 Yeah.

12:41 I got to take a lunch break and go see what's going on.

12:43 Nice.

12:44 That's really awesome.

12:45 I mean, I have a Gitter channel for the podcast and a lot of people drop in there and it's similar.

12:51 There's probably more people in your channel because I don't talk about it very much, but

12:54 still it's great when people get in there and share ideas and help each other.

12:57 Yeah, totally.

12:58 All right.

12:58 It's code challenge.

12:59 So a hundred days of code.

13:00 Bob, tell us what the general idea of this is.

13:04 I have to get his name right.

13:05 I think it was Alex Calloway who invented the challenge for JavaScript and promoting coding

13:11 in general.

13:12 It's about a hundred days in a row.

13:15 Share your coding, share what you're doing, whatever it is.

13:18 Do an hour a day and be responsible.

13:21 Do a tweet out what you did.

13:23 So you see a lot of tweets with a hashtag, a hundred days of code, and people share scripts

13:28 or if they did a tutorial or whatever they did, but it's one hour a day.

13:32 And we gave it a little twist of do actually a script a day, which we shot ourselves a little

13:37 bit in the foot there.

13:38 Tell us what happened.

13:41 Is it like a little more than an hour or what happened?

13:43 A lot of scripts were pretty basic and yeah, can use some refactoring and were within the

13:47 hour, but sometimes it does not because typically happens.

13:50 You start to build something cool and you really want to tweak it.

13:53 And yeah, it can be more.

13:55 But on the flip side, and we will go into a couple of scripts shortly.

13:59 Yeah, we were picking our favorites for the show and we went through the logs and it's like

14:06 a couple of months ago now.

14:07 And we were like, did we do all this coding?

14:09 It was like 5,000 lines of code in a hundred days.

14:12 Well, between the two of us.

14:14 So yeah, even and uneven days, but still we did so much.

14:18 That was really cool.

14:19 Julian, do you feel like you said you were a little newer at Python?

14:22 Do you feel like this gave you some experience with Python in ways that maybe projects you're

14:27 working on wouldn't?

14:28 Oh, totally.

14:28 Well, first of all, it absolutely destroyed me in a good way.

14:32 It was just insane, right?

14:34 We were coding every day as it was for PyBytes.

14:36 So to suddenly say, well, we can do a hundred days.

14:40 It was almost, well, we're already doing it.

14:43 So what's the point?

14:44 So that's when we started, said, well, what if we made a script?

14:47 And that just took me from one level to maybe five levels above, you know, because I was

14:54 forced to not only learn something.

14:56 So it's not just watching a video or reading a doc or something.

14:59 It was learn it, apply it, make it functional and have it actually do something that you

15:04 can then share out.

15:05 And someone can, you know, clone that from GitHub and have a running script that does something.

15:11 That's really awesome.

15:11 So you kind of put a little twist on it and just not just, I wrote some code.

15:16 I have a code streak for a hundred days or whatever you want to call it.

15:20 It's, I created 100 working little baby applications in a hundred days, right?

15:25 And that was nuts.

15:26 So we'll talk about the details of them in a minute.

15:29 But Bob, can you just touch on like some of the things you got to play with?

15:32 Like, did you get to play with a SQLAlchemy or TinyDB or, you know, things like this?

15:37 Yeah.

15:38 Oh, goodness.

15:38 Yeah.

15:39 SQLAlchemy was there.

15:40 We will have some examples shortly.

15:44 But we did some stats and I think we actually used exactly 100 modules, which was like a

15:49 weird coincidence, 100 days, 100 modules.

15:52 And I think like 40% or so was from PyPI.

15:55 So it was a lot of external stuff as well.

15:57 We discovered maps, plot cities on maps and a lot of APIs, web development, all kinds of

16:04 stuff.

16:05 And, you know, we have a lot of snippets there now, so we can go back and there's tools we

16:09 use till this day.

16:11 There were foundations in there with Twilio API that led to a guest post for the Twilio

16:15 blog.

16:15 There are Slack bots in there we use on our Slack today.

16:19 Twitter automation we run today.

16:21 It's pretty cool.

16:23 Yeah, that's really, really awesome, actually.

16:25 I feel like you could get a bunch of ideas of like almost products or things that you could

16:31 create if you were willing to like put a few months into one of them, right?

16:34 Totally.

16:35 Exactly.

16:36 And it's not about perfectionism.

16:38 It's about doing these quick prototypes.

16:41 Just get coding.

16:42 You know, I mean, if you think about having the perfect script, you don't get it.

16:47 You're not getting to do it.

16:49 Yeah.

16:49 I've known a lot of people who are in some people who are in programming who spend too much

16:54 time worrying about getting things just right and not just going, I'm going to write this.

16:58 And if I have to, I'll refactor it.

17:00 And if like it's the worst case scenario, I'll just rewrite it knowing a lot more than I did

17:03 the first time.

17:04 You know, I feel like some people kind of get frozen during the headlights for big projects

17:09 and just not really wanting to start being afraid of going the wrong direction.

17:14 This portion of Talk Python to Me has been brought to you by Rollbar.

17:17 One of the frustrating things about being a developer is dealing with errors.

17:21 Ugh.

17:22 Relying on users to report errors, digging through log files, trying to debug issues, or getting

17:27 millions of alerts just flooding your inbox and ruining your day.

17:30 With Rollbar's full stack error monitoring, you get the context, insight, and control you

17:35 need to find and fix bugs faster.

17:37 Adding Rollbar to your Python app is as easy as pip install Rollbar.

17:41 You can start tracking production errors and deployments in eight minutes or less.

17:45 Are you considering self-hosting tools for security or compliance reasons?

17:49 Then you should really check out Rollbar's compliant SaaS option.

17:53 Get advanced security features and meet compliance without the hassle of self-hosting, including

17:58 HIPAA, ISO 27001, Privacy Shield, and more.

18:02 They'd love to give you a demo.

18:04 Give Rollbar a try today.

18:05 Go to talkpython.fm/Rollbar and check them out.

18:10 Julian, I guess this probably helps you just learn to just like, okay, you have to write.

18:14 It is 11 o'clock at night.

18:15 I have one hour left.

18:17 I have to write, yeah?

18:18 Yeah, that was it.

18:19 It wasn't sit there and plan it and storyboard it or something.

18:22 It was just, okay, what's the first thing we need for this app?

18:25 Okay, it needs to output this data.

18:26 Just write your prints.

18:28 Write your for loops.

18:29 Create your databases.

18:31 And it wasn't perfect.

18:32 It was tough.

18:33 You know, there were some nights we'd be up till, you know, one in the morning with waking

18:37 up at 530 because I have kids.

18:39 And you'd be a wreck.

18:41 And the only positive, the light at the end of the tunnel was seeing that countdown to the

18:45 end.

18:45 And knowing that you had a gap in between.

18:49 So you could, you almost had two days to write the script, but you were writing across both

18:53 days.

18:53 And it was just...

18:56 The other good thing is we probably spent, not spent, we probably save a couple of months

19:01 of Netflix because I probably canceled it.

19:03 Yeah, I was behind on all my Marvel TV.

19:07 Yeah.

19:08 Yeah, I sort of view programming as my gaming.

19:10 Like I used to play things like Counter-Strike and games and whatnot.

19:13 And now if I have an extra two hours, I'm like, oh, what feature can I add to my like

19:18 training website?

19:19 Or what other kind of thing could I create?

19:21 Like, I bet I can do that in two hours, you know, and it becomes kind of a game as well.

19:24 It's becoming like watching series.

19:27 It's kind of relaxing.

19:28 And yeah, the more you build, the more projects you have and the more features or stuff you

19:33 want to add or fix.

19:34 So yeah, it's kind of a lost game.

19:37 For sure.

19:39 All right.

19:39 So let's talk about some of these particular challenges.

19:43 You guys did 100 days of code.

19:45 So 100 scripts, as you described it.

19:47 And I asked you to pick 10 that you thought would be fun to talk about.

19:50 So this is just a 10% sampling, right?

19:53 This is not exhaustive by any measure.

19:55 So Julian, want to start on day 51?

19:58 Okay.

19:59 So day 51, I chose this one because it had to do with the request module, which was one

20:04 of the first modules I dealt with when I started learning.

20:07 Because I wanted to scrape websites, right?

20:09 And that was the way to get into it.

20:11 One thing I remember back in the day that I was struggling with was how to deal with a

20:16 website that had a login prompt.

20:17 I was like, well, this is impossible.

20:19 You can't do it.

20:20 There's no way.

20:20 Yeah.

20:20 You can't do a get against that because it redirects you 301 over to this login page.

20:25 Forget it.

20:25 Exactly.

20:26 Screw that.

20:26 I don't need that data.

20:28 Who needs it?

20:29 So I was struggling.

20:31 And again, for this 100 days, probably one of the complex things was coming up with ideas.

20:36 And just I remembered that pain point and I Googled it and I found out, oh, you can actually

20:41 log in with requests.

20:42 What the hell is this?

20:43 You know, so I can't believe it.

20:45 So then I started playing with it.

20:46 And next thing you know, I was writing a script to log into my freecycle.org account, which

20:52 is like an eBay thing, but everything's free.

20:56 And I was able to log into it, scrape my current ads and then save them, you know, report that

21:02 data and save it back to a database, you know, and it was just a simple script.

21:07 But the challenge of logging into something using a script was just mind blowing for me.

21:12 That's really cool.

21:13 So I, you know, I know that you can do that with requests.

21:16 I know you can do posts and puts and deletes and all those kinds of things and headers, but

21:21 maybe walk us through what is the process of like carrying over the session, right?

21:25 So you go find the logging page, you put the body of like username, password, you do a

21:30 post.

21:31 Would you get back a cookie and have to carry that over to the next request?

21:36 Do you remember how that went?

21:37 Yeah.

21:37 Essentially you have this payload as it's called, and you have to input your username and password

21:42 into it and you do a post.

21:44 The crazy thing here was that you had to investigate the URLs that you need to send this data to because

21:51 you can't just send it to the page.

21:53 You have to go into the background and look for their, I guess their login post request

21:58 URL.

21:58 And then I was able to send that data, that payload data to that using requests.

22:06 And then you get back your session so you can log in.

22:09 And it was, it's just crazy.

22:11 That's pretty awesome.

22:12 Nice.

22:13 Okay.

22:13 That one sounds like a really fun one.

22:15 And it's like, you took this idea that you kind of already had more or less down like request,

22:19 beautiful soup, CSS selectors.

22:21 We're going to do this.

22:22 Oh, wait, here's this next level that I need to like jump over.

22:26 And, you know, it's really cool.

22:27 He took one of these challenges and opportunity to do that.

22:30 Yeah.

22:31 Yeah.

22:31 It was, it was awesome.

22:32 And then, you know, you, you learn stuff along the way.

22:35 So then it was quite simple to take that data and chuck it into a SQL light database, you

22:40 know, nice and easy.

22:41 Yeah, definitely.

22:42 That's nice and easy for sure.

22:44 Bob, how about yours?

22:46 What one do you want to talk about?

22:48 The very first script I did and day number one, and we were still full of ideas.

22:52 So there's a handle at Python underscore tip.

22:56 You might have heard of them.

22:58 They do a daily tweet of a trick or tip in Python, pretty scientific, but they have some very good

23:05 tips and get a great following.

23:07 The way you submit tips to them is via a Google doc, which goes into a spreadsheet or CSV downloadable.

23:16 But there was not really a way to see if, if a tip was already submitted.

23:20 So you don't want to clutter their database or spreadsheet with duplicate tips.

23:25 So I made a little script to just probably request, get the CSV, which is just a public URL, parse

23:34 it in some data structure and just from the command line, you give it one or more strings.

23:38 And then it's just a little CLI script.

23:43 And it then tells you if the string you're looking for, it shows you the tips that has that string in them.

23:49 So you can just say, oh, OK, they have like already five Ether tools tips.

23:53 The one I'm about to submit is pretty similar, so I don't do it.

23:56 And the fun thing is, right, exactly.

23:59 That was also a nice example of like meeting other developers because then we reached out

24:04 to them, hey, make this script.

24:05 This can be helpful for you.

24:07 And then they, at the submit form, they then linked to the script that people could download

24:12 that script.

24:12 I even made a one-liner wrapper that you can do it with a bash, Wget or whatever.

24:17 Just do one command, even if you don't have the script locally.

24:20 And yeah, they linked to it.

24:22 So it was a little bit also for the community if somebody wanted to use that.

24:27 Yeah.

24:28 And then we stayed in touch.

24:29 And later we reached out to Python tip again to do more, to actually associate two code challenges

24:36 to the great collection of tips they have.

24:39 So that was kind of a nice script, but also like meeting other developers.

24:44 Yeah.

24:44 I think the ability to reach out to people and form these connections is really powerful.

24:50 You know, that's sort of because GitHub makes it so easy, right?

24:55 Like it's super easy to connect with people and things like Twitter and so on.

24:59 It's always been there, but it's really great.

25:01 And it's like one afternoon of work or something.

25:05 You've got this little script and now you've got this connection with someone else doing cool,

25:10 similar stuff, right?

25:11 Yeah.

25:11 Yeah, that's awesome.

25:12 Yeah, for sure.

25:13 Julian, take us back to day 25.

25:15 All right.

25:16 So we're going backwards.

25:16 You're talking about SQLite before, yeah?

25:18 Yeah, yeah.

25:20 So this one, one of the first things I learned with the whole 100 days thing was to use SQLite.

25:25 So over the years, I remember seeing people using SQL databases.

25:29 I'm going, I have no idea what I'm looking at here.

25:32 You guys must be.

25:34 Yeah, it's so painful to set up and I need a server and the credentials and come on.

25:38 Yeah, exactly.

25:40 I don't have time for that.

25:41 No.

25:41 It was always one thing that I wanted to do.

25:44 You know, I saw it and I thought this must be such an amazing skill to have.

25:47 These people are wizards.

25:48 I don't know how they do it, you know?

25:49 And so I learned SQLite 3 using Python and just starting off nice and simple database and

25:56 names, you know, the usual stuff you might start off with.

25:59 But then as I was making more things where I wanted to store that data, I was getting really

26:04 annoyed that I had to keep setting up this database manually.

26:08 And this is one of my favorite things about the 100 days is that I ended up creating a whole

26:13 bunch of little scripts that automate these tiny little repetitive processes.

26:18 And this is one of them.

26:19 So day 25, I created a script that generates a test SQLite database.

26:27 So the sort of Python code.

26:29 See, I've prepared now.

26:30 I've got it up here on the screen.

26:31 The Python for the sort of generic database format that I might like with, say, three text

26:38 columns and one integer column.

26:40 That was just a very generic test one that I was creating.

26:43 And this will create that.

26:45 You just run this command and it prompts you to ask for the name of your database.

26:49 And that's it.

26:50 Just creates it.

26:51 Oh, nice.

26:52 Yeah, that's how I started it.

26:53 So I have expanded it.

26:55 I haven't updated the code on GitHub.

26:56 Shame on me.

26:57 Where it asks you then to name your columns and the name of your table.

27:01 So it walks you through a little almost wizard to set it up.

27:05 So that was that one.

27:07 It was actually a lot of fun because then after that, I could just use that every time.

27:11 Yeah, this is one of the harder things to work in with SQLite is if you map something

27:15 like SQLAlchemy to it, then you can just say, you know, create all tables right on the

27:21 models you're mapping and it just does it.

27:23 But if you don't want to use that, you're like, oh, well, I got to do all the DDL like

27:27 creation syntax and all that kind of stuff.

27:30 So this is a nice little thing to have.

27:32 Yeah, it was very useful.

27:33 The SQLAlchemy that's coming next.

27:36 That's a good one.

27:38 And by the way, if you're listening and you want to follow along, I'll have the link to

27:42 your GitHub repository.

27:45 That's the 100 days of code.

27:47 So every one of these is just numbered by day.

27:50 So it's github.com/pybytes, P-Y-B-I-T-S, 100 days of slash 100 days of code.

27:56 So you guys can follow along.

27:58 It has the numbers right there.

27:59 All right, Bob.

28:00 One of the challenges, if you want to do any sort of testing is external dependencies, right?

28:05 Especially APIs.

28:06 And if they're like rate limited or something, it's even worse.

28:09 Or if they're going to make modifying changes like post something.

28:12 So your number 81 has some cool examples of how to get around this, right?

28:16 Exactly.

28:17 That's the problem with external APIs.

28:19 You don't want to call them over and over again when you run your test.

28:23 So I spent one day looking at unit test mock patch to mock test the T-PY API.

28:32 And yeah, I managed to do a little script to populate some fake data and do the patch object

28:40 decorator.

28:41 Kind of fake the call to the T-PY API.

28:45 And yeah, that worked out pretty well.

28:47 It was not a critical script, but that's really where you do the coding just for the sake of

28:52 practice.

28:53 Because the original script was just a funny who tweeted what.

28:57 Because somebody on Twitter asked like, okay, so whom I'm talking to?

29:02 It's PyBites.

29:03 Is this Julian or Bob?

29:04 So we made a little script that based on the location of the tweet, it would then return

29:09 Bob or Julian because Julian is in Australia and Spain.

29:12 Oh, yeah, that's awesome.

29:14 So you can just test by the geolocation.

29:16 Nice.

29:17 Exactly.

29:17 So I took this example to show that you can just go like random stuff.

29:22 It can be funny and just get practice.

29:25 But then who tweeted script then actually raised this second need to practice mocking and how

29:33 to test an external API.

29:34 So that was then a second script.

29:35 So one script follows the other.

29:37 So that's the nice thing.

29:38 Just get started.

29:39 And yeah, you might be afraid that you don't get to the 100, but you will.

29:44 Yeah, that's awesome.

29:46 This portion of Talk Python to me was brought to you by GoCD.

29:49 GoCD is an on-premise, open source, continuous delivery tool to help you get better visibility

29:55 into and control of your team's deployments.

29:58 With GoCD's comprehensive pipeline modeling, you can model complex workflows for multiple

30:03 teams with ease.

30:05 And GoCD's value stream map lets you track changes from commit to deploy at a glance.

30:10 Say goodbye to deployment panic and hello to consistent, predictable deliveries.

30:14 We all know that continuous integration is super important to the code quality of your applications.

30:19 Choose the open source local CI server, GoCD.

30:23 Learn more at talkpython.fm/GoCD.

30:26 That's talkpython.fm/GoCD.

30:29 So maybe really quickly tell people about the patch.object decorator.

30:34 So this is a decorator that you can put on any block of code, but typically maybe write

30:40 on a particular unit test method.

30:42 Yes.

30:43 And it will reach deep down inside and change the implementation of some part of probably

30:49 that API or really whatever you pointed out, right?

30:51 Like time, for example.

30:52 Yes.

30:53 So it has been a while this script, but the decorator wraps a unit test method and it calls

31:00 the CPI API, so the original method.

31:02 But you're kind of replacing the original get status method of that API with, you give it a

31:09 return value, which is then the fake data defined in the main body of the script.

31:13 So it's like I'm faking calling that API, returning my own data, and I'm not making the network

31:20 call.

31:20 That's basically what it's doing.

31:22 Yeah, that's super cool.

31:23 Yeah.

31:24 Yeah.

31:24 Very nice.

31:24 Let's see.

31:25 Next up, Julian, Word Scramble.

31:27 Tell us about the Word Scramble one.

31:29 All right.

31:29 So let me just say a quick disclaimer.

31:31 I'm not a cheater at Words with Friends, but I may have used this one.

31:36 But if one were to.

31:38 But if someone was to play Words with Friends, this might be helpful.

31:42 So I remember, you know, back in the day, playing Words with Friends a lot.

31:46 There were people who would use these little apps on their iPhone to put the letters in

31:52 and it would unscramble that into a whole dictionary list of possibilities.

31:57 Right.

31:58 And that was the inspiration for this.

32:00 Not that I ever used one of those.

32:02 Right.

32:02 That would be wrong.

32:03 You shouldn't do that.

32:04 So if I've ever beaten anyone with Words with Friends, I wasn't using this.

32:08 So the idea is that it's exactly just that.

32:11 I just Googled a standard dictionary.txt, just the whole dictionary and text file.

32:17 And yeah, I used itatools permutations to then read in the words that you will enter into this app and compare it to the dictionary and then come up with whatever valid words you could make out of that series of letters that you enter.

32:36 And that was it.

32:36 It's simple in concept.

32:38 It actually took me a while.

32:40 I ended up calling Bob on this one and saying, oh, man, what am I doing wrong?

32:44 You know, and I showed him the code.

32:46 And this is the beauty of the whole PyBytes relationship, right?

32:49 And I told you, like, AetherTools, permutations.

32:51 Dude, you're growing.

32:53 I mean, look where you are.

32:56 This is awesome.

32:56 Yeah, this is super cool.

32:59 It would have been an ugly for loop, I think, when I started.

33:02 Yeah, I think that's one of the things that you have to learn as you get better in Python is I probably could implement this algorithm or I could probably pip install this algorithm.

33:13 So let's do that instead.

33:15 I mean, I know AetherTools is built in.

33:16 But yeah, just knowing the stuff that you can use, like the pre-built things like AetherTools permutations, rather than going, well, how do I implement a permutation?

33:25 Well, let me think about like a nested loop, right?

33:27 Yeah, well, on that, one of the worst things is you'll spend time on something.

33:31 And then 10 minutes later or even 10 days later, someone like Bob goes, why don't you just use permutations?

33:37 And you'll be like, oh, there's a permutations.

33:41 This existed?

33:42 Damn it.

33:43 Yeah, exactly.

33:46 That's never ending because even if you think you have some Pythonic tricks up your sleeves, there's always more.

33:53 There's so many constructs still learning.

33:56 Sure, there's a bunch built in.

33:57 I feel like a lot of them live in AetherTools and Functools and those sorts of things.

34:01 But just also, there's 120,000 plus on PyPI, right?

34:06 Like if you run out of standard library tricks, there's a few more out there.

34:09 Indeed.

34:09 Yeah.

34:10 That's awesome.

34:10 All right.

34:11 So the next one up is using a pillow to create images in Python.

34:16 Bob, tell us about that.

34:18 Yeah, I picked this one because it's a tool that we still use today.

34:22 Just, again, a simple prototype.

34:24 Just give it a URL and some text.

34:27 Downloads the URL image.

34:28 It puts it on a canvas.

34:29 And it puts your text on top of it, which makes a reasonable banner.

34:34 It's not like Photoshop art, but it's good enough.

34:38 And, yeah, I think, or this script or some code channels morphed into it.

34:44 But we start, we're still using this to make PyBytes banners for new code challenges articles.

34:50 Oh, nice.

34:51 So you can like auto generate like day 31, day 32, day 33 for each one.

34:57 That's the thing.

34:58 I think later we wrapped it in some Flask GUI.

35:00 So we just have a form.

35:02 And we give it the text and the background image URL there.

35:07 And it makes the banner there.

35:09 And you can just click download or even download it directly to your.

35:13 So I make a banner in 10 seconds now or less.

35:16 That's awesome.

35:16 That's way better than like living in Photoshop all the time.

35:19 Yeah, we don't want that.

35:20 We want to go.

35:21 Yeah, yeah, for sure.

35:22 Yeah, I think that's really cool.

35:24 I mean, I had a similar experience recently when I wanted to make all the, I wanted to

35:29 create audio versions of my online courses.

35:32 So how do you take MP4s, convert them to MP3s?

35:36 Then how do you go and put like, this is the title.

35:39 This is the album.

35:40 This is this track in this album.

35:42 And, you know, you find something cool like Pillow or, you know, it's not actually Pillow,

35:47 but like there's just these like little libraries that you wouldn't necessarily think is easy

35:51 to work with.

35:52 Like it doesn't seem like it'd be that easy to work with images, but you know, here

35:55 it is.

35:56 Right.

35:56 Same thing for like IDX tags and MP3s.

35:58 Very cool.

35:59 Yeah.

36:00 So Julian, what about this steam scraper?

36:03 Okay.

36:03 So I love games.

36:05 And that's probably one of the worst things about PyBytes is that I have less gaming time

36:09 than ever.

36:10 This was actually a fun project for me.

36:13 It actually spanned a few days and it was made up of a few scripts that I made throughout

36:17 this entire series.

36:20 This one I still use.

36:21 What it does is, and I know someone out there is going to be listening and say, why don't

36:25 you just use the RSS feed?

36:27 Well, who cares about the RSS?

36:29 The whole point is to make this, right?

36:31 What I did was I scraped the RSS feed using this scraper.

36:37 And this is Steam.com, store.steampad, you know, the Valve game service.

36:41 And I scraped the RSS feed for all the latest games.

36:45 Either way, I was scraping that file.

36:47 I was passing that file, sorry, using a feed parser as well to then get all of the games,

36:54 just the titles and the URLs, dump that into a database.

36:59 Okay, so that was like one section that took me a day or two to wrap my head around because

37:03 I'd never used feed parser at this point.

37:05 Then there was the whole emailing myself the notification that these games were released,

37:11 you know.

37:12 So I'd written an email script at the start of this entire series.

37:15 And then the catch was I was spamming myself with every new game multiple times.

37:22 So I'm going, well, I already know that game's released.

37:25 I've already bought that game.

37:27 I don't want to be told again.

37:28 So then I spoke with Bob and he said, oh, you know, I've conquered this problem before.

37:32 I've encountered it just at a zero one flag.

37:35 And that was it.

37:37 I just mind blown, you know, just I was like, oh, sweet.

37:40 So then I, in the database, added a new column.

37:43 Every existing game, every time something's added, it's given a flag of zero.

37:47 And then once it's been emailed out, it then gets a flag of one.

37:51 And then you only email out the zeros.

37:53 Yeah, that's actually really, really cool.

37:55 So tell me about feed parser.

37:57 That was actually complex for me because I'd never had to pass XML before.

38:03 And so trying to drill your way down through these nested XML tags just did my head in.

38:10 And I remember crying one night, huddled in a corner, you know, with a blanket over me.

38:16 The namespaces.

38:18 The namespaces.

38:20 Exactly.

38:20 And, you know, Bob called me and he said, what's wrong, my son?

38:24 How can I help you?

38:26 You know, and I talked to him about it.

38:29 And he showed me the name Tuple.

38:32 And at that point, I'd never used the name Tuple.

38:35 So this is what I mean.

38:36 You know, Bob knows these things and I'm still grasping at straws sometimes.

38:40 So I was like, what's the name Tuple?

38:43 And he walked me through it.

38:44 You know, I remember this phone call was about half an hour as he's telling me all these things.

38:48 And I'm like, this is amazing.

38:49 And he'd already had a script that used name Tuple.

38:51 So he used that as an example.

38:53 And then I was able to use that, find the correct names and links and then save the data.

39:00 And, you know, my code, I was hacking my way down.

39:03 And it just became like five lines as opposed to, you know, 20 or 30.

39:08 Yeah.

39:08 And you don't need to know all the XPath expressions to search through it.

39:11 This is really awesome.

39:12 So FeedParser just understands RSS1, RSS2, Atom, all that.

39:18 And you could just ask it questions after it loads up an XML feed.

39:21 Yeah, pretty much.

39:22 Exactly right.

39:23 I was just looking for those tag names and it just knew it.

39:27 It just found it.

39:28 It was able to search that stuff for me.

39:30 So I loved it.

39:31 Oh, that's sweet.

39:31 All right.

39:32 So the next one, you know what I enjoyed talking?

39:35 I mean, I enjoy a lot of things about talking to you guys.

39:37 But one of the things that's really cool about going through this is like, I didn't know about FeastParser.

39:40 I just, you know, import elementary and just go after with XPath.

39:43 Like, apparently I don't need to do that anymore.

39:46 That's really, really cool.

39:47 And so, I mean, it's not a huge deal for me, but it could, if it was just automatic, that would be better.

39:52 And I think for the next one as well, I've never played with PyGitHub, but apparently on day 84, you did, right, Bob?

39:59 Yeah.

40:00 All right.

40:00 What is this one?

40:01 Simple prototype again, just a little script to functions to get a user object from the GitHub API and show stats, all the stats for all his or her repos.

40:13 So the stars and the forks.

40:15 Yeah.

40:16 The funny thing is, as you say, you raise awareness to yourself that that library exists.

40:22 And the funny thing is, now that developing something bigger for our code challenges, where I do use a lot of GitHub integration, I went back to that library again.

40:34 Yeah, that's really cool.

40:35 I mean, GitHub does have like a straight up HTTP JSON API, but having a wrapper over top of it.

40:41 So you just say get user or, you know, repo.fork.

40:45 That is so much nicer than actually parsing the dictionaries.

40:50 I do have to say that recent acquire PDB skills helped me because there was, now that I'm digging deeper into the GitHub API, the PyGitHub, there was not, documentation was a bit limited.

41:03 But that was actually also a blessing to inspect objects with PDB set trace and really look into it.

41:10 I mean, GitHub APIs is huge.

41:12 Yeah, that's pretty massive.

41:13 And you can do a lot of fun stuff with it.

41:15 So highly recommend it.

41:17 Yeah, very cool.

41:17 All right, let's talk about some Flask apps that you worked on, Julian.

41:23 All right, so you probably know by now, Mike, I'm a bit of a Flask addict.

41:27 I can't get over it.

41:28 So this was something, so for a long time, I wanted to be able to make web apps.

41:33 And I had no idea.

41:34 And I thought it was magic how people were able to have this script turn into a web page.

41:38 And I never understood how they did it.

41:40 It scared me approaching it.

41:43 And Bob pointed me at Flask and he said, try this.

41:47 And first of all, I went through the Flask documentation and I just melted.

41:51 I was like, what is this?

41:52 This is so detailed and complex.

41:54 This is crazy.

41:55 This is sort of route maps and methods and views and templates and template language and models.

42:01 And ah.

42:01 Exactly.

42:02 Exactly.

42:03 This whole new language.

42:04 It's like learning a whole new programming language.

42:06 And I ended up going through 20 different sources.

42:09 You know, I was checking YouTube.

42:11 I was Googling.

42:12 Like three or four new languages, right?

42:13 It was just crazy.

42:15 So I said, this is something I have to learn.

42:17 And I ended up writing, I think, three or four Flask apps as part of this hundred days.

42:23 So I won't go into each one in too much detail.

42:26 But every one of them was something different.

42:29 It was like a new sort of Flask skill that I hadn't dealt with before.

42:32 So my three favorite that I wrote, I wrote a BMI calculator.

42:36 So that's body mass index.

42:37 Just a simple calculation, right?

42:39 On the command line.

42:41 But to turn that into a workable form on a website that someone can enter in the data.

42:47 And then it actually shows that result, your BMI, on the same page.

42:53 Like that, that was difficult for me.

42:55 You know, I was just thinking, how do I do this?

42:58 So that was pretty cool.

43:00 So that involved having to have a div below the form.

43:05 So the form entry field is quite simple.

43:07 But there's a hidden div that doesn't appear unless a certain variable exists.

43:13 And it was actually really cool.

43:15 I felt like I was a magician.

43:17 I felt like a hacker.

43:18 I was like, man, this is cool.

43:19 I love building web apps like that.

43:21 It takes a while to put the pieces together.

43:23 But once you have them, you're like, whoa, look at it work.

43:25 Exactly.

43:26 It's mesmerizing.

43:26 I still use it, even though I don't care about my BMI.

43:29 I just do it every now and then.

43:31 Another one was a pay calculator.

43:34 You can tell I care about my pay, right?

43:36 No, just that the whole overtime thing that Bob helped me with a year and a half ago.

43:40 I wanted to calculate how much money, if you work X many hours at this rate, how much it makes.

43:46 I thought that's a simple use case.

43:48 The cool part is that it uses Flask sessions.

43:51 So it saves your hourly rate as a session object.

43:56 And then you can keep using that session object to calculate different hours.

44:01 You don't have to enter it in every time.

44:03 And yeah, and to test it out, I had the first page as a way you enter it in and it's saved as a session object.

44:10 And the second page.

44:12 So when you browse to the second page, the session object carries over.

44:17 And that was the challenge for this specific app.

44:20 So that was really cool.

44:21 And the last one was one of my favorites because it was the first Flask app that I wrote that uses an external API.

44:28 Actually, was it an external API?

44:30 No, I think it was a time zone list.

44:33 Either way, it was it imports every time zone on the planet and then populates a pull down menu with it.

44:41 So then you choose that time zone and it tells you what the current time is in that country or in that space compared to your current time.

44:48 So, yeah, it was actually really, really cool.

44:51 I enjoyed that.

44:52 That was difficult populating that list with data from some other function.

44:57 So that was the challenge for this one.

44:59 Yeah, yeah.

44:59 That sounds really cool.

45:00 Very, very nice.

45:01 And obviously that love of Flask carried on over after this finished and that's how I got started with the Flask course.

45:09 Yeah, exactly.

45:09 We'll definitely talk a little more about that at the end.

45:12 That's awesome.

45:12 So last one, Bob.

45:14 Let's talk about some automation.

45:16 Autogen, I don't know.

45:17 Pelican, I know.

45:18 Slack, I know, but I've never done anything with it.

45:20 Tell us about all these things.

45:21 Yeah, I couldn't choose.

45:22 So I put them all under the automation.

45:24 I'm going to automate all the things, just all of them.

45:26 Automation buckets.

45:28 So to start with, so it was funny because with the 100 days, you do a tweet of your progress every day.

45:36 So that was the first common thing to automate, to have it reach out to our log file on the GitHub repo, read in a day, and automatically tweet what's in there.

45:47 Which also put a bit of pressure on us because we had a bit of pressure on us because we had this daily deadline at 22.43 p.m.

45:53 The bot's going to get there.

45:54 The bot's going to get there.

45:55 The bot's going to get there quick.

45:56 The bot is going to get us.

45:57 It's going to get the text.

45:58 If it's blank, I have to delete the tweet.

46:00 It's not a shame, but it's a shame.

46:03 So it put actually pressure on us.

46:06 But yeah, we saved a lot of time with that.

46:08 There were Slack bots.

46:09 So for example, a neat tool that could actually help people in marketing.

46:14 When your domain gets mentioned on Twitter, it gets posted to a Slack channel.

46:19 So I mean, if you get retweeted or stuff, you notice it in notification.

46:23 But if somebody just tweets your URL or mentions your URL in any sense, you don't.

46:28 Right.

46:28 And that happens a lot if somebody just discovers like a page or something you've done that's cool.

46:33 And they just shared on Twitter.

46:34 They might not even know about your Twitter account or forget to put it in there.

46:37 So yeah, you'll find a lot of stuff if you search for your domain outside of your Twitter name.

46:42 Yeah.

46:43 So we see that all on Slack now.

46:44 Pelican.

46:45 Yeah, we write some articles and we have quite some entries.

46:49 So I made a little command line tool to just do some inputs and ask some questions about topic and tags.

46:57 And then generates a markdown file with the right formatting, which again,

47:02 saves some time off every time we have to write a post.

47:04 Yeah, Slack is really cool.

47:06 We have a challenge going on now to build a chatbot.

47:10 And the most original submission we'll get.

47:12 Actually, we buy them a book.

47:14 We're really fond of chatbots.

47:17 And one I wanted to mention, that idea that grew from the 100 days was a karma bot.

47:22 So when you're in Slack, you do like, HipChat uses it.

47:26 When you do like user or subject plus plus or minus minus, a karma bot just keeps track of the score.

47:33 And that was all kind of stuff, prototypes that were born out of the 100 days.

47:38 Wow.

47:38 That's really cool.

47:39 Yeah.

47:39 A lot of stuff came out of there.

47:40 All right.

47:41 So that's one tenth of what you guys learned.

47:43 And I feel like that was super valuable just talking through that with you.

47:46 So that's pretty awesome.

47:48 Julian, do you recommend people try this 100 day code challenge?

47:51 Or is it like too intense?

47:53 Is it like a P90X or whatever?

47:56 No, no.

47:56 I totally think you need to do this.

47:59 If you're interested in programming at any way, shape, or form, you should totally do it.

48:04 The only advice I'll give is that it's tough.

48:08 There are days where you're going to want to go out with your mates.

48:11 And you're going to come home at 11 p.m.

48:13 And you'll be probably drunk.

48:15 And you'll be like, I have to write some code.

48:17 And you'll have to prep.

48:20 Maybe do more the day before.

48:23 This whole script a day thing was over the top.

48:26 So it was something I think we may do one day, again, if we're crazy.

48:31 But the whole just building a pattern and the repetition to make you learn something every day.

48:39 So this we apply to other things as well.

48:41 It's not just 100 days of code now for us.

48:43 But the main thing is if you are married and you have kids, please take that into account.

48:50 Because that was one of the biggest hurdles with us is that it's like you'll have family time and then you'll have to go, I've got to go write a script.

48:58 They don't understand.

48:59 It's not their thing, right?

49:00 So you have to run away.

49:01 You have to.

49:02 That was the hardest thing to balance, to be honest.

49:04 So if you can plan, tell your better half, look, here's what I'm doing.

49:08 Work it out.

49:08 Even plan a time of the year where work isn't too crazy.

49:12 But plan it in advance.

49:13 Don't just jump on it because it can be pretty taxing.

49:16 Yeah, of course.

49:17 You know, one thing that comes to mind while you're speaking is maybe this doesn't have to be outside work, right?

49:22 Maybe you could get an hour of work at your job saying, hey, dear manager, I'm trying to learn this thing.

49:29 And, you know, I have this training budget.

49:30 Could you just give me time instead of, you know, a class with a bunch of boring slides anyway?

49:35 Like, I'll just do this.

49:36 That's an amazing.

49:37 Or something along those lines, right?

49:39 That's a really good idea.

49:40 I'm going to take that to work and try that.

49:43 Nice.

49:43 Yeah.

49:43 That's a good.

49:44 Thanks, man.

49:45 You should.

49:45 Let us know how it goes.

49:46 Yeah.

49:47 It's a good return on investment because you're really practicing.

49:51 And to really to learn the program, it requires a lot of hours of deliberate practice.

49:57 And 100 Days of Code does that.

49:59 Yeah.

50:00 I feel like you guys must have got a lot of confidence and, like, capability with other libraries that you otherwise wouldn't have touched.

50:07 Exactly.

50:07 Two, right?

50:09 Yeah.

50:09 Very cool.

50:09 Okay.

50:10 So, you also have another one.

50:11 And I don't even know where you are in the timing of it.

50:14 But it went around Django specifically, not just Python in general.

50:19 Tell us about that.

50:19 Yeah.

50:20 So, after 100 Days of Code, we were kind of a bit tired.

50:24 But, nevertheless, we started a new 100 Days.

50:26 It was a bit looser.

50:28 So, we didn't do, like, a daily tweet anymore because, I mean, Django apps are typically, like, long, stretched projects.

50:36 You have to do something like Django page view per day or an API endpoint per day or something.

50:42 We weren't, like, that strict on it.

50:45 But, yeah, we did manage to do two or three apps.

50:48 For example, we made a lot of things like that.

50:49 So, we made a lot of things like that.

50:49 So, we made a lot of things like that.

50:49 So, we made a lot of things like that.

50:49 So, we made a lot of things like that.

50:49 So, we made a lot of things like that.

50:49 So, we made a lot of things like that.

50:49 So, we made a lot of things like that.

50:50 So, we made a lot of things like that.

50:50 So, we made a lot of things like that.

50:51 So, we made a lot of things like that.

50:52 So, we made a lot of things like that.

50:52 So, we made a lot of things like that.

50:53 So, we made a lot of things like that.

50:54 So, we made a lot of things like that.

50:55 So, we made a lot of things like that.

50:56 So, we made a lot of things like that.

50:57 So, we made a lot of things like that.

50:58 So, we made a lot of things like that.

50:59 So, we made a lot of things like that.

51:00 So, we made a lot of things like that.

51:01 So, we made a lot of things like that.

51:02 So, we made a lot of things like that.

51:03 So, we made a lot of things like that.

51:04 So, we made a lot of things like that.

51:05 So, we made a lot of things like that.

51:06 So, we made a lot of things like that.

51:07 So, we made a lot of things like that.

51:08 So, we made a lot of things like that.

51:09 So, we made a lot of things like that.

51:10 So, we made a lot of things like that.

51:11 So, we made a lot of things like that.

51:12 So, we made a lot of things like that.

51:13 We made a lot of things like that.

51:14 So, we made a lot of things like that.

51:15 So, we made a lot of things like that.

51:16 So, we made a lot of things like that.

51:17 So, we made a lot of things like that.

51:18 So, we made a lot of things like that.

51:19 So, we made a lot of things like that.

51:20 So, we made a lot of things like that.

51:21 So, we made a lot of things like that.

51:22 So, we made a lot of things like that.

51:23 So, we made a lot of things like that.

51:24 So, we made a lot of things like that.

51:25 So, we made a lot of things like that.

51:26 So, we made a lot of things like that.

51:27 So, we made a lot of things like that.

51:28 So, we made a lot of things like that.

51:29 So, we made a lot of things like that.

51:30 Yeah.

51:31 Still, we got quite some stuff done.

51:33 Yeah.

51:33 That's awesome.

51:34 And so, this one is also done?

51:35 Yeah.

51:36 It's done.

51:37 Yeah.

51:38 I mean, the deadline is over.

51:39 And now, we take a little bit of rest to prepare for another.

51:41 Rest.

51:42 Come on.

51:43 You got time for one and a half more this year.

51:45 Right.

51:46 Basically, we're focusing on our project.

51:47 Yeah.

51:48 He meant the rest framework.

51:49 That's what he meant.

51:50 That's right.

51:51 Right.

51:52 Django rest framework.

51:53 100 days of it.

51:54 Perfect.

51:55 Awesome framework.

51:56 Nice.

51:57 So, I think, you know, get a look at the time.

51:58 We'll probably just leave it here for this topic.

52:00 But I feel like this was super valuable.

52:02 Looking at the 10 you chose and talking about them, I can definitely see the value of doing

52:06 them.

52:07 And I've learned a few things myself.

52:08 So, you know, thanks for walking us through this.

52:10 Nice.

52:11 No worries.

52:12 Yeah.

52:13 Awesome.

52:14 So, before you guys get out of here, though, you have to face the two questions.

52:15 So, first of all, we'll start with you, Bob, I guess.

52:18 If you're going to write some Python code, what editor do you use?

52:21 Vim.

52:22 Vim.

52:23 All right.

52:24 On.

52:25 And notable PyPI package.

52:26 Play with 100 packages or modules in this whole thing.

52:29 So, probably found some cool ones.

52:30 Can we still say request?

52:31 You can still say request.

52:32 That's awesome.

52:33 Maybe for data analysis, I would say pandas.

52:35 We didn't really use it in 100 days, but it's an excellent tool to do any kind of data

52:41 analysis.

52:42 Yeah, absolutely.

52:43 All right, Julian.

52:44 Obviously, on the command line, it's going to be Vim.

52:46 And Bob, don't hate me, okay?

52:47 Please don't hate me.

52:48 On Windows, I actually use Notepad++.

52:51 And I love it.

52:52 I know.

52:53 It's crazy.

52:54 I've known some people that love Notepad++ as well.

52:56 Very cool.

52:57 And notable PyPI package.

52:58 Okay, so I'm going to just say two.

53:00 Obviously, Flask.

53:01 Well, okay, that's not PyPI.

53:02 All right.

53:03 Yeah, yeah, it's on there.

53:04 It's on there.

53:05 Is it?

53:06 Oh, okay.

53:07 Sorry, I thought you meant like a part of standard lib.

53:08 No, no.

53:09 Outside the standard lib.

53:10 External stuff.

53:11 There are probably two.

53:12 I won't go into that.

53:13 But actually, this is an interesting one because I'm pretty terrible at it.

53:17 pytest.

53:18 It was only in the past month that Bob was pushing me on this one, going, "You've got

53:21 to try this," you know?

53:22 And it just worked.

53:24 It's so easy to just get like boring and go, "Ah, just import, you know, unit test and just

53:30 use that it's right there.

53:31 Like, there's nothing to it, right?" And I was not very good at testing my own code and I'm still terrible at it.

53:36 But it was just this whole different way of looking at it.

53:39 So definitely pytest.

53:40 All right.

53:41 Oh, yeah.

53:42 Those are both very, very good ones.

53:43 Awesome.

53:44 All right, guys.

53:45 People are interested in this.

53:46 Like, how can they participate?

53:47 Maybe can they join like your community somehow to like sort of have some support while they

53:52 go through?

53:53 Or what do you think?

53:54 Bob, go first.

53:55 Yeah.

53:56 So PyBytes, video articles, co-channels, news, and projects.

53:59 If you really want to practice, I really recommend to go through the list of code challenges

54:05 we have.

54:06 We have 44 now, up until now.

54:08 And pick whatever you like and clone the repo or fork the repo and make your branch and start

54:15 trying to do these challenges.

54:16 We have seen people growing a lot.

54:18 They thought like, "Ah, I cannot do it." Then they did it.

54:21 Then they thought they would have some lame submission and they actually came up with solutions.

54:26 We were like, "Wow." First off, we were like, "Wow, I'm not even sure what it is."

54:32 You know?

54:33 So we were learning from them as well.

54:34 But it works.

54:35 It's incredible.

54:36 So really, people and ourselves too, we're really stretching ourselves through these code

54:40 challenges.

54:41 So that's really what I would recommend from our site.

54:45 Yeah, that's awesome.

54:46 Julian, how about you?

54:47 Yeah, so from a, I guess, from the beginner standpoint, for anyone listening, just stop

54:52 procrastinating and start coding.

54:54 It's literally learn by doing.

54:56 That's just the greatest way to do it.

54:58 And again, obviously a plug, you've got to try the code challenges.

55:01 They will force you to just to learn new things.

55:04 And because you're getting told in the challenges what you have to do and what you have to learn,

55:08 that's an even better way.

55:10 So do the 100 days of code challenge.

55:12 But the most important thing is to just start writing code.

55:16 That's it.

55:17 Awesome.

55:18 And speaking of writing some code, you started working with Flask.

55:22 You talked about how you fell in love with it.

55:23 You have a course on Udemy for Flask, right?

55:27 That's right.

55:28 Yeah, quickly tell people about it before we get out of here.

55:30 Yeah, just super quick.

55:31 It's a beginner's Flask course.

55:32 It is totally intended for beginners because, as I mentioned before, the Flask documentation,

55:37 trying to find and understand everything was quite difficult to piece it all together.

55:41 So I've made this course.

55:43 Bob and I have worked on it.

55:45 And it's just designed to really sell it in layman terms.

55:48 So if you don't understand, we walk you through all the steps to write your first Flask app,

55:53 get the basics down.

55:54 And we will expand this later as we go.

55:56 And we are working on more courses.

55:58 But this one is the way to get into it.

56:00 And it's actually really fun.

56:01 Feedback's been great.

56:02 And we've got a link for you, Mike, with a discount code for anyone listening.

56:07 Yeah, I see.

56:08 Right.

56:09 It's got the coupon code in there.

56:10 So I'll put that in the show notes and people just click it there and they get a discount

56:12 and you'll know it came from the podcast, which is awesome.

56:15 Cool.

56:16 All right, guys.

56:17 Well, thank you for doing this project and sharing all the stuff you do at PyBytes with

56:20 the community and now sharing it with everyone listening to the podcast.

56:23 No worries.

56:24 Thanks for having us, Mike.

56:25 You bet.

56:26 Bye.

56:27 Bye.

56:28 This has been another episode of Talk Python to Me.

56:31 Today's guests have been Bob Beldrbos and Julian Securia.

56:35 And this episode has been brought to you by Rollbar and GoCD.

56:39 Rollbar takes the pain out of errors.

56:41 They give you the context and insight you need to quickly locate and fix errors that might

56:46 have gone unnoticed until your users complain, of course.

56:49 As Talk Python to Me listeners, track a ridiculous number of errors for free at rollbar.com/talkpythontome.

56:56 GoCD is the on-premise open source continuous delivery server.

57:01 Want to improve your deployment workflow, but keep your code and builds in house?

57:05 Check out GoCD at talkpython.fm/gocd and take control over your process.

57:11 Are you or a colleague trying to learn Python?

57:13 Have you tried books and videos that just left you bored by covering topics point by point?

57:18 Well, check out my online course Python Jumpstart by Building 10 Apps at talkpython.fm/course

57:24 to experience a more engaging way to learn Python.

57:27 And if you're looking for something a little more advanced, try my Write Pythonic Code course

57:31 at talkpython.fm/pythonic.

57:33 Be sure to subscribe to the show.

57:36 Open your favorite podcatcher and search for Python.

57:39 We should be right at the top.

57:40 You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed

57:47 at /rss on talkpython.fm.

57:49 This is your host, Michael Kennedy.

57:51 Thanks so much for listening.

57:52 I really appreciate it.

57:53 Now get out there and write some Python code.

57:56 Thank you.

58:04 Thank you.

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon