Learn Python with Talk Python's 270 hours of courses

#69: Write an Excellent Programming Blog Transcript

Recorded on Tuesday, Jul 19, 2016.

00:00 Do you have a blog? How many articles have you written for it? Do you find it hard to keep writing

00:04 or hard to get started doing technical writing? Well, we might be able to help out with that this

00:09 week. You're probably aware that blogging is one of the key ways to establish yourself as a thought

00:14 leader in the industry. You'll make more connections, open more opportunities, and likely find your work

00:19 more rewarding if you share your experiences and expertise through blogging. But it can be

00:24 challenging to keep writing or to find the time. That's why I asked A. Jesse Giroudavis from MongoDB

00:30 to share his thoughts on writing an excellent programming blog. You'll even learn about Jesse's

00:34 five design patterns for blogging that will help you break writer's block. This is Talk Python to Me,

00:40 episode 69, recorded Tuesday, July 19th, 2016.

00:44 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the

01:14 ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter,

01:19 where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm,

01:24 and follow the show on Twitter via at Talk Python.

01:26 This episode is brought to you by SnapCI and Intel. Thank them both for supporting the show on

01:33 Twitter, where they're at snap underscore CI and at Intel software.

01:37 Hey, everyone. Before we get to the main interview, I actually have a special little segment for you and a

01:43 pretty awesome announcement. I'm here with Matt McKay. Remember him from the Full Stack Guide to

01:48 Deployment episode back in episode 26. So Matt and I have a pretty awesome announcement. Matt,

01:54 why don't you tell everybody what we're up to?

01:55 Sure, Michael. Thanks for having me on. So we're launching a Python for Entrepreneurs co-authored,

02:02 co-taught course on Kickstarter.

02:05 Yeah, this is a course I've been dreaming of writing for a really long time. So many courses teach you how to build web apps.

02:11 There's some courses that will teach you how to build online businesses around it, you know, processing credit cards and things like that, in addition to the core web technology.

02:19 This Python for Entrepreneurs course, it's supposed to teach you both. So you can go from zero to online functioning business, taking credit cards with real users right away.

02:29 So the overriding goal that we're working from really is to dramatically shorten the time from idea to minimal viable product to running a production and accepting money, shorten that time from months, maybe even a year down to a month or a couple of weeks in some cases.

02:43 So Matt, tell us, who did you have in mind when you were working on your part of the course?

02:47 Yeah, so I think the ideal student is someone who knows a little bit about programming, maybe is just getting just trying to hack on some programming themselves for a purpose, or someone who has been programming for a long time, but maybe doesn't have the full range of technologies that they would need to build an online business.

03:04 So really, that's the target audience for this, and someone who wants to build a non-trivial product.

03:10 So I think, for example, if you want to break out of your mold of your regular company job and launch, you know, an Airbnb competitor for your local market, you could use this course and it would be a good place to start.

03:22 Of course, that would be a huge challenge to launch an Airbnb competitor, but you have a general idea of who we have in mind.

03:28 You know, a lot of people who listen to the show, they, of course, know Python, but in case your Python's a little sketchy and not ready to jump straight into web development, on the Kickstarter, we set up a Python Foundation Plus Entrepreneur Reward.

03:39 And that basically gives you access to my Python Jumpstart course as well as an entrepreneur course at almost just the price for the one.

03:47 So that's really awesome.

03:48 And everybody, go and check this out at talkpython.fm/launch.

03:53 We really hope you love this class.

03:55 We hope you back the Kickstarter and we hope this makes a really big difference in the business that you've been dreaming of launching.

04:01 Matt, thanks for being here.

04:03 Thanks, Michael.

04:03 Yeah, I'm excited to see where this goes.

04:05 All right, let's get on to the interview with Jesse.

04:07 I'm not going to ask you how you got into programming in Python because I already asked you that.

04:12 You can start from, you've been up to the last year.

04:14 That sounds great.

04:15 Last year when we talked, I had just begun to transition from being a full-time Python programmer to being mainly a full-time C++.

04:25 programmer.

04:26 And that was a bumpy ride.

04:29 But we've kind of achieved stable flight now where I feel basically competent in C.

04:36 And the project that I'm leading, the MongoDB C driver, which is what C application developers use to talk to MongoDB.

04:47 The project has now gone through a number of releases with me and we've fixed a ton of bugs and it's pretty stable.

04:54 And this summer I have a colleague and two interns working with me on it.

05:01 And that's freed me up to not quite have my head down in C code as much as I did over the last year.

05:08 Give me sort of a contrasting experience.

05:11 You've been doing Python for a long time.

05:12 You're deeply involved in the community.

05:14 And then you go over and do C code.

05:16 And I'm sure you knew C before.

05:18 But what was it like to sort of come back to C?

05:21 Well, I knew enough C to be able to read and write the syntax of the language.

05:28 But after 10 plus years as a professional Python programmer, I knew the difference between knowing a language versus actually being a professional programmer in it.

05:41 And so I knew I knew the C language, but I also knew that I wasn't a professional C programmer.

05:47 And so I would have to learn how to use all of the tooling like Valgrind and GDB, how to maintain API and ABI compatibility, how to manage an open source project, how to package a C shared library for Linux in the proper way, both for Red Hat and Debian.

06:11 And I knew I didn't know all of that.

06:14 And I knew that that was going to be the bulk of professional C programming.

06:20 And therefore, that's most of what I've been spending the last year doing things like being able to figure out from a core dump what happened on a customer's machine or figuring out how to give customers a way out of a poorly chosen API while at the same time not breaking backwards.

06:41 Yeah.

06:42 For those who are already using it.

06:43 Yeah, that's a big challenge if you're supporting customers and they say, we think the driver crashed or something we did in the driver crashed our app.

06:52 Because if that happens in Python or Ruby or .NET, you get a nice stack trace.

06:58 And there's tools that you can turn against.

07:00 It's much harder to just, you know, get up.

07:03 Like you said, a core dump.

07:04 That's a lot of work to look into, right?

07:06 Yeah.

07:07 The proportion of scary bugs causing sleepless nights in Python is much, much lower than in C.

07:15 I'm sure it is.

07:17 That's awesome.

07:17 So you said you have some people helping out on this project so that you can turn your attention a little broader to the community and supporting MongoDB in other ways.

07:29 And so you said you've been doing a lot of writing, right?

07:32 Yeah.

07:32 So in the last year, the scope of my writing has grown enormously.

07:38 I started writing my blog when I started working for MongoDB about five years ago on EmptySquare.net.

07:46 And I'm still publishing a lot there.

07:50 But in the last year, MongoDB itself has started up a tech blog.

07:56 And naturally, I've been doing a lot of writing and editing for that.

08:02 So I listen for interesting stories among my colleagues, problems they encountered, ideas they had, management or software engineering practices they tried that failed or succeeded.

08:18 And I've been soliciting articles and helping people to shape their experiences into tight-knit stories that are crisp and compelling and then helping them to write and edit those stories and publish them.

08:33 That's really cool.

08:34 I mean, you're taking these guys and girls who are mostly programmers, not writers, and you're helping them tell these stories, right?

08:43 So you probably help them come along as writers a little bit, help them break through things like writer's block and write well-structured, compelling blog posts, right?

08:53 Yeah.

08:54 And it's a very different kind of challenge.

08:57 I'm really struck by how much of a problem for people who are not professional writers, writers' block and procrastination are.

09:09 I was thinking the other day how if you assigned a programmer to implement a feature and three weeks later there was no progress whatsoever, no evidence of any effort whatsoever, that would be a serious problem.

09:22 You wouldn't see that very often.

09:24 And you would think about whether this programmer should continue to work for your company for much longer.

09:30 Whereas with a programmer who is writing, you might easily see three weeks of procrastination.

09:37 And you need to break through it, but it's also sort of not as surprising.

09:43 We procrastinate about writing in a way that we don't procrastinate about almost anything else.

09:48 Yeah, I think it takes a lot of practice to write well, and you almost have to make it a habit.

09:53 Yeah, that's true.

09:54 And maybe also to treat it as not certain to be perfect and not as intimate as it feels.

10:09 We need to treat it a little more like code, like do your best, read it over, do your best to make something that's correct and compelling, and then just publish it.

10:20 In the same way that we treat our code, where we know that it will never be bug-free or lightning fast, but we publish anyway because it's better than not.

10:30 Yeah, it's better than not doing anything.

10:32 Yeah, that's true with code.

10:34 I think it's true with blogging.

10:35 I mean, it's true with podcasting.

10:37 It pains me going to go back and listen to our original interview, not because anything we talked about, but just the experience that I have these days versus then.

10:47 I felt really a little unsure of myself and so on.

10:50 And the way you get better is by doing it, right?

10:53 So like writing code, blogging as well.

10:57 So you also write a little for the PSF blog.

10:59 Is that true?

11:00 Yeah, there was this unfortunate moment last year where the PSF's main blogger, Marianne Sushinsky, had, I think she fell off her bike and she hurt her wrist.

11:09 So she was one-handed.

11:11 And then wonderfully, Diana Clark, who heads the PSF, had a baby, but that effectively made her one-handed as well because she was holding her baby in one arm and typing with the other.

11:23 So unfortunately, two people with one arm each don't write as well as one person with two arms.

11:31 So Diana asked me if I could step in and write some articles for the PSF.

11:37 And I've been doing that since.

11:41 And the main thing that I do is I write profiles of people who've won PSF Community Service Awards.

11:48 And that's been super exciting because I can make contact with people who are prominent in our community, interview them about what they're most passionate about, about what makes their work stand out, and then communicate that to all of the PSF members and readers.

12:13 Yeah, that's a great service and a great opportunity for you, right?

12:16 I think one of the things that's interesting that sort of comes out of that is writing and blogging and these types of things, they open up opportunities that you otherwise might not have had, right?

12:31 That you might not have expected to have come out, but there they are, right?

12:34 Yeah, that's right.

12:36 And I really feel that difference when I went to PyCon in Portland this year compared to last year.

12:45 Because this year I had already had long phone calls with the two Community Service Award winners whom I profiled, Jackie Kazel and Damian George, and various people that they knew whom I talked to about their achievements.

13:03 So I had this built-in community and these conversations that I had already started having, and it made it really easy to continue to be connected with people when I met them in person in Portland.

13:17 Yeah, that's excellent.

13:19 So speaking of Portland, PyCon, it was a great conference.

13:24 Let's talk about your session that you did there.

13:26 You did one.

13:27 It was entitled Writing an Excellent Programming Blog, right?

13:30 Yeah, that's right.

13:31 So was this sort of motivated by your experience with working with all the developers at MongoDB and trying to synchronize them into a coherent set of articles and a machine that would create all these great stories from MongoDB and your blog?

13:47 Or where did it come from?

13:48 Yeah, that's right.

13:48 It came from both my personal experience of how much writing had benefited me, and also my experience of a community coming together and talking to itself and communicating its values to other people by writing.

