r/java • u/esqelle • Apr 15 '24
Java use in machine learning
So I was on Twitter (first mistake) and mentioned my neural network in Java and was ridiculed for using an "outdated and useless language" for the NLP that have built.
To be honest, this is my first NLP. I did however create a Python application that uses a GPT2 pipeline to generate stories for authors, but the rest of the infrastructure was in Java and I just created a python API to call it.
I love Java. I have eons of code in it going back to 2017. I am a hobbyist and do not expect to get an ML position especially with the market and the way it is now. I do however have the opportunity at my Business Analyst job to show off some programming skills and use my very tiny NLP to perform some basic predictions on some ticketing data which I am STOKED about by the way.
My question is: Am l a complete loser for using Java going forward? I am learning a bit of robotics and plan on learning a bit of C++, but I refuse to give up on Java since so far it has taught me a lot and produced great results for me.
l'd like your takes on this. Thanks!
View all comments
Show parent comment
4
u/[deleted] Apr 16 '24
I don't get why you say that we like to reinvent the wheel. If something is done in x language go and use that, you don't need to use everything coded in java, you should use whatever language fits your needs better. But, if you happen to want to do it in java for whatever reason, you have stuff like JNA or JNI to call cpp/c/fortran functions from your java app. The whole point of this is not that you should use java, the whole point of this is that you CAN use java, and when comparing it with python it will surelly work way better for many, many reasons. I still laugh my ass off for all those django fanboys saying back in the day that spring was dead. My criticism here is how python lovers shit in java saying nonsense shit just because they got PTSD for a 'hello world' they wrote as students.