4 ms·
Java was a mediocre language made primarily to be optimized for midsized companies and aimed to be learnable by mid level engineers. There's a lot of boilerpla
by cultofmetatron 4y ago
Java was a mediocre language made primarily to be optimized for midsized companies and aimed to be learnable by mid level engineers. There's a lot of boilerplate and ceremony to do even basic things and a type system that takes time to learn while not providing much benefit.
I've heard its gotten better in recent years but why bother?
- you want the jvm libraries? kotlin is a much cleaner syntax that also runs on android and can be compiled to js.
- need speed? rust is hot and has a lot of mindshare going into it as we speak.
- Need cheap devs you can rotate out on your pivot cycle till you land on a viable business model? javascript lets you build your whole stack in the same language with a large pool of junior to senior talent.
- need websocket or realtime? elixir wins the day there.
- ml? you night have a contender here. jvm based projects like spark and hadoop use the jvm. extensively. That said, scala seems more widely used in production there but its not a field I'm super close to so I could be mistaken.
I guess what I'm trying to say is that java isn't particularly bad but it doesn't have an edge either. there's nothing compelling in it thats going to give you an edge in delivering value to the users.
- mcv 4y agoI thought Python was the language of choice for ML. Still, having one language that's good at all of these does sound attractive. The excessive boilerplate is annoying, though.
- PaulHoule 4y agoI wrote this thing using Python years ago https://ontology2.com/essays/ClassifyingHackerNewsArticles/ https://ontology2.com/essays/ClassifyingHackerNewsArticles/ I am thinking of firming it up to make something general for long-term use against RSS feeds. I have a blast writing websockets-based applications w/ asyncio in Python for my own personal use but I'd be loathe to put one of those where they get used heavily. On the other hand I have a lot of faith in the ability of Java-based servers that take heavy hits because I've done it for years. That logistic regression classifier would be easy to port to Java but if I used Python it would be easy to add new algorithms, particularly I want to add a dimension reducer (papers I read suggest it would cut the error rate in half) and a clustering engine, with scikit-learn I get a good choice of high-performance and tested algos. On the other hand, I find it easy to write state-machine code, parsers and such in Java that chew efficiently through large volumes of text.
- afavour 4y agoOn the flip side to what you’re saying, Java can do absolutely all the things you’ve listed and unifying around one language is far more beneficial to productivity than e.g. the small speed benefit you’ll get from using Rust. It and Elixir are fascinating but I think the list of startups that would benefit from adopting either are very, very small. That said I think “why Java over JS” is the core question you’ve raised. I know everyone hates it but JS has mindshare, available potential employees and can do more or less anything you need it to (including run in the browser, which is a unique benefit). If you use TypeScript you can get a pretty sane, workable Node codebase that’ll work for most startups.
- nicoburns 4y ago> unifying around one language is far more beneficial to productivity than e.g. the small speed benefit you’ll get from using Rust Is it? I've found that using multiple languages has a negligible effect on productivity (especially if they're being used for separate projects and there's no need for FFI), but that using a poor one has a big effect.
- afavour 4y agoIMO it depends on company size. If we’re talking startup startup then it’s beneficial. Once you’re big enough that you don’t need engineers to switch between different contexts/services so much it isn’t as important.
- deleted 4y ago[deleted]
- goodpoint 4y ago> aimed to be learnable by mid level engineers. There's a lot of boilerplate and ceremony to do even basic things and a type system that takes time to learn while not providing much benefit. All of this is also true about Go, but it's on the high tide on the hype cycle.
- RamblingCTO 4y agoNumber of possible candidates is also quite a nice factor. Even though you might benefit from more special languages and better devs because people learning haskell are most of the times better devs than most java devs due to their drive and passion.
- angryasian 4y agoyou named 4 different languages that are specialized for certain areas or you can just find a team of java devs that accomplish all of that in one language. >Java was a mediocre language made primarily to be optimized for midsized companies and aimed to be learnable by mid level engineers This is exactly what a startup should be optimizing for. cheap labor that can use a single language that can move fast enough to push product. When they all leave another group can step right in and continue the work
- cultofmetatron 4y agowhile I agree with the need to move fast enough to push a product. "cheap labor" in every startup I've seen has always been a bottleneck. The aim really should be picking a stack that allows A level talent to maximize their time delivering value, Not protecting junior engineers from cutting themselves.
- angryasian 4y ago>allows A level talent to maximize their time delivering value A level talent is a bottleneck as they will move on for better opportunities. I wouldn't focus my company around that either.