This guy knows what's up.

This guy knows what's up.

Well at least we don't have to worry about IRL Skynet any time soon

They need to update those numbers.

I'm a Java lover, but here are the main reasons to make fun of it.

It's run by Oracle. Oracle is literally The Worst. They run PeopleSoft, for example. They've also been poor stewards of the language they bought out, for example...

... the Java community took a big hit when, a number of years ago, Java was declared to be so insecure that the US government officially recommended that consumers just uninstall Java from their machines.

It's verbose. Sometimes I like that in Java; a Java program feels easy to read because everything is so explicit, but I do understand why people dislike that. Scala, for example, is built on top of Java. Scala was able to keep all of the features of Java and add a ton of features, but still a Scala version of a program will have a ton fewer lines of code. Java is just a lot.

People say Java is slow. I take some issue with this. Java is slower than Rust or C, but those are really fast languages. Java is slow to start, but I think to call it just slow is a dated criticism.

Java is a language used for a lot of cruddy software. It's used in enterprise, whereas software companies tend to use newer, sexier languages. This doesn't mean Java is a bad language, but it is associated with some bad stuff.

Overall, Java is a very popular language in the workplace. People tire of Java because it's what they use 9-5, so they grow to dislike it because they associate it with work.

"John run!"

"No mom, i won't leave... Oh"

"Let's go while he's collecting garbage"

Well, to be fair it’s still above 3 billion, just a lot above it.

Is that particularly unlikely?

I’m a programming n00b, can someone explain what’s wrong with Java ?

People love to hate Java, because it's verbose, boring, and used everywhere.

I think the when people think Java is bad they actually are thinking about the Java plugin in browsers. It's really bad and full of security holes, just like Flash Plugin.

Found a single source that said 15 billion devices run java, but that would imply there are twice as many java machines as there are people...

Not really. I think they didn't realize that servers sometimes run Java (bleck). Also, many people have multiple devices in the household with Java, including their Android phones, Blu-Ray players, and even some TVs.

3 Billion Devices Run Java

That's the only time I've seen a warning message being displayed with pride.

So that's how Wall-E was so good at his job. He was running Java.

Some say he's still collecting garbage to this day.

Embedded computers. Pop machines, industrial machinery, digital levels, programable thermostats, etc.

The JVM however is a stellar piece of technology

"Minecraft is slow. Minecraft uses Java. Therefore Java is slow."

Java used to (still does) power loads of non-smart stuff though

Didn't Notch state that minecraft is slow because he was a shit programmer when he wrote it?

I don't know if he's said that, but it's certainly true. There's a mod called Optifine developed without access to the source that improves FPS by 200% on most machines while improving the graphics.

But rather than speeding up the existing codebase (which is clearly trivial to do), M$ decided to let the Java version fester and make XBox and Windows exclusive versions...

It makes it really easy to write cross platform code, as only the VM has to be made platform specific and everything only needs to be compiled for a single set of instructions. But I totally agree that it's probably the most boring and enterprisey language. If programming languages wore clothes, java would wear a grey suit.

Image Transcription: Reddit

What is the most disturbing fact you know?, 1058 points, submitted by /u/OldManoftheNorth to /r/AskReddit

/u/phobug, 288 points

3 billion+ devices run java.

I'm a human volunteer content transcriber for Reddit! If  you'd like more information on what we do and why...

Did you know that all credit cards with chips run java? When you insert the card, the card's internal circuit is powered, and a java application starts. Similarly, wireless cards work the same way, except in the way they are powered, by magnetic induction.

Good human

always thought java is not well suited for embedded systems, like no real time, resources and running a vm.

the micro controllers I've seen so far were always programmed in C or assembler

and wouldn't it be still "smart stuff" even thought it's not consumer electronics

Many JVM implementations include profile driven Just-In-Time (JIT) translation of JVM "Java Bytecodes" (instructions for an "idealised" Java CPU defined in the JVM spec) into native instructions. With all this going on, and garbage collection to boot, the JVM manages to perform within a factor of 2 of the performance of C code for most tasks.

Java itself is a relatively simple language compared to C++ (a highly performant OO language), with extensive libraries, far less cognitive load to do most tasks, easy portability and good enough performance for most things. Java is faster than JavaScript (mostly, although some JavaScript runtimes do really well), it's a lot faster than Python, and blazing in comparison to the likes of Ruby. There's a lot to like.

Where Java falls down is, these days, is verbosity, with C# showing the way (in terms of more succinct language features), and various JVM languages such as Scala, Clojure and whatnot (not a real language yet) demonstrating that you can use the JVM as a performant compilation target while having a more succinct syntax.

Many smartcards run Java. There may be a computer running Java in your creditcard, id-card, drivers license, passport, etc.

Hearing there was 15 billion Android devices alone wouldn't surprise me that much

Suuurely it will run on Flash's Actionscript 3 tho

Now what the hell is wrong with grey suits?? Nothing... They are goddamn sharp!

Could you elaborate further on this please? What makes the JVM amazing?

Nah he would have just spun around in circles all day every day if that was the case.

Times are tough in the progammer meme economy.

PeopleSoft

That's the most "designed by committee" name that I have ever seen.

https://www.youtube.com/watch?v=31D94QOo2gY

Java runs on SIM cards. It is very cut back, but if you have a phone with a sim card, it can store/run java on the actual card. It's a legacy thing from old phones. This was a really cool video about it:

People like disliking java, even though it’s alright

Some of the disdain for java simply comes from a scientific phenomenon known as circlejerking, but the aversion toward java is not unwarranted. Java is very vulnerable and slow compared to lower level languages, and it's not as enjoyable to program in compared to higher level languages such as python. Lots of the coders in this community work with Java, developing a distaste for it as their experience with it increases.

Browser plugins is a dying world though, dead already except for safari and IE.

Having said that, downloading a .jnlp that opens up a program is terribly confusing user experience for most users. Also the fact java doesn’t run by default from untrusted sources (consequence of the security backslash mentioned above) kills user experience. (Source: I distribute java webstart software).

Kind of sucks that Optifine is closed source. It leads to a lot of other mods' graphics being wonky, and the creators of those mods can't do anything about it.

nothing... it's just popular to hate it for no real reason (atleast in this sub).

The main magic is that the JVM sits between the Java code and the machine you're running on, and makes the Java code work on that machine! It means you can (to use Sun's old tagline) "write once, run anywhere", and generally don't have to worry whether your Java code will compile and run on any number of machines.

