Tell me something nice about java

Tell me something nice about java

Attached: 886ae215-3028-4ee1-8f74-b8a9876f8ca2..jpg (720x720, 69K)

Other urls found in this thread:

dev.to/rosstate/java-is-unsound-the-industry-perspective
twitter.com/SFWRedditImages

Just started a Java project.

I want to die, this language is so fucking trash, I could write this program 30 times over in 30 other languages in the time it takes to write this shit in Java, kill me please.

Attached: 1447959536284.png (768x1024, 962K)

Honestly, what's so bad about it? I'm using now for a university course and it seems ok

>what's so bad about it?
Oh you sweet summer child...

Attached: f2rjwzv2hoay.png (500x498, 129K)

I'm only a Python/PureBasic babby, why is Java so bad? I've seen some Java code online and the verbosity of the language did not seem pleasant, is there a point to it?

if you're running a company, it is extremely easy to pick up hires for a java stack (spring mvc etc). The product works reasonably well (albeit annoying to develop on) and is relatively stable with a low amount of effort

It's better than C++.

>mfw brainlets can't handle statically typed language

Dynamic languages are the worst. Everything is so ambiguous, fuck JavaScript, Python, Ruby, etc.

>Why is Java bad?
>BECAUSE ITS NOT BECAUSE OTHER LANGUAGES ARE WORSE!
You are the reason why we can't have nice things.

Attached: 1507178507431.jpg (500x375, 67K)

It's good for big projects, it just werks

when your IDE is autocompleting almost all of that shit, you don't care as much
but it's still kind of fucking dumb

Java is a bad language made good by the ecosystem, libraries, frameworks and tools
now replace java with kotlin or scala and you have truly ascended
or use lombok and a good ide

I have yet to see any other framework in any other langauge that can beat Spring Boot

Java doesn't have sane static typing though

In fact the generics are so broken you can compile code that will write to arbitrary memory locations and you can convert any type to any other type

Kotlin is interoperable with Java and that's kinda nice

I feel like killing myself when doing java.
Everything is a class.
EVERYTHING

Good:
>portability that just werks
>mature ecosystem
>reasonably fast (despite what most people will tell you)
>garbage collection is doing well in 99% of cases
>debugging is easy as pie
>very little action at a distance if you have half a brain
Neutral:
>the verbosity isn't really an issue when you use an IDE or are simply used to it
>lots of shitty code is down to people making shit into classes that shouldn't really be classes, passing around instances of those for every minor thing, etc.
Bad:
>even doing simple shit tends to spiral into overly complex code, not that it has to but people still do it
>streams are objectively fucking awful
>it's gotten to the point where you've got everything and the kitchen sink now, which can confuse people trying to pick it up as a first language

>Everything is a class.
>EVERYTHING
yeah, especially primitive types, operators, etc

Attached: 1.png (1416x1600, 606K)

literally one of the major java criticisms is that it's not actually OOP because too many things are NOT classes / objects

>OO
>wah-wah classes everywhere
don't know what to tell you mate.

Or that too many built-in things are final, such as String etc.

You are speaking to someone who spend 2 years in C and now is forced to do Java.
It just makes me feel so constricted, like you arent going to do this by yourself, there is already a class for that.

>you arent going to do this by yourself, there is already a class for that

that sounds like a pretty decent advantage user

>rich standard library is bad
>not reinventing the wheel each time is bad
>greatly increased productivity is bad

And that's exactly the point. Java is verbose but fast for corporate shit. Making something like an accounting/inventory back-end for a mid-sized company barely takes any time or much thought. If anything pops-up you can fix by looking up the docs/googling shit in a heartbeat. Most peoples complaints are a bit in the vein of complaining that using a mallet is not optimal for fine carpentry and therefore mallets are shit tools.

Maybe but I have shitfor proffesor who doesnt tell me anything, so unless there is is exact same problem already at stackoverflow, I need to go through 1800 page book to find what I need.
It may be good for people what is exactly in those libraries and have been gently eased into them over time.
My course basically thrown me inside waterpool, and swim or drown bitch.

