Live data from Hacker News

Java Pain

tbray.org

61–70 of 151 posts

Re: Java Pain

#61
C, CPP, Objective-C, and Swift are all broken too then...

Java runs as compiled bytecode, not interpreted script. Try "mvn exec:java". If you're not using Maven, you're likely making this ridiculously harder than it needs to be. (And yes, Maven sucks too, but it's also pretty good).

I do think a KeyBase Java client is a good idea though! Can't wait to see the results.

Re: Java Pain

#62
I'm seeing a lot of comments here along the lines of "this is just a problem Java newbies would have and this Tim Bray guy, whoever he is, doesn't want to take the time to learn the tools."

Well. True, to a degree, I suppose, but whoever this Tim Bray guy is adds some pretty important context. He co-authored the XML spec and was director of web technologies at Sun. You know, the people who made Java and promoted it as a web technology. Going out on a limb here, but it doesn't seem to me that the man is a Java newbie.

The point of Bray's rant, I'd suggest, is that these tools largely haven't gotten any easier since 2004. It frequently seems to be controversial in these parts to assert that it's worthwhile to make developer tools easy to use ("what you're complaining about is obviously easily addressed by whipping together something with bash, awk and sed and therefore isn't a pain point at all, you whiner"), which has always vaguely irritated me. A toolchain which requires you to wrangle it into place for every project is a toolchain which could benefit from usability improvements.

Re: Java Pain

#63
Quite a lot of languages let's you do https, but just give you illusion of security. Not really validating it, which is trivial to spoof with certificate signed by "your own authority".

"The Most Dangerous Code in the World: Validating SSL Certificates in Non-Browser Software" https://www.cs.utexas.edu/~shmat/shmat_ccs12.pdf

Re: Java Pain

#64

you're kidding me, right? rhodey@rhodey$ mvn package rhodey@rhodey$ java -jar .jar

I don't think you read the article. You don't address his certificate issues. Your solution also requires writing a pom.xml which is non-trivial.

::head desk::

A pom.xml at least has a schema and tons of copy/paste examples. Every language sucks in it's own way.

Re: Java Pain

#65

The confusing series of shell scripts most Java services (Cassandra, Kafka, Elasticearch) come wrapped in are a constant annoyance. Not only do they rarely if ever follow common shell command idioms, but trying to configure production services turns into tracing environment variables through a series of shell scripts sprinkled across my system. It's nothing wrong with Java the language, but the platform just seems to…

> trying to configure production services turns into tracing environment variables through a series of shell scripts sprinkled across my system

Yes, exactly.

      cat /proc/28014/environ | tr \\000 \\n
Is a way to show what you end up with, but I have yet to discover a good way to figure out how the environ was set there in the first place, having to fall back to strace'ing the full process tree from the startup script to figure out everything being launched and reading its source :(

Re: Java Pain

#66

I'm seeing a lot of comments here along the lines of "this is just a problem Java newbies would have and this Tim Bray guy, whoever he is, doesn't want to take the time to learn the tools." Well. True, to a degree, I suppose, but whoever this Tim Bray guy is adds some pretty important context. He co-authored the XML spec and was director of web technologies at Sun. You know, the people who made Java and promoted it a…

Agreed - and both Sun and Oracle have no cultural tradition of taking toolchain usability seriously. Installing updates is a complete trainwreck for almost every product they've ever released and that's one of the most basic tasks for a software vendor.

Fundamentally, I think the problem is arrogance – companies like Oracle or Sun historically assumed that their products are so important that it's someone's full-time job to deal with the rough edges, they've invested in training or reading massive doc dumps, etc. – familiar to anyone who's heard tales of mainframe operators with run books of canned solutions for each problem. Those HN commentators have the same blindspot.

In addition to usually being flat-out wrong, as the more common user is someone who just needs to do what should be a simple task which is blocking their actual real job, this ignores how profligately that mindset wastes other peoples' time and how it sets a dangerous long-term precedent where alternatives look attractive because everyone simply assumes e.g. Java, Solaris, Oracle's database etc. is hard to use and expensive.

Re: Java Pain

#67
post #34
post #31

Earlier quoted context omitted.

Referring to things like unusual command line options as "incantations" has been reasonably common across the history of computer usage at least from the 1970s or so, if not earlier. See: http://www.catb.org/jargon/html/I/incantation.html

what's so unusual about -cp (or "-classpath")

If you're familiar with most unix tools, you'd expect that to be --classpath.

If you need more than one addition, do you use a colon separated list (Unix), semicolon (Windows), or repeat it once per option? Does it expand ~ or do you need to

None of this is that hard but if you don't use this all the time it's easy for everyone's soup of almost-but-not-quite similar conventions to blur together and you waste time figuring it out.

In the Java world you have the added problem that the JVM has a legacy convention which doesn't follow any platform standard and the problem that many projects use different conventions so you probably also have a different set of rules for JVM options and the actual program options.

Re: Java Pain

#68
Everyone knows in theory that an actual command line is being run, and somewhere a main() method has kicked it all off, but the Java world is really dominated by enterprise tooling concerns, many levels of abstraction away from such things. Since people in the community don't spend much time thinking about it, it doesn't get the attention and polish it needs.

Re: Java Pain

#69

I'm seeing a lot of comments here along the lines of "this is just a problem Java newbies would have and this Tim Bray guy, whoever he is, doesn't want to take the time to learn the tools." Well. True, to a degree, I suppose, but whoever this Tim Bray guy is adds some pretty important context. He co-authored the XML spec and was director of web technologies at Sun. You know, the people who made Java and promoted it a…

I'm surprised he thinks the core platform should offer that, the JDK is large enough as it is thank you. Any number of countless application generators and libs make it easy. Even a quick glance at maven central would've answered his question.

In other words, Java wont search the internet for you.

Re: Java Pain

#70

you're kidding me, right? rhodey@rhodey$ mvn package rhodey@rhodey$ java -jar .jar

I don't think you read the article. You don't address his certificate issues. Your solution also requires writing a pom.xml which is non-trivial.

The cert issues are a packaging and Apple issue. Explicitly. I don't think it's fair to make the claim "java suxors" because Apple packages bad certs.
Post reply on HN