Live data from Hacker News

Programming and Writing

antirez.com

71–80 of 87 posts

Re: Programming and Writing

#71
post #29

An underappreciated aspect of programming that is taught well and consistently in the context of writing is the need for iteration. Never publish something without rereading it first. Anything longer than an email, you should have a break between writing a first draft and taking a second look at it. Murder your darlings: learn to recognize things that you're proud of for the wrong reasons, things that other people wo…

> Stephen King had this to say on the art of writing in his book On Writing: A Memoir of the Craft: “Kill your darlings, kill your darlings, even when it breaks your egocentric little scribbler's heart, kill your darlings."

https://www.masterclass.com/articles/what-does-it-mean-to-ki...

Re: Programming and Writing

#72
> Code is not prose written in a natural language, yet it has a set of fixed rules (a grammar), certain forms that most programmers will understand as natural and others that, while formally correct, will sound hard to grasp.

The prose has to "execute" in the interpreter of the reader's imagination. Not much stack space there: go easy on the pronouns.

Re: Programming and Writing

#74
post #29

An underappreciated aspect of programming that is taught well and consistently in the context of writing is the need for iteration. Never publish something without rereading it first. Anything longer than an email, you should have a break between writing a first draft and taking a second look at it. Murder your darlings: learn to recognize things that you're proud of for the wrong reasons, things that other people wo…

To carry the metaphor, iteration is not just about refactoring and optimizing, it’s mostly about debugging. Finding what isn’t working and trying something new. I wrote about how I use my programming logic to “debug my art”.* The same can be applied to writing. * https://www.pcmaffey.com/debugging-your-art

Great analogy! But it's probably all three: debugging (is it correct?), refactoring (readability), optimizing (succinctness). And likely in that order. Exactly the priority ordering as in programming also. Will keep this in mind!

Re: Programming and Writing

#75
A colleague that once worked on the original AT&T billing system used to say:

“The first time you write, you’re learning about the problem, the second time, the solution, and then finally, you’re continuously polishing it.”

Or something like that. It was years ago.

Re: Programming and Writing

#76
post #34

There are many similitudes between writing novels and writing code, but the main difference is that it's much easier to write bad novels than bad code. Bad code doesn't work. There can be "beautiful" code that doesn't work, but it's pointless. And there are many instances of ugly, even abominable code, that does work, but... well, at least it works! It's very hard, and maybe impossible, to determine if a novel "works…

I don't really agree. "Works" is a lower bound for code, but hardly the end all and be all. There's a whole world out there of "bad but works" code. And about as much arguing about what makes "good code" as there is about what books are good and bad.

> There's a whole world out there of "bad but works" code

That's what I said... But not the same can be said about a novel...

Re: Programming and Writing

#77

As a programmer and aspiring writer, the two activities don't really feel the same to me at all. I understand that there are many similarities. Building a piece of software and writing a novel are complex projects that span long periods of time, requires iteration, attention to detail, and cognizance of structure at varying scales, planning, etc.... But when I'm writing prose, it does not feel anything like writing c…

I feel like programming in a point-free style is the closest to writing prose that coding gets for me. A composition of named functions in sequence is essentially a functional sentence. The ability to effortlessly re-arrange the product on the page is what gives it the flavor -- written imperatively and in detail, that flavor is either lost, or diluted homeopathically amongst the much more verbose format.

Re: Programming and Writing

#78
post #29

An underappreciated aspect of programming that is taught well and consistently in the context of writing is the need for iteration. Never publish something without rereading it first. Anything longer than an email, you should have a break between writing a first draft and taking a second look at it. Murder your darlings: learn to recognize things that you're proud of for the wrong reasons, things that other people wo…

> Stephen King had this to say on the art of writing in his book On Writing: A Memoir of the Craft: “Kill your darlings, kill your darlings, even when it breaks your egocentric little scribbler's heart, kill your darlings." https://www.masterclass.com/articles/what-does-it-mean-to-ki...

