News for hackers. Stuff that matters.
Re:The Der Spiegel journalist who messed with the wrong smal... by manfredo on Sunday December 23, 2018 @12:27AM (#18744601)
When I read news articles about topics with which I am familiar, I encounter plenty of statements that strike me as basically false. Consider this excerpt from the New York Times' piece of Donald Knuth [1]:

> Following Dr. Knuth’s doctrine helps to ward off moronry. He is known for introducing the notion of “literate programming,” emphasizing the importance of writing code that is readable by humans as well as computers — a notion that nowadays seems almost twee.

Calling the idea that code should be readable by humans "almost twee" just makes me think that the writer has no idea what they're talking about. Sure, there are times when people write crap code, but being readable by humans is the whole reason why we built coding languages. Not to mention, the average readability of code has probably increased over time, not decreased. The author is basically just pulling this statement out of her behind to embellish Knuth's reputation, to the detriment of the credibility of the rest of the article.

It's nowhere near the magnitude of the fabrications in Der Spiegel of course, but it does seem to be the case that writers are willing to trust their own prejudices without fact checking. I was able to spot when those prejudices in the above example but only because I have relevant domain knowledge. It makes me wonder, how many times do I swallow the BS without knowing it? It's just a matter of how small (or big) of a statement they're willing to make without verifying it's veracity.

1. https://www.nytimes.com/2018/12/17/science/donald-knuth-comp...

Re:The Der Spiegel journalist who messed with the wrong smal... by munificent on Sunday December 23, 2018 @01:22AM (#18744757)
Re:The Der Spiegel journalist who messed with the wrong smal... by fromthestart on Sunday December 23, 2018 @01:30AM (#18744781)
I immediately thought the same thing. But then I thought, not being a subject matter expert doesn't give you an excuse to write bullshit.

I think people who study the arts are less likely to have experience with and understand complex systems and, because of the different structure of knowlege in a subject like journalism, it's easier to be overconfident in one's knowlege. Especially when extended to topics like physics which require mathematics to truly understand.

Re:The Der Spiegel journalist who messed with the wrong smal... by danso on Sunday December 23, 2018 @02:25AM (#18744917)
And yet a journalist with no tech startup, venture capital, or biomedical experience was able to understand and expose Theranos, which ran its scam right out from Palo Alto and Stanford.
Re:The Der Spiegel journalist who messed with the wrong smal... by Fnoord on Sunday December 23, 2018 @04:26AM (#18745236)
After reading Bad Blood, the exposure had almost failed was it not for Carreyrou's enduring persistence. He met both internal and external pressure to call off his investigation. Not every journalist is cut for that kind of pressure.
Re:The Der Spiegel journalist who messed with the wrong smal... by cat199 on Sunday December 23, 2018 @02:09AM (#18744873)
> Calling the idea that code should be readable by humans "almost twee" just makes me think that the writer has no idea what they're talking about.

Actually..

no.

He did do this.

https://en.wikipedia.org/wiki/Literate_programming

And it's not just that programming should be in languages rather than machine code, but that the code + comments should read like a coherent document.

In other words, just because you write in a programming language doesn't mean it's literate programming.

Re:The Der Spiegel journalist who messed with the wrong smal... by giornogiovanna on Sunday December 23, 2018 @06:53AM (#18745628)
That's not what GP is complaining about - rather, the issue is that the article misrepresents what literate programming is, and makes it sound like nobody writes code for humans to read these days, which is obviously false.
Re:The Der Spiegel journalist who messed with the wrong smal... by hopler on Sunday December 23, 2018 @08:38AM (#18745987)
In my decades of programming experience in the commercial sector, I have seen very little readable code. Rush to market and insecure competitive "anyone as smart as me would understand my code" is standard.
Re:The Der Spiegel journalist who messed with the wrong smal... by danso on Sunday December 23, 2018 @02:07AM (#18744866)
> Calling the idea that code should be readable by humans "almost twee" just makes me think that the writer has no idea what they're talking about.

This is a strange criticism, and ironically it seems to reveal your own misconception of what "literate programming" actually is. Setting aside the discussion of how languages and design philosophies make tradeoffs that affect readability, Knuth's particular brand of "literate programming" pushes a concept that is orthogonal to language design, and substantially different than the precepts of style and commenting practices offered by things like PEP8. "Literate Programming". From Knuth's homepage [0]:

> The main idea is to treat a program as a piece of literature, addressed to human beings rather than to a computer.

From the literateprogramming.com page that Knuth's homepage links to, an excerpt from Ross Williams:

> Instead of writing code containing documentation, the literate programmer writes documentation containing code. No longer does the English commentary injected into a program have to be hidden in comment delimiters at the top of the file, or under procedure headings, or at the end of lines. Instead, it is wrenched into the daylight and made the main focus.

Here's a HN thread about docco, one of the few real-world tools related to literate programming: https://news.ycombinator.com/item?id=2089912

"Literate programming" is not just about readable code, it's about fundamentally restructuring the entire program to be read as one would read a work of literature. And this is something that is not at all standard practice, nor a philosophy that everyone agrees to even be ideal in theory. Here's Peter Norvig's criticism [2]:

> I think the problem with Literate Programming is that assumes there is a single best order of presentation of the explanation. I agree that the order imposed by the compiler is not always best, but different readers have different purposes. You don’t read documentation like a novel, cover to cover. You read the parts that you need for the task(s) you want to do now. What would be ideal is a tool to help construct such paths for each reader, just-in-time; not a tool that makes the author choose a single pth for all readers.

So saying Knuth's philosophy of "literate programming" is "twee" is not at all inaccurate. The sentence structure from the NYT article could be rejiggered so that it's clearer that "twee" refers to Knuth's philosophy, and not "code that is readable by humans" in general. But the author is absolutely right to describe Knuth as being a pioneer in literate programming, and that it's a paradigm not followed in practice by mainstream software development.

[0] https://www-cs-faculty.stanford.edu/~knuth/lp.html

[1] http://www.literateprogramming.com/

[2] https://www.johndcook.com/blog/2016/07/06/literate-programmi...

Re:The Der Spiegel journalist who messed with the wrong smal... by giornogiovanna on Sunday December 23, 2018 @06:55AM (#18745632)
Yes, but as you said in your last paragraph, the main issue is that the sentence is very misleading. I don't know if the author knew what they were talking about, but taken at face value, it does sound very wrong.
Re:The Der Spiegel journalist who messed with the wrong smal... by danso on Sunday December 23, 2018 @09:30AM (#18746240)
The sentence is more correct than it is wrong. Here it is with the context of its paragraph:

> He is known for introducing the notion of “literate programming,” emphasizing the importance of writing code that is readable by humans as well as computers — a notion that nowadays seems almost twee. Dr. Knuth has gone so far as to argue that some computer programs are, like Elizabeth Bishop’s poems and Philip Roth’s “American Pastoral,” works of literature worthy of a Pulitzer.

Note this part specifically:

> the notion of “literate programming,” emphasizing the importance...a notion that nowadays seems almost twee"

"literate programming" is the notion emphasizing* the "importance" of writing code readable by humans. And this "notion" The word "which" would make it even clearer that the subject of the clause is "literate programming", but the sentence is still grammatically correct as is. Everyone thinks it's important for code to be readable, but Knuth is the one who is radical about how important it is -- to the point that he thinks programs should be "literature worthy of a Pulitzer".

In any case, the NYT author is more accurate than the previous HN commenter, who seems to have jumped to a conclusion without knowing anything about the concept "literate programming", or how and why Knuth is known for it. The NYT author is not "basically just pulling this statement out of her behind to embellish Knuth's reputation", but it seems the commenter is not as familiar with Knuth and/or computer programming as he thinks he is.