>don't use built in stuff
>do everything from the ground up
problem solved, you missed the entire point of using java and would probably be better of with something like C, but still.

>tfw you realize that the standard library is only 1% of the ecosystem and you'll have to learn an aditional 100 libraries pulled in as dependencies

Attached: 1523132794615.webm (1280x720, 789K)

>so unless there is is exact same problem already at stackoverflow,
>it's gotten to the point where you've got everything and the kitchen sink now, which can confuse people trying to pick it up as a first language

That's why most java-devs are a shit, they get stuff that evolved over decades crammed into them in 6m-1y. But hey, that's the principal challenge of everything computer related: the sheer volume and convolutedness of everything.

>It may be good for people what is exactly in those libraries and have been gently eased into them over time.
>My course basically thrown me inside waterpool, and swim or drown bitch.
Java is HUGE. there's no going around that, you just have to become familiar enough with it by constantly working with the language, checking the docs and googling everything

people who just string together a bunch of libraries shouldn't be called developers

If not for Java, how are you going to make mobile apps?

Objective C, Swift

The JVM underneath it is actually pretty good. There's a reason Clojure, Scala etc used it.

>I'm gonna waste time and money trying to reinvent something that's created by people who specialize in it and has been heavily tested and optimized for years, because I think it will make me a better programmer. I'm gonna introduce various bugs and performance problems in the process along with additional code that has to be maintained

Attached: flat,900x900,070,f.u1.jpg (900x900, 73K)

>because I think it will make me a better programmer.
To be fair, that not a bad idea: doing shit manually to get a better understanding of how it works. Probably not a good idea to do that during production, though.

Portable and popular? I enjoy being able to work on the project the same way in the same IDE (Netbeans) across my Linux and Windows machines.

This, a million times this.

doesn't Android Studio support Koitlin or whatever that was called? I swear i saw in an android dev website tutorial before
iOS shills need not apply until their market share is remotely comparable to android's to warrant me wanting to develop for that sinking ship

Exactly, during my CompSci course we were often taught and had to work with low-level APIs and libraries but when the time came for assessment we were free to use abstraction layers and such.

>statically typed language
At least give a good type system. Java inherits everything wrong about C and C++ (ommitting just pointers, except for the fact that object types can hold a null value, so you have to still deal with null pointers) and gives you worse performance and overhead of JVM.
If you're fine with overhead of a virtual machine and GC, you might as well use a proper high level language like modern ECMAScript.

*dibs bedora* :D:D

>servlet
>applet
>bean
>factory
how can anyone take this language seriously

there's typescript for confused people like yourself. Also - the world is saying something else but keep living under your rock

is it weird that i'm still not fucking sure what any of those actually mean? I mean, i'm pretty sure i used them

so there is someone on Jow Forums with a sane mind that things objectively

Can you post source/poc of your claims?

unlike what people say, a lot of the design patterns are pretty useful

My work is switching from struts to spring boot and I am excited.

>Bean
The absolute state of Java

Yes, Google added first party language support for developing Android apps in Kotlin last year. I just started working in it two weeks ago, and subsequently had to call my doctor for an erection lasting more than four hours.

Attached: 1493539442319.jpg (816x1024, 185K)

sounds like i have my weekend set up

Since we use the summer meme earlier and earlier every year, there will be a point in which it will have just become a synonym of newfag

it already is

>tfw work for oracle

Attached: 1227751815935[1].png (448x458, 245K)

Jvm is cool.

If you do not know what factory is then I sudgest you study oop patterns.

a factory's a building, not code!

Not going to sugar coat it but it’s verbose as fuck. Fantastic libraries. Gradle has unfortunately infected the build ecosystem.
Overall it’s OK.

what's wrong with gradle?

How often does Larry come down and fuck you in the pooper?

>implying it ever wasnt a synonym of newfag

It ain't ASP.NET

