We Need To Reboot the Culture of View Source (wired.com)
theodp writes: Back in ye olde days of the information superhighway," begins Clive Thompson in It's Time to Make Code More Tinker-Friendly, "curious newbies had an easy way to see how websites worked: View Source." But no more. "Websites have evolved into complex, full-featured apps," laments Thompson. "Click View Source on Google.com and behold the slurry of incomprehensible Javascript. This increasingly worries old-guard coders. If the web no longer has a simple on-ramp, it could easily discourage curious amateurs." What the world needs now, Thompson argues, are "new tools that let everyone see, understand, and remix today's web. We need, in other words, to reboot the culture of View Source." Thompson cites Fog Creek Software's Glitch, Chris Coyier's CodePen, and Google's TensorFlow Playground as examples of efforts that embrace the spirit of View Source and help people recombine code in useful ways. Any other suggestions?
But why? A competent developer can duplicate the functionality of most webpages easy enough, so what does obfuscation gain apart from putting off curious newbies?
It's a great method if one wants to look at the output of a compiler. It's also useful to look at the internals of a web page as far as just how much it's generated on the fly in javascript vs baked in by a server-side script/app.
Which goes to show you how the big complaint I had about the way the web was going came true. Sure, we bypassed having Flash hell. But we've replaced it with HTML5 and javascript hell. The fact that you don't think it's actually possible for a web site to have comments with context and such and that one can only get that in demo websites is precisely the problem. If I want to make a web site like Amazon, what better framework is there than to literally see how they do it?
Actually they should, in part, to understand exactly what their framework is outputting to get an idea of just how scaleable said web app really is in production. More generally, developers of web pages need to look at the code to have an idea of why stuff isn't working right.
they should be following tutorials and using demo projects like you do in every single other language.
Another major part of learning another language is seeing actual production code, not just demo projects. And debugging programs, possibly even without the source code. It's actually a necessary step to get into the mindset of "what could possible be causing this problem".
No, it was special. For a long time, a web page really was something that could be intelligible in "view source" because html was merely a markup language. Page generators could simplify the boilerplate production, but even then the output was still readily human readable. Honestly, the move to CSS didn't kill this. Javascript itself didn't kill this either. What mostly killed this was that Google (and others) intentionally obfuscated their code precisely to make it so people COULDN'T learn from it. Any claims about code size? That's what gzip (and other) in-line compression is for.
Oh, and, btw, you should really look up the history of LISP machines to get some perspective on just how consumer interests turn an open platform into a shithole.