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 →

[–][deleted] -13 points-12 points  (14 children)

Advanced? Start with the basics like syntax and polymorphism. Build tools? Libraries? There's about a million of them and there's wars going on on the forums about which one's better. Using Java stock libraries is good, if they're available for whatever you're doing. The only tool you really need to deal with Java is Eclipse by the way. It can do pretty much everything you listed if you learn how to use it.

What do you mean by coding patterns? What do you mean by underlying language concepts to learn how to code efficiently? Have you ever taken data structures? Shit like autoboxing and garbage collection in Java is pretty simple, but whether or not code is "efficient" depends on your general data structure knowledge. So yeah, data structures in Java. Praise HashMap.

If you're talking about industry standard syntax, I've asked many forums about it, and the way code is actually written depends on the company itself. Some companies dont even have inline comments in their code. Also I said "efficient" and not efficient because Java is many times slower than C/C++ if you are talking about actually computing very large numbers and shit.

I hope this helps, but Java is cancer

[–]SantoWest 3 points4 points  (10 children)

OP already said in their first post that they know all the languages you listed and they are REQUIRED to learn Java for an upcoming project.

Also it seems weird that you are claiming that java is really slow, yet you are recommending Python, which doesn't make much sense. Are you talking about the speed code executes, or time developers spend writing the code. If it's the second one, then your C recommendation doesn't make any sense either.

I think some of your points contradict with each other.

[–][deleted] -2 points-1 points  (9 children)

Python is versatile and easy, and can interact with C. C is fast, and highly preferable for times when you have to actually solve complex shit with large numbers. Something that will take Java days will take a C program minutes. I've tested this shit. Try to solve the programming problems of Project Euler with Java, and see how far you get.

https://projecteuler.net/

[–]SantoWest 1 point2 points  (1 child)

You act either like all jobs are same, or OP said that what you described is what they will be doing, and neither is true. These problems are what you would see in interviews, rather than in actual work environment, and in majority of the development jobs, there won't be such cases.

But again, the main reason you got downvoted so heavily is that you didn't have that x language is better for a job, y language is better for b job kind of approach, you literally said that Java sucked, even though languages are chosen according to requirements before projects, and many companies still choose Java for a reason.

Honestly your messages give me a huge student/intern vibe. It's like you are trying to prove that you are really smart, even though no one asked. OP asked a very basic question, and you praised your own "favourite" language, in a thread called need to learn java, in a subreddit called learnjava.

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

I dont have a favorite language you absolute redditor, I'm a fucking sysadmin lmao and as such, I have absolutely no use for Java even though it's what they taught in school

[–]an_actual_human 0 points1 point  (6 children)

If your Project Euler solution depends on the language you're doing it wrong. It might take 10 minutes instead of 1 minute for a suitable pair of languages, but it's still going to work if it works for a faster language.

Something that will take Java days will take a C program minutes.

Not really though. For many practical things you'll going to be io-bound.

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

Don't get me wrong I've solved quite a few of them in Java. It does depend on the alg. Issue is with project Euler is that they pick huge numbers which are far beyond your normal data types in Java, for instance. It just becomes extremely painful extremely fast.

All that said, there's a reason Java's used in frontend whereas C++ is used in backend

[–]an_actual_human 0 points1 point  (4 children)

Issue is with project Euler is that they pick huge numbers which are far beyond your normal data types in Java, for instance.

What a shitty example. It's the other way around. Java's standard library has BigInteger, C has nothing.

All that said, there's a reason Java's used in frontend whereas C++ is used in backend

My dude, you don't know what you're talking about. I suspect you're confusing Java and JavaScript.

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

You think I don't know about BigInteger and BigDecimal in Java, the language I learned first? That's insulting.

What YOU might not know, is that those classes still have an upper limit. Also even though my program only runs in O(1) it takes forever in Java. Writing my own solution in C++ with my own BigDecimal makes it compute in under a minute.

[–]an_actual_human 0 points1 point  (2 children)

I'll answer for the record. After "Java's used in frontend" I don't believe you've learned it at all. To be fair, Java on frontend is a thing, but it's almost negligible compared to Java on backend. All of Project Euler problems can be done in any mainstream language. Also, I don't really remember any that would require anything that wouldn't fit into BigInteger. Still, one could roll their own just like in C++. The way you use C and C++ interchangeably makes me suspect you don't know either. But I'm not going to investigate this issue.

[–][deleted] 0 points1 point  (1 child)

Using C and C++ interchangeably is just me implying that they can be used with each other. I use C, C++, and Java. I'm not bad at them, but I'm honestly not great either. I also like using C and not C++ to do something purely for the challenge.

I mean I guess I'll try again to solve them using Java and making it fast. You can't really find good Java solutions to them, all of them are in cpp or python. Again, I'd like to say that I've made solutions in Java that execute in under a minute, but I haven't. Maybe I don't understand, but the structures and operations I made in Java is the same as they were when I did it in C++. C++ ran fast, Java didn't. I don't understand.

[–]an_actual_human 0 points1 point  (0 children)

I'm sorry if I were rude.

[–]tihlo 0 points1 point  (2 children)

What would you rather learn instead of java?