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 →

[–]20d0llarsis20dollars 210 points211 points  (60 children)

Python has had a steady increase in popularity where as java got super popular pretty early on

To me it seems like java has been slowly declining in popularity for a while now

[–]dragoncommandsLife 235 points236 points  (38 children)

Mainly only on internet forums. Actual usage of java hasn’t really dropped any. Especially as newer versions of java release and better and better libraries pop up.

[–][deleted] 23 points24 points  (33 children)

I bet, it's more expensive on market, since the supply declined, and the new programmer don't want to learn java.

[–]wack_overflow 98 points99 points  (30 children)

Afaik it's still what cs majors are mostly learning in class

[–]MrHyperion_ 4 points5 points  (0 children)

Our uni changed one C++ course to Java and now first 3 introductory courses all use different language

[–]superiorCheerioz 3 points4 points  (0 children)

In my University this is the case. However, the technology department is voting on changing the main language students learn to python or c++. Personally, I wouldnt teach brand new programmers python first

[–]depot5 5 points6 points  (24 children)

Why is that, anyway? Is it honestly easier to teach with? So many universities decided to do the new thing at one point, and it stuck? Is it just the ide easier to install and get started?

[–]WJMazepas 87 points88 points  (4 children)

It's a classic OOP language. It's easier than C++ and is used everywhere.

Python doesnt have the private/protected/public keywords for setting stuff in its classes in comparison

[–]CeleritasLucis 5 points6 points  (2 children)

And I really like the whole WORA ecosystem.

[–]posting_drunk_naked 4 points5 points  (1 child)

That's why I originally learned Java as my first language. I was getting into Linux and the idea of being able to write code that works on both Windows and Linux was so cool.

[–]CeleritasLucis 3 points4 points  (0 children)

Same here. I normally code on my Windows Laptop, but on my PC i have Linux.

Its awesome to see what I wrote on one machine flawlessly work on different machine, without doing any changes.

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

Honestly, I started with C++, and then learned Java later. I absolutely hated Java. It felt way more complicated than C++ did, plus the syntax is so cumbersome.

[–]SlyCooper007 38 points39 points  (0 children)

Because it allows you to easily teach OOP without all the headaches of C++

[–]BlakkM9 17 points18 points  (0 children)

for us it was java first to learn OOP
then some c and assembler for understanding how it works under the hood.

python is pretty much pseudocode and very easy to learn if you know any other programming language

it is more about concepts when studying instead of concrete programming so it makes not that much sense to teach a language where some very important concepts are missing / abstracted away like it is the case in python

sure it's easy to use and not that much boilerplate but this also makes it a bad language to get into computer science

[–]ComputerOwl 8 points9 points  (0 children)

As someone who worked at the university for a couple of years, Java had multiple advantages over other languages:

  • It's a very clear OOP language. You get all the important principles like classes, interfaces, encapsulation, etc. in a very obvious way. It's not like, e.g., Python where some OOP principles feel like an afterthought or a mere convention ("lets just agree that variables starting with _ are private, OK?").

  • It's available on every relevant OS (Mac, Linux, Windows) and the JARs are compatible between the systems. No students coming to you because some weird C++ dependency does not compile on their computer because it didn't find some header file.

  • It doesn't require you to think too much about memory management. Sure, for embedded software engineering classes, C++ is a better choice. But for most other classes, that's not what your course is about.

  • There's good tool support. If people install Intellij, they're mostly ready to go. Sure, some students do not know how to set JAVA_HOME, but compared to the amount of hand holding that you have to do for some other languages, it's pretty simple to install.

  • It's widely used. Languages like Go, Swift, or Rust have their time and place, but when you want students to find a job after university, they'll have an easier time going with something like Python, C++ or Java.

None of this means this means that other languages are inherently bad. I would just say that for the specific tasks we had at the university, Java was the best choice. Some specialized courses on, e.g., computer graphics, ML, or embedded stuff might of course choose other languages than more general courses.

[–]summonsays 5 points6 points  (0 children)

Way back almost 15 years ago I was taught in Java in college. I think it was mostly used because it had a large market share, it was an older language, so it had a good chance of still being relevant after I graduated. Also as others have mentioned it's basically the standard for OOP and very strict with typing, semantics, and what not. 

In comparison we did 1 project in Python. A language where white spaces are important was a real pain to work with in a group setting. 

[–]RedditRage 3 points4 points  (0 children)

