Slashdot Mirror


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?

8 of 305 comments (clear)

  1. The JavaScript on most sites.. by intellitech · · Score: 5, Insightful

    ..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.
    1. Re:The JavaScript on most sites.. by HornWumpus · · Score: 1, Insightful

      Newbies have no business looking at web pages. It's too much of a fucking mess, it will only scare them off.

      Find something interesting and simple for them to learn on. Yes it will have to be contrived, but so what?

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    2. Re:The JavaScript on most sites.. by digitalchinky · · Score: 4, Insightful

      If you kill off Javascript, you also kill off medial image imaging (my line of work) or a thousand other things you depend on but don't realize. Be careful what you wish for. The web is much bigger than the sea of annoying cookie notices, calls to action, and responsive design. Javascript, like or not, gets crap done :-) It's not perfect, but it's not so terrible either.

  2. Open source not view source by James+Carnley · · Score: 5, Insightful

    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.

  3. It still works exactly as before by somenickname · · Score: 5, Insightful

    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.

  4. We need to go back to simplicity. by green1 · · Score: 5, Insightful

    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.

    1. Re:We need to go back to simplicity. by somenickname · · Score: 2, Insightful

      99.99999% of these sites aren't huge for any good reason, they're just horribly inefficient.

      99.99999% of all software "isn't huge for any good reason". Except for the fact that the developers decided to not use assembly so they could actually, I dunno, complete a project in a sane amount of time.

      Have a look at MenuetOS. It's written completely in assembly, fits on a single floppy and provides a lot of the useful functionality that a modern desktop does. It's insanely fast and easy to understand (if you don't mind jamming 100 lines of assembly into your head to grok an if statement). Yet, no one (probably not even the developers) uses it as their primary desktop. It's an awesome project but, it's certainly never going to overtake any other OS in users.

      You can stand on the shoulders of giants (or, in the case of the web, Trolls) or you can re-invent the wheel over and over. Thankfully, the modern software industry has mostly chosen correctly on this point. We are able to build nice things because the people before us have built nice foundations for us to build upon.

      I'll let you get back to writing your custom XML parser...

  5. Most HTML source is simple by PPH · · Score: 4, Insightful

    <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.