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?
..is intentionally incomprehensible. Whether indirectly through minification or directly via obfuscation.
I know it's hard for some people to accept, but there is a serious amount of interest (and, rightfully so) in preventing the reverse engineering of website code, or at least, hindering efforts to do so.
vos nescitis quicquam, nec cogitatis quia expedit nobis ut unus moriatur homo pro populo et non tota gens pereat.
View source is a relic of how the internet used to be. It's not coming back and I would argue should be hidden by default in browsers. It's akin to decompiling the source of an .exe file to look at the code (which some people do) and learn how it does things. Not a good method.
What you really want for learning and teaching techniques is to view the real source code. The source code with comments, with context, and with reproducibility in full. This is what open source projects and those demo websites do. They intentionally format the code in a readable way for the purposes of learning.
Someone learning to code on the web should not be looking at production code in a scalable web app, they should be following tutorials and using demo projects like you do in every single other language. The web isn't special it just had the quirk of the View Source button that was neat at the time but is now out of date and a relic of a bygone era.
The "View Source" functionality still works exactly as before. Except better. In Firefox, when I mistakenly hit Ctrl-Shift-C (which I do often), it brings me into an interactive "View Source" like functionality that is essentially a debugger. It's not [completely] the fault of webpage makers that the stuff under the hood is effectively gobbly-gook: That's just how the web looks now.
I'm not really sure what this summary is implying. That we should roll back the web to hand written HTML with blink tags so that kids can understand it? Fuck that. Get your kid a Raspberry Pi and as many $5 peripherals as they want. That's WAY more interesting than web programming and leads to understanding how things work instead of copy/pasting shitty HTML.
Google.com Apr 22, 1999
<center>
<img src="/web/19990422191353im_/http://www.google.com/google.jpg" alt="Google! (Beta version)">
<table border="0">
<tr>
<td>
<form name="f" method="GET" action="/web/19990422191353/http://www.google.com/search">
<center>Search the web using Google<br></center>
<center><input type="text" name="q" value="" size="40" framewidth="4"><br></center>
<center><input type="submit" value="Google Search">
<input type="submit" name="sa" value="I'm feeling lucky"><br></center>
</form>
</td>
</tr>
</table>
<a href="more.html">More Google!</a><br>
<p><font size="-1">Copyright ©1999 Google Inc.</font>
</center>
If you want "view source" to be useful, you need to go back to coding with simplicity in mind.
The original post talks about viewing the source of the google homepage and getting an incomprehensible slurry. But why? What does that actually accomplish? The page is one text entry box, and 2 buttons, plus a graphic above it. There is ZERO excuse for it being over 47,000 characters (not counting all the other stuff it pulls in). But this isn't at all rare on today's web. This is also why so many pages are so horrendously slow to load, it's all scripts and links to other files and domains, even the simplest websites use absolutely incredible amounts of bandwidth, and yet do no more than could be done in 1/100th the size or less, and be human readable.
99.99999% of these sites aren't huge for any good reason, they're just horribly inefficient.
What web server doesn't gzip the HTTP stream these days? Concatenating into a single file makes sense to avoid multiple connections or requests, but minifying doesn't.
In a few posts, there seems to be some confusion about the use of java in medical imaging. What the above poster is likely talking about is a program released by the NIH called ImageJ. https://imagej.nih.gov/ij/ It is a wonderful application that is useful for image processing and even microscopy. There is a user community that has made many add-ons to increase functionality. It is written in java because macs are thing in the medical research world, and it was easier to support one java version than separate mac and PC things. That said, it was a little disingenuous to include that in this discussion about web programming. ImageJ is not used as web plugin, but more as an on local machine program. I think his point was, if you wish away all of java, you will wish away some things people use. The thread is about wishing away java for HTML purposes. Hope this helps.
"Liberalism is a very noble idea, currently controlled by some very bad people. Be sure you do not get the two confused.
<html>
<script type="text/javascript" src="actual_page_content.js">
<body>
<h1>Please turn on Javascript to view this page.</h1>
</body>
</html>
Have gnu, will travel.
On the flipside, while these people *think* they are making expertly crafted sites, they've in practice poorly duct taped a bunch of stuff that looks fancy at a glance, but behaves crazy and is damned near impossible for anyone to figure out what's going on.
What's happened here is we have a whole ton of people who can do the equivalent of drywall, paint, and decoration work, but can't build foundations or framing. Complicating things is the decision makers frequently can only judge the superficial, so teams that are good at doing that structural stuff but can't make attractive front end will be passed over for teams that can make something attractive, but works terribly.
XML is like violence. If it doesn't solve the problem, use more.