

Java Vs. JavaScript - rkwz
http://ask.metafilter.com/195482/Lets-assume-that-I-am-the-stupidest-person-that-ever-lived-Explain-to-me-what-JavaScript-is-what-it-does-and-how-a-moron-would-go-about-learning-it#2813956

======
ChuckMcM
Actually, it wasn't 10 days. As I recall (and I was at Sun at the time in the
'liveoak' group which was to become the Java group) Netscape already had been
thinking along these lines and something they called 'netscript' which was
their view of how to increase the interactivity of web pages. The original
suggestion was to flush it and go with Java to fill this niche, but it was
pointed out that having a 'light weight' interpreter already in the browser
was useful when all you needed was a "little" interactivity (like a pop up
over a form field to tell you what it wanted). No doubt somewhere I've got a
1/4" (QIC) tape with my old Sun email which would let me tell you definitively
but that is my recollection. There was concern that people would not know
which to use 'netscript' or 'java' and so somebody (and I don't recall who)
suggested it be called 'javascript' so that it would be clear it was a lighter
weight way of adding interactivity than 'Java'. (most folks at the time
thought of 'scripting' languages as light weight languages). The thought being
"If its small and trivial just do it in javascript, if its bigger and more
sophisticated step up to the power of Java." At the time I don't think anyone
anticipated how much could be put into Javascript, nor how tight fisted Sun
would become around Java.

~~~
joshu
IIRC it was called Livescript.

~~~
ChuckMcM
I believe you are correct.

------
tychobrahe
I love the whole tone of the article and how Brendan Eich is painted as the
hero. Because he is. He managed to make a language that, despite its
simplicity, is still in its peak after 16 years of heavy mainstream usage.

I discovered functional programming because of JavaScript (via Joel Spolsky,
in 2006!!) and I must say something: Thank you Brendan.

------
scottyallen
Java is to Javascript as car is to carpet.

~~~
wbienek
Car is to CARriage..:)

~~~
bronson
So Java is a more modern form of JavaScript? Don't think that comparison is
sound...

------
jessevondoom
Summary: "kind of, but not really." Only in the comments is the name
LiveScript mentioned. I remember actually playing with JS as LS in the
Netscape 2.0 days.

So the gist is kind of there, but if you want actual history I'd suggest
:<http://en.wikipedia.org/wiki/JavaScript#History>

------
retube
That's a nice little bit of history there. Not sure how much apocryphal and
how much true though.

As I understood it one of the reasons js really took off was Microsoft's
addition of XHR requests. Is that right?

~~~
mibbit
XHR was introduced many years after js was extremely popular. Also XHR doesn't
add anything technically. The same thing can be achieved with dynamically
adding <script> tags, or using an iframe, or a number of other methods.

The introduction of the buzzword 'ajax' certainly popularized what people had
already been doing for years though.

~~~
DougWebb
The pre-XHR methods were super-clunky though. The technical contribution of
XHR was to provide a standard and clean way of programatically sending HTTP
requests in the background without refreshing the page. Without XHR or
something like it, I don't think browser-side applications would have taken
off the way they have.

It's a shame the Microsoft engineers hadn't thought of making websockets
instead. Bi-directional communication would have been useful for the web-based
version of Outlook they were supporting, and it would have become available to
the rest of us much earlier.

------
aasarava
"Describe the difference between Java and Javascript" is actually one of the
first technical questions I ask when hiring developers (or otherwise
evaluating the skills of anyone in a technical, Web-related position.)

When I first tried it, years ago, I was a little embarrassed for having asked,
because I figured everyone would know the correct answer. Then several
candidates totally blew the response, and I realized just how good of a filter
the question really is -- and continues to be.

~~~
gmac
What do you expect as an answer here? Just a basic grasp of what they're for,
or a deep computer-sciencey appraisal of the sorts of languages they are? (If
the former, you'd really hope those people wouldn't be making it to
interview...)

~~~
aasarava
I should clarify that I ask this during an initial phone screening. (Having HR
personnel ask the question never seems to work because they don't know how to
evaluate the response, which can vary and still be correct.)

What I'm looking for is mention of the fact that Java is fully object-oriented
and, these days, primarily used on the server side. (Though some mention of
the history of -- and problems with -- applets is good too.) For JavaScript,
some mention of AJAX, jQuery, Node.js, etc., are all helpful.

Essentially I want to know if the person truly understands the pros and cons
of each and when to use each, as opposed to just having a shallow
understanding that "they're different languages". I'm still shocked at how
many Web developers can't offer more than the the latter.

------
sambeau
What, no mention of "HotJava"? (just to sully the waters)

------
divvlr
Love javascript. My friends brother works with Brendan at firefox. The fact
about him being a genius is true.

------
dillon
Your tone is absolutely brilliant!!

