Java the Hutt

I am gonna admit, I never understood /g/ Holla Forums's hate for Java. Sure, it's a bit rough on the edges, but it does the job quite well, and Java 8 does include some really nice features that make working with it a much more pleasant experience.

I didn't understand it, until now.

All I had used in addition to the very acceptable standard library were small libraries, like JodaTime (which is kinda convoluted to use, but I guess it could be worse) or libGDX (pretty nice library for games and graphics all around), but our teacher decided we had to learn Spring, and I really feel like killing myself right now.

In Spring, everything is absurdly convoluted, everything is slower than it should, everything is a pain in the arse, and nothing makes sense. Even though it supposedly helps speeding up development, the boilerplate required is horrendous, and I can't see how does it help maintainability when one of its main selling points is enabling the programmer to scatter code all around the place. But what's worse is that, since it's supposed to be a dependency injection framework, its design philosophy reduces to "it's magic, I ain't gotta explain shit", and everybody loves it because it just werks, except when it doesn't, then may the gods have mercy upon you, because Spring sure won't.

If problems with the code and design themselves weren't enough, we also have its absurd amount of Maven dependencies that are guaranteed to fuck your shit up at least once. For example, a friend of mine managed to get his project running, so he passed it to me so I could see where I fucked up, just to find out literal copypasted code (the whole folder, in fact) didn't fucking work on my machine. After some digging, I found out he missed explicitly stating some dependencies on his pom.xml and it somehow worked for him, but not for me. A friend of mine, who got the same fucking code I got from my friend, had a different error pop up. Another project, managed to get it to compile and run, but not work; friend to the right solved the problem by changing some parameters, but I changed the same parameters and it still wouldn't work. Only half of the class managed to get it working, and the rest still don't know where the fuck they failed. But it's magic, it just werks.

Now I really understand why people hate Java. Java itself isn't bad, but the mainstream ecosystem is so bad it may as well be.

Other urls found in this thread:

github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
twitter.com/AnonBabble

Java was designed by and for big business and managers. It just isn't a hacker's language, and so will never be as cool as Lisp, Forth, C, Perl, and so on.

Find a better teacher.
Or better, learn programming yourself. Stop wasting time.

You have also the fact that the JVM is also an enormous abstraction layer that eats hardware resources like tic tacs.

Java is used by "professional" business programmers that do "professional" things like calculating customers data, employee pay and product level.
Java is also used by millions of pajeets because its the "professional" language

C++, Python, Haskell, Lisp and other languages are used to do very unprofessional things that cant be used by banks to calculate pay data.
Don't forget Java is the best language.
C# is the second best language

Java and C# are languages created by billion dollar companies and the boot licking MBA drones assume its the best language.

The first language I learned was Java.
It was the first language I learned because the retards at the school board thought that java was the best first language because it was used by businesses and its "professional"

...

...

As I said, Java itself is not the problem. Java 8 is an unremarkable, but ultimately operable language that you can use to do some nice stuff. Streams and lambdas also make programming extra comfy, and unless you really suck up to all Java conventions (which may be necessary in some projects, or completely redundant in others), it's not much different to a strongly typed C minus manual memory management, forced classes and a lot of tools at your disposition you can choose to use or ignore so it feels nothing like C, even though syntax and usage are similar. The problem is people keep using Java wrong, and making stupid tools with it. I would go as far as saying Spring goes against the Java philosophy itself, since instead of encouraging solid and maintainable systems, it encourages slapping some tape around several pieces until it works as intended, then continue slapping more tape around it and hope nothing breaks whenever you want to add some functionality or change something.

Also, kinda iof topic but
More like a language to get hacked, right. :^)


I already know programming. In fact, I already knew Java way before getting into this mess. But I learned it on my own account, which is why I never thought it to be as fucking horrible as everyone else said. I still need that fucking degree.

Can your roobee or pieton do this?
github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
Thought so.

Why? Are you a slave or something?

I still don't understand what Spring does. It seems to just put objects into your constructor with a very obnoxious XML file? Is that all it does?

Reminds me of Singleton, just create one object and then give that object to everyone that wants it. That is too complicated for some, and have to go ahead and create a Singleton instead. So now you have a side effect embedded in your code that can't be mocked away, so no more unit testing.

That's what was supposed to do, but now it has become a terrible monster that does that and a lot of other things as well. Aspect oriented programming, or pointcuts, are also now part of Spring, which could either be a very nice addition or the worst thing you could do to your project, depending on how much you use them ("only for logging" vs "I am actually going to put relevant code here", respectively), among other things like its own shitty MVC or database connectivity that somehow sucks harder than JPA.

Problem is, people were complaining about that stupid XML Bean definition, but I guess it made sense considering you could easily make changes to that file between program restarts. People obviously complained because of the overtly verbose XML, and the Spring guys decided to give people an alternative. Said alternative is fucking annotations inside Java code. Why make your program more flexible when you can fuck it up on compile time, amirite?

