What Pythonistas can learn from bestselling horror authors

Hey there,

I just finished reading Stephen King's "On Writing."

It's a great little book where he shares some of the writing advice and stories he's picked up over the course of his career as a bestselling author.

He goes pretty deeply into the "behind the scenes" of his writing process, what his schedule looks like, etc.

All very interesting stuff. I'd highly recommend the book if you're interested in writing or just want to get a slightly different peek inside Stephen King's brain for a few hours.

Now, why am I telling you this? There's a chapter in the book where he says, in essence, that:

"All writing is re-writing."

That really struck a cord with me.

And I think it applies directly to what you and I do as Python programmers...

Here, let me explain:

One important thing you need to realize is that there's NEVER a "perfect" first draft:

Just like writing, programming is NOT a linear process. It's an iterative one.

You start with a "blank piece of paper"—whether that's a blank .py file or some boilerplate code you pulled from an existing template.

Then you get your first draft down...just get it out:

Maybe it doesn't fulfill all of the requirements yet (usually it doesn't, at least for me.)

Maybe the code you write looks a little "ugly": the formatting is off, the naming is bad, it's too complicated for what it does.

But that's okay.

Stephen King doesn't write a novel in a single pass—and neither do you need to write the perfect program in one go.

Because now you're going to *iterate* on what you've got so far:

You're going add a little more functionality. Make the code a little prettier. Tease out some functions here and there. Add docstrings and comments.

And you're going to keep iterating and making changes until your program is ready to face the day—

Basically, "all programming is re-programming."

Or as Kent Beck (the Test-Driven Development guru) put it:

"Make it run, make it right, make it fast."

This is really a mantra to live (to program) by.

If you look closely you'll find this idea in all kinds of other creative endeavours (except maybe not in sandcastle competitions.)

Happy Pythoning!

— Dan Bader

Older messages

New Python tutorials on Real Python

Saturday, September 5, 2020

Hey there, There's always something going on over at realpython.com as far as Python tutorials go. Here's what you may have missed this past week: Python 3 Installation & Setup Guide [

New Python tutorials on Real Python

Saturday, August 29, 2020

Hey there, There's always something going on over at realpython.com as far as Python tutorials go. Here's what you may have missed this past week: Python mmap: Improved File I/O With Memory

Learning Python and the Power Of Constraints

Friday, August 28, 2020

Hey there, When I was 15-years old I'd set my mind on becoming the world's greatest guitarist. I was already a huge nerd at the time—so one beautiful Sunday morning I sat down for a few hours

Video subtitles & transcripts now available on Real Python

Thursday, August 27, 2020

Hey there, I've got a big update to share today... Real Python video courses now have full subtitles and transcripts! I think this is going to do a lot for accessibility and making your favorite

New Python tutorials on Real Python

Saturday, August 22, 2020

Hey there, There's always something going on over at realpython.com as far as Python tutorials go. Here's what you may have missed this past week: A Practical Introduction to Web Scraping in

You Might Also Like

BetterDev #259 - How LLMs Work, Explained Without Math and Turning AirPods into a Fitness Tracker to Fight Cancer

Monday, May 13, 2024

Better Dev #259 May 13, 2024 Hi all, We come back with a new issue this week. If you like BetterDev, please help spead word out by refer to your friends. Buy me a coffee would be great too. Many link

Meet OpenAI’s newest GPT

Monday, May 13, 2024

Plus: White House to fund semiconductors and Cruise tests in Phoenix View this email online in your browser By Christine Hall Monday, May 13, 2024 Good afternoon, and welcome back to TechCrunch PM. We

The Story of Project Management & SEO ruined the internet

Monday, May 13, 2024

My name is Philipp and you are reading Creativerly, the weekly digest about creativity and productivity-boosting tools and resources, combined with useful insights, articles, and findings from the

📱 Don't Travel Without This Cheap iPhone Accessory — Run Your Smart Home With a Raspberry Pi

Monday, May 13, 2024

Also: How to Generate AI Art for Free, and More! How-To Geek Logo May 13, 2024 Did You Know Thanks to serious conservation efforts and sustainable harvesting programs starting in the 1950s, the United

JSK Daily for May 13, 2024

Monday, May 13, 2024

JSK Daily for May 13, 2024 View this email in your browser A community curated daily e-mail of JavaScript news Level Up Your JavaScript: Mastering Array Manipulation Techniques Arrays are a fundamental

You rock(et) my world, moms

Monday, May 13, 2024

If you're looking for a Starliner mission recap, you'll have to wait a little longer -- the mission has officially been delayed. View this email online in your browser By Aria Alamalhodaei

Mapped | U.S. States By Number of Cities Over 250,000 Residents 🌎

Monday, May 13, 2024

Eighteen US States don't have a single incorporated area with more than 250000 people. View Online | Subscribe Presented by: Is your portfolio ready for the internet's next evolution? >>

Daily Coding Problem: Problem #1440 [Easy]

Monday, May 13, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Zillow. A ternary search tree is a trie-like data structure where each node may have up

Deepdive – prioritizing for product managers

Monday, May 13, 2024

As a Product Manager, you're constantly juggling everything – ideas, feature requests, strategic initiatives… the works. You want to do it all, but with limited time and resources, you know you

GCP Newsletter #398

Monday, May 13, 2024

News Official Blog Security Threat Intelligence Introducing Google Threat Intelligence: Actionable threat intelligence at Google scale Official Blog Security Introducing Google Security Operations: