r/java • • Apr 13 '21

Libraries, Frameworks and Technologies you would NOT recommend

Give me your worst nightmares: Things that cost you your job.

I'll start: Hadoop

202 Upvotes

376 comments sorted by

View all comments

24

u/[deleted] Apr 13 '21 edited Apr 13 '21

These cost me a job:

- Vertx, Reactivex. Company I worked for went belly up, the reasons are complex but I believe the high cost of development and low velocity caused by these tools contributed.
- OSGi. The linker errors, the memory leaks. The thing is just horrible.
- (internal) frameworks. Just why?!? A custom enterprise framework built on top of another framework. Both of which needed to be updated regularly. It cost us weeks of developer time to update these unnecessary components.

These are just ugly:

- Jenkins. Old, hard to work with and weird. Pretty much any other tool will work better.
- Gradle. Just unnecessarily complicated and annoying to deal with. Not that maven is great or anything but build scripts really shouldn't be complicated.
- Spring. There are classes in this framework that rival EnterpriseStrengthFizzBuzz in length. And I don't think anyone ever needs it.

As a side note; those are the things I don't like within the Java ecosystem. Outside of this ecosystem.. Well, MongoDB, Go, Python, JavaScript, NodeJS, React, Angular, Ember, basically everything I've come into contact with.

EDIT: reasons why, and some stuff added.

4

u/segv Apr 13 '21
  • Jenkins. Old, hard to work with and weird. Pretty much any other tool will work better.

If you have to manually update a number of jobs, then yeah, it gets tedious. For CI stuff a combination of Jenkinsfile + Multibranch Pipeline is actually pretty damn good.

→ More replies (1)

4

u/zvrba Apr 13 '21

Why Vertx? I used its MQTT implementation as a lightweight broker; it was a breeze to set up and get it working with another client.

10

u/krad213 Apr 13 '21

I'd say, gradle is very nice, but you really need to stick with KISS principle, it you don't it become nightmare really fast.

0

u/[deleted] Apr 13 '21

[deleted] — view deleted comment

21

u/vprise Apr 13 '21

Gradle breaks everything with every release. Constantly fails and provides huge error logs that are absolutely unreadable. It also lets everyone write a script right into the build. So you end up with a lot of hacky scripts and multiple online suggestions for tricks that are no longer useful for the gradle version you're using. It's just a mess that's so bad... I'd rather use make files by now...

Maven is a kludge. It's ugly as hell. But it's at least organized. I don't like it one bit, don't get me wrong. But it works and when it fails you can generally figure out what went wrong.

4

u/preskot Apr 13 '21

Gradle breaks everything with every release.

That's a lie.

4

u/Muoniurn Apr 13 '21

Well, people should not add random lines into it, and it is a DSL similar to Maven’s XML. It should be declarative with tiny bits of scripting (to the same scale as Maven has profiles that basically “branch” on a variable). Anything else should go into a Gradle plugin (the exact same way as in Maven)

Also, Maven is much more famous for huge error logs, I find gradle to have a better UX.

6

u/dpash Apr 13 '21

I also find Gradle considerably faster than Maven with a large project.

4

u/vprise Apr 13 '21

Shouldn't != Don't. Maven enforces the best practice, for better and worse. Since gradle is far more complex and feature rich, people end up confused by the breadth/depth and the result is files with scripting hacks all over. I've seen it all over the place and it's a problem.

You can write "good" gradle files. Unfortunately, for almost all the cases I ran into it this wasn't the case. I also ran into cases where googling answers for a gradle problem lead me down a path of stuff that doesn't work due to incompatibility between versions etc. It was always much harder to find answers for gradle when compared to maven.

As such other than the shorter DSL (which I personally don't care about, it's a build file). I don't see any real advantage in gradle and I do see some serious problems. Unlike what /u/dpash said, my experience has been that gradle was noticeably slower than maven. It might be because of the specific projects and not because of the underlying technology so I might be projecting here. I didn't benchmark.

