Java Is Underhyped
751–760 of 808 posts
Re: Java Is Underhyped
#752Earlier quoted context omitted.
I came to say say that's not a language problem, that's a packaging problem. But that would be misleading. The reason packaging is still a problem in Python are linked to the language: - to get perfs, you need compiled extensions, which java doesn't need. So a Jar can be fast and portable, while in Python it's an "or" proposition. Wheels help, but they still are OS dependent, so you need a build per OS. - PYZ arrived…
So... Java is bad, but let's ignore Python's problems. I'm forced to use Python at work, because data scientists demand it, and I can rant about your "good for data" language for at least 24 hours straight. Python isn't great at anything specifically, but it's crap in a few specific places. No multithreading? Fine! But then Python core libraries are crap at IPC, when multiprocess is the preferred way of parallel comp…
Python is the best language in the world for small tools under 500 lines to solve glue and data munging problems.
Re: Java Is Underhyped
#753Earlier quoted context omitted.
Dropbox, Instagram, Google, Youtube, reddit and Nasa all have been heavily Python powered for a decade. I myself have coded a streaming platform getting half a million user every day in Python. Baring the CDN to store the content, it runs on 2 servers, one for the DB. So real things get done in Python pretty well.
In case of the Dropbox please read this: _But as the company grew, new engineers who joined couldn’t understand the code. Clever code is usually short and cryptic, written by and for the individual who came up with it, but is hard for anyone else to understand—and nearly impossible to maintain. Guido called this “cowboy coding culture”. He recognized its value in our early stages of trying to implement things quickly…
Re: Java Is Underhyped
#754Earlier quoted context omitted.
IMO it's the other way around. Java has some of the best IDE's around so everyone uses them. You can code in notepad and compile with maven but why would you? With Rust you code in VIM because there's nothing better. Improving Rust IDE's has been one of the teams big focuses for years. Everyone codes in random text editors because there's no amazing IDE.
With rust yoy don't need to constantly generate code. Vim is just perfect, if you have rust-analyze you get inline errors, code completion, jump to definition, autoimport, autoformat... You don't need to constantly "extract method", move to class, generate all these mountains of classes by rightclick. This says a lot about the language. But the main point is that with rust it actually just works: there is one way to…
In Rust, macros generate code on build. In Java, Annotations Processors do. I don't see a big difference between these approaches, besides Java's mechanism being older and crustier. Rust macros generate tons of code.
> if you have rust-analyze you get inline errors, code completion, jump to definition, autoimport, autoformat...
Last time I checked, Rust analyzer was in alpha/beta. Java has all this and it's battle-tested. Including language server for VScode and other lightweight editors, and several options for build plugins that auto format.
> You don't need to constantly "extract method", move to class, generate all these mountains of classes by rightclick.
Lombok, or one of the popular Builder libraries, gets rid of all this boilerplate. I don't generate anything using IDE. In my experience, most Java user don't. There's many mature libraries for geting around class ceremony.
> there is one way to set global toolchain and per project/dir. You're not required to also click through a million menus and dialogs and copypaste stuff and sync and rebuild and restart to get the editor barely working.
You are right. Rusts build system is simpler and better integrated. But Java has amazing build tools, maybe the best out there. A properly configured maven project will compile, test, and run with one command. And it will import into your IDE with a simple "import project, yes"
I have worked on a ton of Java projects over the years and never had to deal with most of what your describe.
Re: Java Is Underhyped
#755I work an an Android use case, so reading Java stacktraces, and code commits became a valuable skill.
Then, I learned the value of using Java libraries such as Appium and Selenium for end-to-end integration, performance, and reliability testing.
Then I started using Java libraries like Okhttp, Jackson to build fancier test setups.
While this was happening, I was learning the value of writing code that could be ran in containers - which Java does. Now I can create microservices that I stick in containers on Google Cloud Run or Pivotal Cloud Foundry - and pass arguments to execute tasks.
After getting these foundational skills developed, I started working on adding features to Android apps in the use case.
Since I had learned that much, I figured I should write a personal site using Spring MVC, Spring JPA, VueJS, ChartJS, and CockroachCloud (postgres). I then went and wrote a DAO microservice to write to CockroachCloud on a recurring schedule, and used Java with JDBC to learn how to access postgres without Spring.
Java has become a great skill, that I picked up almost entirely during the pandemic. Especially when paired with Javascript. On Javascript, what I find interesting is that some teams have rewrote services from Javascript to Java. IME, Java works on everything, and with everything.
Once you master one object oriented language, having to learn Objective-C or another variant of Java like Kotlin or Scala becomes that much easier.
IMO, there are 3 things are worth learning. They are SQL, a high level scripting language, and a object oriented language. They all have their uses, and the skills are transferable. For me, Java just happened to be the most valuable skill I could learn.
Re: Java Is Underhyped
#756Earlier quoted context omitted.
And most recently, tons of self styled "Data scientists". This has, IMO, diluted the rabid rhetoric of the 90's/oughties python community which is good, but replaced it with people who don't know and don't care what good code even looks like, so it can be difficult to work among them.
I feel sometimes that they pride in writing shitty, unmaintainable code; that they do it on purpose. One of the ways they enjoy life is to disregard all "best practices". And I'm not talking about some high-level OOP principles, but the basics - like keeping consistent code style, or even writing some tests. The previous crowd with love for monkeypatching everything and hate for abstraction other than dictionaries wa…
Everything is jupyter notebooks, to the point where example documentation is delivered as notebooks and services run notebooks as it’s apparently easier to do that than to get people to write their code properly. “Oh but data exploration” they say, which is fine, but you shouldn’t be doing data exploration in your prod ML pipeline anyway, and you’re writing code, it’s really not that hard to follow some even rudimentary practices.
Re: Java Is Underhyped
#757Earlier quoted context omitted.
Dropbox, instagram, google and youtube all were written in Python at some point. Languages don't scale, architectures do. But even when the language became the bottleneck, they went the road of rust and go, not the road of java. Again, not to say Java is not used by those companies with great success.
There is an absolute mountain of Java at Google. Pretty sure it's the most used language by LOC.
Plus all the boilerplate coming not from the language but the OOP design patterns.
Re: Java Is Underhyped
#758Earlier quoted context omitted.
Python is good for quick projects, but if you're writing a project with more than 2000 lines of python something's going wrong. The apparent ease of python becomes an unmanageable web of complexity. In the end you woukd have less headaches if you just used a proper statically typed language.
Dropbox, Youtube, Google, Instagram and NASA tell a different story. And me too. Scaling a Python project complexity is not harder than scaling Java, the things you have to be careful about are just different.
In comparison one of my personal projects is in Rust and while that’s currently maybe only a thousand lines it’s already significantly easier to deal with.
Re: Java Is Underhyped
#759Earlier quoted context omitted.
Python projects that start to grow has a tendency to become hard to manage in a way that I have not seen in Java at all. Java is like you say not the greatest at anything but it is also not the worst at anything. Its great for projects where the you don't know what you should optimize for or don't care. If java is to boring maybe kotlin is the way to go. I really like kotlin and in my personal experience the only dow…
> Python projects that start to grow has a tendency to become hard to manage in a way that I have not seen in Java at all. Mypy is excellent. It has two-way type inference like Haskell. Good usage means catching almost all type errors before running. So is PyCharm, which is IntelliJ for Python.
Re: Java Is Underhyped
#760Earlier quoted context omitted.
Yeah, because he did so much for Python tooling at Google.
Google is hugely invested into Python, especially the data engineering branch. TensorFlow, Jax, etc. Though they will probably get replaced by Dex lang, they even dropped Swift 4 Tensorflow to focus on Dex [1]. The language looks very Pythonic compared to Julia which is a 180-degree turn in terms of language design. [1] https://github.com/google-research/dex-lang
But it’s also a google side project, so previous experience dictates that it’ll be dead somewhere between arrival and 5 years time.