7 ms·
Beside legacy code, in what context would you start a new project un java?
by focom 3y ago
Beside legacy code, in what context would you start a new project
un java?
- zx14 3y agoI would still pick Java any day over the vast majority of languages. Gigantic ecosystem, gigantic community, gigantic knowledge base, solid IDEs, and the list goes on.
- greymalik 3y agoWhen your engineering team is experienced and proficient in Java and your organization has built substantial tooling to support it.
- beanjuiceII 3y agowhat kind of tooling?
- cogman10 3y agoAny tooling you could imagine for a language java has that + 10 other implementations. Static analysis, debuggers, profilers, telemetry integration, metrics integration, etc. And these are GOOD. Java tooling, because it's pretty old at this point, is fairly well polished.
- BaculumMeumEst 3y agolots of java shops have loads of internal libraries that solve organizational goals or interface with other internal systems. they will continue to build new projects in java because the cost of tossing all that out is high.
- ENGNR 3y agoHigh performance, typesafe code that can be maintained by a large team. Also has a very well established ecosystem of libraries, and multiple languages to choose from (Java, Scala, Kotlin, Clojure, etc)
- eweise 3y agoProjects where you need mature boring technology so that you can focus on building your product.
- beanjuiceII 3y ago[flagged]
- palata 3y agoEver heard of Android? It's not JVM per se (it's ART), but given your comment I'm pretty convinced that you don't know the difference anyway. I would take JVM every day instead of those crappy web-based ElectronJS apps.
- winternewt 3y agoOfficial Android language is Kotlin though.
- tadfisher 3y agoKotlin is an official language, albeit the "preferred" language. Java is still very much supported and viable (outside of Compose).
- winternewt 3y agoOK, preferred language. I don't think that changes the validity of the point I was making.
- pessimizer 3y agoBoomers are in their 70s. They're not everyone who is older than you.
- dragonwriter 3y ago> Boomers are in their 70s. 59-77, this year, by the usual definition.
- pessimizer 3y agoBoomers born 20 years after WWII? I feel this is Gen X erasure. I barely count as Gen X and I'm almost 50.
- 725686 3y agoAny project in which you don't want to be obsolete in 6 months.
- beachy 3y agoWhen your CV already has enough shiny new stuff in it, and you just want to get the product built on a stable, future-proof platform.
- gautamdivgi 3y agoAny system that requires scale and performance and in-depth monitoring. The one thing about Java that most people miss is the javaagent based instrumentation that is exemplary. So when you’re in trouble you always have jconsole . There’s an excellent APM that we use called glowroot which is open source. Also what all others have mentioned below.
- deleted 3y ago[deleted]
- cogman10 3y agoWorld class garbage collectors. Well polished concurrency story (which gets a lot better with Java 21). Amazing JIT. Humongous mature ecosystem, larger than most languages. And the language (as of late) has been rapidly evolving to pick up new features and a trimmer runtime.
- Yasuraka 3y agoYou had me after the first three words
- jjtheblunt 3y ago"world class garbage" ?
- Yasuraka 3y agoYep, and Java's the man for the job
- mongol 3y agoWhen you work in a company that requires reliable software
- dandiep 3y agoI'm building a webapp backend in Python right now and the ecosystem compared to Java is just horrendous. * Maven (or at the very least transitive dependency management) is a defacto standard. While some solutions exist such as Poetry, there is no such as thing as a centralized repository with POMs that tell you all the related dependencies easily. And managing virtual environments feels like a huge step backward. * I ended up using FastAPI + Dependency Injector for the Python project, and while great, it is less robust, less well documented than things like Spring + JAX-RS * Because Python sucks at multithreading and is slow, everyone has a bunch of C in their libraries, so when there is a bug (which there will always be), it's very hard to debug. In Java land I can easily step through any code, including the JVM. * Lack of typing metadata - even relatively new libraries like the OpenAI client lack typing information, leaving you guessing about what data is available to work with. * SQL Alchemy is vastly inferior to Java ORM solutions IMO (no, I don't want to discuss ORMs...) * IDE support is still relatively primitive for pytest. Until a couple weeks ago, you couldn't see the output of all your tests in the VS Code console log until it was done executing. Or when you get an error, you can't just click on the stack trace to go to the failing line. * Lack of autogenerated API documentation, e.g. equivalent of Javadoc Love the Python syntax, but I still feel like I was more productive in Java for writing webapps. YMMV
- progmetaldev 3y agoThese are issues that I fear I will have moving from C#/.NET to Python. I know there are libraries like Pydantic for typing, but I think the tooling around C# is going to be tough to lose. That being said, the syntax and libraries are a huge draw for using Python.
- jeremycarter 3y agoWait until you hit the terrible performance of Python. C#/.NET will outperform Python every single day.
- zmmmmm 3y agoThe bad news is the initial build is peak of the experience with Python - it's all downhill after that, since Python and other dynamic languages are mainly optimised for code creation rather than code maintenance. It's fascinating just observing at a higher level our different systems and what makes it through as bugs after all testing, code review etc is done. Java - null pointers are the main thing. Python - it's a dogs breakfast. Latest bug was someone forgetting a comma in a list of strings since ['foo' 'bar'] is valid. But all kinds of crazy stuff - kwargs everywhere with people putting invalid values or types in. Straight up incorrect numbers of args going into functions which our linters don't notice for some reason. Refactoring anything widely used is a highly risky endeavour. Even with type hinting across all the exposed interfaces, Python is like a sieve for bugs, they just fall straight through. Once you get a complicated enough system, you just have to rely on total test coverage (ideally integration / end to end) or just letting your users find the bugs.
- threeseed 3y agoJVM has the largest and highest quality ecosystem of libraries of any platform.
- 62951413 3y agoWhen you agree that Scala's adoption is stagnant and Kotlin's advantage over JDK21 is moderate.
- jjtheblunt 3y agoin retrospect, do they both seem to have been test scenarios for features subsequently picked up by Java?
- marginalia_nu 3y agoI'd pick Java any day for a new project. It's mature and absurdly stable, both the language and the ecosystem; the tooling is best in class, and a lot of the awkward chafing points are going away to the point where the language is pretty pleasant to work with... It isn't an exciting language. It's boring, it's the last to get new cool features, and that's by design. It also never breaks. There's extremely rarely any library churn or surprises. You can spend all the time working instead of putting out fires caused by the ecosystem.
- kaba0 3y agoThat’s a wrong question to ask. The proper one is the reverse I believe, why would I throw away one of the top 3 languages for a likely much smaller one with barely-existing ecosystem and questionable benefits?