I was reading Mary’s and Tom’s Poppendieck new book, and found very simple, but interesting questions – they were: Is a programmer an author or a translator? Is code written for a machine or for a person?
Here is what you will find in the book (I just added the part of the section):
“Two programmers working independently will create very different solutions to the same problem, often with large differences in interpretation. Similarly, two authors will produce widely different interpretations of the same topic, often with large differences in interpretation. However, two translators will produce relatively similar interpretations of the same work.”
“Programmers write initially for themselves, but most importantly, they write for the people who must interact with or change their code in the future. Good programmers work hard to clarify their intent as they write – they want their audience, the people who read their code, to know what they intended the code to do.”
“Sometimes we see demands for documentation from people who can’t read the code, but we know that anyone who seriously expects to change the code is going to have to read the code. We believe that for most purposes, it is much more important for code to speak for itself than for documentation to translate its meaning.”
From the same token, here is what seems to be interesting from Ward Cunnigham (from Robert C. Martin “Clean Code” book):
“You know you are working on clean code when each routine you read turns out to be pretty much what you expected. You can call it beautiful code when the code also makes it look like the language was made for the problem.”