Personally it just feels like shell scripting builds all over again, with all the fun and horror that comes with it. Plus daemon is such a fucking horrible hack around the slowness of builds that it turned me off gradle completely.

And decorator is person decorating.
And builder is person building...
And singleton is that single brain cell in your brain.

But srsly - learn your patterns if you are doing any oop.

what are patterns

Oh. You must be front end fellow.
Never mind.

Got any book suggestions?

>original gang of four book
if you're an autist or just woke up from a 20year comma
>head-first colouring book
if you're retarded
>pajeet#44996's youtube tutorial series
if you are a true javaman

What's it like having no actual work experience whatsoever

Cause unless you get really, really lucky and land a super rare job that's the reality you will face


t. dev with 3 years of experience

congrats user

the first time I used Spring Boot I was worried about having my job outsourced because everything suddenly became so easy to do

dev.to/rosstate/java-is-unsound-the-industry-perspective

>a design pattern
>it's forced everywhere

Java 8 (10 seems nice too due to var)

?
are you saying that objected-orientation is a design pattern? in a strictly semantic way you're kinda right in that a programming paradigm is a pattern and that it is the basis of the design; but by that logic almost everything is a design pattern.

Attached: shitty meme.png (720x720, 376K)

it will get you a job and they will pay you for it. But maybe having a job is not your thing

Everything that's 'verbose' about java is there for a reason.

