Hacker News new | ask | show | jobs
by klibertp 1553 days ago
For point 3. - it's exactly the same with code that's not literate. Writing code is ultimately about expressing ideas using a language, which is really much closer to writing a novel than to drawing a plan for a bridge. As such, if you want to make your code understandable to other, you have to learn to write well. Just like with novels, there's no problem with having a personal style, or a specific flavor that comes from how you use the language, how you structure your sentences and paragraphs, how you guide a reader through the story.

In other words, the style varying between people is not a problem - bad writing is. And, unfortunately, in my experience very few programmers are capable of consciously producing good writing. The fact that most of the docs out there are barely-legible trash is a proof of this.

I'm sure that reading literate code from Charles Stross would be a blast. It would be exciting, sometimes surprising, but still clear, easy to navigate, structured in a way allowing for extension within a well thought-out framework. Unfortunately, when people without his talent try to use LP, they produce things on par with that unfinished fantasy novel you started writing in 8th grade.

Programming requires a bit of talent, but you can get by with lots of hard work. Literate programming is much harder than that and requires a lot of talent to be beneficial to the codebase. Without that, your LP code will be Fifty Shades of Twilight, and honestly, we don't need more of things like that.

1 comments

It's a nice perspective, but the fact that more people have read Fifty Shades/Twilight than the sum total of all who have read any of Charles Stross's works undercuts your point.

And while you add to point 3, it wasn't my main point.

Take any two exceptionally good writers who have very different styles. If one of them produces literate code, the other may be able to understand it very well, but it is unlikely that he can modify it, along with the prose, and maintain the quality of the literate document.

It's not just about bad writers, but incompatibly good ones.

I believe you're wrong - writers can, and do, steal styles and ideas from each other all the time. Not to mention, the editors are basically doing this:

> can modify it, along with the prose, and maintain the quality of the literate document.

for a living. As long as you're accomplished enough of a writer, you'll be able to analyze the works of others and copy them easily. It's coming up with your own style that's a problem.

To summarize: exceptionally good writers will be able to modify and expand each other's work without much effort. Or at least that's what I believe, based on some personal experiences with writing and writers. It should be quite similar with literate programming, too.

Doubt u get what beetle said. It is far more work to rewrite an essay with a different thesis.
Obviously. But we're talking about modifying the existing text, not rewriting it. How often do you have a chance to redo a whole project with completely different implementation and/or completely changed requirements? In my experience, most of the programming work is about adding new chapters to the existing text, and editing the existing text in some areas to make it easier to reason about. In other words, it's either extending the existing functionality, or refactoring it. It's not about rewriting the whole thing.

I would be happy to know, how experienced are you with actually writing creative works, working with a text, working on editing it, and so on? Again, I'm not 100% sure if literate programming would be exactly the same, but if it is similar to creative writing, then - I stand by this point - personal style of writing is not a problem. For two reasons:

- it's trivial to adjust your writing to an existing style when doing light editing and small extensions

- it doesn't matter if different stories in an anthology are written in different styles (actually, you buy anthologies because of different styles), so big extensions and rewrites in a different style are also ok