14:07 So I had this sense that people who come to PyCon want to contribute code to each other, and they admire people who write great code, but that they were often unaware of what huge value we can achieve for ourselves and for each other by publishing our writing.

14:29 And I also felt like people who wanted to write didn't quite have the professional approach to it that they do to their coding, and so they weren't being very productive when they did decide to write.

14:44 Yeah, I feel like a lot of people blog with guilt.

14:47 You know, they are like, oh, I know I should have a blog, so I'll create a blog, and they'll write for a while, and then they'll kind of let it drop.

14:57 And then, you know, it's not good when you see a post that says, I'm planning on writing some more soon, you know, and it's like five, six months old.

15:05 But it is hard.

15:08 And so I think one of the interesting things that your talk does, and of course I'll link to the video.

15:13 It's recorded on YouTube so people can watch it, and I recommend they do, is you kind of broke it out into almost like a set of design patterns for successful developer blogs.

15:24 And you contrasted what it means for a developer to blog versus what it means to be like a tech crunch writer versus what it means to be a BuzzFeed article top 10 list writer, right?

15:35 You have different goals, different timelines, and so on.

15:38 That's right.

15:39 I think people think of a blog as something that needs to be updated regularly because they're used to the old model where people blog and expect repeat readers and think of a blog as something that makes money from page views.

15:56 But there's really not very many of those in the world, and they're nothing like what you and I and our listeners write about.

16:06 So what open source Python developers will write about is our individual specialties.

16:13 And we will write infrequently when we're inspired by some new piece of information or new project that we're working on within our extremely narrow specialty.

16:26 And we'll probably be speaking to a very small number of fellow specialists who are looking for this kind of deep expert knowledge about our topic.

16:37 So it's not going to be the news of the day.

16:40 Certainly not going to be anything like TechCrunch.

16:43 We don't do industry reporting.

16:44 We don't guess whether a company is going to IPO or whether it's going to be more profitable this quarter.

16:50 We're writing articles of deep significance and lasting value, and therefore we don't write very often.

16:59 And I think that that's completely appropriate.

17:02 But we really need to understand what sort of articles we write that are valuable in order to understand why it's okay that we write them infrequently.

17:12 Right.

17:13 But then understand the patterns and the styles that we can sort of fit our ideas into to best match as well.

17:19 You know, when you're talking, I was thinking this sounds a little bit more like an academic person, like a professor writing an academic paper more than it does, you know, a newspaper journalist.

17:33 Yeah, that's exactly right.

17:35 And that's why I encourage people not to think of themselves as writing blog posts, because the things that we publish about open source software development are not posts to a web blog.

17:51 They're articles about topics.

17:53 And so I think we should start calling what we do articles and essays, because that will put us in the right frame of mind to write well-wrought, deeply thought pieces of writing.

18:04 Yeah, that's excellent.

18:05 So you started out going through in your session talking about a couple of things.

18:10 And one of the things you talked about is there's a couple of reasons that we start writing.

18:16 I thought they were interesting.

18:17 You sort of touched on some of them.

18:19 Share your experience and expertise.

18:21 Meet your fellow experts, kind of like you did with going to PyCon.

18:27 You had exposure to these folks, and it was really great.

18:30 But another one that I found that resonated with me is you said, writing is thinking superpowered.

18:36 Can you expand on that?

18:37 Yeah.

18:38 I think that explaining a topic, we know this, that it's only when you try to explain something to somebody else that you are really certain about how deeply you understand it.

18:51 And I think it's even more so when you're writing it down and rereading what you've written, reinforcing your understanding, and looking up things where you realize that you have gaps.

19:03 One case where I did this, I very often do this when I start working on a bug, is I start writing the story of how I diagnosed and fixed the bug.

19:14 And I start writing the story before the story is complete.

19:19 So a few years ago, I was diagnosing this bug.

19:23 It had come up via a PyMongo bug report.

19:26 And what it looked like to me was that assigning to a thread local is not thread safe in Python 2.6, that you need to lock around that assignment.

19:40 And that is, if true, obviously a bug in Python.

19:46 And so intricate and deep and mind-blowing that I really didn't think that I would be smart enough to diagnose it.

19:53 Yeah.

19:54 Threading is hard.

19:55 Thread local concepts are hard.

19:57 And then if there's a bug down in CPython itself around it, like, okay, this is intense, right?

20:03 So I find it really interesting that you started writing before you actually had the answer.

20:08 It was like an exploration almost, right?

20:10 Yeah.

20:11 And writing down the story of how I diagnosed the bug was how I diagnosed the bug.

20:19 So I wrote down at each stage, this is how far I got.

20:23 This is what I was thinking.

20:25 And by then reading that back to myself, I could really entrench my understanding and also test it.

20:35 I would see, if I were somebody reading this, would this make sense to me?

20:40 What would I think the author had missed?

20:42 What haven't I thought of yet?

20:44 Am I certain of my conclusions so far?

20:47 And that allowed me to proceed step by step and diagnose a previously unreported bug in Python 2.6's threading implementation, which to this day, I think, is sort of astonishing.

21:02 That really is amazing, considering how much usage that version got.

21:08 Can you just sum up what the bug was in, like, a sentence or two?

21:11 Yeah, there is a way that one thread could interrupt another in the midst of updating thread local state that would leave something that had been in a thread local storage unreferenced and leaked.

21:26 And this caused a socket leak in PyMongo that would eventually lead it to run out of file descriptors.

21:34 Yeah, that's not good.

21:35 No, it was catastrophic.

21:38 But it's extremely hard to find, and it takes a long, long time for it to actually crash, right?

21:44 So not good.

