Live data from Hacker News

Java for Everything

teamten.com

301–310 of 344 posts

Re: Java for Everything

#301
post #53

Does anyone know a good starting point for learning not just Java, but how to install everything I need? I consider myself the Neo of OOP and a master devops, but every time I tried to use Java I hit a wall of unreadable manuals/guides , software impossible to install/maintain, and mixed opinions among Java devs. Like it can't be used without a dedicated sysadmin.

That...sounds surprising. Basically you need: 1. An IDE (I highly recommend IntelliJ IDEA) 2. A build and dependency management tool (I prefer Gradle, but Maven is a reasonable choice - though way more verbose) Beyond that point, a lot depends on what you want to do. Some of my preferences (YMMV): * logging: slf4j over logback * json serialization/deserialization: jackson * db access (if you don't need or want ORM):…

There is also Spring Boot, which is very similar to Dropwizard. Both wonderful frameworks.

Re: Java for Everything

#302
post #198

Earlier quoted context omitted.

There's Avian. It can produce standalone, compact ELF files that have no dependencies. It's not an AOT compiler though. The problem with AOT in the Java ecosystem is quite a lot of modern frameworks and the like have ended up relying on the ability to synthesise code at runtime. Android has put a check on that kind of behaviour but it's still there. There's also Excelsior, which is an AOT JVM, but it's for Windows on…

There's also Excelsior, which is an AOT JVM, but it's for Windows only. Unfortunately, it's also extremely expensive. That's not to say it isn't worth every penny in some situations, but I've gotten kind of spoiled by free development tools for personal projects. I'm glad the days of spending hundreds of dollars for things like C compilers are long behind me. I agree that a really good AOT JVM would be very nice. It…

Looks like it is Windows, Linux and Mac. No 32bit on Mac, though.

http://www.excelsiorjet.com/

Re: Java for Everything

#303

Earlier quoted context omitted.

Or in Clojure, it's (sort #(compare %1 %2) coll) To reverse it (sort #(compare %2 %1) coll) Where coll is the collection you want to sort. Same caveat applies with: (reverse coll) Try as I might I can't get Clojure to bench slower than its comparative Java. I see no reason to program in Java anymore wherever possible.

Java 8 counterpart to you Clojure variant is actually: coll.sort(comparing(identity(), Integer::compareTo)); Or: coll.sort(reverseOrder())

Better! Still much more complex, though.

Re: Java for Everything

#304
post #296

Earlier quoted context omitted.

> If the language you're using is already expressed in a form that does not need serialization, then you don't have to serialize it. Yeah. If only that language and "not needing serialization" code format didn't have 200 other problems, like NONE of the major services accepting it, lack of tooling, a sorry state of an ecosystem, difficulty of finding programmers and/or jobs, etc...

And the simple fact that taking code provided by a remote service and just using it as is just handing the keys of your server over. LISP homoicity is nice but its a bad, bad idea to accept LISP code over the network from any client. Documented dataformats that are not executable are enough of a security risk that sending an executable around is not a great idea. (Should have been attached to grandparent, as I agree…

You really don't get it do you. An s-expression doesn't have to be evaled to be read. I just keep getting downvoted here. It's like offering a machine gun to a caveman and getting clubbed to death with it.

Re: Java for Everything

#305
post #293
post #286

Earlier quoted context omitted.

Which JVM?! There isn't such thing as "The JVM", there is the JVM standard, reference implementations and certified JVMs. Oracle has JVMs implemented in a mix of C, C++ and Java, up to pure Java (Maxime), just like many other JVM vendors and research institutes also do. Even Oracle is playing with the idea of using the Maxime JVM, now Graal, to eventually replace Hotspot. The Java 7 and Java 8 reference implementatio…

> Which JVM?! The Oracle one, aka the one production Java code is usually deployed on. I am aware of several of those research projects but they're, well, research projects. Even if the JVM were fully implemented in Java, the OS most likely wouldn't be. Even if it were, the CPU microcode almost certainly wouldn't be. At some point your Java will be running on something not-Java, even if that thing is "logic gates". B…

There are lots of production JVMs, they aren't research projects.

- Oracle JVM

- Oracle J/Rockit

- Websphere JVM

- OS/400 JVM

- HP-UX JVM

- Aix JVM

- Aonix Perc JVM

- ...

> But it doesn't matter - just as the implementation language of the libraries you use in Python doesn't matter.

If I can achieve the same execution speed with pure Python, then yes it doesn't matter. However, that isn't the case.

Re: Java for Everything

#306
post #285

Earlier quoted context omitted.

It's entirely possible to write simple things in Java, without ESBs and a person-century of effort. That I don't disagree with (see Java4K and various other demoscene-like competitions), but when the mainstream culture of Java is oriented towards architecture-astronautism and "enterprisey" bureaucratic excesses of complexity, that's what the majority of Java developers you find are going to do. Ask them why a simpler…

"was told to "refactor" a fairly trivial 20-line method in one class into 8 separate classes each containing 1-line methods" How typical is this level of non-value adding misguided pedantism? I understand that big software consultancies would want to milk their clients for all the work they can for implementing function points. But what profitability models drive developers to this level of weirdness? Is it just a cu…

Enterprise. It is just how the enterprise world works.

Re: Java for Everything

#307
post #198

Earlier quoted context omitted.

There's Avian. It can produce standalone, compact ELF files that have no dependencies. It's not an AOT compiler though. The problem with AOT in the Java ecosystem is quite a lot of modern frameworks and the like have ended up relying on the ability to synthesise code at runtime. Android has put a check on that kind of behaviour but it's still there. There's also Excelsior, which is an AOT JVM, but it's for Windows on…

There's also Excelsior, which is an AOT JVM, but it's for Windows only. Unfortunately, it's also extremely expensive. That's not to say it isn't worth every penny in some situations, but I've gotten kind of spoiled by free development tools for personal projects. I'm glad the days of spending hundreds of dollars for things like C compilers are long behind me. I agree that a really good AOT JVM would be very nice. It…

Then you might be happy to know that AOT is planned for the reference implementation for Java 9, eventually Java 10.

Also that Oracle Labs have SubstrateVM, which is an AOT compiler based on Graal.

Then there is also JikesRVM and RoboVM.

Re: Java for Everything

#308
post #254

Earlier quoted context omitted.

i use PHP and i got customers and revenue and retention rate too facebook use php deal with it programming language is one thing, marketing your solution is another thing

facebook is using php compiled to C++, and that's only for their frontend. Mind your anecdotal evidence :)

Actually, Facebook is using PHP executing on a JITting virtual machine:

https://www.facebook.com/notes/facebook-engineering/speeding...

Mind your out-of-date rebuttals to anecdotal evidence :)

Re: Java for Everything

#309
post #152

Earlier quoted context omitted.

> I've watched a company spend two years, dozens of developers, and over a million in ESB license fees failing to write a site that was expected to have, at peak, 100 users/day. I'm sorry to hear that. But you understand that this had nothing to do with Java, right? Java didn't make those people do that. That was just good old fashioned human stupidity. It's entirely possible to write simple things in Java, without E…

Is there an update to this book or something similar that speaks to Java +7?

The book is mostly about the use of the Java EE APIs. As such, it's not all that affected by the evolution of the core language from 6 to 7 to 8.

However, it probably will be affected by the evolution of the Java EE API. EE 6 was a huge, massively simplifying, change from EE 5, which is why it needed a book like this. EE 7 was a fairly incremental change from EE 6, and EE 8 is set to also be a modest step forward.

The biggest change in EE 8 - and i don't know whether to laugh or cry about this - is that Java will be getting a standard web MVC layer. Fifteen years after such things first appeared on the scene, and five years after they became passé. Maybe there'll be an API for controlling dialup modems or AIM clients next.

Post reply on HN