I always thought singletons were kinda dumb and replaceable by static classes in 98% of usecases, but I never got how its side effect could be harmful outside of a pedantic Haskell programmer with state phobia context. How does it break unit testing?

I must have missed this meme, who is she supposed to be?

If thou gaze long into an abyss, the abyss will throw poo onto thee.

99% of java hate is just neckbeard wannabe hackers being butthurt about people not using C. almost every time I write anything on the internet some dumbass neckbeard tells me i dont know what im talking about and starts spouting on about cache coherency and his other precious concepts that he thinks only he knows of despite that ive written 10s of thousands of lines of each of C and assembly as well as 10 other languages, and reverse engineered and broke tens of large commercial products (before I even knew C/C++)
sure most users are retarded but that doesn't change whether the language itself is good. C itself is full of retards, and so is every mainstream PL
sage for cringy apologist thread

Is that something like writing rapid shit code?

Do you think your uni is training you to become a master programmer eh? They're training you next in line to university affiliate companies. Every industry right now is demanding programmers and they don't care about performance unless it's mission critical crap.

Just learn it yourself. Drop and take a different course (if not too late) then get a masters or doctorate in IT related crap because they only teach shit to undergrad courses.

Ok, now Spring sounds terrifying to me. I still don't get it though, how much more flexible are you getting instead of just changing the actual code? If it is just creational, then why not have different factories that produce different configurations.

1. With singleton you have implicit dependencies. When I unit test I want to mock dependencies and test the class in isolation e.g. your Singleton might be calling a database, some remote server or writing some file etc. I don't want to do that when I run a test, I just want to test that my class pass what I want to my database, or my server or writes the correct file etc or whatever that class is suppose to do without actually doing it. But if you use a Singleton inside your class I can't mock it away, there are perhaps some hack ways to do it but I am not talking exclusively about Java now. If I construct class A, I pass in B and C I know A depends on B and C and I can mock them and pass in the mock instead. If B and C are called within A they can't be mocked away since they are not passed as objects to the constructor, but A still depends on B and C, they did not go away. You just hide them inside A.

2. It also tells a story on how your objects should be created. If C requires B in its constructor I know B must be constructed before C, and if B requires A in its constructor I know A should be created before B.

But with Singleton you might need to "initialize" certain things in a certain order, and that order is again implicit and weak to changes. I have seen this in many code bases. This of course also leads to more difficult testing, because you might just want to test class A but you need to initialize n number of Singletons (with probable side effects, starting up something etc that is unrelated to the test) in some order instead of just mocking one object and send that into A.

Well that is what I could think of on top of my head. There are probably more things related to concurrency. To me, Singleton is just lazy coding and leads to spaghetti code.

As another university student in Computer Science, this is exactly the process we have to fight every class/semester that involves Java. I never hated Java until I had to work on projects that I hadn't completely built. The boilerplate code is always horrendous, and usually there's no developer documentation provided for it.

Not only that, but you have to use some IDE, usually Eclipse. No one can afford something like Intellij (which probably wouldn't be that great either). It always adds configuration files in your git repository that somehow fucks up everyone else's IDE, and it can "do everything" except the simple things, like autodetecting dependencies or making git usage simple. Not to mention, navigating the dropdown menus involves hunting down the one obvious command among millions you'll never need.

Yes Spring is awful to debug, but it's (relatively) easy to maintain.

If you want to use a Java dependency injection framework, try Dagger 2. The code and classes that it generates are pretty damn close to human readable.

...

OP is a Paggot. Pajeet + Faggot. Sage

Sounds like you've never been effective with those tools.

sage for Dunning-Kruger effect.

Stop your bitching. Your teacher is trying to make you employable. Doing any work in Java these days that's not writing firmware for embedded devices is going to require either Java EE or Spring.

Java gave me PTSD.

I envy your universities.
Where did you go to?

Erin from Critical Miss. It's gamergate shit

France, Paris-Est Marne-la-Vallée.

Java is for mentally deficient people who don't put in a day's work into learning how to code.

I'd rather use brainfcuk.

ahahaha
thats even worse than object oriented programming

This is what happens when you learn things in the wrong order. You've never built a sufficiently complex application in Java (or similar 3GLs), which had to be maintained over a long enough lifetime, possibly subjected to feature change, which would motivate an understanding of design patterns, whose repeated use across projects creates a need for standardized boilerplate, which results in learning frameworks like Spring. An undergraduate program in Computer Science (if that's your major) is the wrong place for most people to be learning Spring. It's going to seem (and indeed is) overly abstract and superfluous to people who aren't weathered in the 3GL OOP world.


Java is not nearly as bad as Holla Forums would lead you to believe, but here is some criticism: Java 8 has been getting respect for including lambdas and allowing for some functional programming syntax. I disagee. It is syntactically cumbersome, and doesn't work well with many Java paradigms e.g. checked exceptions. Scala is so much better if you want a JVM-based functional P/L.

...

...

France, Bordeaux
ENSEIRB-MATMECA

Hey op is libGDX good for 3d games?

There's literally nothing wrong with JavaScript

Are you or your teacher on the April mailing list ?

ree