21:45 Yeah, that's really cool.

22:01 SnapCI is a continuous delivery tool from ThoughtWorks that lets you reliably test and deploy your code through multi-stage pipelines in the cloud without the hassle of managing hardware.

22:11 Automate and visualize your deployments with ease and make pushing to production an effortless item on your to-do list.

22:18 Snap also supports Docker and M browser debugging, and they integrate with AWS and Heroku.

22:24 Thanks, SnapCI, for sponsoring this episode by trying them with no obligation for 30 days by going to snap.ci slash Talk Python.

22:39 So the next thing you talked about was almost like a design pattern, a set of design patterns that you see over and over in these technical writings that you talked about that are not academic papers, not BuzzFeed articles, but sort of this middle ground where we as developers often operate.

22:56 Can you maybe talk about those a little?

22:58 Yeah.

22:59 Yeah.

22:59 Among the stories that I really admired and found most valuable, it seemed like they were five-ish structures, which are stories, opinions, how-to guides, explanations of how something works, and then reviews.

23:17 And the structure of each of these is very simple, and you can reuse it like a template.

23:26 So a story just tells a sequence of events, and it's always got some moral like a fable.

23:34 You learned something, or you learned not to do something, or you discovered some fact that you wouldn't have otherwise.

23:42 One of the things I liked about it when you talked about these is each one of these sort of patterns, if you will, is accompanied with a concrete article from someone often in our community.

23:53 Right.

23:54 So, for example, you told the story of, I think you called it, it was called Unyielding by Glyph, and a problem around threading that has to do with the story.

24:03 Is that right?

24:04 Yeah, that's right.

24:05 Glyph's article titled Unyielding about a bug that he had in multi-threaded Java and how he fixed it by re-implementing his entire stack in asynchronous, twisted Python code.

24:20 It's a great story.

24:22 It's funny.

24:23 It's about this text adventure game he had where, due to a threading bug, a brass cockroach item in the game would multiply indefinitely and fill the entire world and make it unplayable.

24:37 So, it's hilarious and it makes really memorable his underlying point, the lesson of the story, which is that async code is less prone to race conditions than multi-threaded code is.

24:51 Yeah.

24:51 Very cool.

24:53 And then I interrupted you on the next one, which is opinions.

24:55 So, opinions, the structure is what we learned in high school.

25:00 You state a thesis, you back it up with three points of evidence or more, and you anticipate and respond to the reader's likely objections, and then you just conclude by restating your thesis.

25:15 And the example of that that I cite is an article by Julia Evans where she argues that we shouldn't feel guilty about not contributing to open source.

25:27 And her argument there is super interesting because she says that we often feel obliged to be always submitting pull requests, but sometimes open source software just works for you the way it is.

25:43 There isn't a missing feature or a bug that's getting in your way.

25:46 And if you make guilt contributions in that state, they won't actually be the right thing because they're not scratching your own itch.

25:56 They won't actually be that beneficial to the project.

25:58 So, when you're in that phase where you're just working with open source and it works for you like it is, it's okay not to contribute and you shouldn't feel guilty.

26:09 So, she's not attacking anybody there.

26:12 And that's really important.

26:15 I think that in the software community, especially open source, there's a lot of thoughtless and damaging aggression.

26:25 And we should stop saying, oh, that thing sucks.

26:30 That thing's a piece of trash.

26:32 That's not a useful opinion.

26:34 A useful opinion is insightful and interesting and...

26:38 No, it's definitely not useful.

26:40 ...goes out of its way to be constructive.

26:42 All right, Jesse.

26:43 So, the next one is how to.

26:44 Yeah, that's right.

26:45 So, how to is probably mostly what we all write, where you just explain how to do something.

26:54 And it always begins by motivating it.

26:57 It says, if you want to accomplish a given thing, you'll need to know how to do X.

27:06 So, that lets the reader decide whether to read the article and also makes a promise of what the value of the article will be if they do finish it.

27:15 Right.

27:15 There's usually some kind of constraint, like under these circumstances or under these conditions, it makes sense for you to use, I don't know, object data model mapper for Mongo versus straight PyMongo.

27:27 Who knows, right?

27:28 But something like this.

27:30 Exactly.

27:30 And the example that I really enjoy for that is an article by Kenneth Reitz about growing open source seeds, where he...

27:41 Kenneth Reitz is the maintainer and inventor of requests, which is one of the most successful Python packages.

27:50 And so, he's got a lot of expertise about creating a package that's very popular and then maintaining it without burning out.

28:00 And that's what his growing open source seeds article is about.

28:03 But he begins by motivating you with a counterexample of a library that Facebook open sourced and then abandoned, which made everybody mad at them.

28:14 So, his promise is, if you don't want to end up like they did, like that project did, then you should read How to Do My Thing.

28:22 And therefore, if that's not a priority for you right now, you can skip it.

28:26 But if that does seem like a fate that you're in danger of and you want to learn how to avoid it, then you should read Kenneth's article.

28:35 Yeah.

28:36 Yeah, that's excellent.

28:37 I think we end up do writing...

28:38 We do end up writing a lot of how-tos, right?

28:42 I think that's sort of the engineering side of us saying, okay, I need to understand all the steps and the building blocks, the Lego pieces of programming or the Lego pieces of community building.

28:53 But there's also sort of the just understanding the concepts.

29:00 You know, how does something work?

29:01 Kind of like a scientist cares, you know, why atoms bond together, not just, you know, what do I do to make them come apart?

29:08 Yeah, that's exactly right.

29:09 I think we all have those two sides to us in some proportion.

