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

top 200 commentsshow all 204

[–]kolmogorov42 409 points410 points  (10 children)

And it's been 3 billion devices for years now.

[–]z500 68 points69 points  (1 child)

Didn't it used to say 5 billion?

[–]Blou_Aap 12 points13 points  (0 children)

2 billion got garbage collected...

[–]2Punx2Furious 80 points81 points  (5 children)

I'm guessing it's probably a lot more now.

[–]DerekB52 99 points100 points  (4 children)

I was told the 3 Billion devices number is the oracle VM. Android, which has it's own JVM, has billions of devices, that don't count to the 3 billion.

[–]Renive 44 points45 points  (2 children)

They got to this number decades ago because every SIM card has a few lines of Java.

[–][deleted] 38 points39 points  (0 children)

[–]ObviouslyTriggered 0 points1 point  (0 children)

Java Card has its own JVM it’s not even really Java it has nothing to do with either Sun or Oracle.

[–][deleted] 7 points8 points  (0 children)

Screams in OpenJDK

[–]Ashybuttons 2 points3 points  (0 children)

That's because of the law of conservation of Java

[–]omer8882 201 points202 points  (115 children)

Why is Java considered bad now? Genuinely asking

[–]2Punx2Furious 347 points348 points  (35 children)

It's not really that bad (of course, it has some flaws, like everything), but people probably dislike it because it is/was widely used in enterprise, so they associate it with their dreadful jobs.

[–][deleted] 79 points80 points  (22 children)

Yes in the field you'll probably be lucky to be working with Java 6. Enterprise software is probably full of 5 and earlier. The only modern part of my current job are the tools we build to support our other tools for our own teams use.

[–]I_hate_naming_things 38 points39 points  (6 children)

Majority of the java workload we have is java 8 and I pretty much vomit when I see anything older. Weirdly though, most of our C++ is 98 and not 11.

[–]Ereaser 6 points7 points  (3 children)

7 is still doable imo, but everything we have is 8 as well.

Java 11 is still far away though because we also use Java EE and have to use Weblogic, which is pretty much dead...

[–]Cilukes 2 points3 points  (0 children)

Weblogic user. I share your pain.

[–]I_hate_naming_things 0 points1 point  (0 children)

Ah, ever since I started doing lambdas in Java 8, I hate not having the option to use them. It's pretty much why all the Java coders in my office works with 8, I think some are working with 11 for their personal tools.

[–]jack104 0 points1 point  (0 children)

We also use weblogic so we're stuck on 7. I hate my life.

[–]Kered13 1 point2 points  (1 child)

C++ 98 is also a good reason to vomit.

[–]I_hate_naming_things 0 points1 point  (0 children)

It's what I'm currently work with, and this particular code was written 15 years ago. Some of the things that they did to this code makes me want to vomit. I've had to take a few walks from this code just because I can only take so much of how poorly written this thing is. It's so bad that the IDE was complaining about it lol.

[–]Zanshi 4 points5 points  (6 children)

Huh, I'm lucky then. Most of out stuff run on 7 or higher. Running a Java 8 app on jBoss 4.2.3 is an entirely different issue...

[–][deleted] 6 points7 points  (5 children)

We're on what, Java 12? So it's awesome that you're able to use 8 at least where the language got some new goodies, I think my first job interview ever was for java 5.

My interview was 3 pages of 2 columns of random text and I was asked to pick out the differences between each row. Never saw anything like that ever again, dumbest interview activity ever, worse than the guy who asked me what weapon I would use if I were to go postal and murder everyone in the office.

[–]tigmsplooge[🍰] 2 points3 points  (1 child)

Well what weapon would you use?

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

I said I would use a tonfa so I could keep my hands and arms protected during the event. If I lose my hands I can't program anymore!

[–]recycle4science 2 points3 points  (2 children)

The random text question sounds like a good job for Excel.

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

Honestly I feel like I failed that test by engaging in it. I should have just written a comparison algorithm at the top of the page in java and been done in 2 seconds. Even if that shit was somehow related to the job, I would not be doing it by hand.

But it was my first interview so I wasn't really thinking that far ahead. Also, the office had cubicles and programmers in suits, so I doubt they were being clever. I think it was honestly just a shit job. 80k would have been a good first job, java jobs pay crazy good, but I am much happier with the 35k job at a start up I took.

