Latest / Talk Python To Me / #69: Write an Excellent Programming Blog
Transcript
- 0:00Do you have a blog? How many articles have you written for it? Do you find it hard to keep writing
- 0:04or hard to get started doing technical writing? Well, we might be able to help out with that this
- 0:09week. You're probably aware that blogging is one of the key ways to establish yourself as a thought
- 0:14leader in the industry. You'll make more connections, open more opportunities, and likely find your work
- 0:19more rewarding if you share your experiences and expertise through blogging. But it can be
- 0:24challenging to keep writing or to find the time. That's why I asked A. Jesse Giroudavis from MongoDB
- 0:30to share his thoughts on writing an excellent programming blog. You'll even learn about Jesse's
- 0:34five design patterns for blogging that will help you break writer's block. This is Talk Python To Me,
- 0:40episode 69, recorded Tuesday, July 19th, 2016.
- 0:44Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the
- 1:14ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter,
- 1:19where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm,
- 1:24and follow the show on Twitter via at Talk Python.
- 1:26This episode is brought to you by SnapCI and Intel. Thank them both for supporting the show on
- 1:33Twitter, where they're at snap underscore CI and at Intel software.
- 1:37Hey, everyone. Before we get to the main interview, I actually have a special little segment for you and a
- 1:43pretty awesome announcement. I'm here with Matt Makai. Remember him from the Full Stack Guide to
- 1:48Deployment episode back in episode 26. So Matt and I have a pretty awesome announcement. Matt,
- 1:54why don't you tell everybody what we're up to?
- 1:55Sure, Michael. Thanks for having me on. So we're launching a Python for Entrepreneurs co-authored,
- 2:02co-taught course on Kickstarter.
- 2:05Yeah, 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.
- 2:11There'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.
- 2:19This 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.
- 2:29So 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.
- 2:43So Matt, tell us, who did you have in mind when you were working on your part of the course?
- 2:47Yeah, 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.
- 3:04So really, that's the target audience for this, and someone who wants to build a non-trivial product.
- 3:10So 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.
- 3:22Of course, that would be a huge challenge to launch an Airbnb competitor, but you have a general idea of who we have in mind.
- 3:28You 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.
- 3:39And that basically gives you access to my Python Jumpstart course as well as an entrepreneur course at almost just the price for the one.
- 3:47So that's really awesome.
- 3:48And everybody, go and check this out at talkpython.fm/launch.
- 3:53We really hope you love this class.
- 3:55We hope you back the Kickstarter and we hope this makes a really big difference in the business that you've been dreaming of launching.
- 4:01Matt, thanks for being here.
- 4:03Thanks, Michael.
- 4:03Yeah, I'm excited to see where this goes.
- 4:05All right, let's get on to the interview with Jesse.
- 4:07I'm not going to ask you how you got into programming in Python because I already asked you that.
- 4:12You can start from, you've been up to the last year.
- 4:14That sounds great.
- 4:15Last year when we talked, I had just begun to transition from being a full-time Python programmer to being mainly a full-time C++.
- 4:25programmer.
- 4:26And that was a bumpy ride.
- 4:29But we've kind of achieved stable flight now where I feel basically competent in C.
- 4:36And the project that I'm leading, the MongoDB C driver, which is what C application developers use to talk to MongoDB.
- 4:47The project has now gone through a number of releases with me and we've fixed a ton of bugs and it's pretty stable.
- 4:54And this summer I have a colleague and two interns working with me on it.
- 5:01And that's freed me up to not quite have my head down in C code as much as I did over the last year.
- 5:08Give me sort of a contrasting experience.
- 5:11You've been doing Python for a long time.
- 5:12You're deeply involved in the community.
- 5:14And then you go over and do C code.
- 5:16And I'm sure you knew C before.
- 5:18But what was it like to sort of come back to C?
- 5:21Well, I knew enough C to be able to read and write the syntax of the language.
- 5:28But 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.
- 5:41And so I knew I knew the C language, but I also knew that I wasn't a professional C programmer.
- 5:47And 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.
- 6:11And I knew I didn't know all of that.
- 6:14And I knew that that was going to be the bulk of professional C programming.
- 6:20And 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.
- 6:41Yeah.
- 6:42For those who are already using it.
- 6:43Yeah, 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.
- 6:52Because if that happens in Python or Ruby or .NET, you get a nice stack trace.
- 6:58And there's tools that you can turn against.
- 7:00It's much harder to just, you know, get up.
- 7:03Like you said, a core dump.
- 7:04That's a lot of work to look into, right?
- 7:06Yeah.
- 7:07The proportion of scary bugs causing sleepless nights in Python is much, much lower than in C.
- 7:15I'm sure it is.
- 7:17That's awesome.
- 7:17So 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.
- 7:29And so you said you've been doing a lot of writing, right?
- 7:32Yeah.
- 7:32So in the last year, the scope of my writing has grown enormously.
- 7:38I started writing my blog when I started working for MongoDB about five years ago on EmptySquare.net.
- 7:46And I'm still publishing a lot there.
- 7:50But in the last year, MongoDB itself has started up a tech blog.
- 7:56And naturally, I've been doing a lot of writing and editing for that.
- 8:02So 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.
- 8:18And 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.
- 8:33That's really cool.
- 8:34I mean, you're taking these guys and girls who are mostly programmers, not writers, and you're helping them tell these stories, right?
- 8:43So 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?
- 8:53Yeah.
- 8:54And it's a very different kind of challenge.
- 8:57I'm really struck by how much of a problem for people who are not professional writers, writers' block and procrastination are.
- 9:09I 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.
- 9:22You wouldn't see that very often.
- 9:24And you would think about whether this programmer should continue to work for your company for much longer.
- 9:30Whereas with a programmer who is writing, you might easily see three weeks of procrastination.
- 9:37And you need to break through it, but it's also sort of not as surprising.
- 9:43We procrastinate about writing in a way that we don't procrastinate about almost anything else.
- 9:48Yeah, I think it takes a lot of practice to write well, and you almost have to make it a habit.
- 9:53Yeah, that's true.
- 9:54And maybe also to treat it as not certain to be perfect and not as intimate as it feels.
- 10:09We 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:20In 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:30Yeah, it's better than not doing anything.
- 10:32Yeah, that's true with code.
- 10:34I think it's true with blogging.
- 10:35I mean, it's true with podcasting.
- 10:37It 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:47I felt really a little unsure of myself and so on.
- 10:50And the way you get better is by doing it, right?
- 10:53So like writing code, blogging as well.
- 10:57So you also write a little for the PSF blog.
- 10:59Is that true?
- 11:00Yeah, 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:09So she was one-handed.
- 11:11And 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:23So unfortunately, two people with one arm each don't write as well as one person with two arms.
- 11:31So Diana asked me if I could step in and write some articles for the PSF.
- 11:37And I've been doing that since.
- 11:41And the main thing that I do is I write profiles of people who've won PSF Community Service Awards.
- 11:48And 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:13Yeah, that's a great service and a great opportunity for you, right?
- 12:16I 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:31That you might not have expected to have come out, but there they are, right?
- 12:34Yeah, that's right.
- 12:36And I really feel that difference when I went to PyCon in Portland this year compared to last year.
- 12:45Because 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:03So 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:17Yeah, that's excellent.
- 13:19So speaking of Portland, PyCon, it was a great conference.
- 13:24Let's talk about your session that you did there.
- 13:26You did one.
- 13:27It was entitled Writing an Excellent Programming Blog, right?
- 13:30Yeah, that's right.
- 13:31So 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:47Or where did it come from?
- 13:48Yeah, that's right.
- 13:48It 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:07So 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:29And 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:44Yeah, I feel like a lot of people blog with guilt.
- 14:47You 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:57And 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:05But it is hard.
- 15:08And so I think one of the interesting things that your talk does, and of course I'll link to the video.
- 15:13It'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:24And 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:35You have different goals, different timelines, and so on.
- 15:38That's right.
- 15:39I 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:56But 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:06So what open source Python developers will write about is our individual specialties.
- 16:13And 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:26And 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:37So it's not going to be the news of the day.
- 16:40Certainly not going to be anything like TechCrunch.
- 16:43We don't do industry reporting.
- 16:44We don't guess whether a company is going to IPO or whether it's going to be more profitable this quarter.
- 16:50We're writing articles of deep significance and lasting value, and therefore we don't write very often.
- 16:59And I think that that's completely appropriate.
- 17:02But 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:12Right.
- 17:13But then understand the patterns and the styles that we can sort of fit our ideas into to best match as well.
- 17:19You 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:33Yeah, that's exactly right.
- 17:35And 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:51They're articles about topics.
- 17:53And 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:04Yeah, that's excellent.
- 18:05So you started out going through in your session talking about a couple of things.
- 18:10And one of the things you talked about is there's a couple of reasons that we start writing.
- 18:16I thought they were interesting.
- 18:17You sort of touched on some of them.
- 18:19Share your experience and expertise.
- 18:21Meet your fellow experts, kind of like you did with going to PyCon.
- 18:27You had exposure to these folks, and it was really great.
- 18:30But another one that I found that resonated with me is you said, writing is thinking superpowered.
- 18:36Can you expand on that?
- 18:37Yeah.
- 18:38I 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:51And 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:03One 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:14And I start writing the story before the story is complete.
- 19:19So a few years ago, I was diagnosing this bug.
- 19:23It had come up via a PyMongo bug report.
- 19:26And 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:40And that is, if true, obviously a bug in Python.
- 19:46And so intricate and deep and mind-blowing that I really didn't think that I would be smart enough to diagnose it.
- 19:53Yeah.
- 19:54Threading is hard.
- 19:55Thread local concepts are hard.
- 19:57And then if there's a bug down in CPython itself around it, like, okay, this is intense, right?
- 20:03So I find it really interesting that you started writing before you actually had the answer.
- 20:08It was like an exploration almost, right?
- 20:10Yeah.
- 20:11And writing down the story of how I diagnosed the bug was how I diagnosed the bug.
- 20:19So I wrote down at each stage, this is how far I got.
- 20:23This is what I was thinking.
- 20:25And by then reading that back to myself, I could really entrench my understanding and also test it.
- 20:35I would see, if I were somebody reading this, would this make sense to me?
- 20:40What would I think the author had missed?
- 20:42What haven't I thought of yet?
- 20:44Am I certain of my conclusions so far?
- 20:47And 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:02That really is amazing, considering how much usage that version got.
- 21:08Can you just sum up what the bug was in, like, a sentence or two?
- 21:11Yeah, 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:26And this caused a socket leak in PyMongo that would eventually lead it to run out of file descriptors.
- 21:34Yeah, that's not good.
- 21:35No, it was catastrophic.
- 21:38But it's extremely hard to find, and it takes a long, long time for it to actually crash, right?
- 21:44So not good.
- 21:45Yeah, that's really cool.
- 22:01SnapCI 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:11Automate and visualize your deployments with ease and make pushing to production an effortless item on your to-do list.
- 22:18Snap also supports Docker and M browser debugging, and they integrate with AWS and Heroku.
- 22:24Thanks, SnapCI, for sponsoring this episode by trying them with no obligation for 30 days by going to snap.ci slash Talk Python.
- 22:39So 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:56Can you maybe talk about those a little?
- 22:58Yeah.
- 22:59Yeah.
- 22:59Among 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:17And the structure of each of these is very simple, and you can reuse it like a template.
- 23:26So a story just tells a sequence of events, and it's always got some moral like a fable.
- 23:34You learned something, or you learned not to do something, or you discovered some fact that you wouldn't have otherwise.
- 23:42One 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:53Right.
- 23:54So, 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:03Is that right?
- 24:04Yeah, that's right.
- 24:05Glyph'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:20It's a great story.
- 24:22It's funny.
- 24:23It'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:37So, 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:51Yeah.
- 24:51Very cool.
- 24:53And then I interrupted you on the next one, which is opinions.
- 24:55So, opinions, the structure is what we learned in high school.
- 25:00You 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:15And 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:27And 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:43There isn't a missing feature or a bug that's getting in your way.
- 25:46And 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:56They won't actually be that beneficial to the project.
- 25:58So, 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:09So, she's not attacking anybody there.
- 26:12And that's really important.
- 26:15I think that in the software community, especially open source, there's a lot of thoughtless and damaging aggression.
- 26:25And we should stop saying, oh, that thing sucks.
- 26:30That thing's a piece of trash.
- 26:32That's not a useful opinion.
- 26:34A useful opinion is insightful and interesting and...
- 26:38No, it's definitely not useful.
- 26:40...goes out of its way to be constructive.
- 26:42All right, Jesse.
- 26:43So, the next one is how to.
- 26:44Yeah, that's right.
- 26:45So, how to is probably mostly what we all write, where you just explain how to do something.
- 26:54And it always begins by motivating it.
- 26:57It says, if you want to accomplish a given thing, you'll need to know how to do X.
- 27:06So, 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:15Right.
- 27:15There'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:27Who knows, right?
- 27:28But something like this.
- 27:30Exactly.
- 27:30And the example that I really enjoy for that is an article by Kenneth Reitz about growing open source seeds, where he...
- 27:41Kenneth Reitz is the maintainer and inventor of requests, which is one of the most successful Python packages.
- 27:50And so, he's got a lot of expertise about creating a package that's very popular and then maintaining it without burning out.
- 28:00And that's what his growing open source seeds article is about.
- 28:03But 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:14So, 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:22And therefore, if that's not a priority for you right now, you can skip it.
- 28:26But 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:35Yeah.
- 28:36Yeah, that's excellent.
- 28:37I think we end up do writing...
- 28:38We do end up writing a lot of how-tos, right?
- 28:42I 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:53But there's also sort of the just understanding the concepts.
- 29:00You know, how does something work?
- 29:01Kind 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:08Yeah, that's exactly right.
- 29:09I think we all have those two sides to us in some proportion.
- 29:14So we also want to write how things work type articles where the motivation is not about actually doing anything, but simply understanding something.
- 29:27And 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:36And she wrote an article about syntax warnings.
- 29:40So 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:55which most of us have never seen because we didn't make that particular mistake when we were just starting out.
- 30:02And one of Allison's students, though, tried that out and hit that error.
- 30:08So there's no need to write how to avoid that.
- 30:13You simply move the from module import star statement to the top of the file and you're good.
- 30:17But Allison was really interested in where that syntax warning came from and why that statement was not allowed.
- 30:25It might be a reasonable thing to do as a beginner because you can do those local imports if you preserve the namespace, right?
- 30:32Like import OS would be OK, right?
- 30:35Yeah, that's exactly right.
- 30:36So it may not be very useful to know why that doesn't work, but it's awfully interesting.
- 30:43So 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:57Yeah, that's awesome.
- 30:58And then so that was the fourth one.
- 31:01The last one you said that maybe this is the easiest.
- 31:04I 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:12You've got something.
- 31:13You're like, I kind of take this Saturday morning to write something.
- 31:15A review could be a good choice, right?
- 31:17That's right, because it can be any length and there's always something new to review.
- 31:23You've always seen a movie or finished a book or tried out an open source project.
- 31:29And if you just want to keep your blog alive or keep your writing muscles toned, write a review.
- 31:40But 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:52And it's not very good as writing practice either.
- 31:55It's much more important to describe what the thing is and what it's good for.
- 32:01So this movie is good for relaxing on a summer matinee.
- 32:06Or this project is useful if you want an easy-to-use debugger that doesn't have all the bells and whistles.
- 32:15And by writing your review that way, that makes the most valuable description of that thing for your reader.
- 32:26Yeah, that's excellent.
- 32:27So these five things come together as these almost design patterns for our technical articles, if you will.
- 32:35And I think they're really helpful.
- 32:37How do you see them helping with writer's block?
- 32:40So you can use it in two ways.
- 32:42And 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:51I don't know what the structure will be.
- 32:54And so I don't know how to begin, how to write the first paragraph.
- 32:59A 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:12And that narrows my scope.
- 33:16I can choose one, and then I just plug in the blanks in the template.
- 33:21And by the time that I've chosen a structure and filled in the blanks, I'm already halfway done to a first draft.
- 33:30The 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:42Do I have a story to tell, an opinion to share?
- 33:45Do I want to explain how to do something or how something works?
- 33:49Or is there something I've experienced recently that I want to review?
- 33:52And 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:00Yeah, that's really cool.
- 34:02I think that's super helpful.
- 34:03And 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:15Like, well, what am I going to do now?
- 34:17I think this is excellent.
- 34:19So when you think about the target audience, one of the things people really care about is getting their blog to be popular.
- 34:27And 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:38What was your thinking there?
- 34:40SEO is a set of techniques for competing for a mass audience with other authors who are writing about the same topic.
- 34:50And that is the total opposite of the kind of writing that we're talking about now.
- 34:56We're writing about specialties, and we're virtually the only people writing about them.
- 35:03And 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:09So our fellow specialists will find us, and we really don't need to worry about it.
- 35:15And we're not targeting a mass audience because we're not getting paid for page views.
- 35:20All we're doing is communicating with people who are into the same stuff that we are.
- 35:25So the number of page views and the number of clicks, it just doesn't matter.
- 35:29Right. It's about making the connections and building the catalog of ideas and so on, right?
- 35:37Yeah. And making sure that your fellow specialists know that you are one of the people whom they should talk to about these ideas.
- 35:47Now, these specialized communities do have ways of sharing blog posts with each other.
- 35:54There's Planet Python, which thousands and thousands of Python programmers read.
- 35:59And it has a list of feeds that it aggregates on GitHub.
- 36:04So you just go there and submit a pull request, and pretty quickly, one of the administrators will add you.
- 36:10And if you are mainly interested in connecting with other Python programmers, that's good enough.
- 36:17You're done.
- 36:17If you're also writing about other topics, there are planets and aggregators for them.
- 36:24And then there are also a number of these weekly emails like PyCoders Weekly and Python Weekly.
- 36:30Their editors have big ears, and they generally hear about anything that they want to republish without your having to make any effort.
- 36:39But 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:48And that's really good enough.
- 36:49Google is designed to bring people who are interested in your topic to your site.
- 36:55Yeah, I agree with you on that.
- 36:57I certainly think communicating with the guys who write the weekly newsletters, there's Python Weekly, PyCoders Weekly, Import Python.
- 37:08Those three seem like the big ones to me.
- 37:10I'm probably missing some.
- 37:11And if I am, sorry.
- 37:13But, you know, you can get in contact with those guys pretty easily.
- 37:16And I find it makes a big difference.
- 37:19If something gets featured there, people usually talk about it.
- 37:22Yeah, that's right.
- 37:23Yeah, cool.
- 37:24Also, maybe a little bit of social media.
- 37:27Like, I find Twitter is a really good place for sharing your new ideas.
- 37:31Because unlike a lot of social media, you sort of follow people because of their common interests and common ideas.
- 37:39So maybe throw that one in there as well.
- 37:41Yeah.
- 37:41We all love Python for its tremendous productivity benefits.
- 37:59But getting the best performance takes some work.
- 38:01What if you could get out of the box, easy access to high performance Python?
- 38:06Intel Distribution for Python Developers delivers just that.
- 38:09Get 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:23Try the Intel Distribution for Python and experience performance today at talkpython.fm/intel.
- 38:30And profile your Python and native C++ applications for performance hotspots with Intel VTune amplifier.
- 38:37With Intel, it's all about performance.
- 38:48You 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:54And you had some advice for those folks.
- 38:58That was good.
- 38:58So the main thing that makes us better writers is to read and read a lot.
- 39:08And I think that a lot of community-minded open source developers do read a ton of blogs.
- 39:15But we want to read them as writers.
- 39:20And most importantly, that means reading articles to the end.
- 39:26I would love to see a chart of this.
- 39:28Or maybe I would hate to see a chart of this.
- 39:31But 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:41People generally give up or skim.
- 39:43So reading as a writer means actually reading the entire article.
- 39:50And not just skimming it, but reading all the way to the end and then asking ourselves,
- 39:56did this article communicate well or not?
- 39:59And regardless of whether it was effective or not, how would we improve it if this were our article?
- 40:06And that's the best way to improve is to read critically like this.
- 40:12The other thing I would suggest is to get an editor.
- 40:17And that can just be a programmer friend of yours or a non-programmer friend who's a good writer.
- 40:23Find out who gives good, useful, critical feedback on early drafts.
- 40:30And then you'll start to lean on those friends.
- 40:33And you can swap drafts with them and help each other improve that way.
- 40:37Yeah, that's good advice.
- 40:38How 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:52I think that sounds wonderful.
- 40:53I want you to invite me.
- 40:54Yeah, absolutely.
- 40:56Yeah, I think it sounds wonderful too.
- 40:58All right.
- 40:59So that's for if you don't have a lot of experience.
- 41:01I think this idea of reading articles with this critical eye is really powerful.
- 41:07And the world is working against us on this.
- 41:10You 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:18It means we do this less and I think we get in the habit of doing less.
- 41:22But I think it is really a good way.
- 41:25It's almost like, you know, learning to code well by reading open source software that is well respected.
- 41:31This is the writer version of it, right?
- 41:33Yeah, that's right.
- 41:34Cool.
- 41:34So that's the getting some experience story.
- 41:38But if, you know, maybe I'm a fine writer, but I'm just really busy.
- 41:40I have no time.
- 41:41You also had some advice for those guys.
- 41:42Yeah.
- 41:43The first is just to remember that it's okay to write in frequently.
- 41:47If 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:03And the rest of the time, maybe not.
- 42:06But 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:20So 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:32And with that muscle kept in shape this way, writing more frequently and writing longer and more valuable articles will come more naturally.
- 42:43Right.
- 42:43I definitely see that as a natural consequence.
- 42:45You hear about lots of the really prolific authors.
- 42:48They didn't spend that much time writing.
- 42:52They'd get up at like eight and write to noon daily.
- 42:56Or they'd sit down every day and they say, I'm going to write three pages a day.
- 43:00And that's it.
- 43:01And they've written hundreds of books just by going like that.
- 43:03So this do a little bit actually adds up really quickly, I think.
- 43:08So what's the takeaway from this talk that you gave?
- 43:11The takeaway is to write together if you have the opportunity.
- 43:16So 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:34And 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:44You 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:54And 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:08So blogging for and about these kinds of projects is a way to make a connection and create something of lasting value.
- 44:18Besides this, just remember that even though you may feel like if you're not coding, you're not producing anything worthwhile.
- 44:27It's not true.
- 44:29Writing 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:43So use these five structures to overcome writer's block.
- 44:48Get yourself inspired by whatever it is that you're working on right now and publish your thoughts.
- 44:54Yeah.
- 44:55Great advice.
- 44:56You talked about writing together and you also talked about in some sense, if you write it, they will come right.
- 45:02If you write enough specific, important articles, people will come.
- 45:06But 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:15And getting feedback is valuable.
- 45:16So what do you think about like guest posting?
- 45:19Like if you want to write an article, you think it fits with someone else's blog.
- 45:23Does 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:29I think it would.
- 45:30It's not very prevalent in the open source community.
- 45:36We tend to stand up our siloed blogs and occasionally link to each other.
- 45:41But it can be a good way to get the word out.
- 45:44And big sites like dzone.com and similar large sites that have lots of bloggers.
- 45:53Reach out to them and ask them if they would like to republish you.
- 45:58I 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:06But if it's something that Dzone likes and they republish it, it will get thousands of hits instead.
- 46:11When 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:24In 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:34Yeah, that's good advice.
- 46:35And Dzone has a most valuable blogger program where you can get sort of reviewed by them and approved.
- 46:42And once you're in, they'll sort of pull and review and possibly repost your articles automatically.
- 46:48So if that sounds cool, then check that out.
- 46:51So you wrote all this up in sort of links and examples and everything at bit.ly slash excellent-blog, right?
- 47:00Yeah, that's right.
- 47:01Excellent-blog is super meta because it's an article based on a talk about writing about programming.
- 47:11And now we are discussing it on a podcast.
- 47:15It's quite meta.
- 47:18It's maybe meta-meta.
- 47:19A couple levels.
- 47:20But if you can stand the sense of vertigo, reading it is helpful because it's a written-up version of my PyCon talk.
- 47:30And 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:44Yeah, cool.
- 47:44That's a very good resource, and I'll be sure to link to it.
- 47:47Another thing that you did recently that I found to be pretty awesome was you wrote a chapter.
- 47:53I'll call it a chapter.
- 47:54I guess it's a chapter.
- 47:55For a book that got published called 500 Lines or Less.
- 47:59You co-authored that with Guido Van Rossum, right?
- 48:02Yeah, that's right.
- 48:03It's within the architecture of open source applications book series.
- 48:07And the 500 Lines or Less book has articles where programmers solve very advanced, scary-sounding problems with very short code examples.
- 48:23So Allison Kaptor wrote a Python interpreter.
- 48:25And Ned Batchelder wrote a template engine.
- 48:29And there's all sorts of intricate topics in there.
- 48:32Guido and I wrote essentially a version of AsyncIO with a web crawler and asynchronous coroutines that fits within 500 lines.
- 48:45And 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:10Yeah, and I thought that was a very nice piece of writing.
- 49:12That was about 25-ish pages or so.
- 49:15And you start from, let's just write the most naive, straightforward way.
- 49:21Well, maybe the natural way to make this do more at once is to throw threads at it, but there's all these problems.
- 49:29And you slowly build up to this final kind of understanding of AsyncIO.
- 49:34It's really amazing if you work at it, how simply some of these ideas can be expressed, especially in Python.
- 49:42But 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:57And 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:08Yeah, that's cool.
- 50:09It's not all Python, is it?
- 50:11It's a mix.
- 50:12But it seems to have a lot of Python in it.
- 50:14Is that right?
- 50:14Yeah, that's right.
- 50:15It may be that if you want to get something done in 500 lines, you're likely to choose Python.
- 50:20But there are a lot of other programming languages represented there, too.
- 50:23Okay, excellent.
- 50:24Yeah, I definitely recommend people check out that book.
- 50:26I find it, I found it to be pretty fascinating.
- 50:29Originally, and I had you on show number two, we were talking about Python and MongoDB.
- 50:33You're still at MongoDB.
- 50:35We talked about kind of what you're up to there.
- 50:37But, you know, what's the latest news from Mongo in the last year?
- 50:42Yeah, so at MongoDB World last month, our annual conference, we announced a bunch of exciting new features.
- 50:50The rightly headline grabbing one was Atlas, which is MongoDB as a service.
- 50:56You just tell us how much Mongo you want, what kind of Mongo you want.
- 51:01And we set it all up for you.
- 51:04Currently in EC2, but we're going to add new cloud providers in the future.
- 51:09And 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:24Oh, that sounds really exciting.
- 51:25I'm sure that'll help, especially newcomers, but it'll help everybody.
- 51:28That's cool.
- 51:28We've also got a lot of great news for Python developers specifically coming up.
- 51:34One of them is that Motor, which is my async MongoDB driver for Python, it supports Tornado and AsyncIO already.
- 51:43And I'm going to be developing, finally, Motor 1.0 this fall, which will use the latest version of PyMongo under the hood.
- 51:55That 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:03And that it's going to be stable and give you an API that you can rely on for years to come.
- 52:11That's awesome.
- 52:12Congratulations.
- 52:13Thank you.
- 52:14The other big news is that Anna Hurley and I are working on a NumPy BSON codec.
- 52:22So this is going to go directly from NumPy, which is what Python statisticians use for large data sets.
- 52:30And it will translate directly to and from BSON, which is the binary JSON data format that MongoDB uses internally.
- 52:41So in the past, whenever you wanted to move data back and forth, you had to have some intermediate structure, usually a Python dictionary.
- 52:48And that slowed down that transcoding to a crawl.
- 52:53But 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:12Oh, that's awesome.
- 53:13How much of your C work contributed to that?
- 53:16Any?
- 53:16This 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:25And that's why it's going to be fast.
- 53:27Right.
- 53:27Oh, that's awesome.
- 53:28Yeah.
- 53:28Okay.
- 53:29Well, that's really good news to hear what you guys are up to.
- 53:32It continues to be exciting over there.
- 53:34So, Jesse, we're getting close to the end of the show.
- 53:38I always ask people when they're writing Python code, you know, what's their favorite editor?
- 53:43Well, my favorite editor is PyCharm.
- 53:45I feel very strongly that people hobble themselves when they use Vim or Emacs.
- 53:52They need a real debugger, an editor that understands the structure of their project, and it has a built-in profiler.
- 54:01It's got all sorts of amazing features, and it's really worth the time investment to learn it.
- 54:08Awesome.
- 54:08Okay.
- 54:09What's your favorite PyPI package?
- 54:12Right now, I'm really enjoying Lector, which is Armin Roeneker's project.
- 54:17It's a static site generator.
- 54:19It's written in Python, and it's what I use now to generate my own blog.
- 54:23And then I upload it to a hosting service called Netlify.
- 54:27But Lector can publish to lots of different places, including GitHub pages.
- 54:32David Baumgold now has joined the project and is one of the chief maintainers along with Armin.
- 54:40It's a very flexible, fun project.
- 54:43It's new.
- 54:44It's got an active community.
- 54:47And 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:54Lector is treating me very well.
- 54:56Okay.
- 54:57That's cool.
- 54:57I haven't played with Lector.
- 54:59I'll definitely check it out.
- 55:00All right.
- 55:00Jesse, any final call to action for our listeners out there?
- 55:04Maybe we're maybe thinking about blogging or have a blog, but it has updates in the last decade.
- 55:10Yeah.
- 55:12Get out there and get writing.
- 55:14Don't worry about what platform you're going to use.
- 55:17Don't mess around with your visual design for too long.
- 55:23Just write down what you're really excited about so that I can read it.
- 55:26I want to second that thought as well.
- 55:28Jesse, thanks for coming on the show.
- 55:29It's great to share these blogging ideas and everything else you're up to.
- 55:33Thanks a lot.
- 55:33Yep.
- 55:34See you later.
- 55:36This has been another episode of Talk Python To Me.
- 55:39Today's guest has been A. Jesse Giroux Davis, and this episode has been sponsored by SnapCI
- 55:44and Intel.
- 55:45Thank you both for supporting the show.
- 55:47SnapCI is modern, continuous integration and delivery.
- 55:51Build, test, and deploy your code directly from GitHub, all in your browser with debugging,
- 55:55Docker, and parallels included.
- 55:57Try them for free at snap.ci slash talkpython.
- 56:01The Intel distribution for Python delivers the high-performance Intel C libraries built right
- 56:05into Python.
- 56:06Get close to 100 times better performance for certain functions when using NumPy, SciPy,
- 56:11and scikit-learn.
- 56:12Check them out at talkpython.fm/intel.
- 56:15I'm so excited to finally be able to unveil my Python for Entrepreneurs course that I told
- 56:21you about at the top of the show.
- 56:22If you want to learn Python web development and launch an online business, you owe it to
- 56:27yourself to check out the Kickstarter at talkpython.fm/launch.
- 56:30I hope we can build something amazing together.
- 56:33You can find the links from this episode at talkpython.fm/episodes slash show slash
- 56:3969.
- 56:39Be sure to subscribe to the show.
- 56:42Open your favorite podcatcher and search for Python.
- 56:44We should be right at the top.
- 56:45You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct
- 56:51RSS feed at /rss on talkpython.fm.
- 56:54Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.
- 57:00Corey just recently started selling his tracks on iTunes, so I recommend you check it out
- 57:04at talkpython.fm/music.
- 57:06You can browse his tracks he has for sale on iTunes and listen to the full-length version
- 57:10of the theme song.
- 57:11This is your host, Michael Kennedy.
- 57:13Thanks so much for listening.
- 57:15I really appreciate it.
- 57:16Smix, let's get out of here.
- 57:18Outro Music
- 57:40Thank you.