29:14 So we also want to write how things work type articles where the motivation is not about actually doing anything, but simply understanding something.

29:27 And the article that I cite for that is by Allison Kaptor, who has for a long time been a facilitator at the Recurse Center.

29:36 And she wrote an article about syntax warnings.

29:40 So it turns out that if you do from module import star, if you write that line within a function definition in Python, you'll get a exception called a syntax warning,

29:55 which most of us have never seen because we didn't make that particular mistake when we were just starting out.

30:02 And one of Allison's students, though, tried that out and hit that error.

30:08 So there's no need to write how to avoid that.

30:13 You simply move the from module import star statement to the top of the file and you're good.

30:17 But Allison was really interested in where that syntax warning came from and why that statement was not allowed.

30:25 It might be a reasonable thing to do as a beginner because you can do those local imports if you preserve the namespace, right?

30:32 Like import OS would be OK, right?

30:35 Yeah, that's exactly right.

30:36 So it may not be very useful to know why that doesn't work, but it's awfully interesting.

30:43 So she dove in and she found out a lot about how the Python compiler works and its symbol table and wrote an article about it that is fascinating purely for the curious scientist within us.

30:57 Yeah, that's awesome.

30:58 And then so that was the fourth one.

31:01 The last one you said that maybe this is the easiest.

31:04 I think either the how to or this one, the review, might be the easiest if you just want to kind of write another article.

31:12 You've got something.

31:13 You're like, I kind of take this Saturday morning to write something.

31:15 A review could be a good choice, right?

31:17 That's right, because it can be any length and there's always something new to review.

31:23 You've always seen a movie or finished a book or tried out an open source project.

31:29 And if you just want to keep your blog alive or keep your writing muscles toned, write a review.

31:40 But the main thing to keep in mind is that simply rating things, saying whether the movie or book or a software project is good or bad, is not very useful to your audience.

31:52 And it's not very good as writing practice either.

31:55 It's much more important to describe what the thing is and what it's good for.

32:01 So this movie is good for relaxing on a summer matinee.

32:06 Or this project is useful if you want an easy-to-use debugger that doesn't have all the bells and whistles.

32:15 And by writing your review that way, that makes the most valuable description of that thing for your reader.

32:26 Yeah, that's excellent.

32:27 So these five things come together as these almost design patterns for our technical articles, if you will.

32:35 And I think they're really helpful.

32:37 How do you see them helping with writer's block?

32:40 So you can use it in two ways.

32:42 And this is what I do, is that if I've got a topic that I want to write about, but I can't seem to get started.

32:51 I don't know what the structure will be.

32:54 And so I don't know how to begin, how to write the first paragraph.

32:59 A great way to start is to ask myself, am I writing a story about this topic, or do I have an opinion that I want to argue for, or any of the other of the five structures?

33:12 And that narrows my scope.

33:16 I can choose one, and then I just plug in the blanks in the template.

33:21 And by the time that I've chosen a structure and filled in the blanks, I'm already halfway done to a first draft.

33:30 The other way that I can use this is if I don't know what to write about next at all, I can ask myself whether I have one of these five kinds of stories.

33:42 Do I have a story to tell, an opinion to share?

33:45 Do I want to explain how to do something or how something works?

33:49 Or is there something I've experienced recently that I want to review?

33:52 And that can help me to generate ideas and realize that I have thoughts that I want to write about that I hadn't been noticing before.

34:00 Yeah, that's really cool.

34:02 I think that's super helpful.

34:03 And I can certainly see myself going down this checklist if I've got just a blank WordPress, you know, new post, what's the title, and just an empty field for the content, right?

34:15 Like, well, what am I going to do now?

34:17 I think this is excellent.

34:19 So when you think about the target audience, one of the things people really care about is getting their blog to be popular.

34:27 And you said you kind of discourage people from being too overtly focused on things like SEO and content marketing and so on for your personal blog, at least.

34:38 What was your thinking there?

34:40 SEO is a set of techniques for competing for a mass audience with other authors who are writing about the same topic.

34:50 And that is the total opposite of the kind of writing that we're talking about now.

34:56 We're writing about specialties, and we're virtually the only people writing about them.

35:03 And that means that when our fellow specialists want to read about our topics, they'll be searching for keywords that only we are using.

35:09 So our fellow specialists will find us, and we really don't need to worry about it.

35:15 And we're not targeting a mass audience because we're not getting paid for page views.

35:20 All we're doing is communicating with people who are into the same stuff that we are.

35:25 So the number of page views and the number of clicks, it just doesn't matter.

35:29 Right. It's about making the connections and building the catalog of ideas and so on, right?

35:37 Yeah. And making sure that your fellow specialists know that you are one of the people whom they should talk to about these ideas.

35:47 Now, these specialized communities do have ways of sharing blog posts with each other.

35:54 There's Planet Python, which thousands and thousands of Python programmers read.

35:59 And it has a list of feeds that it aggregates on GitHub.

36:04 So you just go there and submit a pull request, and pretty quickly, one of the administrators will add you.

36:10 And if you are mainly interested in connecting with other Python programmers, that's good enough.

36:17 You're done.

36:17 If you're also writing about other topics, there are planets and aggregators for them.

36:24 And then there are also a number of these weekly emails like PyCoders Weekly and Python Weekly.

36:30 Their editors have big ears, and they generally hear about anything that they want to republish without your having to make any effort.

36:39 But if you do want to make sure, you can always write to their editors and mention whenever you write something that you think that they would be interested in.

36:48 And that's really good enough.

36:49 Google is designed to bring people who are interested in your topic to your site.

