r/java • • 5d ago

Datafaker 3.0 Released

https://www.datafaker.net/releases/3.0.0/

Hi all,

Thanks to the combined effort of 29 contributors, we've managed to create a new version of Datafaker, version 3.0. It's mostly compatible with Datafaker 2.x, but due to enabling JSpecify in this release, we've decided to call this a (potentially) breaking release. Java 17 is still the baseline, so no changes there, but we've managed to add some features, make it even faster, improved GraalVM support, and a whole lot of other improvements, plus we changed our website, https://www.datafaker.net/, to look slightly more modern.

Big shoutout to everyone who contributed on this! Cheers!

66 Upvotes

12 comments sorted by

View all comments

0

u/snugar_i 4d ago

Looks kind of interesting, but you know the saying that less is sometimes more? Does the JAR really need to be so big just to include things like Back from the Future quotes? How often is anyone going to need that in a real project?

10

u/bodiam 4d ago

Maybe, but not every project needs to be very serious. I'm not sure if we inherited it or it was a contribution, but we don't often say no.

Besides that, this project is mostly used for test purposes, and has almost no dependencies. For reference, the Hibernate Core jar is 15 mb, and it's about 25 mb including all dependencies. Datafaker is under 3 mb, while supporting data for almost every language.

2

u/Comakip 3d ago

This is one of the reasons why the PHP version of this package got abandoned years ago: https://marmelab.com/blog/2020/10/21/sunsetting-faker.html

It got forked real fast though.

2

u/bodiam 1d ago

Interesting writeup about the PHP Faker. It's very different from our Datafaker. Datafaker is a continuation of Javafaker, a library no longer maintained. I had some spare time, and decided to make a successor, but ideally, without leading into the trap Javafaker was: Javafaker had 1 core developer, and when they stepped out, the library died. So, instead of doing this, I wanted to embrace my peers, and wanted to make this a meritocracy, where all non-harmful contributions are welcome, whether I agree with them or not. The idea, very much inspired by this https://www.ted.com/talks/derek_sivers_how_to_start_a_movement, was to start a moment, where everyone is equal. The library is now going strong for a few years, it's managed by a core team of 3-5 developers, anyone can make a release, implement any feature they want, and sometimes we have discussions about things, but so far, it's always working out. The part of a few random strangers on the internet, still spending their time on a silly library, is the cool part about building this software, and somehow very rewarding.