Libera #java

Interesting Links, 31 Oct 2016 (and 25 Dec 1038)

kumuluzEE is “A lightweight framework for developing microservices using standard Java EE technologies and migrating existing Java EE applications to microservices.” It’s not immediately clear from the web page what makes it ideal for migrating to microservices, but there it is. “Don’t Even use COUNT(*) For Primary Key Existence Checks” has some valuable performance advice, and considers multiple DB implementations while offering it. Now for some Scala stuff: “Quo Vadis, Scala?” has some...

2 minute(s) read

Interesting Links – 24 Oct 2016

The Way of the Lambda – Elegant and Efficient discusses using Java 8’s removeIf to remove elements from collections, as opposed to removing them via an iterator, and shows graphs to show the improvement. One claim (via Reddit) was that it was O(1) but here the claim is a little more reasonable. Another thing from the post was that the author says that he’s “recently … spent a few years away from Java development...

2 minute(s) read

Interesting Links – 21 October 2016

Everything is fine with JavaScript – hold on, I know, this is a Java blog! But it’s okay. Trust me. This post says a lot about JavaScript – but a lot of it is also very transferable to the Java ecosystem. One headline stands out: “If someone is holier-than-thou about technology choices, they’re wrong and you should ignore them.” (Notice how carefully I’m avoiding bringing up, say, MySQL or JSF here.) From...

1 minute(s) read

Interesting Links – 17 Oct 2016

JEP 295: Ahead-of-Time Compilation offers deployers a chance to compile the base Java modules to native code. This can save time on some optimizations, but it’s understandably limited (and should be). The Halstead Metrics (also known as “Halsted metrics”) discusses code complexity in Java. Worth considering; this particular explanation comes courtesy of JHawk, a commercial code metrics tool, not to be confused with “j-hawk“, an open source testing tool. Experimenting with...

1 minute(s) read

Interesting Links – 5 Oct 2016

In Accounts is Everything Meteor Does Right, Pete Corey points out that Meteor‘s Accounts package dictates how user authentication and authorization will work, period, and that this removal of choice actually makes it entirely usable. Having wrestled with Shiro and Crowd and Spring Security and JAAS, it’s a point that’s hard to argue with – and while users of Shiro, etc., will probably say that those packages work as well as Accounts does...

2 minute(s) read

Interesting Links – 3 Oct 2016

User MarkyC showed Falsehoods Programmers Believe About Phone Numbers, in response to a query about what data types were useful for storing phone numbers. Channel consensus was to do what was necessary, but usually: String. From Reddit, OpenJDK6 End of Life details how the open source OpenJDK6 is reaching its end of life, years after the official Java 6 and Java 7 have reached theirs. This was surprising; I didn’t realise OpenJDK6 was still...

2 minute(s) read

Interesting Links – 29 Sep 2016

The reflections project scans your classpath, indexes the metadata, allows you to query it on runtime and may save and collect that information for many modules within your project. “try { return } finally {}” demonstrates what happens when a finally block modifies a reference that’s being returned in the try block. It’s rather interesting. Need to generate fake data? https://github.com/DiUS/java-faker to the rescue. It’s a port of a popular...

2 minute(s) read

Interesting Links – 26 Sep 2016

Oh, shit, git! is a site that shows a number of common things git users say, as well as how to fix the situations that cause them. Note that the title indicates that the readers are expected to be of age. Some examples: Oh shit, I did something terribly wrong, please tell me git has a magic time machine!?! Oh shit, I committed and immediately realized I need to make one small change! Oh shit...

2 minute(s) read

Interesting Links, 15 Sep 2016

It may be a little early to suggest that Eclipse is dead, but “The Fall of Eclipse” says it anyway, and says why. The Eclipse community would disagree, of course. User liste pointed out MariaDB4j, which is… MariaDB embedded into a jar, suitable for integration testing with MariaDB in a build tool. Sure, H2 and Derby exist, but this allows you to test against MySQL and MariaDB, because if you have to use MySQL in...

2 minute(s) read

Interesting Links, 2016 Sep 13

Technical Itch: JVM guaranteed safepoints, Safepoints in HotSpot JVM, and Dynamic Deoptimization came up in conversation. javap.yawk.at – selckin says it’s basically “take a peek under the hood at the java bytecode for fun and profit.” Interesting site, though, it basically runs javap and procyon (a java decompiler) over submitted code and shows you the bytecode and associates it with the lines of java (or kotlin, or scala) that generated that bytecode. NetBeans...

1 minute(s) read