36:55 Yeah, I agree with you on that.

36:57 I certainly think communicating with the guys who write the weekly newsletters, there's Python Weekly, PyCoders Weekly, Import Python.

37:08 Those three seem like the big ones to me.

37:10 I'm probably missing some.

37:11 And if I am, sorry.

37:13 But, you know, you can get in contact with those guys pretty easily.

37:16 And I find it makes a big difference.

37:19 If something gets featured there, people usually talk about it.

37:22 Yeah, that's right.

37:23 Yeah, cool.

37:24 Also, maybe a little bit of social media.

37:27 Like, I find Twitter is a really good place for sharing your new ideas.

37:31 Because unlike a lot of social media, you sort of follow people because of their common interests and common ideas.

37:39 So maybe throw that one in there as well.

37:41 Yeah.

37:41 We all love Python for its tremendous productivity benefits.

37:59 But getting the best performance takes some work.

38:01 What if you could get out of the box, easy access to high performance Python?

38:06 Intel Distribution for Python Developers delivers just that.

38:09 Get close to 100 times better performance for certain functions when using NumPy, SciPy, Scikit-learn, linked with optimized native libraries like Intel Math Kernel Library, Access Efficient Multithreading, and Python projects like Numba and Scithon.

38:23 Try the Intel Distribution for Python and experience performance today at talkpython.fm/intel.

38:30 And profile your Python and native C++ applications for performance hotspots with Intel VTune amplifier.

38:37 With Intel, it's all about performance.

38:48 You did talk a little bit about how to get started if you're not a good writer or maybe you just don't have very much experience.

38:54 And you had some advice for those folks.

38:58 That was good.

38:58 So the main thing that makes us better writers is to read and read a lot.

39:08 And I think that a lot of community-minded open source developers do read a ton of blogs.

39:15 But we want to read them as writers.

39:20 And most importantly, that means reading articles to the end.

39:26 I would love to see a chart of this.

39:28 Or maybe I would hate to see a chart of this.

39:31 But I think that the first few sentences of most articles are probably read a hundred times as often as the last few sentences are.

39:41 People generally give up or skim.

39:43 So reading as a writer means actually reading the entire article.

39:50 And not just skimming it, but reading all the way to the end and then asking ourselves,

39:56 did this article communicate well or not?

39:59 And regardless of whether it was effective or not, how would we improve it if this were our article?

40:06 And that's the best way to improve is to read critically like this.

40:12 The other thing I would suggest is to get an editor.

40:17 And that can just be a programmer friend of yours or a non-programmer friend who's a good writer.

40:23 Find out who gives good, useful, critical feedback on early drafts.

40:30 And then you'll start to lean on those friends.

40:33 And you can swap drafts with them and help each other improve that way.

40:37 Yeah, that's good advice.

40:38 How do you feel about having like a writing group, like three or four people who are into blogging and maybe meet on Skype once a month to exchange ideas and share articles and whatnot?

40:52 I think that sounds wonderful.

40:53 I want you to invite me.

40:54 Yeah, absolutely.

40:56 Yeah, I think it sounds wonderful too.

40:58 All right.

40:59 So that's for if you don't have a lot of experience.

41:01 I think this idea of reading articles with this critical eye is really powerful.

41:07 And the world is working against us on this.

41:10 You know, with things like Flipboard and Zite and the apps that encourage you to read the first paragraph and then flip on to the next.

41:18 It means we do this less and I think we get in the habit of doing less.

41:22 But I think it is really a good way.

41:25 It's almost like, you know, learning to code well by reading open source software that is well respected.

41:31 This is the writer version of it, right?

41:33 Yeah, that's right.

41:34 Cool.

41:34 So that's the getting some experience story.

41:38 But if, you know, maybe I'm a fine writer, but I'm just really busy.

41:40 I have no time.

41:41 You also had some advice for those guys.

41:42 Yeah.

41:43 The first is just to remember that it's okay to write in frequently.

41:47 If you are occasionally inspired by a really powerful idea that you're so excited about that you just can't do anything until you've communicated it, then that's the time to write.

42:03 And the rest of the time, maybe not.

42:06 But if you do just want to practice your muscle a little more, I think that writing reviews and setting yourself a time limit is a really good way to just stay in shape.

42:20 So promise yourself after every book you finish or after every movie you see to set a timer for an hour, write three paragraphs, describe the thing, and you're out.

42:32 And with that muscle kept in shape this way, writing more frequently and writing longer and more valuable articles will come more naturally.

42:43 Right.

42:43 I definitely see that as a natural consequence.

42:45 You hear about lots of the really prolific authors.

42:48 They didn't spend that much time writing.

42:52 They'd get up at like eight and write to noon daily.

42:56 Or they'd sit down every day and they say, I'm going to write three pages a day.

43:00 And that's it.

43:01 And they've written hundreds of books just by going like that.

43:03 So this do a little bit actually adds up really quickly, I think.

43:08 So what's the takeaway from this talk that you gave?

43:11 The takeaway is to write together if you have the opportunity.

43:16 So if your company has a tech blog, then submitting articles to it is the best way to make yourself visible both to your company and to your larger community.

43:34 And if your company does not yet have a tech blog and you're somebody who's passionate about writing, then this is a huge professional opportunity for you.

43:44 You should be the one who starts your company's tech blog and helps your company communicate about its engineering culture to the wider world.

43:54 And besides companies, there are lots of open source projects and foundations that need to get the word out to their community, but don't have anybody writing for them right now.

44:08 So blogging for and about these kinds of projects is a way to make a connection and create something of lasting value.

