Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am not English major, but I am pretty sure that the idea of becoming a writer by reading pieces of other people's texts is wrong. This is simply not enough. There is a "second component" in good writing, and it is not just about language usage.

One could read Selinger or Pamuk or Sartre or Hesse, to realize that this second component is much more important, while masters like Nabokov whose speciality is playing with words might show you that wording is also important.)

The transition from reading to writing ones own texts, not imitating or copy pasting is also not clear, and, of course, one never could become a good writer only by excessive reading. Writing and speaking are different cognitive tasks from reading or listening.

So what? Reading of good code is important, it teaches style, how to be brief, concise, precise. But where to find the good code? Well, the recursive list functions in Scheme are worth reading. Some parts of Haskell Prelude are worth reading, some macros of Common Lisp, etc.

The code of "the top writers" are worth reading. Code from PAIP or On Lisp or SICP are obvious examples, while some code, like from Practical CL which is mostly a mechanical translation of OO stuff only adds more confusion.

So, reading "good" code is still the must, the same way that reading Catcher In The Rye or Zen And Art Of Motorcycle Maintenance or Atlas Shrugged is still the must.

But programming is about writing, which means expressing ones own ideas and realizations and understanding, so one must have these in the first place.

In this sense programming is like writing a poetry - it must emerge and form in ones mind before it could be written down. The best poetry is written exactly like this - committed to the paper suddenly as it emerges, without any later changes.

This reflects the process of "emergence" of ideas or profs in a mind of scientists who are continuing to persue a problem for years - suddenly it is here, as if it came from subconscious. It seems that the best code, like these classic Lisp procedures or parts of Prelude has been written this way.

Of course, reading Java is as meaningless as reading graphomans or some lame and lenthy political pamphlet in a third-rate newspaper.)



"In this sense programming is like writing a poetry - it must emerge and form in ones mind before it could be written down. The best poetry is written exactly like this - committed to the paper suddenly as it emerges, without any later changes."

Are you sure that's true? Can you cite some examples?

Lisp is famous for its interactivity: the read-eval-print loop, SLIME, Lisp Machines, Emacs, etc. Avid Lisp hackers even edit code inside of running systems. The "bottom-up approach" to programming (as advocated by Paul Graham) is almost the opposite of what you describe, isn't it?

Generally speaking, I think both programmers and poets work in a dynamic way with their texts: moving stuff around, seeing what works, doing experiments, asking others, etc.

That's one reason why Knuth's idea of literate programming seems so academic and remote for most programmers: how are you going to keep all of that text up-to-date when you start refactoring?


I would say that there is no contradiction with bottom-up approach, and it was popularized before PG by SICP lectures with image manipulation DSL for making these beautiful recursive image patterns.

Your each iteration in a bottom-up process could be based on a small insight after thinking about a subproblem. Later one just re-uses ones own realizations and adapts them to new requirements.

Also I think that it should be not just linear bottom-up process, but recursive one, when you regularly "call yourself" with the old problem, but a "new you, evolved with experience". Starting from the bottom, from basic building blocks is crucial. The only "addition" is that nothing will be set in stone and you should come back to "simplify" and refactor even what is at the very bottom.

I also never advocated Knuth's idea or that whole programs should be printed as books (while some procedures such as map or append are worth to be printed and framed).

As for poetry, well, I thing almost every youth wrote some in his late teens or early twenties, and yes, I told it wrong, not a whole poem emerges in ones mind, but a few central passages, the main scheme, to which some ornaments could be added later.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: