Libera #java

What you want to have to develop Java

Recently a user asked what they would need to know to develop a “small web application” using Java, including a database. This is not a good question, really, but IRC user surial gave a lot of relevant information that’s worth preserving and adding to. This is not what surial said – if you’re interested in the actual content, see the channel logs – but this is a paraphrase that attempts to build on surial’s...

6 minute(s) read

Interesting Links, 14 April 2016

Natty is a natural language date parser written in Java. The idea is that you feed it corpora like "1984/04/02", "february twenty-eighth", or "3 days from now", and get back a list of potential matching Date objects. It is not designed to pull dates out of natural language – for that you’d want something like OpenNLP – but it might be able to help convert the natural language dates you get from OpenNLP...

3 minute(s) read

Byte Order Marks (BOM)

The so-called Byte Order Mark is a special unicode character that has no visual representation. The point of it, is to start your text data with this pseudocharacter; it serves as a way to identify “Endianness” – that the text is encoded with UTF-16 (Little Endian), or UTF-16 (Big Endian), or UTF-8. Java handles it kinda weirdly; this post describes how it works. The BOM is the bytes: 0xFE 0xFF. That means...

2 minute(s) read

Interesting Links, 28 Mar 2016

The Apache Foundation has announced the release of PDFBox 2.0. Apache PDFBox allows for the “creation of new PDF documents, manipulation, rendering, signing of existing documents and the ability to extract content from documents.” TechEmpower‘s Web Framework Benchmarks features Rapidoid as the fastest web framework – and Rapidoid is written in Java. It’s worth noting that the benchmark, being a benchmark, isn’t exactly “real world” – and Rapidoid doesn’t win every category...

2 minute(s) read

Interesting Links, 17 Mar 2016

This list was originally supposed to be published over a week ago, but life’s been busy. Sorry, folks! Happy St. Patrick’s Day! A succesful Git branching model considered harmful is a response to another article, A successful Git branching model. Both models can work; which one works better for you depends on a lot of factors that are likely to be unique to your development environment. (I’ve used both: I find the...

4 minute(s) read

Interesting Links, 1 Mar 2016

Happy March 1, it’s April Fool’s Day! Oh, wait… From ##java itself: Anthaas_> 99.7% of people who say C++ is faster are not capable of using the highly-skilled techniques required to make that true. Now, about how he collected the data to validate that statement… Gradle.org posted “Gradle vs Maven Feature Comparison“, with a description of “At long last, a comprehensive feature comparison of Maven vs Gradle that shows...

2 minute(s) read

External Program Invocation in Java

Users who wish to shell out a Java program may be tempted to use Runtime.exec(), which yields a Process. They probably should use zt-exec instead. However, for those who think that using a separate library for something so “simple” is overkill, please read on. General Notes Java does not invoke a shell – Java uses execve(). This means that variables like ~, %HOME%, and “$JAVA_HOME” will not be expanded, nor will you be able to...

5 minute(s) read

Interesting Links, 24 Feb 2016

It’s been a while, and I’m pretty sure I missed some fun stuff, but here goes with a few things: Blogger Sam Atkinson has a few here, some good, some bad. I admire his proclivity. “Don’t Rewrite Your Old Application; Refactor!” has some advice for people migrating to new products. It’s got some good thinking in it (rewriting is going to miss stuff, it’s going to take longer than you...

2 minute(s) read

Programmatic Reload of Logback Configurations

Logback has the capability to programmatically and explicitly load various configurations. This can be useful when you need to adjust logging levels at runtime, and it’s actually pretty easy to do, as well. You’d want to use something like this for a long-running application, or one that has an extensive load process: imagine a production environment, where you want to see details that would be hidden by convention. For example, imagine you...

5 minute(s) read

Interesting Links, 15 Feb 2016

A great quote from ##java: < surial> maven/gradle are to ant, as svn is to cvs. JavaCPP is a new project that attempts to bridge a gap between C++ and Java, entering the muddy waters along with JNI and JNA (as well as a few other such projects). It actually looks pretty well done – and targets Android as well as the JVM, which seems like a neat trick. First in a couple from...

2 minute(s) read