44:18 Besides this, just remember that even though you may feel like if you're not coding, you're not producing anything worthwhile.

44:27 It's not true.

44:29 Writing is one of the most generous things you can do for yourself and for me, because I want to read about your specialty and for your community at large.

44:43 So use these five structures to overcome writer's block.

44:48 Get yourself inspired by whatever it is that you're working on right now and publish your thoughts.

44:54 Yeah.

44:55 Great advice.

44:56 You talked about writing together and you also talked about in some sense, if you write it, they will come right.

45:02 If you write enough specific, important articles, people will come.

45:06 But if you're just getting started and you really have nobody, you know, your brand new blog, nobody subscribes, nobody cares, that can be challenging and it can be discouraging.

45:15 And getting feedback is valuable.

45:16 So what do you think about like guest posting?

45:19 Like if you want to write an article, you think it fits with someone else's blog.

45:23 Does it make sense to reach out to them and say, hey, I'd write a post for you if you're open to that sort of thing?

45:29 I think it would.

45:30 It's not very prevalent in the open source community.

45:36 We tend to stand up our siloed blogs and occasionally link to each other.

45:41 But it can be a good way to get the word out.

45:44 And big sites like dzone.com and similar large sites that have lots of bloggers.

45:53 Reach out to them and ask them if they would like to republish you.

45:58 I found that to be very effective for me where an article that I publish on my own site might get a few hundred hits.

46:06 But if it's something that Dzone likes and they republish it, it will get thousands of hits instead.

46:11 When you do that, if you do care about bringing people back to your own blog, then arrange to have many links to related articles that you've already written on your own blog.

46:24 In the article that you've guest posted on somebody else's blog so that you can connect with your readers over the long haul.

46:34 Yeah, that's good advice.

46:35 And Dzone has a most valuable blogger program where you can get sort of reviewed by them and approved.

46:42 And once you're in, they'll sort of pull and review and possibly repost your articles automatically.

46:48 So if that sounds cool, then check that out.

46:51 So you wrote all this up in sort of links and examples and everything at bit.ly slash excellent-blog, right?

47:00 Yeah, that's right.

47:01 Excellent-blog is super meta because it's an article based on a talk about writing about programming.

47:11 And now we are discussing it on a podcast.

47:15 It's quite meta.

47:18 It's maybe meta-meta.

47:19 A couple levels.

47:20 But if you can stand the sense of vertigo, reading it is helpful because it's a written-up version of my PyCon talk.

47:30 And it has links out to all of my favorite articles as well as lots of other resources that will help you to improve your writing and also to get the word out and reach an audience for your writing.

47:44 Yeah, cool.

47:44 That's a very good resource, and I'll be sure to link to it.

47:47 Another thing that you did recently that I found to be pretty awesome was you wrote a chapter.

47:53 I'll call it a chapter.

47:54 I guess it's a chapter.

47:55 For a book that got published called 500 Lines or Less.

47:59 You co-authored that with Guido Van Rossum, right?

48:02 Yeah, that's right.

48:03 It's within the architecture of open source applications book series.

48:07 And the 500 Lines or Less book has articles where programmers solve very advanced, scary-sounding problems with very short code examples.

48:23 So Allison Kaptor wrote a Python interpreter.

48:25 And Ned Batchelder wrote a template engine.

48:29 And there's all sorts of intricate topics in there.

48:32 Guido and I wrote essentially a version of AsyncIO with a web crawler and asynchronous coroutines that fits within 500 lines.

48:45 And then used it to write an explanation of how AsyncIO works, how coroutines work, how the yield from statement works, and also how you can use queues and other thread-like structures within an Async program to make your AsyncIO code manage its control flow.

49:10 Yeah, and I thought that was a very nice piece of writing.

49:12 That was about 25-ish pages or so.

49:15 And you start from, let's just write the most naive, straightforward way.

49:21 Well, maybe the natural way to make this do more at once is to throw threads at it, but there's all these problems.

49:29 And you slowly build up to this final kind of understanding of AsyncIO.

49:34 It's really amazing if you work at it, how simply some of these ideas can be expressed, especially in Python.

49:42 But any time that you throw away error handling and throw away all of the historical baggage and just really focus on the technique that you want to express, just a little bit of code can often do it.

49:57 And if you read this book, you'll find that things with really scary names are often quite approachable if you read one of these really focused implementations of it.

50:08 Yeah, that's cool.

50:09 It's not all Python, is it?

50:11 It's a mix.

50:12 But it seems to have a lot of Python in it.

50:14 Is that right?

50:14 Yeah, that's right.

50:15 It may be that if you want to get something done in 500 lines, you're likely to choose Python.

50:20 But there are a lot of other programming languages represented there, too.

50:23 Okay, excellent.

50:24 Yeah, I definitely recommend people check out that book.

50:26 I find it, I found it to be pretty fascinating.

50:29 Originally, and I had you on show number two, we were talking about Python and MongoDB.

50:33 You're still at MongoDB.

50:35 We talked about kind of what you're up to there.

50:37 But, you know, what's the latest news from Mongo in the last year?

50:42 Yeah, so at MongoDB World last month, our annual conference, we announced a bunch of exciting new features.

50:50 The rightly headline grabbing one was Atlas, which is MongoDB as a service.

50:56 You just tell us how much Mongo you want, what kind of Mongo you want.

51:01 And we set it all up for you.

51:04 Currently in EC2, but we're going to add new cloud providers in the future.

51:09 And it's this extremely focused UI that will just get you from zero to a distributed, fault-tolerant, backed-up cluster of MongoDB in as few steps as possible.

