Hacker News new | ask | show | jobs
by rayalez 2183 days ago
I'm planning to get a Masters degree in CS, and it bothers me that the program I chose uses Java as the primary language. They have an awesome theoretical curriculum, but it looks like I'll have to use Java to complete all the practical tasks.

I'm a Node/React web developer, I want to build a SaaS startup, and I'm not really interested in writing Java apps, I doubt I'll ever want to use it for something.

Do you guys know if Java would be really painful to learn? It's hard to get motivated about learning a thing I'll probably never use in practice.

10 comments

You will probably learn many languages in your career. Most of the understanding you'll gain will apply across languages, so I wouldn't worry about it being a waste of time.

Learning Java should force you to understand object oriented design, as it is hard to do anything well in Java without it (though some try). While there are signs that OO's domination is nearing an end, there are reams of code out there that require a good understanding of it.

It’s not likely that any university is going to teach masters classes in JavaScript, that’s for sure. So you’d have to use a different language than JS anyway. Advanced topics you would learn like ML, computer vision, distributed systems, big data stuff all already have their languages that you have to use anyway and not many (if any) are JS.

Also, if you are going to be a React web developer, the theoretical/advanced stuff they teach you in an MS program is likely not going to be relevant at all to your actual career.

Source: current MS CS student.

Java is a common university language, and an even more common industry language. I think gaining knowledge of the Java ecosystem and Java architectural patterns will only be beneficial to you in your professional career. Hopefully you'll find places you see advantages in Java, and places you see advantages with Node. This will help you make better decisions when building production apps.
I hate Java for lots of reason, but it does do a few things really well, one of which is that it is easy to learn. Most of the core libraries are very consistently designed, so you don't need to hunt around documentation to find something. Instead you type import java.util. and look at the autocomplete list for the collection you want. Most of the standard libraries implement the same interface, so using them is almost always the same.

I haven't used Java in years, but I'm very certain I could pick it up again immediately with nothing more than an IDE. Contrast that with python, which I use almost every day and I still need to visit stack overflow to perform rudimentary tasks because libraries for it are a mess.

grind some leetocde questions in Java. after a while it made me appreciate the explicit Type declarations and interfaces. Like, you begin to wonder, do you want to use a HashMap<> or TreeMap<> as your map implementation. Or a LinkedList or ArrayList as your implementation of List etc... I find languages that are more dynamic like js/python dont make the user think as much about this (which is great in some cases, but if your doing academic CS stuff... kind of helps in some sense)
Java will at least help you understand stuff like static typing in TypeScript and classes in ECMAScript 6. In any case, skills are readily transferable across programming languages.
Java is used everywhere, why do you think you’ll never use it?
I do contracting work and mostly focus on Node/React, yet I still encounter Java all of the time. Especially Java with the Spring framework. With how entrenched Java seems to be, it's probably something you will come across from time to time (especially in the web development world - at least from my experience). Also, I find that JavaScript devs have an easier time learning Java than Java devs have learning JavaScript.
There's a long career ahead of you, and if you ever work at a large company, or even if your startup grows so that its backend needs to really scale, chances are you will be using Java. Its combination of performance, productivity and observability is hard to beat. Many companies start off with some other platform and then adopt it as they grow.
I graduated undergrad two years ago, the majority of my CS classes were taught in Java. I now work in full stack web dev (Python, Django, React) and tinker with embedded electronics on the side.

Java was picked because (for the most part) it just works on everybody's machines, it comes by default with a large set of libraries, and it can build standalone executables (great for grading purposes). You don't have to explain why MacOS comes with Python, but you shouldn't use that version of Python. Java of course has its peculiarities, but so does every other language.

And as you say, you won't just be learning Java, you will be learning how to develop software. Over time and with exposure to multiple languages you will find switching between them is possible. You may (will) have preferences but with a solid foundation you can say "I recognize that this is a loop over an array, I don't remember the exact syntax in this language, but I know how to look it up".

I'm not sure what your situation is for a masters, but for the best odds of job searching post-undergrad the best advice I could give is have several projects which you can talk about the implementation specifics (why did you choose this pattern) and the big picture (why did you choose this architecture). For an entry level positions the exact language didn't matter when job searching as long as it was in the ball park.

TL;DR You're going to school to learn computer science and to illustrate those concepts they're going to use Java. That knowledge WILL be transferable to other languages. For maximum value explore and tinker with other languages on the side.

And as a bonus, a lot more of the world runs on Java than you think so it will be valuable to have on your resume.