What's so bad about Java Jow Forums?

What's so bad about Java Jow Forums?

Attached: x00Java.png (500x500, 19K)

Other urls found in this thread:

techempower.com/benchmarks/#section=data-r16&hw=ph&test=query
vogella.com/tutorials/DependencyInjection/article.html
jooq.org/
twitter.com/SFWRedditImages

Old and Busted

it's geared towards homosexuals

too much overhead for hello world and fizzbuzz programs

also doesn't have really stupid and difficult things that elitistfags can brag about

the worst thing is that people simply have no idea what theyre talking about. modern day java IS indeed comparable (performance wise) to "native" languages such as C++, etc. in the early days, the JVM used to take forever to boot, and thats where it got the "slow" reputation from. as a matter of fact, it can perform exactly as fast as said "native" languages when you know what you are doing (or the native writing person does NOT know what they are doing.) humans just tend to remember negative things much more than they do positive things. plus, nowadays java is so mature, it has got libraries you can download for pretty much anything you want. If youre just curious about that question, the honest TLDR answer is: nothing. if youre thinking about learning java now, go for it. its still widely used and very very relevant.

Because every object is boxed and results in terrible memory overhead, like 5-10 times more, and this is not a joke.
>IS indeed comparable (performance wise) to "native" languages
Only in synthetic benchmarks that use ONLY primitive types. Try doing the same thing with classes and it loses even to C#.

wrong
techempower.com/benchmarks/#section=data-r16&hw=ph&test=query

Java is an old, ugly and badly designed language which has (unfortunately) high usage in the industry, because it's easy to find Java devs (= replaceable workers) and allows you to fragment code (= outsourcing). Managers love thier Java.


Didn't we had this thread just yesterday..?

Generics suck and it's been losing sight of its purity lately which has always been part of its charm. There are a few syntactic idiosyncrasies, largely coming from C++. Also no unsigned types.
That's about it.

And you will see it tomorrow because it's easy to find Java devs

The only thing wrong with Java is that it is too tightly couple to Oracle. Sure there's OpenJDK but if Oracle decided to drop development of the JVM, the language could fall on the wayside.

Unlikely to happen, but it is a concern. Other than that, nothing is really wrong with Java. It's fast as fuck, has great performance in most cases and it makes it easy to write maintable large codebases, which is why it is the most language in big businesses and big distributed systems (hadoop, kafka, spark, amazon, ali express)

People who say otherwise are either retarded or newfags that believe memes from Jow Forumsprogrammerhumor

Nothing, really. It's picked up a few warts in incorporating concepts that it wasnt designed with (generics, functional programming). But it's holding up decently and has the best ecosystem out there. Javascript of all languages is starting to rival it with npm etc, but let's be real: you cant build mission critical software on Javascript.

It can land you a job, so it triggers all the NEETs on here.

>Jow Forums stops hating java
I like this timeline

Best performance/safety/productivity ratio of any language, ever.
It's too mainstream so elitist brainlets hate it.

The ultra-low-latency Nasdaq stock exchange software is written in Java.
It's slow when used by brainlets, otherwise it actually beats C++.
The issue with C++ being that no human is actually able to optimize complex C++ code without introducing memory errors. So the whole thing about being able to write your own allocators, etc. is pretty much a moot point. People, in practice, use the slow, reference-counted STL containers.

haha true

"Too easy to learn" so it attracts people who otherwise wouldn't be programming. This is a problem in the eyes of autists.
Otherwise nothing much, except the performance

java performance is great though, you're uninformed

You can write good Java. People generally don't though, they write enterprisey, hyper-OOPy abominations like this. That's where it gets its awful reputation from.

Attached: 1528746169146.jpg (739x710, 130K)

Good thing you dont have to use garbage like spring

>separation of concerns
>each need fulfilled by 3d party open source off the shelf library

Why is this bad?

Java is a really bad language when compared to its virtual machine.

Java is used for alot of introduction classes to programming, it replaced sicp at MIT

