using random lib sound poor or inexperienced developer problem not java problem. same issue can happen in other language.
but this all beside point.
let say java terrible choice.
tell us more about how using java mean we dont know computer science. still want to understand how language choice a “computer science” problem. teach us.
Worked, and Yes. But thats due to legacy more than anything else, and because the builder tools team built a pretty sizeable ecosystem around dependencies/builds with Java, with a lot of templates out of the box.
>tell us more about how using java mean we dont know computer science. still want to understand how language choice a “computer science” problem. teach us.
Early on at Google, there was an engineering decision to use “Python where we can, C++ where we must.” There is a reason for that.
In terms of performance, a VM language is really good when you are dealing with multiple architectures. Java was a good choice back in the day to support application development across multiple environments.
As such Java was the natural choice for Android for quick application development. But lets look at how that evolved over time
- Most performance heavy applications are written heavily with NDK. Google provided this specifically because the jvm layer doesn't suit things like games very well.
- Java isn't even the official SDK language, Kotlin is preferred, which essentially "fixes" a lot of Java things. BTW there was guidance at Amazon to use Kotlin over Java going forward because it results in a better maintainable codebase.
- Google is heavily investing into Fuschia, with Flutter/Dart, as the next gen mobile/home device OS. In general a lot of web app application style apps are written with React Native, which is structured very similarly to Flutter/Dart (as the code can be compiled to a JS web app as well)
So it seems like Google, the company responsible for putting a JVM on majority of the worlds smartphones, doesn't even believe it it anymore. Python or Golang is all you really need these days for any backend - you develop faster, code runs just as fast (especially with Python 3.11, or previously with PyPy), taking account that most of the time the latency driver is going to be network requests, and you have a much better tooling with those language.
As for vulnerable software you are correct though , vulnerabilities can happen in other languages. Golang seems to have quite a few. Python had one back in 2007 with tarfiles. Meanwhile, your favorite Java now has Spring4Shell circulating around, and I hopefully don't have to explain how in the case of Log4j, a developer willingly writing the network request/execute code as part of logging something is much, much worse than finding some bug that can make a program crash in very specific conditions.
And this is because of the core issue of Java of having so few core libraries compared to Go and Python - so instead you have random projects with questionable people working on them, and then these projects get all hodgepodged together into the modern day Java best practices. So you have things like big dependency injection frameworks that eat startup time, or things like Lombok that essentially hack the AST. There is no central authority controlling what Java is, so you get these Log4Shell, Spring4Shell and others.
But lets ignore all that, and focus on the fact that Java still runs fast, for whatever weird reason you need speed. So what exactly does Java give you over Golang or Python? OOP semantics? Strong typing?
Lets look at how that works in practice. Every professional Java codebase will have unit tests. Everything that you can possibly ever catch compile time you absolutely can catch with unit tests, and there will never be an argument against writing less unit tests for anything because "compiling hypothetically catches all the errors for you". Now take your standard java project, where you have a build system like Gradle. You run your compile process, which is groovy being compiled to JVM that gets executed to run additional commands that do things like annotation processing, after which all of your code gets compiled into a jar file, then ran, where the dependency injection frameworks have to load, and then your unit tests get ran. At Amazon, every time you wanted to either run unit tests or start up the service, it took at least 10 seconds for everything to run before your code gets executed. In comparison, launching Python interpreter to run your additional unit test that you wrote is quite fast. Look at AWS Lambda start times between Java and Python if you don't believe me.
The only thing strong typing does is that it makes it harder for, lets say "entry level" devs to shoot themselves in the foot, since they are essentially using an API. But Java does provide ways to shoot yourself in the foot, which is why code reviews are a thing. And if you have code reviews, then you can collaborative drive a certain structure even in dynamically typed languages like Python towards minimizing mistakes, even more so because development happens faster so you have an easier time putting in everything that needs to be put in.
So in the end, if you didn't realize all of this, then you don't fully understand computer science. If you do realize this, and still think Java is ok to use today, then you either are delusional, or are privy to some great wisdom that nobody else knows.
amazon move fast in this space. if something have expensive or hurt innovation they move quickly off. sometimes company wide campaign to block "X" going to production. tell an amazon principal or sr. principal they only have java for legacy reason and they will ask you what company you work at.
>>> - Most performance heavy applications are written heavily with NDK. Google provided this specifically because the jvm layer doesn't suit things like games very well.
nobody here talk about writing super performance optimized thing. we not talking about games. dont know anyone using java for games and you writing strawman argument.
>>> BTW there was guidance at Amazon to use Kotlin over Java going forward because it results in a better maintainable codebase.
this not true. maybe you team has its own preference for kotlin. no company wide guidance on this. how i know? you not only person worked at amazon.
> Google is heavily investing into Fuschia, with Flutter/Dart, as the next gen mobile/home device OS. In general a lot of web app application style apps are written with React Native, which is structured very similarly to Flutter/Dart (as the code can be compiled to a JS web app as well)
yeah even amazon using react native for some apps. what this have to do with java? and what specifically it have to do with your assertion about using java mean not knowing computer science?
>>> Meanwhile, your favorite Java now has Spring4Shell circulating around, and I hopefully don't have to explain how in the case of Log4j, a developer willingly writing the network request/execute code as part of logging something is much, much worse than finding some bug that can make a program crash in very specific conditions.
bugs happen in any software. make no sense how this is indictment of java as language. you picking logging issues. even go has many logging frameworks. c++ std lib not include logging as first class afaik. again this argument have no merit.
>>> So you have things like big dependency injection frameworks that eat startup time, or things like Lombok that essentially hack the AST. There is no central authority controlling what Java is, so you get these Log4Shell, Spring4Shell and others.
nobody force you use big dependency injection framework or use Lombok. it your choice.
>>> At Amazon, every time you wanted to either run unit tests or start up the service, it took at least 10 seconds for everything to run before your code gets executed.
amazon has own flavor of build system. Brazil and it many variations for different languages very old..slow..some combination of both. if you work at amazon you should know about amazon tax.
>>> The only thing strong typing does is that it makes it harder for, lets say "entry level" devs to shoot themselves in the foot, since they are essentially using an API.
are you complaining on java or strong typing?
>>> The only thing strong typing does is that it makes it harder for, lets say "entry level" devs to shoot themselves in the foot, since they are essentially using an API
^ This comment make no sense. strong typing is like using an api? LOL
>>> But Java does provide ways to shoot yourself in the foot, which is why code reviews are a thing.
So move off java and we can stop doing code reviews?
>>> So in the end, if you didn't realize all of this, then you don't fully understand computer science.
language choice has nothing to do with knowing or not knowing computer science. this is one of most absurd comment seen. LOL :)
computer science not focus on any particular language. cs program may have course on programming languages..cover history of languages.. regular grammars.. what it means have abstractions. concepts critical to design of a language. it care nothing at all if you have fetish for python or go or angry tears about some java logging framework.
>>> If you do realize this, and still think Java is ok to use today, then you either are delusional, or are privy to some great wisdom that nobody else knows.
if java not okay to use then amazon distinguished engineer, sr. principal, and principal community would deprecate or ban language entirely. you wrote lengthy post. maybe you found yourself clever asserting point about java being slow for games. can assure you if you write this as amazon doc.. senior leaders not take you seriously.
calling people "delusional" for not agreeing with your opinion strong indication you presenting weak argument. and thats me very generous. this more like infantile "hissy fit" behavior. you confuse HN with reddit maybe.
you never answered question how language choice related to knowing or not knowing computer science.
1. Nobody is forcing you to use Java
2. Appealing to authority as justification for Java use.
Neither of which go to contrary of anything I said, so this is a pointless discussion because it basically means you agree to every drawback of Java I stated.