News for hackers. Stuff that matters.
Re:Rating 26 years of Java changes by bdangubic on Saturday October 11, 2025 @05:44PM (#45552965)
never had any issues debugging as I am never debugging the scheduler (that works :) ) but my own code.

and what exactly is “cronService”? you write in each service or copy/paste each time you need it?

Re:Rating 26 years of Java changes by alex_smart on Saturday October 11, 2025 @06:18PM (#45553146)
You can write your own libraries?

My goodness. What a question!

Re:Rating 26 years of Java changes by bdangubic on Saturday October 11, 2025 @07:43PM (#45553782)
you write your own database driver? encryption?
Re:Rating 26 years of Java changes by blackoil on Sunday October 12, 2025 @02:09AM (#45555691)
If you want to build an application from scratch, you must first create the universe.
Re:Rating 26 years of Java changes by alex_smart on Sunday October 12, 2025 @02:22AM (#45555766)
All this because I told one guy who asked "what exactly is “cronService”? you write in each service or copy/paste each time you need it?" that they can reuse code by writing a library instead of copy/pasting it?

If this is the level of incompetence encouraged by a framework, I would avoid using it just to avoid the chance of hiring people like you.

Just kidding. Spring boot is great. But yeah, I would fire people with this attitude without blinking an eye.

Re:Rating 26 years of Java changes by bdangubic on Sunday October 12, 2025 @07:56AM (#45557545)
* Why would I write my own database driver or encryption just because I wanted to implement my own "cronService"?*

how do you decide whether you will write your own or pull in a dependency? this is a legit question. you did start this with writing your own “cronService” (which is about as insane as writing your own database driver) so asked about it.

Re:Rating 26 years of Java changes by alex_smart on Sunday October 12, 2025 @12:19PM (#45559338)
> you did start this with writing your own

I really did not. I only said that if you were to create your own cronService, you can reuse it by creating your library rather than copy pasting code (which is obviously insane).

> which is about as insane as writing your own database driver

No, it is not. Spring Boot’s support for async jobs and scheduled jobs is lacking. A lot of people roll their own. Including yours truly.

It is also much easier than writing a database driver so there is that.

Re:Rating 26 years of Java changes by bdangubic on Sunday October 12, 2025 @04:41PM (#45561702)
Spring Boot’s support for async jobs and scheduled jobs is lacking.

Can you elaborate? What exactly is lacking and what version of Spring are you using?!

Re:Rating 26 years of Java changes by alex_smart on Monday October 13, 2025 @04:40AM (#45566166)
Compare with the functionality offered by async job systems of other full stack frameworks - eg django with celery and rails with solid-queue. It’s not even close.

I am on the latest version of Spring Boot.

Re:Rating 26 years of Java changes by bdangubic on Monday October 13, 2025 @09:32AM (#45568156)
I am not saying there aren't more robust scheduling libraries, people still use Quartz a lot in the Java ecosystem - was just wondering what specifically are you up against that you cannot solve with Spring's scheduling?
Re:Rating 26 years of Java changes by alex_smart on Sunday October 12, 2025 @02:12AM (#45555705)
Why would I write my own database driver or encryption just because I wanted to implement my own "cronService"?
Re:Rating 26 years of Java changes by throwaway7783 on Saturday October 11, 2025 @09:20PM (#45554271)
Whole point of spring is so you don't have to write your own libraries. Batteries included and all.
Re:Rating 26 years of Java changes by bdangubic on Saturday October 11, 2025 @09:47PM (#45554415)
@alex_smart hand rolls it all :)
Re:Rating 26 years of Java changes by alex_smart on Sunday October 12, 2025 @02:16AM (#45555721)
What if I told you - you can use a batteries-included framework, and still write your own libraries specifically only for things you want your own version of and want to share across projects?

The problem isn't that I don't know how to use a batteries included framework. The problem is that you guys don't know there is even an option to reuse your code by writing libraries.

Re:Rating 26 years of Java changes by throwaway7783 on Sunday October 12, 2025 @11:18AM (#45558805)
Why are you assuming you cannot write your own library and use it with Spring? It's not an either/or, just like most frameworks are. You are framing it as if there is only one way to do it in spring.

Please do not project things like "you guys don't even know..". I'm one of "you guys" , and have built production code in a variety of languages and frameworks. So this "you guys" knows exactly what he/she is talking about.

Re:Rating 26 years of Java changes by alex_smart on Sunday October 12, 2025 @12:11PM (#45559269)
> Why are you assuming you cannot write your own library and use it with Spring?

I am not. I am literally saying the exact opposite.

Re:Rating 26 years of Java changes by throwaway7783 on Sunday October 12, 2025 @12:47PM (#45559609)
Okay, that's fair. I don't even know anymore what point you are trying to make.
Re:Rating 26 years of Java changes by alex_smart on Sunday October 12, 2025 @02:47PM (#45560671)
I was making exactly the point that you can use your own libraries along with a batteries included framework like Spring Boot.

I don't even understand what the source of confusion is. I literally said exactly the same thing in the comment you first you replied to.

Re:Rating 26 years of Java changes by vbezhenar on Sunday October 12, 2025 @05:42AM (#45556834)
`cronService` is an injected instance of some class, probably provided by framework. My point is to demonstrate alternative, imperative way of defining cron tasks, as compared to declarative one.
Re:Rating 26 years of Java changes by vips7L on Sunday October 12, 2025 @09:04AM (#45557967)
A better name would probably be CronScheduler or something else. “Service” is always overused and doesn’t actually describe or mean anything.