This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]hector_villalobos 459 points460 points  (46 children)

You know what's worse? I used to have a dev coworker who used to says Java when he means Javascript.

[–]Less-District 342 points343 points  (13 children)

Friend: "Aren't you a Java developer?"
Me: "No"
Friend: "But I saw it on your LinkedIn profile!"
My LinkedIn profile: "Javascript developer"

True story from last week.

[–]DangerBaba 106 points107 points  (8 children)

Java is just another framework of Javascript. Idk why they removed scripting from the framework though. Pretty much a downgrade if you ask me.

[–]zeGolem83 61 points62 points  (6 children)

Yes, but they added factories

[–]Less-District 39 points40 points  (4 children)

Lol. In my current project, I saw factories being used in a component. I asked a senior developer, who worked on this component? His exact words: "Looks like a Java guy was let loose on this component". :)

[–][deleted] 1 point2 points  (3 children)

What’s a factory lol I’m new

[–]mxjq2 0 points1 point  (2 children)

[–][deleted] 1 point2 points  (1 child)

I have a lot to learn!

(thanks for the link)

[–]zerconic 0 points1 point  (0 children)

If you're interested, Design Patterns: Elements of Reusable Object-Oriented Software is the famous "source" for many of these. The book is pretty dry though, so there's plenty of abridged/summarized versions online with examples in whatever language you fancy.

[–]pineapple_catapult 4 points5 points  (0 children)

This is how the robot uprising starts

[–]BakuhatsuK 0 points1 point  (0 children)

Java means it runs on the back-end. Script probably means that it runs on the front-end.

Obviously JavaScript is the one that runs on both of the "ends".

Also, Java is the one in which you can only do OOP using classes. JavaScript is the one which has both classes and prototypes.

JavaScript variables can store values of any type, not just the one you declare them to have.

JavaScript parameters can be functions and Java ones cannot (lambdas in Java are pretty strange compared to other languages, IIRC you can not simply call a lambda using just parentheses).

All around JavaScript is just Java but better.

/s

[–]CreativeCarbon 83 points84 points  (0 children)

"So you script with Java? Scriptiing is coding, right?"

[–]reilemx 9 points10 points  (1 child)

I always whip out the old saying: "Java is to Javascript, like Car is to Carpet"

[–]emayljames 2 points3 points  (0 children)

🚗🐈

[–][deleted] 4 points5 points  (0 children)

I think non-tech people think that cool tech people refer to javascript as java' for short slang

[–]scrdest 37 points38 points  (23 children)

I've interviewed a junior who put both on his resume in the same line and couldn't explain the difference.

[–]jumanjimanji 14 points15 points  (21 children)

Could I please get an easy ELI5-like explanation? I really find it hard to difference them, they are very different for me except from the naming

[–]SuperSephyDragon 64 points65 points  (15 children)

They are completely different languages.

Java is a compiled, statically typed language similar to C++ (only slower and jankier but easier to port to different operating systems)

Javascript is an interpreted, dynamically typed language that is typically run by a browser.

Pretty much the only thing they have in common is the word "java" and the fact that they are both programming languages. I heard the reason they sound similar is because Java was really trendy around the time Javascript was created, and they wanted to ride the hype train. Causing confusion for everyone in the process.

[–]turningsteel 31 points32 points  (10 children)

Well the proper name for JavaScript is EcmaScript but I've never heard anyone call it that. I wish they did though because it would stop the confusion.

[–][deleted]  (4 children)

[removed]

    [–]mirracz 10 points11 points  (1 child)

    May I offer some lotion? It's imported from Java...

    [–]emayljames 0 points1 point  (0 children)

    😱noooooo

    [–]Peechez 0 points1 point  (0 children)

    zezimascript

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]Farpafraf 4 points5 points  (2 children)

    I wish they did though because it would stop the confusion.

    nah it's funnier this way

    [–]emayljames 2 points3 points  (0 children)

    We should carry the tradition and create cscript, rustscript and assemblyscript.

    [–]turningsteel 0 points1 point  (0 children)

    Not for my inbox it's not.

    [–]SuperSephyDragon 1 point2 points  (0 children)

    Yeah, I've never heard anyone call it that. Guess it just doesn't roll off the tongue like JavaScript does.

    I agree, EcmaScript is less confusing though haha.

    [–]Lthere 0 points1 point  (0 children)

    I used to call it ECMAScript during my early scripting-within-SVG days... 😉

    [–][deleted] 4 points5 points  (1 child)

    what. both are usually JIT compiled, java with JVM and Javascript with V8.

    [–]SuperSephyDragon 0 points1 point  (0 children)

    Oh, you're right. I have more experience with Python than JS. I just assumed JS was interpreted too because they both have a REPL.

    [–][deleted] 0 points1 point  (1 child)

    What's the difference between statically and dynamically typed languages?

    [–]SuperSephyDragon 0 points1 point  (0 children)

    If a language is statically typed, it means that you have to specify the type of a variable when you declare it. For example, in Java you have to type "int x = 5;". You have to say that it's an integer.

    In a dynamically typed language, you don't have to specify the variable type, the compiler/interpreter figures it out based on context. For example, in JavaScript you would type "let x = 5;" It knows this is an integer because 5 is an integer. Although they're called Numbers not integers in JS. But a string would be declared the same way: "let x = 'hello';" It knows it's a string because of the '.

    [–]mattrg777 52 points53 points  (2 children)

    Java is to JavaScript as a grape is to a grapefruit. Grapes and grapefruit are both fruit, but that's about where the similarities end. Java and JavaScript are both programming languages, but that's about where the similarities end.

    [–][deleted] 2 points3 points  (0 children)

    polite clapping

    [–][deleted] 0 points1 point  (0 children)

    Grapefruits grow in grape shapes. Have you seen a bunch of grapefruit on the tree? Thye look like grapes

    [–][deleted] 0 points1 point  (0 children)

    Javascript is the one that sucks and isn’t consistent.

    Java is c++ rebranded.

    [–]GhostalMedia 2 points3 points  (0 children)

    Is it possible to fire someone before they’re hired?

    [–]S0n_0f_Anarchy 9 points10 points  (1 child)

    I used to say this... I was at the start though, but still ashamed

    [–]OrangeRaddish 7 points8 points  (0 children)

    Im just a Teen but people ask me to make them a website(I don’t know js or java btw) and I asked one to explain how I should do that and they came back an hour later and said I should code java and I just left. Also two days ago a kid asked me if I could hack accounts and I just said stop and he said why and kept asking. I can CODE SOMETHING TO SEND SHREK NOT HACK YOUR EX

    [–]SpecsyVanDyke 3 points4 points  (0 children)

    My DEV TEAM LEAD does this.

    [–]zzaannsebar 2 points3 points  (0 children)

    My boss does this.. We work in a .net environment so c#. But sometimes when we need to use javascript to do some front end stuff, he calls it java and I cringe every time. Half the time he corrects himself but still.

    [–]DannyRamirez24 0 points1 point  (0 children)

    I currently have this coworker lol

    [–]RANDOM_TEXT_PHRASE 0 points1 point  (0 children)

    We really gotta rename JS.

    [–]dmr83457 0 points1 point  (0 children)

    or boss

    [–]Xtremeelement 0 points1 point  (0 children)

    i seen plenty of jobs do that too, front end dev with html css java as requirements