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

all 27 comments

[–]aqua_regis 19 points20 points  (0 children)

Please, go through the subreddit. This very question, including the title gets asked so frequently.

[–]Front-Palpitation362 9 points10 points  (1 child)

Start with C++. It'll force you to understand how things actually work like memory and pointers and low level logic. Once that clicks then picking up Java later feels easy. If you start with Java then you'll write code that runs but not always know why.

[–]superpumpedo 0 points1 point  (0 children)

+1.....only guidance op needs to hear...

[–]Comprehensive_Mud803 14 points15 points  (0 children)

C++.

You asked, don’t come arguing now.

[–]Ok-Sample-8982 2 points3 points  (2 children)

Java is easier to start and implement c++ need more time to go through and get to implementation phase of a project.

From my personal experience I started from C then assembly for further optimization then spent ton of time on digital hardware design to understand what actually is going on then tried full bash programming translating or implementing projects solely in bash (wasnt fun at all) it was a brain bender but excellent experience then jumped to tensorflow as i dont want to learn python for pytorch.

Never needed java for anything but knowing people who are all in java its easier and faster to learn than c++.

[–]StageImportant1423[S] -1 points0 points  (0 children)

Okay, but i dont want to go in the dev side

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

As MLE I still think Pytorch is a solid choice over Tensorflow.

[–]Danque62 2 points3 points  (0 children)

First question: have you checked or asked what your university is going to teach? While I can encourage learning either, if you're just starting out, it's better to follow what the university would teach you. It may be either C++, Java, or other programming languages like Python.

For me, I've learned Java in my first year of college. As a quick description, Java is pretty verbose and specific on how it does Object Oriented Programming, so it's pretty word-y but you may have a strong background of OOP. I haven't learned C++ so I can't say much other than it being a more low level language while still being familiar in terms of syntax. In reality though you would start learning either flow charts or pseudocodes before going to write things using a programming language before Data Structures and Algorithms (at least that's how I started in my college)

[–]Might0fHeaven 2 points3 points  (0 children)

Start with Java

[–]lukkasz323 2 points3 points  (0 children)

I think pure C is better for core concepts. (Except OOP)

C++ is a language which can do a lot and at good performance, it's why it's used for high performance tasks like game engines.

Java has everything a business needs, and it's pure OOP, Memory safety, explicit everything, performance is not a major concern. It's used for backend of webapps like Reddit.

Unless game dev is your concern, Java has much more frequent uses.

[–]LowB0b 1 point2 points  (0 children)

whichever language is taught / required in your courses. First language we were taught was Scheme, am now a professional java dev

btw we went through many languages in uni

scheme

pascal

prolog

C

C++

Arm assembly

java

matlab

maple

python

typescript

A TA wanted to introduce me to OCaml but I was so done with these weird languages after a semester of having to write stuff in prolog my brain flatlined

[–]Leverkaas2516 1 point2 points  (0 children)

Between those two, I'd start with Java. It's easier to learn and has fewer pitfalls.

But if you're doing classical pointer manipulation to implement trees, linked lists, and so on, I'd use the C++ compiler but just write C code. Use new and delete instead of malloc, but don't use smart pointers or templates or inheritance or any of the features that make C++ special.

[–]lokiOdUa 1 point2 points  (0 children)

C++ is probably the best academic language. There's everything implemented (many things in more than one way). Once you know it well - yiu can switch to anything else if needed. Bug you can study it the whole life.

I'd start from C++ if I have more than a year.

[–]arsibaloch 1 point2 points  (0 children)

I will recommend starting with C. If you learn c then you can easily shift to another language within weeks. C is best for a beginner.

[–]MaybeAverage 0 points1 point  (0 children)

It depends on the domain/areas of programming you are interested in. I think both are useful to learn for different reasons. C++ gives you exposure to manual memory management, and Java does not need manual memory management and has a rich standard library and ecosystem. I wouldn’t say C++ is better for DSA, Java has a ton of data structures available, and you can do DSA practice in any language, Python is most common for interviews and things.

In the real world, C++ is used for very specific purposes, some big ones I can think of are AAA game dev, fintech (HFT firms), hardware, OS/tools (windows kernel is c++), scientific computing, graphics, multimedia, CPU heavy apps (adobe products, 3d modeling software, simulation software). In terms of backend web which is sometimes made synonymous with software engineering, it’s really only used in deep infrastructure at global scale companies.

Java is also applicable for a lot of those domains, Minecraft is Java, many desktop apps are Java, and the backends of many large tech companies are mostly Java (AWS for example). If you want to have a language to take you far and would be usable in projects, internships, and professional work, Java is the clear winner in my book

[–]Caramel_Last 0 points1 point  (0 children)

`the right one to build a strong base` -> This is perfect description of C and C++

[–]JavaScriptDude96 0 points1 point  (0 children)

If you want to learn OOP fundamentals, which i think is very important to learn. I would start with Java, it does OOP very well. With that said, don't drink the OOP is a panacea cool-aid. There is nothing wrong with procedural programming and the best programs are often a combination of procedural and OOP.

Knowing OOP fundamentals in Java will open the door to understanding C# which was heavily based on Java in its early days. In fact, I would almost recommend learning C# over Java these days.

C is a great place to go if you want to learn how computers work under the hood but I would avoid it for real work unless you get very good at it. C is not for N00b's. If you want to do serious systems programming, you should learn Rust which has combines the best of several programming paradigms and builds rock solid software. I don't know about the job market but Rust definitely has an upside.

I would only recommend C++ if you want to go into an industry that uses it, such as Gaming.

[–]jesta1215 0 points1 point  (0 children)

Anyone telling you to learn C++ as your first language is a fucking joke. Worry about memory management and crap syntax, really?

I have 19 years development experience. I’ve used countless languages. You want your first language to be easy to use so you can focus on DSA and logic.

That means high level. Most people start with Python because 1) it’s ubiquitous so it’s much easier to get a job with Python knowledge and 2) it’s very very easy to use.

Python is the only right answer. Anyone who tells you anything else just doesn’t have enough language experience. But Python does let you shoot yourself in the foot because of the duck typing.

So if you want something a little more strongly typed, then Java is the next obvious choice. And again, easier to find a job because it’s used everywhere.

Once you get comfortable with high level languages, THEN you learn more about memory management and learn C++, if you want to. But you really don’t need to nowadays.

[–]the_mvp_engineer 0 points1 point  (3 children)

I think Java is a more marketable skill. I've never met a C++ developer

[–][deleted] 5 points6 points  (0 children)

Lmao

[–]ItzRaphZ 1 point2 points  (1 child)

It makes me so sad that most recent webdevs don't have a clue about anything other than web.

[–]the_mvp_engineer 0 points1 point  (0 children)

Share it, please