Thats not to say its bad though, but its indicative to it being one of the easier languages to get your dick wet with

Attached: 1524026817291.jpg (720x720, 72K)

I could be mistaken, python replaced sicp for intro, fug

If you have an IDE with good codecompletion then writing Java is not bad. Otherwise you will be severely annoyed with how long your statements have to be. Accessing methods within long named Objects makes the code look verbose. For example, this is a statement I had to write for a program Im working on:

ActionManager.getInstance(project).getAction(IdeCodes.CODE_COMPLETION_ACTION).actionPerformed(new AnActionEvent(null, new Presentation(), context.getInstance(editor));

Basically be ready to be getting and setting a lot.

>ActionManager.getInstance(project)
Inject this
>Basically be ready to be getting and setting a lot.
Use Lombok

Great advice, thanks.

if you think you "had" to write a tapeworm like that, you're just shit at writing code

>groundless insult about context you know nothing about.

Keep being you Jow Forums. Have you ever even worked with an SDK?

>shamelessly posts a shit piece of code
>"groundless insult" when pointed out it could easily have not been as shit
I work with worse pieces of code than that but I would never blame the language or the API when it's clearly the author of that code that fucked up the quality

This.

Stop promoting this shit. We know millennial coders love their Java and their bloated libraries which occupy 80MB of disk space and allocate 98MB for a hello world.

If you want to be a decent programmer learn C/C++, writing Java afterwards will come naturally. If you want to be godlike learn assembler and how a compiler works, it will literally transform the way you write code.

>old man yelling at clouds

Wanna know how I know you write shit code? You think that Java needs 98MB and you think that it is a lot. C is ok, but rust is better, C++ is garbage

if you want to be nothing but a NEET circlejerker, that is

>muh super-optimized hello world
some scope of programming you have, no wonder you shit on Java

>writing Java afterwards will come naturally
that's actually wrong and usually C-fags write poor Java code because they can't get rid of their archaic shit practices

>What's so bad about Java Jow Forums?
slow
bad security
constant fucking updates to JRE which require admin privileges.

Also, faggits

>complains about JRE updates
>probably disables them
>complains about bad security

Attached: 1376592805742.jpg (544x400, 20K)

It's a bad curry attempt c
It's discusting

oh look, the java faggits I was talking about

Oracle

>yfw you are working with shit microcontrollers and you dont want to appear like a complete noob by using external libraries for dynamic data types but you are actually a noob and then you must create shit lists and a fuckton of methods just so you have a dynamic array of structs in C

JUST

Attached: 29e.jpg (600x885, 35K)

He's right you should update that shit, if you have it, best choice is to get away from that shit

>you should update that shit
of course
but there are updates all the fucking time, because Java is riddled with shit security.
Also, Java updates fuck up Java settings.

Pajeets

Attached: arguing about java on the internet.png (341x69, 6K)

As I said, you should get away from that shit, I have it because fucktard teachers are lazy

>Inject this
Injection noob here. How exactly does injection work and how do you benefit from it in this concrete scenario?

vogella.com/tutorials/DependencyInjection/article.html

I think people dislike Java because they aren't aware of how great it becomes at abstracting layers of an application with the help of build tools like Gradle, or frameworks like Spring Boot.
For the pythonistas, or developers using similar duck-typed concise languages, Java must appear like hell - so much typing and nonsene to do something that seems easy, like storing the value of a json string in an object and just serving it along with another object as HTML. They'd be right, it is hell compared to something like jsonify(obj) or similar.

But I've been writing Java software for a few years now, and I haven't gotten close to creating as nice a software architecture model as I have with Java for other languages. Of course, there's better choices for GUI applications or non enterprise backend applications, but Java is absolutely king at enterprise applications, and backend services. I admit however that this is largely due to existing frameworks in Java.

3. No stack-allocated structs.
2. Weak type system.

1. Crazy frameworks.

...also Java is extremely readable when done right. The lack of syntactic sugar coupled with the new stream() and functional interfaces of Java 8 makes it great.

Task for Jow Forums: show me an example snippet of FORMATTED non-java code that defines an SQL, performs a query to a database with one parameter.
How readable is the multiline SQL string in your languages allowed style formatting?

>For the pythonistas, or developers using similar duck-typed concise languages, Java must appear like hell
To Scala programmers, too.

Who hype for Eclipse Photon here.
Also other RCP devs in here?

I can kind of want to blow you out over the claim that Java is as fast as native code, do you want to play?

>Scala programmers
who?

Ask a senior on your team.

Why are you using a JRE if you're a developer?

I'll admit there was one senior who sort of knew Scala, but he was VERY senior and quit because he got too old.

>it will literally transform the way you write code.
lmao no it wont.

Attached: 1522523098774.png (338x322, 38K)

sql queries are very nice in C# with entity framework. dunno how it compares to java

It's the McDonalds of programming languages.

How else are you supposed to write backend webapps in java?

The point is to create modular units of code that does one thing, and one thing great. The repository fetches from a persistent storage (disk, database, cloud, memory, whatever), the Manager class below performs validation or other data modification/creation. By injecting different types of repositories into the below, we retain the exact same logic but we could for instance fetch our results from a flat file on the disk, or from a database somewhere. All depending on the repository implementation.

Here's how I'd define a simple library in Spring:

@Component
@RequiredArgsConstructor
public class ImageBoardManagerBean () {

private final ImageBoardRepository repository;

public Post findPostById(Long id) {
if (id == null) {
throw new IllegalArgumentException("FUCXK YOU STOP MAKING NULLPOINTERS FUCK"):
}

Post post = repository.findPostById(id);
validateOrDoShitWithPost(post); //whatever businesslogic here, pretend it's there
return post;
}

}


Notice the lack of @Inject or @Autowired annotations on the ImageBoardRepository dependency. Note the RequiredArgsConstructor annotation however, it creates a constructor that looks like this due to the final keyword:

public ImageBoardManagerBean(ImageBoardRepository repository() {
this.repository = repository;
}


This makes it impossible to create an imageBoardManagerBean without also providing a repository(db, cloud whatever) for it to work with.

Dependency Injection makes it easy to change implementations in your code, for instance we could make an implementation of ImageBoardManager that always provided the same post. This means we can change our code without adding tons of if checks and other control structures that make the code more difficult to read and debug.

You're not getting away from though. It's always there in the background.

Java considered harmful.

Is there really any shame in using external libraries, though?

Using entity frameworks and similar ORM's is considered harmful.

>show me an example snippet of FORMATTED non-java code that defines an SQL, performs a query to a database with one parameter
set param "De Vries"
db foreach -as lists first_name {
SELECT first_name
FROM customers
WHERE surname = :param
} {
puts $first_name
}

This, I learned assembly as my first programming language and I still prefer java/javascript above all else because they're easy to use. Computers are getting faster every day, not everything needs to be directly compiled to your native processor ISA

>you think that it is a lot
It is a lot.

So all it does is save you from making that constructor?

>java/javascript
How can you group the two? They aren't similar.

Java EE sucks.

Then you would write the backend "Web apps" not in Java. :^)

>ORM is harmful
Why is that?

n+1

No, that's a library called lombok. If you're going to write Java without lombok you might as well kill yourself right now.

Just an example of killing the verbosity a bit in Java. With lombok, just annotate a class with @Data and bam, setters and getters.

@Data
public class Thread {
private Long id;
private List posts;
private boolean visible;
private boolean bumpable;
}


Generates code during compilation like

{
Thread thread = new Thread();
thread.getId();
thread.isVisible();
thread.getPosts();
thread.setVisible(false);
}


Some people consider this unclean since it messes with the code during compilation, but I don't give a fuck. This shit is like crack.

Not him but what are you nigging about?

All ORM are slow, bloated pieces of shit. Learn how to write proper SQL and just use prepared statements.
The best performing frameworks on techempower all use Raw sql and not stupid ORM.

How is this possible? Annotations always seemed like magic to me.

The original poster talked about bloated libraries and that reminded me of Javascript too kek. But regardless of how ridiculously heavy the applications/frameworks can get Java and Javascript are my favorite programming languages

Vert.x or any other of the top performing implementations on techempower. But seriously, just use vert.x

not bad considering it allows for great SQL formatting

The Pluggable Annotation Processing API is a pathway to many features some consider to be unnatural.

Attached: 68510252_p0.jpg (787x1002, 795K)

My problem with this is actually this .
I was considering introducing annotation based frameworks such as lombok into our projects (I am kinda the substitute lead dev).

But most of my co-workers already have problems getting along with the technologies we currently use (EMF, XText, Eclipse RCP, etc) and whenever they see annotations there their brains shut off and they become unable to solve the problem.

It doesn't have to be if you use it right., in fact there doesn't need to be any overhead at all apart from casting the returned data to objects/entities if that's what you want.
Use the DbContext freely, and all is fun and games.

>tfw someone changes the order of field declarations to
@Data
public class Thread {
private Long id;
private List posts;
private boolean bumpable;
private boolean visible;
}

It'd probably be easier to introduce Kotlin than fucking Lombok.

You mean Xtend if he uses Xtext and his company is Eclipsefags.

jooq.org/

Yeah, Xtend we already use in some parts.
And Xtend code exactly where my co-workers tend to get confused.

We are turbo Eclipsefags.

>And Xtend code exactly where my co-workers tend to get confused.
Sounds like you need better cow-orkers.

Well, sadly Im only in a position where I can influence the technologies we use, not the people we employ.

Bloated. Too much abstraction. Only retarded normalfags like it.

Using IDE-specific code generation or libraries as part of your project build and compile is a literal warcrime.

Lombok is the one exception. I don't use any other annoations other than what e.g spring or Java EE provides.
Once you've tried lombok, writing Java without it is unthinkable. It's the free gift of LESS CODE without compromising readability, leading to less complex code.

Hopefully, it'll become a Java Standard or some shit.

Fuck no it isn't. Including lombok is literally one (1) dependency and you're done. Kotlin is cool and all with the data class, but lombok has it one-upped still: class extension.

data class MyCock(val length: Long)

data class MuhDik (
override val Length: Long,
val girth: BigDecimal
) : MyCock()

Versus

@Data
class MyCock {
String veryLong;
}

@Data
class MuhDik extends MyCock {
String helloWorld;
}

as you can see, no need to redefine the variables of the super-class.

Nothing would change, except for the constructor. In your case, it would really fuck you over because the code would still compile. But then again, this is the same problem without lombok.

The final answer too the Jooq is lombok.

I'm hinting at the fact that maybe you work at a shitty company. If you are the only person who gets Xtend, you probably aren't compensated enough.

this you stupid hipsters

java is alright. a lot of people use it; thats also why a lot hate it. its the same reason why so many people shit on other popular things

Attached: 1370782838354.jpg (400x363, 78K)

>modern day java IS indeed comparable (performance wise) to "native" languages
Given unlimited RAM, which, like CPU cores, costs money (# of servers). Go sucks for not having generics, but the memory usage is night and day.

Yeah but Im also the one in line to take over as project manager, eventually. Also the pay is nice, so Im not complaining.
The main problem is really that we are a completely new group within our department. Everybody is straight from university (including me) and is very inexperienced.

Get Intellij licenses for your team.

Also, what software are you developing?

You are running out of cpu cores before you are running out of RAM
RAM is cheap and there is a lot of it. Java actually does not need a lot of ram if you give it less, it will just need as much RAM as it can to reach optimal performance. Example: If you got 32 gb ram, it will easily use 2gb+ of it, if theres enough available in order to minimise GC. If oyu have less RAM available it, will use less but if you generate a lot of objects it will also do more GC