Yes. You can do OO programming in C (not only can, it's actually done) which isn't really an OO language. You can do it in purely functional Haskell. You can probably do it in many languages I don't know. I'm kinda puzzled why OO programming is a paradigm when it doesn't really define much. OO is more of a way of thinking about a problem and not about the language. It seems to me that somebody confused these two and made a language (actually a shitton of them) that only has screwdrivers. Need to hammer a nail? Well, a screwdriver must do.

never wrote a single fun or useful line of code in java.And the thought of doing servers with it seems cumbersome. But people that use it says that the java servers are fast, stay up and are easy to maintain and fix

I admit it's been a while since I've done C, but how would you effectively do OOP in that?

Assuming we define OOP as "functions and the data they operate on are bundled and the data is encapsulated" could you point me to a simple example?

Not a leading question, genuine interest

>“But It Doesn’t Compile”
>If your compiler doesn’t type-check our example, I have news for you. No, your compiler isn’t catching the bug. In fact, your compiler itself has a bug. Your compiler is broken. The Java specification says this example should type check and compile. Your compiler is supposed to implement that specification, and it’s failing here. It’s failing because it didn’t anticipate the corner case we created here.

I've found the autism. Complaining about shit that will never ever matter for anyone anywhere unless your purpose at that point in time is just to complain.

Only doesn't compile in certain compilers

Others will happily compile that code and let you create a backdoor that writes to any arbitrary memory location

>is there a point to it?

When you actually need to make something that people are going to use

There's a major difference between classic java and modern lean java, which is starting to look more and more like C#

I do truly feel sorry for softwareonlyfags.

Attached: 1522064423919.jpg (746x500, 102K)

You're just going towards the argument of "you can do anything in any turing complete language." Sure, you can. But why the fuck would you do complex physics calculations in java? why the fuck would you make basic bitch business programs in haskell?

>OO is more of a way of thinking about a problem and not about the language.
Yes. And an OO language is one that makes implementing the conclusions of that train of thought as feasible as possible without bothering you with stuff like manual memory managment etc., like Java.

>Need to hammer a nail? Well, a screwdriver must do.
Yeah, because no Java project ever got done due to how impractical it is. Jesus fucking christ, you got me defending java. Fuck you.

You could do something like:
struct foo {
int a;
void (*modify_self)(struct foo*);
int (*some_function)(int, int);
};

Yeah, there is a lot of boilerplate that compilers in OO languages would insert for you so people do this only when it makes sense in the context of a problem. One could probably make some macros to make it easier but I do not wish to see it. If you wanted to encapsulate the data you would just not expose the structure of foo (which is pretty tricky because in C you can always just access the raw bytes in location of foo). As for actual cases of usage you can often see stuff like this in operating systems but they usually don't carry data around. Just some functions implementing an interface to abstract over things like file systems.

what are you, some kind of assemblyfag?

Java is going to dominate in the IoT and AR environments

Who makes these

>You're just going towards the argument of "you can do anything in any turing complete language."
No. I didn't mean "you can do it" as in "you can express the same computation" but as in "express the same thought pattern". C, Haskell and Prolog are fundamentally different languages (imperative, purely functional, logic) yet they all can express the idea of an object (dunno how well it goes for Prolog though). They have fundamentally different models of computation but apparently objects don't care about that. Objects in Haskell aren't even lengthy. It's like OOP is just a set of macros to reduce boilerplate for implementing objects in a given language. You take a language, strap these macros onto it and get an OO language. So is OOP a class of languages?
>But why the fuck would you do complex physics calculations in java?
I wouldn't because I don't think it would be fast enough and I'm not a java guru to optimize it.
>why the fuck would you make basic bitch business programs in haskell?
Because Haskell is a great language. But I'm not gut enough to make actual programs with that monad stack thing.
>Yeah, because no Java project ever got done due to how impractical it is.
Apparently hammering nails with a screwdriver just werks. Didn't you ever think how easier it would be if you could just define regular procedures instead of static methods in Java? Damn, static methods are pretty much like regular procedures but wrapped in some class namespace for no apparent reason. I like Python for allowing one to just make a procedure when they think is appropriate. I actually don't use Python though. Also, the whole "OO design patterns". To me that is just a proof that OO programming makes some fundamental things unnecessarily complicated because it often just doesn't fit the problem.

EE

BEANS

thats called a codemonkey, pajeet.

>...but as in "express the same thought pattern".
Okay, fair enough. Misunderstood you there.
> It's like OOP is just a set of macros to reduce boilerplate for implementing objects in a given language.
Basically? Yep.
>You take a language, strap these macros onto it and get an OO language.
Okay, making all these "macros" ie. the skeleton, jcf, jfc, jdbc, jpa etc. took a quarter of a century and millions of work-hours. That's not nothing and is substantial enough to warrant it's own classification. Yeah, you could tack all that stuff onto C - but it would take decades and it wouldn't be C anymore. So yeah: OO is in the implementation, not some special kind of OO quintessence. In essence the whole "good ecosystem" thing that counts as a bonus for a language/tech - that, excatly that, only it is part of the basic spec.
>Because Haskell is a great language.
It's not for that purpose. It could be if someone put in the work, but that is an if of epic proportions.
>Damn, static methods are pretty much like regular procedures but wrapped in some class namespace for no apparent reason...
Do it all the time, I even commonly make franken-classes with nothing but global procedures. That's shitty even by Java standards. Does it bother me? A bit. Does it bother me when I get something done before a deadline and collect a bonus or even just extra good-will with a client? No.
>Also, the whole "OO design patterns"...
Got me there, but I'm just a stupid code monkey and really don't have a comment on that one.

>I don't like it because I'm bad at it and don't understand it

I seriously hope you are lucky enough to get a job in systems or embedded, otherwise you're going to have a bad time

Did you ever consider that one or two courses on java/oop in college aren't enough to give you any qualified opinions

Because it's becoming quite obvious you're speaking from a student perspective

Threads like these just reinforce the idea that 90% of g consists of unemployed neets who have never written a program more complex than fizzbuzz.

I used Java and Swing for a computer graphics class and liked it.

I'll admit I don't have much experience in GUIs in other languages (only a little in Python) but it seemed pretty robust and not all too complicated.

>you could make C into Java given enough time and resources
>hence java is superfluous
mate, that's exactly what was done. Only Java was written in C++ as far as I know.
that's like saying: "you could make C in assembly if you needed to, hence you only really need assembly." before you're done you come to the conclusion: all you need is machine code, everything else is just bloat.

FX is even simpler and nicer.

I don't use Java and that's the best thing about it