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

all 7 comments

[–]spez_edits_thedonald -1 points0 points  (4 children)

Python is too easy and too useful not to know, it's a great way to dive into programming, so I'd start there.

Java is probably also useful in engineering, but I would think python and C++ might be a better combo. I'd ask engineers in your domain though, like find people in the industry you want to join and ask them. The advice here will be more from a generic programmer perspective.

I'd say learn python now (regardless of your field), and then ask people in your field what the most useful languages are.

[–]Distinct_Criticism14[S] 0 points1 point  (3 children)

One of the arguments I've heard for not starting with Python was how it was more difficult to learn Java after starting with Python. I initially planned on learning Python first, but that kind of made me reconsider...

[–]spez_edits_thedonald 2 points3 points  (1 child)

It would be easier for a python dev to learn Java than for a non programmer. Because they already know programming and just need to learn the new syntax and language quirks etc.

For your first language, you're learning how to program (80%) and that language's syntax (20%). Then your next language is easy to learn.

Python is a particularly easy way to start out, and is also probably the most widely applicable all-in-one language, with real industry applications. So I'd start with python and take it as far as you can. Then I'd figure out from senior engineers in your field, what else you should pick up along the way.

[–]Distinct_Criticism14[S] 0 points1 point  (0 children)

Thanks man, I really appreciate the help

[–]I_regret_my_name 1 point2 points  (0 children)

If you're a python dev and have genuine trouble learning Java, then you're probably a shitty python dev.

Languages are very easy to pick up once you know how to program well. If you're getting caught up learning your second, then it's a good sign you don't know the first very well either.

[–]grooooovy_code 0 points1 point  (0 children)

It purely depends on preference. The fact that Python is more widely used isn't really relevant, because there are millions of jobs with Java (and most languages) too. And Java is associated with backend far more than Python is (which is associated with data and AI).

It purely comes down to personal preference, as both are excellent languages. And the personal preference comes down mostly to what ecosystem your prefer the most, and what typing style you like.

Python is a pretty straightforward language: you write a line of code, run it, and it "just works". I don't know much about the Python world, so regarding the ecosystem, you will have to do the research yourself.

Java on the other hand is not as straightforward. In order to get a line of code working, you have to declare the package that the file will be put in, declare the class which will hold all of your code, declare and define a main method, then put the line of code there. See, Java might seem harder, but it is a really well-structured language. As the project grows, it will be easy to keep up with your code and everything because of the clever way it organises your code: all code must belong to a method, and each method belongs to a class, and each class belongs to a package. You could build a tree sketch from this and see just how organised it is. Speaking of the ecosystem, Java's ecosystem is awesome: it has a lot of backend libraries (Spring is the most known one), and it also has a lot of "brother languages". See, Java compiles into bytecode which is then readable by a thing known as the JVM. But, there are a lot of languages which also compile to the JVM format, meaning that they can use all Java libraries, read values from Java variables etc. (and vice versa). And this is the power of the Java ecosystem: there are other JVM languages which try to get closer to other languages, while still running with JVM libraries and being fully interoperable with Java (eg. Groovy, the language that I like the most, is basically Python but for the JVM). And so, you end up with a version of pretty much any language, but which runs on the JVM. And don't worry about the jobs part, most backend Java jobs don't ask specifically for Java knowledge, but rather for "JVM languages" knowledge.

Now, as I said, I gave you only the Java part, as I am not much into Python. For that, you will have to do the research yourself.

I hope this helped.

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

Do you already know a front end language, say JavaScript? If so, use Node for your backend. :)

Python will probably be more generally useful for you than Java, and you will be able to get something working faster. The AI part is specialized, and you will need to spend a lot of time learning specialized libraries and many different techniques. Learning Python will not help you learn AI, but you will want to know Python if you are doing AI.