2012-07-23

Explaining to non-programmers what JavaScript is

When I tell non-programmers that what I do professionally involves JavaScript, I most commonly get the reaction: “Isn’t that that thing that you have to install and that makes the browser slow?”. This answer surprises me in two ways:
  1. Many more people are aware of Java than of JavaScript, often because they were asked to install Java at some point in time.
  2. That’s not necessarily a good thing for Java, because it is frequently associated with negative things. JavaScript has become such an implicit part of the web that people aren’t even aware that it exists.

What is JavaScript?

So how to best explain what JavaScript is to non-programmers? Some technically interested non-programmers have heard of HTML5, for example, because they have seen the icon [1] somewhere. Then JavaScript can be explained as the programming language behind HTML5. The follow-up questions are usually: “But what is HTML5? Isn’t it a replacement for Flash?” The latter question is not a bad place to start with an answer, because it is a replacement in some ways, but not in others. Without HTML5, one can explain JavaScript via web applications:
Traditionally, we only had applications on our computers, now we can also run them “on the web”, inside our web browsers. Web applications that you have probably used are Google Maps and Facebook. Those are real applications, not merely websites, and they are written in JavaScript. Furthermore, Java and JavaScript are completely different languages. At one point, Java was supposed to be the core technology of web applications, with JavaScript in a supporting role. But that has completely changed: Java has now practically disappeared from browsers and JavaScript is the language of the web.
After those explanations, feel free to mention the Cloud, because many people have heard that word. Alas, the Cloud means many different things. The explanation I normally use is: online data storage plus synchronization [2].

A more tongue-in-cheek explanation (borrowing from @starian):

Question: So, Java and JavaScript are different?
Answer: Yes, just like ham and hamster.

Consequences?

It might be a good thing that JavaScript is so little known: The days of worrying about people switching off JavaScript seem to be over. On the other hand, JavaScript deserves to be better known, especially among programmers and as a general-purpose language. Is HTML5 and its logo the right vehicle for making that happen? Or should we use the JS logo [3] more? Then again, it is probably just a matter of time until JavaScript takes really off among programmers (arguably, it already has [4]). Better IDEs and ECMAScript.next [5] are coming and should make its advantages even more obvious. Until then, being the avant-garde and not telling anyone could be a strategic advantage (I’m only half joking).

References

  1. Branding web technologies and the new HTML5 logo
  2. The cloud and how it changes mobile computing
  3. logo.js – JavaScript has a (semi-)official logo
  4. The increasing pervasiveness of JavaScript – a few historic milestones
  5. ECMAScript: ES.next versus ES 6 versus ES Harmony

1 comment:

Axel Rauschmayer said...

I know basic html but i am not a programmer so don't have any idea about java script and all, thanks for writing this post so simple and easy to understand.
Html5 programming