51:24 Oh, that sounds really exciting.

51:25 I'm sure that'll help, especially newcomers, but it'll help everybody.

51:28 That's cool.

51:28 We've also got a lot of great news for Python developers specifically coming up.

51:34 One of them is that Motor, which is my async MongoDB driver for Python, it supports Tornado and AsyncIO already.

51:43 And I'm going to be developing, finally, Motor 1.0 this fall, which will use the latest version of PyMongo under the hood.

51:55 That means, among other things, that it will perform much better, especially when it connects to very large replica sets with a large number of servers in them.

52:03 And that it's going to be stable and give you an API that you can rely on for years to come.

52:11 That's awesome.

52:12 Congratulations.

52:13 Thank you.

52:14 The other big news is that Anna Hurley and I are working on a NumPy BSON codec.

52:22 So this is going to go directly from NumPy, which is what Python statisticians use for large data sets.

52:30 And it will translate directly to and from BSON, which is the binary JSON data format that MongoDB uses internally.

52:41 So in the past, whenever you wanted to move data back and forth, you had to have some intermediate structure, usually a Python dictionary.

52:48 And that slowed down that transcoding to a crawl.

52:53 But now, if you want to load up a bunch of numbers into MongoDB, use MongoDB to store it or to query it, and then load it back into NumPy arrays in order to do statistics on it, that pipeline is now going to be very streamlined and extremely high throughput.

53:12 Oh, that's awesome.

53:13 How much of your C work contributed to that?

53:16 Any?

53:16 This is really only possible now because I know C well enough, and so does Anna, that we can tackle it because it's essentially a C project.

53:25 And that's why it's going to be fast.

53:27 Right.

53:27 Oh, that's awesome.

53:28 Yeah.

53:28 Okay.

53:29 Well, that's really good news to hear what you guys are up to.

53:32 It continues to be exciting over there.

53:34 So, Jesse, we're getting close to the end of the show.

53:38 I always ask people when they're writing Python code, you know, what's their favorite editor?

53:43 Well, my favorite editor is PyCharm.

53:45 I feel very strongly that people hobble themselves when they use Vim or Emacs.

53:52 They need a real debugger, an editor that understands the structure of their project, and it has a built-in profiler.

54:01 It's got all sorts of amazing features, and it's really worth the time investment to learn it.

54:08 Awesome.

54:08 Okay.

54:09 What's your favorite PyPI package?

54:12 Right now, I'm really enjoying Lector, which is Armin Roeneker's project.

54:17 It's a static site generator.

54:19 It's written in Python, and it's what I use now to generate my own blog.

54:23 And then I upload it to a hosting service called Netlify.

54:27 But Lector can publish to lots of different places, including GitHub pages.

54:32 David Baumgold now has joined the project and is one of the chief maintainers along with Armin.

54:40 It's a very flexible, fun project.

54:43 It's new.

54:44 It's got an active community.

54:47 And if you want a static site generator that's written in Python, you can get in there and hack it up a little bit.

54:54 Lector is treating me very well.

54:56 Okay.

54:57 That's cool.

54:57 I haven't played with Lector.

54:59 I'll definitely check it out.

55:00 All right.

55:00 Jesse, any final call to action for our listeners out there?

55:04 Maybe we're maybe thinking about blogging or have a blog, but it has updates in the last decade.

55:10 Yeah.

55:12 Get out there and get writing.

55:14 Don't worry about what platform you're going to use.

55:17 Don't mess around with your visual design for too long.

55:23 Just write down what you're really excited about so that I can read it.

55:26 I want to second that thought as well.

55:28 Jesse, thanks for coming on the show.

55:29 It's great to share these blogging ideas and everything else you're up to.

55:33 Thanks a lot.

55:33 Yep.

55:34 See you later.

55:36 This has been another episode of Talk Python to Me.

55:39 Today's guest has been A. Jesse Giroux Davis, and this episode has been sponsored by SnapCI

55:44 and Intel.

55:45 Thank you both for supporting the show.

55:47 SnapCI is modern, continuous integration and delivery.

55:51 Build, test, and deploy your code directly from GitHub, all in your browser with debugging,

55:55 Docker, and parallels included.

55:57 Try them for free at snap.ci slash talkpython.

56:01 The Intel distribution for Python delivers the high-performance Intel C libraries built right

56:05 into Python.

56:06 Get close to 100 times better performance for certain functions when using NumPy, SciPy,

56:11 and Scikit-learn.

56:12 Check them out at talkpython.fm/intel.

56:15 I'm so excited to finally be able to unveil my Python for Entrepreneurs course that I told

56:21 you about at the top of the show.

56:22 If you want to learn Python web development and launch an online business, you owe it to

56:27 yourself to check out the Kickstarter at talkpython.fm/launch.

56:30 I hope we can build something amazing together.

56:33 You can find the links from this episode at talkpython.fm/episodes slash show slash

56:39 69.

56:39 Be sure to subscribe to the show.

56:42 Open your favorite podcatcher and search for Python.

56:44 We should be right at the top.

56:45 You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct

56:51 RSS feed at /rss on talkpython.fm.

56:54 Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.

57:00 Corey just recently started selling his tracks on iTunes, so I recommend you check it out

57:04 at talkpython.fm/music.

57:06 You can browse his tracks he has for sale on iTunes and listen to the full-length version

57:10 of the theme song.

57:11 This is your host, Michael Kennedy.

57:13 Thanks so much for listening.

57:15 I really appreciate it.

57:16 Smix, let's get out of here.

57:18 Outro Music Thank you.

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