4 ms·
> 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 teachi
by combatentropy 7y ago
> 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 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.
- jimbokun 7y agoI completely agree. And there are definitely some programmers whose code and prose are both eloquent and beautiful: https://norvig.com/sudoku.html 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 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.
- safety-third 7y agoThis 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.