3 ms·
Being able to view the source is important—but thanks to minification and automatic generation of content, the source isn’t designed to be consumed by humans an
by evincarofautumn 15y ago
Being able to view the source is important—but thanks to minification and automatic generation of content, the source isn’t designed to be consumed by humans anymore. Viewable source can’t be anywhere near the biggest reason for web applications’ popularity. On Occam’s Razor, I’d bet anything it’s just because the web is a ubiquitous, semistandard platform that’s all interconnected (relatively) seamlessly.
The “publicly viewable example code” isn’t helpful at all as-is. Discoverability already sucks. Just sending the source through a pretty-printer would be solving the problem backward, but if you’re going to do that, then there’s still no real reason the source itself has to be transmitted. If we had a single, standard, compiled format, then we’d solve the transmission and parsing problems, and the format could be presented on many different media, of which “decompilation” to HTML would be just one.
I’m not saying it wouldn’t be a lot of work to get it right, but in my opinion the benefits would outweigh the costs. That’s why I wrote the article. But of course you can’t solve a problem just by saying “this is how we ought to do it” without any discussion, so it’s people like you who intone “no, that’s a terrible idea, Jon” that will ultimately prove me wrong or right.