Live data from Hacker News

Java Pain

tbray.org

1–10 of 151 posts

Re: Java Pain

#2
If you're using eclipse or android studio there's just a single button that compiles and sends your app to the plugged in device, and uses your IDEs debugger, and a logcat window for the system log. There's also an emulator which you could use instead, which comes with the sdk.

Re: Java Pain

#3
There are many Java pains, both little and big. Most of them are more related to the JVM than the language.

It's why I still don't use Clojure significantly (or even ClojureScript), even though I really like the language. Things just break or simply never work and it appears random. Other environments I use get a lot less wrong (although node is pretty bad too).

Re: Java Pain

#4
$CLASSPATH pain is one of the first things a new Java developer encounters — maybe the last, in many cases.

The only reason it's not quite as bad in .NET is that it can usually reference at least the framework in a well-known location.

But generally, whatever you call the problem that $CLASSPATH is designed to solve (assembly binding, reference resolution), it's an unsolved problem.

Re: Java Pain

#5
Also points for readers;

if you use intellij or another good ide it'll package it up for you with a execute script

(gradle's application/java plugin also do this)

manual classpath supplying is not advised

Re: Java Pain

#6

There are many Java pains, both little and big. Most of them are more related to the JVM than the language. It's why I still don't use Clojure significantly (or even ClojureScript), even though I really like the language. Things just break or simply never work and it appears random. Other environments I use get a lot less wrong (although node is pretty bad too).

That is true. Coming from Ruby world, you find that Java and the Clojure world have a lot of rough edges. But Clojure makes things as easy as possible. For example, reading from a file or a URL is still (slurp "https://"). It works fine on a stock OSX, Java 8 sdk and the latest clojure. Don't let such minor inconveniences discourage you from exploring Clojure/ClojureScript. The language is fascinating. I feel that learning and practicing clojure has made me a better developer.

Re: Java Pain

#7
"Dear Java: I can run Ru­by and Python and Go and JavaScript and C code from the com­mand line on my Mac." - to be fair most of those languages are scripting languages.

Re: Java Pain

#8

There are many Java pains, both little and big. Most of them are more related to the JVM than the language. It's why I still don't use Clojure significantly (or even ClojureScript), even though I really like the language. Things just break or simply never work and it appears random. Other environments I use get a lot less wrong (although node is pretty bad too).

I have always had the feeling that JVM is very stable, but I don't have much Java experience. Is that a wrong assumption?

Re: Java Pain

#9

There are many Java pains, both little and big. Most of them are more related to the JVM than the language. It's why I still don't use Clojure significantly (or even ClojureScript), even though I really like the language. Things just break or simply never work and it appears random. Other environments I use get a lot less wrong (although node is pretty bad too).

What's wrong with node? npm is a very polished package manager, and I'm frankly surprised how infrequently libraries with native bindings fail to build.

Re: Java Pain

#10

If you're using eclipse or android studio there's just a single button that compiles and sends your app to the plugged in device, and uses your IDEs debugger, and a logcat window for the system log. There's also an emulator which you could use instead, which comes with the sdk.

So to run a smoke test using a language that's already installed on the computer Tim Bray is using, instead of just typing something easy into a terminal, he needs to download an entirely new application, set that up with his project (which isn't exactly a walk in the park), plug in his device, and then run it?

He wants to run a smoke test on a library he's writing. He doesn't want to run a full-blown application just to test his library, or to have to plug in a device to test his library. He wants to open up a terminal, type "java test KeybaseLib" (or something like that) and have it just work.

Post reply on HN