Java vs. JavaScript

Posted on September 30th, 2009 by Arthur Kay

If you spend enough time on the web development message boards you’re bound to run into someone who posts a question in the wrong forum. In many cases, the mistake is a simple misunderstanding – like posting a CSS question in an HTML forum as the two languages are tightly related. No harm, no foul.

Java does not equal JavaScript!That being said, I don’t understand how many people mistake Java with JavaScript. Obviously, the two languages share the first four letters of their name. . . but the similarities basically end there.

Java is requires its code to be compiled in order to executed. JavaScript is a browser-based programming language* which executes the code at run-time (i.e. the code is not compiled before execution).

* JavaScript can also be used as a server-side language for web applications, but this implementation is also executed at run-time.

I’ll forgo the more technical differences between Java and JavaScript because they’re subsequent to my overall point: Why do developers confuse the languages?

The issue here is that the “developer” doesn’t even know what language they’re writing! I understand that many of the people who make this mistake are “newbies” (e.g. students), and I can sympathize with their learning curve. . .  BUT this sort of mistake would be like asking a car mechanic how to fix your furnace. (Sure the guy is handy – but he doesn’t get paid to fix furnaces. He might break your furnace. He will also give you a funny look.)

What is more interesting is that C++ and C# forums rarely have this problem even though the two languages are much more similar than Java/JavaScript. I have no way to logically explain this fact – but I’d love to hear people’s opinions.

Long story short, Java is not JavaScript. They’re not related, they don’t hold hands and they’re not friends. Stop confusing them!

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • del.icio.us
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Yahoo! Buzz

2 Responses to “Java vs. JavaScript”

  1. Ryan says:

    Does this mean that Java and Javascript would not make the next version of our Separated at birth series??
    The series: http://twoandahater.blogspot.com/search/label/Separated%20at%20Birth

    By the way, I have only ever used 1 program that compiles code before running it and it was a freaking pain in the ass (probably because I had to learn a whole new language). My bitch-Why do all stat programs not share a common language? and worse I need all the programs because they each have strengths in different areas. Also I have to often use multiple programs to solve 1 problem.

    The question- do you programmers run into this problem a lot?

  2. Arthur Kay says:

    Yea, I don’t think the two would make your series on “Separated at Birth”. They’re more like evil twins, or maybe more like doppelgangers and matter/antimatter – they’ll destroy each when they meet. (Joking, of course.)

    Programming languages which need to be compiled are tremendously useful and are the basis of pretty much all software created in my lifetime (minus the recent trend toward Rich Internet Applications). In general they’re faster and contain fewer run-time errors, though I suppose they’re also more difficult to pick up for new programmers.

    As for stat programming… I don’t have much of an explanation as to why your field can’t settle on one language. I’m sure it has something to do with the varied backgrounds of the researchers involved, and I’d bet this scenario is true of most fields. Software developers don’t settle on a single language, so why should anyone else? It makes for great mental exercise!

Leave a Reply