Hacker News new | ask | show | jobs
by Fa773NM0nK 4788 days ago
"occasional performance concerns require putting readability in the backseat, but this is rare"

occasional? Seriously? rare? Seriously?

"Source code should be written to be understood by people." Nope, Source code should be written to be executed. If people can understand it easily, its a plus point, not a baseline.

Considering that the keyboard is the primary way we write sources, I find it difficult enough to keep my fingers in speed with my thoughts. In addition to that if I have to press tabs to align each of the statements in my 'for's, I'll be left in a much poorer way.

3 comments

One of my professors in college put it in a way that stuck with me. All source code has to be compiled by (at least) two different machines; the compiler and the programmer's brain. The machines have radically different parsers, but must end up with the same parse tree for the program to function correctly.
> "Source code should be written to be understood by people."

This viewpoint is described well in the Preface to the First Edition of Structure and Interpretation of Computer programs, 2nd paragraph:

http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-7.html

I would suggest reading the whole Preface. It's quite an inspirational work for this field.

"The source of the exhilaration associated with computer programming is the continual unfolding within the mind and on the computer of mechanisms expressed as programs and the explosion of perception they generate. If art interprets our dreams, the computer executes them in the guise of programs!"

Enjoyed it! Thanks!

I apologize, the Foreward is the inspirational work I was speaking of:

http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-5.html

Not that the contents of the Preface should be ignored :)

Cool! I'll surely give it a read!
I'm a layman so I ask this question with sincerity. Would your opinion change if the formatting was performed manually, at the moment of your choosing?
"formatting was performed manually"? What do you mean by that?

I'd rather it be performed automatically. But, I find very few tools that would format it the way I want.

I meant that the formatting mentioned in the article was done when you chose to do it (by executing a command) rather than automatically as it recognized the syntax.

I guess I'm asking if you object to the formatting itself or the automation of it.