Code is not Literature
gigamonkeys.com
Code is not Literature
1–10 of 88 posts
Re: Code is not Literature
#2Re: Code is not Literature
#3Re: Code is not Literature
#4Re: Code is not Literature
#5http://i.stack.imgur.com/JlUiE.png
The potential advantages include:
- More source code and more documentation on the screen(s) at once
- Ability to edit documentation independently of source code (regardless of language?)
- Write documentation and source code in parallel without merge conflicts
- Real-time hyperlinked documentation with superior text formatting
- Quasi-real-time machine translation into different natural languages
- Every line of code can be clearly linked to a task, business requirement, etc.
- Documentation could automatically timestamp when each line of code was written (metrics)
- Dynamic inclusion of architecture diagrams, images to explain relations, call-graph hierarchies, etc.
- Single-source documentation (e.g., tag code snippets for user inclusion in manual[s]).
Re: Code is not Literature
#6Example of a conditional statement:
Juliet:
Am I better than you?
Hamlet:
If so, let us proceed to scene III.
http://en.wikipedia.org/wiki/Shakespeare_(programming_langua...Re: Code is not Literature
#7But as soon as the skilled code reader has a purpose in mind -- a question to answer -- he or she can rapidly find a meaningful narrative. Put into that context, programmers read code constantly, and the more they read the better they get.
So I don't like the "nobody actually reads code" claim. It's a strawman. When I tell people to read code, it's always in the context of "pick something you want to understand or fix, and read with that purpose in mind." Not "the Linux kernel is like Moby Dick, you should really read it all."
Re: Code is not Literature
#8I really enjoyed reading this article, but I would argue with its headline. Based on the author's experience and the example from Donald Knuth, it seems like the best way to read code is to go through it multiple times to the point where you could reimplement it or provide complete documentation for it.
The literary analog for code reading might be a writing a scholarly reader's companion to a book.
You can't write a secondary source for a work of literature by reading it once through like a drugstore thriller or romance. A literary analyst would read the book through completely >3 times and spend hours on certain key passages. They would take extensive notes reconstructing the innerworkings of the characters, the relationships between them, and key themes. Once the work has been comprehensively understood, the scholar can write out in an expository manner what is going on in the piece of literature, the same way that a thoroughly digested piece of software can be rewritten based on the mental model that develops as you read.
Obviously software and novels do not map completely one onto the other. I think the key similarity is that they both can be created with sufficient complexity to require taking multiple passes and following along with the author, building something similar yourself in order to truly understand them.
Re: Code is not Literature
#9Re: Code is not Literature
#10Having just implemented a specification where the spec was less useful than some source, I'd say that literature is not code for sure. And as someone who has read literature, though I wasn't an english major like the author--you know it seems like they encourage english majors to treat writing as a specimen--it seems true that code is not literature either, it doesn't even compare for entertainment value for example.