Web Directions Conferences for web and digital professionals

Not Real Programming

As I recently reflected, a paper by Tim Berners-Lee about the World Wide Web for HyperText ’91, the then peak HyperText focussed conference in the world, was rejected. Who could be so short sighted? Well almost all of us really, but here’s what a prominent Hypertext researcher at the time said

  • Links in hypertext must be bidirectional. WWW’s are one way only.
  • WWW servers aren’t aware of each other and there is no inter-​​server communication.
  • All WWW servers are equal. There should be a concept of hubs.
  • WWW servers don’t keep state. They are completely unaware of their previous interactions.
  • It’s obvious that whoever wrote the hypertext engine doesn’t understand SGML. This HTML is done all wrong.
  • Finally, he’s giving this away for free. That means it has no value at all. We have our own version and a strong licensing partner.

All of them at the time very legitimate criticisms. And as it turns out, completely wrong. Because they were a priori[1] beliefs about what good hypertext systems were, based on a lot of theory, and very little real-world experience.
By the way, I held pretty much all those beliefs at the time. Hypertext was something I knew a fair bit about. And of course I was wrong.

I also observed recently that the criticisms of the use of web technologies for application development (critics now generously grant that web technologies are fine for pages) are also a priori truths that don’t even need justification (JavaScript is slow, um, JavaScript is slow, and well, JavaScript is slow) and fall into a similar pattern.

But, there has been another, even longer running constant regarding the web for the last 20 years—working with web technologies is not “programming”, not “real coding”. Seriously, this has been going on for about 20 years. But I’ve kind of had enough of it.

For a long time, the focus of this criticism was on HTML (then CSS). Because (I’m guessing here, as typically this belief is stated without any further justification, it simply is) HTML/CSS doesn’t look like “real” programs (you know with loops and variables and stuff), because HTML/CSS stuff doesn’t crash, and so it can’t possibly be “real” programming.

These days JavaScript is often lumped in there too (because I suppose again, if a priori web programming isn’t real programming, then that’s never going to change, even if it gets loops and variables and stuff).

The perils of innovation

This whole ‘debate’ brings to mind book, Clayton Christensen’s The Innovator’s Dilemma. In it, Christensen makes the case that disruptive technologies don’t start out better than established technologies, as would seem intuitive, they start out worse. But for all their faults in comparison with entrenched, established competitors, there’s something radically different that opens whole new opportunities, and makes them disruptive.

How might this apply to the web, and in particular HTML and CSS (and to a lesser extent JavaScript, for which there might be a lesson lurking in here)?

Well, TIOBE software has been publishing an index of the top programming languages for many years.

The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings

Guess where HTML ranks? CSS? Nowhere in the top 50. I’m pretty sure they don’t even bother to include it in their research (though I’m happy to be proven wrong).

Maybe that’s because people who use HTML and CSS aren’t considered “skilled engineers”? Maybe because of what they consider to be “courses” for the purposes of their research (do they have to be University level?) Maybe there aren’t sufficient third-party vendors? (other than Microsoft, Apple, Google, Mozilla, Blackberry, Samsung and countless others I guess).

So, what’s going on? I’d suggest this is a classic example of the innovators dilemma. HTML/CSS[2] don’t do what ‘real’ programming languages do.

And yet, more people can use these technologies (albeit far from all of them particularly well) to build productive real world stuff than probably all the top 50 languages put together. Their apparent weaknesses of being forgiving (it’s not programming as wrong stuff doesn’t crash!), and relatively straightforward to get started with (it’s a toy!) are (among other things) precisely their disruptive advantages. Just as the ability to read and write went from being an elite ability, to an almost ubiquitous human capability in a bit over a century, providing arguably the greatest disruption in human history (until 1908, during the early stages of the explosion in human literacy, no human had flown except by hot air balloon, but just 60 years later, humankind stood on the moon), I can’t begin to imagine what the near ubiquitous ability to program computers (in a very general sense, not in the sense of mastering for-loops) will bring over the next century.

And when this happens, you can thank HTML.

Because among all the revolutions of the web was one we pay too little attention to: it is declarative, not imperative programming.

When most people hear the word programming, they think of things that look like this

AXE programming Ad (yes, it’s assinine, think about why I chose the image perhaps?)

But this is simply one, although to date the dominant, paradigm of computing, imperative computing. In imperative computing, we tell the computer how to do something we want done. Here’s a simple example using the web

var allParagraphs = document.querySelectorAll("p")

for (var i=0; i < allParagraphs.length; i++) {
	allParagraphs[i].style.color = "red"
};

I even cheated here a bit, as you could argue that to be truly imperative, I should have walked the entire DOM tree, testing each node to see if it were a paragraph. See, programming for the web is a toy! Real men walk the DOM tree!

We've had to tell the browser exactly how to style each paragraph (get its style property, and set the color property of the style object to the keyword red)

Of course, that's not what we do, instead we do this

p {color: red}

Too easy! Not real programming!

Sorry for the sarcasm, it just gets boring after a while to hear this sort of argument.

CSS is an example of a different, and in many circumstances better paradigm of computing, declarative programming (declarative programming comes in different flavours, including functional programming.) Declarative programming specifies what the computer should do, not (as we saw with imperative programming) how it should be done. In this example, what should be done? Turn all paragraphs red. I really don't care how it happens, just make it so (Jean-Luc Picard would (will) be a declarative programmer).

HTML, and CSS are harbingers of widespread declarative programming. Doing away as they do with many of the aspects we associate with traditional ("real") programming, they look too easy. Judging by how poorly they are often used (and how few people use much of the power of CSS selectors), they might be easy to use, but as challenging to master as more traditional programming languages.

So, when I hear people say HTML and CSS (and even JavaScript) aren't real programming, I think of Mainframe computers, and the Walkman, and The Encyclopedia Brittanica. All better. All gone.

A priori knowledge or justification is independent of experience (for example "All bachelors are unmarried"). Galen Strawson has stated that an a priori argument is one in which "you can see that it is true just lying on your couch. You don't have to get up off your couch and go outside and examine the way things are in the physical world. You don't have to do any science.

[1] Wikipedia

[2] And JavaScript, which in fact ranks 9th, up one whole place since 2008 and below among other languages Python, PHP (see, the back end is real programming afterall), Objective-C and Visual Basic.

We make events for the web professionals shaping Australia's digital future

Learn more about us

Web Directions South is the must-attend event of the year for anyone serious about web development

Phil Whitehouse General Manager, DT Sydney

Join us in 2018:

  • Web Directions Summit 2018

    Our legendary event. Two big tracks, one Product/Design, one Developer focused.

    Sydney November 2018

    Details
  • Web Directions ai 2018

    The intersection of Technology, Business & Design with Ai

    Sydney October 2018

    Details
  • Web Directions Culture 2018

    Creating better teams and workplace cultures

    Sydney October 2018

    Details
  • more web directions events

    See our complete line up of awesome events

       

    Details