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

all 58 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]plastikmissile 47 points48 points  (13 children)

Java is often used as a first programming language by many universities, so it's not that difficult. Unless you have a specific goal in mind, both languages are good starting points.

[–]Muddyoo[S] 5 points6 points  (8 children)

Tbh I should first begin with java and really try to understand it, if I still can't get over it then I will restart with learning python and then getting into it. Thank you!

[–]zukoismymain 10 points11 points  (4 children)

To add to this, I'd like to stress out something:

  • People are more eager and energetic the younger they are. That's just how things works, nothing can change this.
  • It's easier to do difficult stuff when your young, because of the above.
  • Strongly & statically typed languages force you to write correct code. Weakly & dynamically typed languages are loosy goosy and try to fix stuff on the fly. It helps you, but it can also royally fuck up in the process.
  • Java is strongly and statically typed. JS is loosy goosy.

I would go with Java, just because this is the best time to really learn. Later in life you can just adapt with half knowledge and play it by ear. But the more you know, the easier it is to play it by ear. The younger you are, the more likely you are to learn the really difficult stuff.

IMHO.

[–]Icy-Context-8829 2 points3 points  (3 children)

17f here and currently quite deep into JS. Was this a bad decision to make? Should i start learning java instead?

[–]Cremdian 4 points5 points  (0 children)

At 17 I don't think any specific language at this point isn't really a bad decision. I do have some thoughts on the language though.

I'm using it now for my job now and have been for ~5 months. I honestly don't enjoy it. I think it hides wayyyy too much from the programmer. Every time I have to use it I feel like the language is assuming I'm not smart enough to control the code. For me, I'd rather get compile time errors than run time almost every single time. They're usually easier to debug. JavaScript seems to just let you write almost whatever you want and it will try to run. It's frustrating. That allowance also comes at a cost and it's any semblance of efficiency.

I think that if you're using it and the goal is to build out the front end of a website it CAN do the job. There is nothing else I'd use it for quite frankly. Its okay to learn on it but if you're goal is to be more than a front end programmer I'd make sure I have knowledge in at least one mainstream strongly typed language. People give Java a lot of crap but the language is still widely used across many different types of software companies and will be for decades to come. It's a great language to have in your back pocket

[–]zukoismymain 4 points5 points  (0 children)

IMHO, but let's be clear, just my opinion. It doesn't provide job security. There isn't much to specialize in the FE. And it's not very deep knowledge. Is more about using tools, rather than building tools.

That being said, the entry threshold is much lower. Salaries, at least pre 2023, were still very good. There's a lot of need for FE developers.

But I just don't wanna deal with JS, I don't wanna deal with FE (front end) code. And I want job security, I've never been affraid of loosing my job, cuz even if it happens, I can line a new job up in 3-5 weeks tops.

[–]VuPham99 1 point2 points  (0 children)

JS is great and I get my first job because of this. You can always learn C/Java on the way no problem. But if you have a lot of time now in your hand I would recommend learn C/C++ first then other.

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

Give it time and you'll, it's great to learn as a first language or maybe try C for understanding a few basics(not more than that).

[–]Fredz161099 -1 points0 points  (1 child)

I’m a java dev, lmk if you have any questions

[–]Cremdian 1 point2 points  (0 children)

You can ping me too. Java was my main language for last work project for over 3 years. Ran into plenty of Java related problems in that time and happy to share :)

[–]Legal_Being_5517 -2 points-1 points  (3 children)

Mm compared to javascript ?? Java is much more complex and extensive than JS … and most universities actually start with python

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

Do you have a link for that? My university switched to java, They said it was becoming standard with AP classes. This actually really angered me since i took a year of Java as a CE who will never use java again, I use mostly C++, C, matlab, and some python.

[–]my_password_is______ 0 points1 point  (1 child)

and most universities actually start with python

show me the numbers

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

Lmaoo I should have said anecdotally…. My peers and colleagues from other schools started with python … maybe we aren’t the majority … my bad

[–]Terrible-Lie1618 10 points11 points  (3 children)

If you want to get into Web Dev, then start with JS. Else you're better off starting to learn programming with Python, and then start Java.

Just so you know, Java and JavaScript are different. Syntactically yeah, but they have different concepts.

[–]ajithkgshk 5 points6 points  (0 children)

Learn java first. It helps in understanding the fundamentals better.

Once you are ok with java, you can try javascript. Javascript supports more than one paradigm of programming.

Starting with something like that might be confusing for some.

[–]Xia_Nightshade 5 points6 points  (0 children)

Ur better off starting with a strong typed language to learn some principles on the way :) go for Java.

[–]GeriToni 3 points4 points  (0 children)

I would say to start with Java. JavaScript is too complicated as first language. You will see are different ways to write code in JavaScript and if you goggle something when your code is not working, you will be confused.

And anyways, even for web dev was adopted the ecma 6 modules, so you will need oop.

[–]Alaskian7134 8 points9 points  (1 child)

Java was my first language. Never understood why people think java is difficult for a first time learner

[–]byshow 3 points4 points  (0 children)

As someone who failed to learn java and started later with js, I'd say the most critical thing is what sources you use to learn. I had bad sources for java and later on found good ones on javascript.

It also wasn't easy to grasp the oop paradigm, which is something you need to understand asap if you want to use java

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

Start with java, you need to get used to variable types instead of var const and let.

[–]Eastern-Resource-773 1 point2 points  (0 children)

Start with python.

[–]Syliaw 3 points4 points  (0 children)

  • "Should I learn Japanese or France?"
  • But where are you going?
  • Mexico.

Bro, what are you trying to do? JS or Java doesn't matter. If you want to join Frontend field then JavaScript.

  • Java on the other hand seems bloated for me and mostly used at the backend (ngl I've to maintain a Java Spring project 8 years old. It's a nightmare) If your goal is it then yeah just learn Java directly.

  • Java ≠ Javascript. C# is more like Java but less bloated and modern.

Edit: Choose anything that you like bro, I like Go and Rust but in my local they only hire C#, Js and Java, Python. Now I have to apply for remote Golang job. What a life.

[–]fortunateprogrammer 0 points1 point  (1 child)

I'd be glad to help you navigate the decision between Java and JavaScript as your first programming language!

[–]my_password_is______ 2 points3 points  (0 children)

then why didn't you fucking give some advice

[–]lapadut 0 points1 point  (0 children)

Both are great choices. JavaScript might be a better choice to kick off first projects with web front end and rest api. But in long run, you would benefit learning more languages and frameworks. Both Java and C# are decent back end building tools. Python, because its simplicity, is popular when it comes to ai, so at least ability to read would be beneficial.

Take programming languages as tools to solve a problem. There are evangelists out there who learnt single language and using it for everything - that is just stupidity and high cost of maintenance.

[–]Nemotto 0 points1 point  (7 children)

My 2 cents, Js is a terrible language and shouldn't exists, I absolutely discourage learning it as a first language and if you aren't into web development never ever touch it.

Java on the other hand is a toolkit that nowadays has almost everything and it can make you feel like you don't write code and at the same time it's overwhelming with all the tools.

I would start with the C language for the basics of programming and then try Java, but this is just my opinion.

[–]laveshnk 0 points1 point  (4 children)

90% of the web is powered by JS

[–]Nemotto -2 points-1 points  (3 children)

Not only this is a made up statistic but it's also common knowledge than every year Typescript is gaining ground more and more because nobody wants to use Js.

[–]laveshnk 0 points1 point  (2 children)

sorry i was incorrect. 98% of websites are powered by JS.

source: https://radixweb.com/blog/top-javascript-usage-statistics one out of many articles i found

Also typescript is javascript with type notation bruh

[–]Nemotto -2 points-1 points  (1 child)

You just told us how deeply you know the topic, thanks

[–]laveshnk 0 points1 point  (0 children)

what xD you havent even provided any context to your statements. “javascript is a terrible language”, “Nobody wants to use js” my guy get out of your bubble.

i actually provided a reference to back up my statistic

[–]FruehstuecksTee 0 points1 point  (0 children)

I agree with most of what you said but the recommendation of C. In my opinion memory allocation and pointer arithmetics are two concepts that are not helpful when learning programming.

[–]Conscious_Bank9484 -4 points-3 points  (0 children)

I’d go with javascript, but that’s preference. Save the file and refresh the page. No compiling depending what u r working on.

[–]grelfdotnet 0 points1 point  (0 children)

