News for hackers. Stuff that matters.
Re:How to Write Usefully by combatentropy on Friday February 21, 2020 @12:55PM (#22385134)
> My English teachers rewarded flowery, verbose writing.

Same here, and I suspect the same for most people: "due to a series of historical accidents the teaching of writing has gotten mixed together with the study of literature" --- http://www.paulgraham.com/essay.html Toward the end of high school I found The Elements of Style by accident and it changed my life. Yes, it changed my life!

I was always more interested in art than science. So I didn't become a programmer until I was almost 30. What struck me was how similar it was to prose.

1. There are many ways to write a program

2. Your first draft of a program is usually bad, but you can steadily improve it by rewriting it over and over and over. This unglamourous technique is the secret behind good prose too, as Graham points out.

3. As you rewrite it, you find you can do the same thing in half the space.

4. The programs that are most pleasant to use are ones where the programmer first wrote it for himself. Likewise, as Graham said here, a good strategy for useful essays is to write it first for yourself.

Re:How to Write Usefully by jimbokun on Friday February 21, 2020 @01:29PM (#22385458)
I completely agree. And there are definitely some programmers whose code and prose are both eloquent and beautiful:

https://norvig.com/sudoku.html

This is my all time favorite programming book, both for the prose and the code within it:

https://github.com/norvig/paip-lisp

Interestingly, I find that the set of Lisp programmers also contains many of the best writers about programming: Norvig, Graham, Stallman, McCarthy, Steele, Abelson, Sussman, etc.

Re:How to Write Usefully by safety-third on Friday February 21, 2020 @02:19PM (#22385886)
This is how I do it as well. I usually find inspiration that makes my code much better. My secret sauce is telling others I am debugging it instead of making a new draft. This keeps someone from insisting that my first draft is "good enough."

In addition, I design my programs such that I can confidently rewrite important sections. This is OOP encapsulation's main purpose. In practice, everyone writes getters and setters until every object is an ugly struct.