> “Don’t get discouraged because there’s a lot of mechanical work to writing. There is, and you can’t get out of it. I rewrote A Farewell to Arms at least fifty times. You’ve got to work it over. The first draft of anything is shit. When you first start to write you get all the kick and the reader gets none, but after you learn to work it’s your object to convey everything to the reader so that he remembers it not as a story he had read but something that happened to himself. That’s the true test of writing.” – Ernest Hemingway > “The main thing is to know what to leave out. The way you tell whether you’re going good is by what you can throw away.” – Ernest Hemingway

To make anything production quality you have to go many iterations from sketching (prototype), to inking (design/setup) and then many, many passes on the post production iterations. Unfortunately our project management hasn't learned it is a creative art yet. You can't just throw another writer in to make it faster always. Game development is more programming/creative mix and it is clear in that industry, it is easier to argue for delays for polish and game mechanic tuning, others it is almost a perception hit just to delay for a better product with more iterations.

Hemingway also had a great tip for any creative or programming or self driven career like writing, leave something you know unfinished that you can start in the morning. So sometimes if you have a solution and implement part of it, prepare to test it or even put a compile error right where you left off, you build and start up the next day at that point.

> “The most important thing I’ve learned about writing is never write too much at a time… Never pump yourself dry. Leave a little for the next day. The main thing is to know when to stop. Don’t wait till you’ve written yourself out. When you’re still going good and you come to an interesting place and you know what’s going to happen next, that’s the time to stop. Then leave it alone and don’t think about it; let your subconscious mind do the work.

The next morning, when you’ve had a good sleep and you’re feeling fresh, rewrite what you wrote the day before. When you come to the interesting place and you know what is going to happen next, go on from there and stop at another high point of interest. That way, when you get through, your stuff is full of interesting places and when you write a novel you never get stuck and you make it interesting as you go along.” – Ernest Hemingway

This next quote about quality/product/content/experience is great, and it can parallel making a good game, or an app that makes someone's life more fun, or a tool that helps someone achieve something. Make your product a friend like a book if you can, you'll probably have to do it yourself as project management systems of today won't allow it.

>“All good books are alike in that they are truer than if they had really happened and after you are finished reading one you will feel that all that happened to you and afterwards it all belongs to you; the good and the bad, the ecstasy, the remorse and sorrow, the people and the places and how the weather was.” – Ernest Hemingway

[]1 https://www.turnerstories.com/book-reviews/2019/4/10/ernest-...

Re: Programming and Writing

#79
Here's a technique for revising and improving prose that has no analog in programming: reading the text aloud to yourself.

This is the best way to fix a first draft, of short texts at least, without having to wait for it to cool off first. Often an email must be sent quickly, with no time to set the message aside. So always before I hit Send, I invest a minute to pronounce the text aloud, or at least under my breath while moving my lips.

I'm often amazed at the obvious typos I catch this way. As well, my oral fluency -- which appears to come from a whole different place than my written voice -- can often improve entire sentences with better word choices or figures of speech that emerge from my mouth spontaneously as I speak the text back.

Voilà! A much better second draft of the message in a very efficient manner.

And yes, I read this post aloud before I pressed "add comment." I hope it doesn't betray me.

Re: Programming and Writing

#80

Here's a technique for revising and improving prose that has no analog in programming: reading the text aloud to yourself. This is the best way to fix a first draft, of short texts at least, without having to wait for it to cool off first. Often an email must be sent quickly, with no time to set the message aside. So always before I hit Send, I invest a minute to pronounce the text aloud, or at least under my breath…

Arguably writing tests is the analog of reading prose aloud. It forces you to think through cases as a user of your code and often helps catch bugs as a side effect of your thinking than the test result.

Or perhaps a closer analog is the rubber duck where being forced to explain your problem leads to thinking more clearly about it and solving it.

Post reply on HN