Depends on how bare bones it need to be. There is at least one tool that let you compile Java to bytecode that execute directly off an ARM processor and I think there are various single chip hardware implementations of the Java VM (not so virtual I guess) that let you run Java directly on low cost hardware for embedded devices (obviously can't use a lot of the fancy graphical libraries).

Well if you count the embedded version, which if I'm not mistaken also runs on those small chips in modern credit cards, I wouldn't be surprised.

Java is notorious for poor memory management and subsequently absurdly impacting garbage collection, which often result in a “stop the world” pause and fucks things up.

If you're stuck in like, 2005, sure. Garbage collection in most JVMs has been far, far better than that for a long time.

The language is also incredibly verbose, hence all the “enterprise hello world in Java” jokes.

This part I kind of agree with, though recent additions like lambda expressions and (though it's more library than language) streams may be starting to address the problem.

Did you also know that when you swipe your credit/debit card all of this happens:

That merchant's bank creates a transaction and contacts VISA/MasterCard etc => VISA goes onto the 'payment network' (all banking institutions are connected to this network) => your bank goes into its most likely encrypted mainframe system for debit and credit card info and reads your account, then tells VISA yes or no <= and then it reverses this process back to the store

This all happens in about 3 seconds.

(I work as credit card dev)

I found a new appreciation for debit/credit cards for example how complex something like redeeming a reward from points can be.

Java is notorious for poor memory management and subsequently absurdly impacting garbage collection, which often result in a “stop the world” pause and fucks things up.

The language is also incredibly verbose, hence all the “enterprise hello world in Java” jokes.

It’s not a bad language by any means, but to say that there’s no real reason to find fault with it is just ignorant.

Ahh yes, in contactless cards the java application is powered by magnetic induction of course. "Write once, run anywhere" - even credit cards run the JVM nowadays

what do you mean?

“He’ll have to reboot to install a critical security update any minute now”

> language is actually used in the actual, real world

> it's a boring and """""enterprisey""""" language

o-ok

Bragging rights.

Your credit card is one of them.

servers sometimes run Java (bleck)

Apache Tomcat meows in distance

New to programming in general, why does everyone despise java with a raging hate boner on this sub?

Unless you're attending a funeral or you work for MiB, you should avoid black suits. Go for a dark navy or a charcoal instead

Java boasts amazing server side capabilities and developer tools among other things.

knock, knock who's there? .....................................java

Write once, debug everywhere

selenium crashes quietly in the background

Frankly, I don't think you have the experience or knowledge to answer that question.

When people say "Java is vulnerable", they're usually talking about Java plugins on websites, which are now deprecated. They have been for some years. So while there's some truth to it, it's not really something that anyone is concerned with. At all. Ever.

About Java being slow... That's not very true. There is some truth to it, but it's not really a legitimate reason to diss Java. Any garbage collected language will get slow with significant enough memory allocation and deallocation.

These reasons are as much a "circlejerk" as the rest of the comments here.

I suppose you could say "look at the performance, it's terrible!" but if you haven't looked at the conclusions, then you're just wasting your own time:

It may seem paradoxical to use an interpreted language in a high-throughput environment, but we have found that the CPU time is rarely the limiting factor; the expressibility of the language means that most programs are small and spend most of their time in I/O and native run-time code.

Now for the real reasons programmers don't like Java.

Dependency management is hell. Maven/Gradle/whatever you use, it's generally not fun. Don't get me wrong, in C/C++ it's pretty bad too, but man, something like Cargo would be amazing for Java.

Verbosity. Writing the type of an object twice is annoying. Writing getters and setters is kind of annoying and fills your screen with clutter. And yes, names in Java can get really verbose. But that's an issue with programmers, not the language (See .NET).

Source: I've been programming in Java for 5+ years.

NOT USING PYTHON3

TRIGGERED

It has a shit ton of functionality and combined with IntelliJ makes it really easy to write seamless code.

I think they didn't realize that servers sometimes run Java (bleck).

Java is great server-side.

Unlike java, many as3 developers actually moved on to better things like haxe.

Java used to be clunky and slow due to he jvm. It improved a lot in the past decade, though.

That's Reddit Sync

Exactly what I was thinking. Plus tablets. A lot of things run some form of android, therefor a lot of things run some kind of java. There were talks (maybe just rumors?) of rewriting android in golang instead of java, but nothing has come of that yet.

Either they're waiting for gui bindings to exist for go so they don't need to write the whole thing in cgo, they actually care about the time people have invested into learning java and android apis, or they don't want to break every app that currently exists on the market.

But the point of that tangent is... I bet that number would fall considerably if android ever changes.

And it's designed to work on (almost) any system without having to rewrite it for each system. JAVA dgaf if its linux, windows, mac, toaster, or whatever system as long as it has the right JRE on it.

Why do they benefit from it being closed source? Isn't it free anyway?

There is nothing wrong with Java, it's just not the newest cool kid on the block. We will still use Java 20 years from now, and you can't go wrong by learning it.

Java Card

https://en.wikipedia.org/wiki/Java_Card

It's coarse and rough and irritating and it gets everywhere

"Here at PeopleSoft we are a group of people who deal with other people's people. Also we have some software we use to complete these tasks. PeopleSoft, it just makes sense in a way."

Java Card

Java Card refers to a software technology that allows Java-based applications (applets) to be run securely on smart cards and similar small memory footprint devices. Java Card is the tiniest of Java platforms targeted for embedded devices. Java Card gives the user the ability to program the devices and make them application specific. It is widely used in SIM cards (used in GSM mobile phones) and ATM cards.

[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source | Donate ] Downvote to remove | v0.28

Python's used scientifically because it's succinct and high level. It gets decent speed from native implementations in its libraries. The interpreter is slow, but it's calling fast native functions.

IntelliJ is the reason to use Java over other languages. It's miles ahead of even Visual Studio for C# - even with ReSharper, which is always touted as the gold standard of IDEs .

A large portion (but not all) of the people I've come across that like to chant the "Java sucks" mantra do so because they've seen/heard/read so many others do the same; they haven't truly formed the opinion on their own via some actual experience.

Years ago Java made weekly headlines on tech news sites and even general mainstream news for numerous critical vulnerabilities. While this was true technically, the headlines were overly blanketing the entire Java language as the root cause of the security issues, and very few of the articles clarified that almost all of these were directly and only linked to the Java Browser plugin which effectively opened your entire system up to being exploited via Java loaded from the web.

Others still cling to the "Java is slow" mantra. Modern implementations of the JVM and Java Compiler have squeezed efficiency into the language to a point where this is no longer a point with arguing for most of the use-cases in which Java will perform extremely fast with well-written (not hyper-optimized) code. Of course if you're a software engineer and you're designing a system that requires every last bit of speed and efficiency, you're probably not going to choose Java when considering the requirements engineering, but rather something like C/C++ and then doubling the length of time to build such a state due to needs of hyper-optimizing every last piece of code.

The final aspect where I will say Java has some issues is Memory - it tends to be a memory hog. There are ways to improve this situation but it requires fine tuning the JVM and the underlying code tediously. A lot of devs would make the argument that the added time to do all of this extra tuning negates the idea that Java is "faster to develop" which is a valid point worth arguing.

At the end of the day as a software engineer you have to choose the right tool for the job. Anyone who wants to start throwing tools out of their toolbox before even knowing what the requirements will be are doing everything wrong. I wouldn't use Java for a high-speed trading platform. I wouldn't use C to build a simple web-blog backend. I wouldn't use NodeJS to handle the data modeling algorithms for large, high intensity number crunching. I wouldn't use PHP for anything (j/k ... I have to say PHP7 has breathed new life into a crumbling old language).

For me it’s not the verbosity alone I dislike. With a proper IDE, much of that verbosity writes itself (although that fact is another can of worms). My issue is that even with all the extra verbosity, which adds all this time spent munging data from one instance of one class so that you can jam it into some other class, it still seems like all that verbosity prevents very few bugs relative to the work put in. You still end up, in practice, with many of the same types of runtime errors that you run into with much less verbose dynamic languages. So I feel like it’s much pain, little gain. The verbosity does help with refactoring though.

If it had stricter typing or relied less on mutable state by default, I think it wouldn’t be any more annoying to write but would fend off entire classes of errors that plague its software today.

Dependency hell in JVM languages is also a special kind of torture.

On the plus side, the library ecosystem of JVM languages is great. I write a lot of clojure and it’s nice to be able to hook into so much enterprise software and not feel worried about it being some unsupported third-party hackjob (npm packages).

I think this sums up most of the major complaints, but I would add:

Much of the ecosystem, including much of the core libraries, appear to have been written before people really figured out how to do OOP. They suffer from blindly applying patterns regardless of how appropriate they are to the situation. Virtually everything that is part of Java EE is absolutely horrendous. Related to verbosity, but the language lags very far behind its competitors in features, which makes it feel archaic in comparison. Also, many of the features it does implement (like the stream api) are vastly inferior to what other languages have had for years (or even decades). This is particularly noteworthy when it comes to writing concurrent code. The language contains numerous design flaws, which more recent languages have learned from, such as implicit virtual and override, type erasure, and checked exceptions.

There are tradeoffs... typechecking makes Java easier to understand poorly/undocumented code:

fun convert(input): # wtf is "input"? An object? A string? An int? ... # what should I expect "output" to be? return output

Compared to java:

public String convert(String input){ ... return output; }

This isn't a java thing, I just think it's not fair to compare languages like that. Java and Python both have their uses.

What Reddit client are you using?

It's like the third time someone posts this here in the same week.

That undersells that value of the JVM. A typical scripting language can do the same thing but the JVM is significantly more complex than that.

Also oversells how successful the JVM is at doing that lol.

Java is slow actually dates back before the JIT compiler. Before that arrived Java was actually very slow. When JIT arrived, it allowed the recompile the code for speed while the application was running.

Between that and applets, the meme of Java being slow lived on long after it was no longer the case.

Good bot

I am new to programming and just started learning java and I can't get the joke here. Could someone explain?

Eh, it's not really a competitor. It will likely never reach a tenth of Java's usage.

starts using cash instead of credit card

Well, if I had any. But once I get some I will

Too be fair to Notch, he didn't expect Minecraft to become as big as it is today when he made it. It was basically a quick and dirty tech demo to say 'look what I made' and it blew up. I'm pretty sure most of Minecraft has been rebuilt from scratch recently to made up for Notch's hacky code.

And they kill because they hate themselves

I hate sand too.

Colleges often teach Java, and up until recently, it was your only native option for programming on Android.

Also, due to factors beyond my knowledge, there's a significant Java population in India & SE Asia.

Same goes for SIM cards in phones.

And most people buy a new phone every other year or so.. It's not like we're only ever going to produce 1 Android phone for 1 person. I don't know why that figure is surprising.

We all know the future death robots will run on PHP.

I think that is half the problem. People learn Java at uni then think everything ever should be solved by Java. Results in Java being used for a ton of things it shouldn't be. Embedded devices with a ported JVM to run a Java interface, rather than just use bloody C. Games written in Java, with all the drawbacks of GC.

So many libraries for activities.

Eh, I prefer black suits personally. I agree with you though.

Those are rookie numbers

Woah, I never realized SIM cards have a processor in them. That's a really neat video, thank you for posting that.

Meh bot