Why is Java so complicated compared to other languages

Why is Java so complicated compared to other languages
I fucking hate learning this shit but I have to for Android

Other urls found in this thread:

github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
javacoffeebreak.com/faq/faq0006.html
medium.com/netflix-techblog/benchmarking-cassandra-scalability-on-aws-over-a-million-writes-per-second-39f45f066c9e
twitter.com/NSFWRedditVideo

>this shit
>android
>android isn't shit
that's where you're wrong, poo-brain

hol' up, you seriously have problems with a language easier than using a toilet?

Yes, like what's the point of a constructor if you can feed a variable the class giving it access to all its properties and methods

This is the most annoying language I've come across

Out of...2?

Java is made (and makes more sense) in large scale applications.

If you're coming form something like Python or JavaScript, things feel very slow and cumbersome. And yes, you write a lot of boilerplate code in Java (usually an IDE takes care of the worst boilerplate like getters and setters). But the explicitness and slowness is good for bigger projects with lots of different pieces. Why would use a marker interface for a "hello world" app?

Constructors are interesting because you can have different constructors and chain them:

public class OPisAFaggot {

private String txt;

//default constructor of the class
public OPisAFaggot(){
this.txt = "Default constructor";
}
public OPisAFaggot(String str){
this();
this.txt = str;
}

public static void main(String args[]){
OPisAFaggot op = new OPisAFaggot("poo in loo");
}

>this()
Confirmed to have never used Java outside of a single school assignment.

>But the explicitness and slowness is good for bigger projects with lots of different pieces
Java is shit. The type system is shit. The new functional programming package is shit because the type system is shit.
It's unnecessarily verbose and tedious to both write and read.
Notice how an ide can help you write verbose code but it can't help you read verbose code. Code is read more often than it is written.

Look into Kotlin if you want a slightly better Java.

Just looked into kotlin recently and it fixes so many of my gripes with Java. Even though it uses some of the most unusual syntax for specyfiyng types of variables and output types of functions.

>Confirmed to have never used Java outside of a single school assignment.

If you say so, internet tough dude..

Obviously it's just a simple example, so a real life application would be a lot of complicated configuration in the default constructor. Since code duplication is a bad code smell, you want the complicated stuff in one (and only one) constructor. Then you chain them together.

What's you point?


>Look into Kotlin if you want a slightly better Java.

Yeah, great advice for a NEET.

Java has about 1 million times more jobs/open source project as Java. Not talking about the ecosystem..

I mean I would have accepted C# or even something like Clojure or Scala here. But Kotlin?

Seriously..

OP's talking about Android development. Kotlin just got officially supported by Google on Android.

>reddit spacing

>Obviously it's just a simple example
No you fucking retard, the point is that the parent constructor is called with super(), not this()

>Java has about 1 million times more jobs/open source project as Java. Not talking about the ecosystem..
>I mean I would have accepted C# or even something like Clojure or Scala here. But Kotlin?
Kotlin shares Java's ecosystem. You can call Kotlin code from Java and Java code from Kotlin just fine.
You couldn't even bother to do a single google search before making your retarded post.

>parent constructor
That's when you use inheritance, you use super to call it.

I think what that dude meant is something like having a constructor that takes 4 arguments and you only provide 2, so inside that 2 args constructor you can do something like this(0,arg1,0,arg2);

Calling the 4 argument constructor and not having to code for all the constructors.

>Why is Java so complicated compared to other languages
What? Even PHP is harder than Java since you need to assume the same retarded mindset as the people behind PHP.

>other languages
>PHP

Java is not complicated. it's actually one of the most readable and easy languages there are.

My first language was Python. it has too many gimmicks and shortcuts that you don't really understand how stuff works.

Thanks to Java I love programming

Yeah working with stuff like operator overloading can be so confusing sometimes.

Oh wait Java doesn't even have op overloading. You just have to .equals() everything.

C# + Xamerian makes Android development possible, with the added benefit of being cross platform.

How are the Android APIs on Kotlin?

>No you fucking retard, the point is that the parent constructor is called with super(), not this()


Whoa, what's wrong with you?

There is indeed a difference between "super()" and "this()", the former being the constructor of the super class, the latter being used for the constructor of the same class..


>Kotlin shares Java's ecosystem.

Whatever...
To me the difference is not really important.

Android is just shit.

Ahahaha you fucking retard, you claim someone else has never used Java when you can't even fucking read what simple code is doing

You can call Java functions directly from Kotlin (And Kotlin functions from Java), so the API's literally the same. Kotlin helps out a lot with custom inline functions, operator overloading and other non-java stuff, but the main API's the same.

it was made by a prison inmate.
its is complicated to hide the hardware lvl code manipulation commands.
like magic.
ever thought it was on another lvl?

Lol java?
>mfw went to try windows programming after you realize GNU/C/C++ is meme lords for communist open sores

Can't understand a single concepts except after reading it 10 times and looking at multiple souces and trying to find an analogy in linux.

You want to be productive don't start with GNU/C/C++ meme

give an example where it's complicated but another language is not.

i've never heard anyone say this before, plenty of people say it's verbose, but complicated, it's like a kids language, you can't even access memory or system APIs directly so you can't break anything

>That moment when you realize you can't code apps on scratch

What's wrong with this()?

Java is for people with jobs. NEET brainlets need not apply.

Java is ridulously easy. It's as simple as it gets, really.

That's the point. 90 IQ pajeets can use it and be productive.

In a backwards-ass language where all object types are implicitly refrences, overloading == would be terrible.

Java is designed for multiple dev to work effectively. Constructor is a contract to let devs other than creator know that the class will work as long as 'x' is provided.

You must be a retarded web-dev. If you want to make every member public feel free to do so.
There are times when you want to use a parameterized constructor to create an immutable class.
Getters are useful to provide copies of collections, or to decorate a parent getter.
Setters are useful to provide validation.

java is very simple compared to other languages

>Java
>Complicated

It's literally one micro step above basic English, pajeet.

The reason enterprise love to use Java is because of J2EE interfaces. It allows dev to choose their own favorite implementation of a specific part of the system.
I.e. I can use Spring + Hibernate, or Spring + EJB. Spring can work with either one because both Hibernate and EJB implements the same set of interfaces.

Not to mention Java app can work in any environment.

Its crap. Don't expect to make a professional app out of it.
Good for small hobbist projects though.
There is also Cordova, React native and most recently Flutter. None of them are meant for pro development.
t. Android dev

>both Hibernate and EJB implements the same set of interfaces
you wot? EJB is a component container and Hibernate is an ORM framework.

Okay my brain farted, will it work if I change it to Hibernate vs Spring JDBC (for performance) ?

Java is a pretty easy language

> java
> so complicated its taught as baby's first programming language throughout the world

not really, but you can change it to Hibernate vs EclipseLink vs MyBatis vs whatever else, because they are all JPA implementations

No.
Nowadays you use spring data JPA, and most frequently you end using hibernate as the implementation, except for the rare cases when you are forced to use EclipseLink.

Same with me. Sure it isn't perfect but it is easy to use without being a total pain in the ass like C++ for desktop software. C# is nice also as it is basically Java. I've not used C# in a while though. WPF was just coming out when I used it last but I think Microsoft has kind of deprecated that now in favour of UWP or something?

install kotlin

I fixed your implementation.
I would have taken off serious points if you showed that during an interview with me.

public class OPisAFaggot {

private String txt;

//default constructor of the class
public OPisAFaggot() {
this("Default constructor");
}

public OPisAFaggot(String str) {
this.txt = str;
}

public static void main(String args[]) {
OPisAFaggot op = new OPisAFaggot("poo in loo");
}

>Original code shows chained constructors.
>"Fixed" implementation does not
>I would have taken off serious points if you showed that during an interview with me.

Shit interviewer.

>>"Fixed" implementation does not
What the hell is this then?
public OPisAFaggot() {
this("Default constructor");
}

>
>implying others than street shitters use Javashit.

overloaded constructor

...

yes

top kek.

ok

> feed a variable the class

Oh fuck man, Jesus. I'm sorry you're so retarded.

you know a language is shit when you can't be productive without a fucking ide

My Java teacher once told me "don't worry the IDE will write this shit code for you."
Ya but it's still shit code then. That doesn't solve the problem.

The biggest advantage to Java's structure is it eliminates a lot of runtime errors you get in other, less structured languages like Python.

Now you get why all your jobs are being sent to India? If Java was easy, even white people would be able to do it.

IDE makes your job easier and indeed more productive for any language, not just Java. Why people still refuse to use them in current year is beyond me unless you just wanna write some quick snippet.

Enterprise FizzBuzz:
github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

It might seem like a joke, but it's really not. Javaturds think this is how code should actually be structured.

Java is why there is a backlash against OOP among millennial FP fans. It is over engineered and it encourages over engineering. Fucking .NET is simple and concise by Java standards.

On top of that Java is slow and with the exception of Android produces shit applications. If you need a decent GUI and/or high performance, you need something else. If you don't give a fuck about the end result and just need to hire an army of street shitters for cheap while you milk an investor, you need Java.

reggie is a fag

Java's faster than any of your functional autism, senpai.

The issue isn't with IDEs making stuff easier. The issue is when required to use it even for some basic editing.

i know, i'm just a bit butthurt because my pc is shit (tfw 1 gb ram) and it would rather crap itself than run any ide and the only jobs where i live are all java

You should learn to compile/run Java without IDEs first (ie, learn to walk before you learn to run). Java + Android Studio is not recommended for beginners.

>Javaturds think this is how code should actually be structured.
If it's a 100k LOC enterprise application then of course. If it's a fizzbuzz then of course not.

>It is over engineered
If by over engineered you mean suitable for large applications then sure.

>and it encourages over engineering.
If by over engineering you mean creating extensible and maintainable large applications then sure.

>On top of that Java is slow
Java is fast.

>If you need a decent GUI and/or high performance, you need something else.
Not really, see JetBrains products.

You don't need to use an IDE for Java. You're not force to use an IDE for Java.

>I fucking hate learning this shit but I have to for Android
Same
I usually work with 8 bit micrcontrollers, sometimes even 32 bit ARM ones, assembly and all kinds of small embedded shit. Im pretty used to C, made a lot of shit in it, socket programming, bit of GUIs, you name it.
Then i feel the need to learn java because in my toolkit, i have exactly zero of those "widely used high level programming languages", C++ doesn't count for most part.

I try to learn java and damn, it is so ugly looking i dont even feel like learning it, but i have to because its so widely used and its applications are immense. So here i am forcing Java down my neck. Its mostly the scary sounding concepts and lack of motivation to learn thats keeping me away, that i'll tell you

>scary sounding concepts
what could possibly be scary about Java?

Join the master race: C#

C# is ugly as fuck

at least Java has purity

Don't worry, some really smart and clever people decided Java should be usable even on embedded devices and RFID cards (Javacard), so you'll be able to program shitty Java code for just as many embedded devices as with C

C# is a fixed Java.

C# just makes me wish I was writing C++ or maybe D instead.

>what could possibly be scary about Java?
Constructors, polymorphism, inheritance, etc
Well its not like java is bad, its just that i haven't given it the time required to learn a new language or skill

All of those things are easier in Java than in C++. Java is shit, but because of different reasons.

Those all look pretty much the same in either language.

Just just kotlin, it's 100% interoperabile with Java. It even has tools that can convert your kotlin code into Java so the Pajeet boss doesn't know.

KOTLIN
O
T
L
I
NIGGERS

looks like shit though

You mean like Java code?

Java's syntax is ok, kotlin is just different for the sake of being different

Kotlin removes boiler plate code, discourages nullables, and makes the syntax prettier. It's supposed to just be an improved Java.

>Add bluetooth support
Fizzbuzz pvp when?

Lol, fucking undergraduate retard.

nice argument bro

>Java has purity

>complicated

even curryniggers can learn java
kys if white

As far as syntax goes, yeah it does. Java's language rules are pretty minimal.

>>Javaturds think this is how code should actually be structured.
>If it's a 100k LOC enterprise application then of course.
You're what's wrong with Java development.

>>It is over engineered
>If by over engineered you mean suitable for large applications then sure.
No. I mean overly complicated. A dozen classes and 15 interfaces to implement a simple fucking function.

>>and it encourages over engineering.
>If by over engineering you mean creating extensible and maintainable large applications then sure.
Java apps are the exact opposite of extensible and maintainable.

>>On top of that Java is slow
>shows a pic of irrelevant STACK benchmarks
>"Java is fast."
Try implementing any CPU or memory I/O intensive algorithm in C, C++, and Java, and see which one gets its ass kicked to the curb.

>>If you need a decent GUI and/or high performance, you need something else.
>Not really, see JetBrains products.
>kek
I once had to use the JetBrains IDE and it made me want to murder a JetBrains developer. Takes forever to launch; forever to open a project; can't keep up with typing; crashes every 5 minutes; and managed to max out a fucking core i7.

Ever hear of CodeWarrior? It was a popular IDE on Power Macs in the late 1990's. It was far faster and more responsive than JetBrains, and that was on 100 MHz chips with 8-16MB of RAM.

>As far as syntax goes, yeah it does. Java's language rules are pretty minimal.
>purity

>What is Pure Java? I've heard that its 100%, so if I only use Java code and no external applications, is my code 'pure'?

>Answer 100% Pure Java code is code that conforms to the Java ideal of universal portability. Writing an application that doesn't exploit operating system/platform specific features is a great start, but you also have to write the code in a platform neutral way. This includes things such as not hardwiring the '/' symbol as a file separator on Unix systems, as this will fail on a Wintel system that use '\'. If you don't rely on the core Java API's, and instead use native methods, this can also disqualify an application from being 100%. Developers who wish to use the 100% Pure Java logo must have their application independently verified, using the Java Purity Checker software. Full details are available from Sun, but developers who wish to write portable code can read the 'cookbook' for writing pure applications for free.
javacoffeebreak.com/faq/faq0006.html

>java for embedded
>now your "microcontroller" requires 16 cores and 32gb of RAM
Fuck Java.

You're confusing purity of the structure and syntax of the language with the purity of the code you're writing.

>No. I mean overly complicated. A dozen classes and 15 interfaces to implement a simple fucking function.
You're just making shit up lol

No point in educating a retard.

>boilerplate like getters and setters
You remind me of a kid who used to auto generate getters and setters for everything and then not use them.

>t. never worked on a java project
No, the nightmare is real. Enterprise FizzBuzz is real.

How many of you guys with jobs actually see the supposed benefit of Java on huge enterprise projects?
Like... I understand that Java is engineered the way it is in order to make armies of Pajeets productive on a single project with hundreds of thousands of lines of code.
But my problem with Java is that a good chunk of enterprise business development (that I've experienced) is not a huge project with hundreds of thousands of lines of code. A lot of the code I've written has been relatively small and the entire project done by me and a couple of other people, just to solve some immediate business need. Sure maybe Java makes a huge project overall more manageable, but for the 90% of small things you have to put up with all the verbosity and boilerplate and Java bullshit anyway because managers, pajeets, and middle aged developers are afraid of anything else.

At one time hard math was used to keep people out of software development who really had no business being in software development. Those days are long gone and the industry is flooded with pajeets and coder camp 'graudates.'

I suppose with an army of pajeets Java's broilerplate is necessary to minimize the damage done by fuck ups. But if you didn't have pajeets in the field it wouldn't be needed.

OOP can be very good even on a one man project (depending on the project). But with a team of real engineers you don't have to have the inane complexity and separation found in Java.

If you have any talent as a developer and you've worked on smaller projects with other decent developers you quickly realize how ridiculous Java is.

>You're what's wrong with Java development.
I think you're overestimating my influence.

>No. I mean overly complicated. A dozen classes and 15 interfaces to implement a simple fucking function.
Do you have an example?

>Java apps are the exact opposite of extensible and maintainable.
All of the big players that are using Java seem to think otherwise.

>Try implementing any CPU or memory I/O intensive algorithm in C, C++, and Java, and see which one gets its ass kicked to the curb.
None of them if the implementations are good.
Is 1 million writes per second enough for you?
medium.com/netflix-techblog/benchmarking-cassandra-scalability-on-aws-over-a-million-writes-per-second-39f45f066c9e

>I once had to use the JetBrains IDE and it made me want to murder a JetBrains developer. Takes forever to launch; forever to open a project; can't keep up with typing; crashes every 5 minutes; and managed to max out a fucking core i7.
I watched a lot of talks with people demoing their stuff in IntelliJ on shitty macbooks and it never lagged or crashed.

>Ever hear of CodeWarrior? It was a popular IDE on Power Macs in the late 1990's. It was far faster and more responsive than JetBrains, and that was on 100 MHz chips with 8-16MB of RAM.
That's fantastic, but irrelevant.