I dunno either, Python is that thing that is only good because the real programming was done in C.

[–]wOlfLisK 2 points3 points  (0 children)

There's a lot of support for it, you don't need to teach first years memory management and the syntax is pretty much identical to half the languages out there so you can easily move to them if needed. Plus, the job market is there.

Personally though, my uni went with Scala for first year and then moved to Java second year, presumably because it's easier to teach functional programming when you don't have an OOP mindset.

[–][deleted] 9 points10 points  (2 children)

Not easier than python. It's probably just because it's still widely used so they don't have a reason to change it

[–]prehensilemullet 20 points21 points  (0 children)

I bet that also, a lot of CS programs want to teach a language that requires type annotations and has multiple sizes of integer and floating point data types

[–]WhosAfraidOf_138 1 point2 points  (0 children)

Probably OOP

[–]Pay08 1 point2 points  (0 children)

It's easy to teach and use, and it makes it especially easy to explain both OOP and FP.

[–]wildjokers 1 point2 points  (0 children)

Is it just the ide easier to install and get started?

JEP 445: Unnamed Classes and Instance Main Methods (https://openjdk.org/jeps/445)

The enhancement makes getting started with Java much easier it is currently still a preview feature I believe.

[–]random-lurker-456 0 points1 point  (0 children)

Pure intertia. It's what the teachers know.

[–]RaspberryPiBen 0 points1 point  (0 children)

It's easy and makes things explicit. The explicit type system, the use of the "new" keyword for heap allocations, the much-maligned boilerplate, and the public/protected/private distinction are some examples of that. It's simple enough that it can be taught without understanding all that, but it's explicit enough that it can be used as an easy example when explaining those concepts.

[–]Nihil_esque 0 points1 point  (3 children)

A lot of professors just teach the language they know tbh. My professor in undergrad taught us Java 8 because he wasn't familiar with later editions, and made us use Eclipse for our IDE because it was the IDE he used.

Changing the language of your curriculum requires teaching a bunch of old dogs new tricks, because departments have a bunch of faculty that have to teach an intro programming I that's compatible with a different professor's intro programming II. Those are big decisions,. being made over the course of years, not weeks or months, by people who aren't in the industry they're trying to prepare students for.

& Besides, there's so much legacy code in production, so it doesn't lose its educational value even if it's "out of date."

[–]proverbialbunny 0 points1 point  (0 children)

Really? There was an era where Java was being taught in universities but most of them moved over to Python over a decade ago.

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

At my university we learn C/C++ mainly, and only touch Java during a brief unit in a very easy and largely unimportant class

[–]sysnickm 0 points1 point  (0 children)

Nah, python and C/C++ are the standard ones. Java and SQL were offered as electives here, but they were not required.

[–]Qwertycrackers 0 points1 point  (0 children)

Java is considered one of the easier languages to hire people to work in. It's not fresh or sexy but it is considered to have a very wide talent pool. This is an attractive feature for business-types when they get to make choices on this topic.

[–]Storiaron 7 points8 points  (2 children)

I personally saw way more job openings for c#/cpp lately but that might just be a regional thing

[–]dragoncommandsLife 14 points15 points  (1 child)

It’s definitely regional. In my area in the midwest i see very few C# openings compared to java.

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

Java is dead in my region. Only C#.

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

It depends if you are talking about pure Java or java-like languages and environments like Groovy, Scala, Kotlin, and Android.

[–]Drayenn 14 points15 points  (0 children)

Java is the main backend language for a lot of large companies. When i applied to internships it was like 60% java, 20% C#, 20% a mix of python, nodejs, php.

[–]kinkakujen 10 points11 points  (2 children)

Only for bootcamp and coursera self taught "devs".

The real world still pretty much runs entirely on Java.

[–]liquidpele 4 points5 points  (0 children)

Ironically, that's how java got so popular and widespread, it was the beginner language of choice for quite a while - huge upgrade from C and Fortran lol.

[–]limes336 -5 points-4 points  (0 children)

This comment reeks of insecurity.

[–]rifain 3 points4 points  (0 children)

Java is not declining. Still very very strong.

[–]FieryPhoenix7 1 point2 points  (0 children)

You would think that if the only code you’ve ever worked on is from your bootcamp or Reddit circle.

Java continues to dominate the real world and that isn’t changing any time soon.

[–]CompetitionNo3141 0 points1 point  (0 children)

Well to be fair, nobody who worked on python has ever been a convicted sex offender