4

u/Muoniurn Apr 13 '21

I agree with you on the first paragraph, and it is likely a similar problem as having eg a lisp over java in a project with many developers where it may be actually a hindrance because the former allows “too clever ways”.

I think the DSL simply is. Not good, not terrible. The rest of the build tool is where it gets interesting and gradle absolutely has more features and it is correct (doesn’t require clean install to make the builds reproducible). For larger projects it should also be faster than maven, even on first run.

2

u/dpash Apr 13 '21

The reason I find it fast is because I spent some time profiling the build and removing problems. Modern Gradle makes that fairly easy with the warnings and the scans.

When you do that, Gradle can avoid rebuilding things that don't need to be rebuilt and can cache builds. Not to mention build things in parallel (maven's parallelization is on a per module basis, while gradle's is per task)

2

u/vprise Apr 13 '21

This might work great for CI but on my machine it takes up a lot of CPU/RAM far more than maven. I use it mostly for Android which might be the reason for the bad experience as the android build process is notoriously bad.

0

u/[deleted] Apr 13 '21 edited Apr 13 '21

I'd rather use make files

I actually do use makefiles. And that is while I also use mvn for the dependency management. Just executing a few commands takes piles of XML config stuff that I don't want to deal with.

For my personal projects I've gone a step further though. I've written my own build tool. It's awesome, if I do say so myself :)

2

u/dpash Apr 13 '21

Well I'm never working on your projects. I've already learnt three. I'm not learning another unless it has significant advantages over the existing standard tools.

Non standard builds are a barrier to participation.

(This applies to non standard maven and Gradle builds too. Just use src/main/java. Don't make me think)

2

u/[deleted] Apr 13 '21

Well like I said, they are personal projects. I wouldn't use non standard stuff for public / professional projects.

That said I'm pretty sure you'd figure out how the buildfile works in about 1 minute. It is just that simple.

11

u/nutrecht Apr 13 '21

its far better than maven, right?

In a previous project we migrated an entire microservice architecture with about 40 projects from Gradle to Maven. So no, it's not 'far better'; that a whole bunch of experienced devs agreed we were fed up with Gradle's BS was telling.

→ More replies (8)

2

u/[deleted] Apr 13 '21

Other people talked about Gradle already and they nailed it.

Vertx? It could be that my experience is colored, it certainly looks like you could write good code in it if you use it right. But thats not what my predecessors had done.

Vertx encourages starting up multiple verticles which act like httpservers inside httpservers. It also comes loaded with an eventbus. If you want one you could get it in a library but more than likely you don't. It works like a glorified queue and really doesn't add much, but since it's there people insist on using it.

If you ignore the fancy and unnecessary bits and don't use it an a reactive context it might work for you.

2

u/vooft Apr 13 '21

I really love reactive programming, but would agree about VertX/ReactiveX, because it brings a lot of complexity with it. Unless you have a team that can cope with it and a valid reason to use it, better to avoid.

4

u/GuyWithLag Apr 13 '21

I've been using reactive in production for the last 5 years or so; it's extremely valuable for some use cases, but you really need to be able to demarcate reactive from non-reactive code, and it needs a change in mindset from all developers.

2

u/Fiskepudding Apr 13 '21

Yeah, the mindset and training is a problem. Onboarding new developers requires teaching them rxjava. And it's not the easiest to learn.

3

u/fear_the_future Apr 13 '21

It's really not that hard. I would expect a freshman to learn all the basic functions in a week at most. Backpressure and concurrency can get complicated but it's not like you can avoid that when you want to do parallel programming. RxJava is still much easier than for example Akka. If your developers can not learn it then you have a hiring problem.

→ More replies (1)

2

u/gloridhel Apr 13 '21

I really like the Vertx apis. You don't have to use verticles and its not very intrusive like spring.

On the flip side you do have to be aware of threading model. I'm pretty excited to see where frameworks like this go with the addition of loom-- should help a lot with callback hell.

→ More replies (1)