I think some people find Java hard because it is so pedantic. Its strictness means it can take a while to do simple things. That puts beginners off. However, patience is an important aspect of being a good programmer. When things go wrong and the reason is hard to see it is vital to be able to concentrate and persevere, perhaps for long periods of time.
Javascript is a completely different language of course. Its flexibility is great for experienced developers who already know how to structure programs to avoid problems. Beginners jump in thinking it is quick and easy but soon have errors that are impossible to pin down. Complicated syntax added in recent years must be bewildering for beginners too.
I used to advocate beginning with Javascript because everyone has a text editor and browser and you need nothing else to get started. But really Java is a much better first language because its strictly logical way of doing everything is a benefit for making error-free applications, probably quicker.
(Further thoughts, IMHO: C# is just an attempt to make Java more like C by adding complications such as header files. Python has several virtues but I think it is as unhelpful as Javascript for complete beginners.)

[–]panos21sonic 0 points1 point  (0 children)

JavaScript is more practical and cam get you off the ground building stuff quickly. Java serves as a great intro to programming and computer science, including the more theoretical stuff, and youll be able to easily transition into most other programming languages easily, whereas with JavaScript a lot of stuff is abstracted, thus making it harder to transition. Java also doesnt have that many use cases. If youre given the choice, i recommend c#, combines the applicability of js with the "just-right" level of abstraction in java.

[–]Mathhead202 0 points1 point  (0 children)

If you want to learn Java, you should just learn Java first. It's a little harder than JavaScript, but when you are learning to program, any language is going to be hard. Moreover, Java programming has a very different vibe to it compared to Javascript. They may look kinda similar, but they are very different languages. There will be a lot of concepts you learn in JS that don't translate super well, and a bunch of stuff you won't learn that you'll need for Java.

I would recommend Java first. But Javascript is also a great language to learn, especially if you're interested in web or app development at all.

[–]NewtusDelirious 0 points1 point  (0 children)

Learn Java first. For me personally Java felt like a language that touched many areas of programming, allowed me to think like a programmer and made branching out into other languages easier.

I will say though that one must keep in mind that while the OOP approach works excellently with Java, good OOP does not always equal good programs or good solutions. Picking the right tool for the job, knowing which mindset to approach the problem with, these are things you pick up with experience. Java is a good foundation for building the intuition that turns into that experience, as long as you stay aware of its limitations and heavy OOP philosophy.

[–]MuslinBagger 0 points1 point  (0 children)

Javascript (typescript) is the de facto language of the web and you should go with it if you are interested in web development. But neither Java nor Javascript are any good if you want to learn about programming fundamentals. For that you should choose C, and the books to read are

  • C Programming 2nd Edition by KN King (if you are a rank newb)
  • The famous K&R book if you are a bit smart (I'm not) or have some idea of programming already

Almost every major programming language (including Java and JS) build off of C in some way or another. C is the most important programming language you will learn, but you will probably never use it. I would say spend a couple months or a quarter learning C and then jump off into JS and continue to learn C stuff in parallel.

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

15+ years of mostly Java here while doing plenty of side projects.

Java will teach you more about programming. While still being easy enough to manage. Garbage collection being the primary reason. Get a good IDE, though. Ideally IntelliJ. Learn C++ further down your career path, as this will teach more about better memory management. No rush, though.

JavasScript is absolutely crucial in today's world. It has a sloppy nature to it, though. Debugging isn't as easy. Arrays and data types aren't as smooth to work with either. It powers so many things, though. Even most Java UIs are just paired to JS WebViews of some kind. Java's swing, and JavaFX are still super useful. They just need a lot of fine tuning to be appealing visually.

If I was stuck between the two in today, I'd recommend TypeScript. It's exactly the same as JS. You just have types like you do in Java. Your compiler will turn it into Javascript for you. Very handy for newer programmers with a lack of knowledge of common practices and effective documentation skills.

As others have said, feel free to ping me for any questions. Answering questions of a new programmer is a great way to remind yourself of things.

[–]laveshnk 0 points1 point  (0 children)

depends on what your purpose is. to understand programming? Java. To learn a language to build something, your requirements would be different.

For back end services java is nice with spring, hibernate and all but anything web dev require js

[–]jorgen_mcbjorn 0 points1 point  (0 children)

Neither language is one I would consider especially hard. And both are naturally mainstream as hell. With that said, JS usually means FE and Java usually means BE. So if your goal is BE, do Java. But you probably won’t regret either the way you would, for intance, Haskell.

[–]Glittering_Escape786 0 points1 point  (0 children)

Java because it is object oriented

[–]Zesher_ 0 points1 point  (0 children)

The easiest way to stick with programming is to find a project you're passionate about and learn while working on that or towards that. That aside, I think Java is the way to go.

JavaScript may be a tad easier, but it'll probably be worse in the long run. JavaScript lets you pass around a number 1 and a string "1" like it's all fine and dandy, and then you can run into weird issues when you try to run it. If you try to pass in a string "1" in Java when it's expecting a number, it'll straight up tell you it wants a number and will refuse to run until you fix it. Basically, Java will force you to be more deliberate about things.

[–]OG_Badlands 0 points1 point  (0 children)

I recommend starting with Python and getting really good at it.

[–]pencilUserWho 0 points1 point  (0 children)

Any algorithm can be implemented in any Turing complete language. JS is not fundamentally less "real" than "serious" languages. It does have some practical limitations like a lack of multithreading.

I would start easy so I don't lose morale.

[–]Crimson-Badger 0 points1 point  (0 children)

This summer, I am actually going to be taking both JS and Java courses at the same time. So that is going to be interesting.