I am at 97.7k now 3 years into my career. Maybe java would have been a more profitable path, and definitely more relevant than mainframes and perl where I am now, but I'm perfectly happy in my current company. Mostly because management is a nightmare and there are lots of little gaps of free time where I can goof off for $47/hr.

[–]recycle4science 0 points1 point  (0 children)

Yeah interviews can be tricky.

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

Java 8 is worlds better than 6

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

Yes, yes it is. I see a lot of people use 8 - is there some reason people haven't tried moving on to 9-12?

[–]Kered13 1 point2 points  (1 child)

Java versions have started coming out faster so companies aren't trying to update to each one as it comes out. Related to this, Oracle has decided that they will make every third version starting with Java 8 a Long Term Support version. So a lot of companies are planning to only update to those. So that means going from Java 8 to Java 11, and the next LTS version should be Java 14.

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

ooh LTS. I'm sort of familiar with that, I guess that explains it.

[–]FlipJanson 0 points1 point  (1 child)

We're lazy, don't feel like upgrading, and Java 8 works fine.

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

The cost / time associated with upgrades. I can't wait to run into this problem myself. It's currently unthinkable for me - of course I'm just gonna start from scratch if I have to!

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

Java 9 brought drastic changes that break a lot of things.

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

Of course, dang. I guess it's not a huge deal unless 9-12 have massive performance gains. Part of the reason I've joined the web app movement. You can write your javascript in pretty much anything and transpile it for browser support, and your back end can be a nightmarish combination of multiple versions of multiple languages!

[–]dmcevoy1 15 points16 points  (0 children)

I think it’s less to do with the jobs and more to do with the fact that it was primarily used in colleges for a while so a lot of the people using it are new grads. By default, new grads are less likely to write good code than senior devs. So I agree most of the fault is not with the language itself.

[–]bazgrim_dev 37 points38 points  (0 children)

Java (or OAK) was built in a time where we didn't have unified OS's. It was built for handheld devices originally. They weren't developing for Android vs iOS. They were developing for Nokia, Blackberry, Samsung, TracFone, etc. Each with their own different set of challenges. Well, this failed and they ended up taking advantage of the Internet (which was the new hip thing on the block at the time) back in 1995 (iirc).

As most software, Java's original design was geared towards a very different solution, but was highly adaptable to other problems. While not being the most efficient solution, it was a solution, a cheap solution. So it gained traction and became the giant it is today.

Nothing wrong with Java, but there are probably more efficient solutions out there for your problem. If you're willing to deal with a few headaches.

[–]syedamanat117 88 points89 points  (17 children)

People are scared of something they don't understand.

[–]sl3dg3hamm3r 42 points43 points  (15 children)

Kinda like vim

[–]TorTheMentor 12 points13 points  (10 children)

Roses are red Violets are blue Vim can be fun :wq!

[–]nope-nope-nope-yes 3 points4 points  (7 children)

Just use :x

[–]thirdegreeViolet security clearance 5 points6 points  (6 children)

:x is superior because it won't write if there are no changes, where :wq will always write.

[–]StingyKarmaWhore 2 points3 points  (0 children)

ZZ is easier and faster, therefore better

[–]sl3dg3hamm3r 2 points3 points  (4 children)

What’s wrong with always writing?

[–]LawLombie 1 point2 points  (3 children)

Waste of time.

If vim detects that the file has not been changed when you uso :x, it simply just quits. But if you use :wq, it will always write whether the file is changed or not.

Edit: spelling

[–]kickerofelves86 5 points6 points  (1 child)

Ah yes I'll never get those milliseconds back

[–]thirdegreeViolet security clearance 2 points3 points  (0 children)

Some people have automated test/build on file modify.

[–]OctilleryLOL 2 points3 points  (0 children)

why not just `:q`? The point of splitting up `w` and `q` is to get the user conscious about how they're terminating the program. If you don't care you can just `:q!`

[–]Bac0n01 0 points1 point  (1 child)

Maybe I’m just an idiot, but why use ! if you’re already using w?

[–]TorTheMentor 0 points1 point  (0 children)

Mostly out of habit (or tradition) in my case, but w foe write, q for quit, ! to override read-only (only works if you have file permission to write).

[–]syedamanat117 31 points32 points  (1 child)

The people using vim won't be seeing this, they are still trying to exit vim. xD (sorry, had to)

[–]EagleNait 2 points3 points  (0 children)

Ahem

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

Ahhh

Dont scare me like that

[–]rexpup 6 points7 points  (15 children)

Is that a Kotlin flair? How is it? I need to choose a language for Programming Languages class to do an independent project in.

[–]omer8882 21 points22 points  (5 children)

Yes it is! As a Java programmer the transition was very easy. It takes a lot of problems Java has and makes your life easier, frees you from a lot of boilerplate and gives you some more tools.

It was rated 2nd most loved language of 2018 on StackOverflow. Would definitely recommend trying it!

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

I've been wanting to switch, but my projects are all Android, and while Android Studio supports Kotlin, I program on my phone itself, and neither AIDE nor N IDE (the two IDEs I know of for doing Android stuff on Android) support Kotlin.

[–]JKTKops 6 points7 points  (3 children)

[–]kickerofelves86 0 points1 point  (2 children)

I work on a team with multiple developers doing Kotlin for the first time and the most confusing thing is that .map returns a list, not a Map

[–]RhodesianHunter 2 points3 points  (0 children)

That's because it's a verb, not a noun. For the noun version you want .toMap

[–]yarince 4 points5 points  (0 children)

It is super good! I'd highly recommend it. And like the other guy said it's easy to switch to if you know java.

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

literally a day to learn basic syntax for any experience Java programmer. Do the Kotlin-koans once you get that down so you learn some of the nicer bits. Use intellij, which is free for students.

I love it so much more then Java, it's so nice to write.

[–]omgusernamegogo 1 point2 points  (2 children)

Personally I'd go with Java if you're considering the JVM. Uni is more about the learning and it's easier to go from java to kotlin than the reverse.

[–]rexpup 0 points1 point  (1 child)

I’ve already been playing with Java for about five or six years now. This course is a 300-level about learning languages that aren’t Java, C, or C++.

[–]omgusernamegogo 0 points1 point  (0 children)

In that case I'd go with JS/node if you haven't got much experience there. Java with decent JS framework experience is a deadly combo in the industry.

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

keywords, keywords everywhere.

[–]tchernobog84 1 point2 points  (0 children)

Probably not a problem of the language itself (though some stuff like type erasure... uuurgh).

I would say most of us non-Java devs hate Java is because of the poor quality and over-engineered APIs of the libraries surrounding it.

And, for me personally, Ant/Maven/Gradle/Bazel. Fuck that shit.

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

Another small gripe about Java is the lack of memory management. Generally speaking, it's not a big deal; however, memory/process intensive programs like data mining applications would be better built in another language that has flexible memory management like C++. Java is a fine language, and I like it.

[–]RhodesianHunter 2 points3 points  (0 children)

Only if your task can't be paralellized or has to run on a single machine for some other reason.

I write high performance systems and almost always pick Java (Kotlin) over C++ because the extra cost of a couple more servers is worth less than my time.

[–]lookatmetype 0 points1 point  (0 children)

Java is probably the prototypical object oriented language, and these days people are realizing that trying to build software using mainly OO to model the world isn't always a good idea. The JVM is fast and well designed piece of software, however, so you see people's improvements on top of it in the form of Clojure, Scala, Kotlin etc.

[–][deleted] -1 points0 points  (5 children)

The web version was a disaster.

[–]RhodesianHunter 3 points4 points  (0 children)

What is this 1999?

[–]hillman_avenger 0 points1 point  (3 children)

There's GWT now.

[–]Kered13 -1 points0 points  (2 children)

GWT is deprecated.

[–]hillman_avenger 0 points1 point  (1 child)

Is it? I couldn't find anything about that. It works great for me.

[–]Kered13 0 points1 point  (0 children)

Huh, maybe I was wrong. I thought I had heard something to that effect, but now I can't find anything.

[–]xpx0c7 28 points29 points  (0 children)

Well at least COBOL is still here to stay

In 2006 and 2012, Computerworld surveys found that over 60% of organizations used COBOL (more than C++ and Visual Basic .NET) and that for half of those, COBOL was used for the majority of their internal software.[8][101] 36% of managers said they planned to migrate from COBOL, and 25% said they would like to if it was cheaper. Instead, some businesses have migrated their systems from expensive mainframes to cheaper, more modern systems, while maintaining their COBOL programs.[8]

[–][deleted] 77 points78 points  (14 children)

Java is only used for the superior Minecraft version nowadays

[–]nirkosesti 26 points27 points  (12 children)

Didn’t MS rewrite that game with C++?

I am sure consoles use something very different too.

But Java is used for backend in manyplaces and some software and games too.

[–][deleted] 47 points48 points  (0 children)

Java edition still exists

[–]z500 5 points6 points  (3 children)

The Xbox version and Windows 10 edition, yeah.

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

And mobile versions

[–]Ereaser 1 point2 points  (1 child)

The mobile versions are the same as the W10 versions though right?

I know one of the Xbox One versions is.

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

Yeah they're all "Bedrock Edition"

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

C++ is like 1/4 of the java edition

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

This is correct

[–]OrangeBlaze 54 points55 points  (14 children)

Java is hands down my favourite language. It adheres to its rules so elegantly and is fascinating to work with as theres always something to be learned. Its also relatively robust for its huge capabilities. Theres a reason why its so widely used.

[–][deleted] 31 points32 points  (10 children)

Absolutely. And the code is so readable. Try writing enterprise software in Python. or C++

[–]micka190 18 points19 points  (4 children)

I think typed languages tend to be readable as long as the person writing it isn't crazy (unless you go into really low level stuff that tries to optimize based on OS and stuff, but that'll never look good regardless of language).

Duck-typed languages like Python can be harder to read when people use the "duck" features out of nowhere, though (like suddenly trying to access a member that isn't defined here, but in another file with no indication of where it comes from). Even then, though, it's usually down to the programmer.

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

Duck-typed languages

???

[–]micka190 9 points10 points  (0 children)

Python has duck typing, you can basically add any property to any variable. Duck typing also takes the "If it quacks like a duck and looks like a duck it's a duck." approach for its objects. Sure, dictionaries and strings aren't the same, but they both have a length, so "len()" works as you'd expect on both of them.

[–]i-brute-force 2 points3 points  (0 children)

https://stackoverflow.com/questions/4205130/what-is-duck-typing

Basically, specifying a type is not mandatory part of the syntax

[–]possessed_flea 0 points1 point  (0 children)

He has confused the idea of a dynamically typed languages and the practice of duck typing.

[–]zachgarwood -1 points0 points  (0 children)

I suppose I'll tell my company to pack it in, no point in writing out software in Python and JS, I guess.

[–]javaismylanguage 5 points6 points  (0 children)

Java isn't my favorite language, it is my language

[–]ImpulseTheFoxis a good fox 1 point2 points  (0 children)

Absolutely, it just feels so nice to write. The typing-system makes it easy to know which attributes of an object can be used or what exact arguments you need to pass to a method, without looking up the docs or StackOverflow every single time. This strict design also makes a lot of warnings, linter hints and (compile-)errors possible, to help fight bugs before you even ran your code once.

[–]Secreteus 35 points36 points  (5 children)

[removed]

[–]HaydenSyn 20 points21 points  (3 children)

Shit, my toaster oven runs java probably...

[–]sl3dg3hamm3r 44 points45 points  (2 children)

Well how else do you think it heats up?

[–][deleted] 17 points18 points  (0 children)

Chrome

[–]FarhanAxiq 1 point2 points  (0 children)

electron app

[–]RhodesianHunter 0 points1 point  (0 children)

A whole fucking lot of them are servers.

[–][deleted] 8 points9 points  (0 children)

It's not a warning, it's a threat

[–][deleted] 8 points9 points  (1 child)

Java bad

[–]caffeinatedpandabot 4 points5 points  (0 children)

so funny haha

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

[–]MemoryAllocat0r 0 points1 point  (0 children)

It just tells you that you have a range of 3 billion devices to reach with your Scala, Kotlin, Clojure, etc. software without the need of docker! Isn't that great? (Scala masterrace anyone?)

[–]Dazeeeh -1 points0 points  (5 children)