I recently had to decide what version-numbers to assign to development releases of an upcoming product. My first thought was to use 2.0-sprint-3, 2.0-sprint-4 then 2.0. But is 2.0-sprint-4 really before 2.0? The maven docs were unclear, so I researched the topic.
Spoiler: no, it is not; I had to settle for 2.0-beta-* as my naming scheme.
For Java development, I use either Intellij or Eclipse. Both have strengths and weaknesses. I did encounter one very annoying issue with Intellij recently, and apparently it is one that JetBrains have been aware of for over two years, and haven’t shown the slightest interest in fixing. Given that my employer pays for Intellij licences, I feel justified in feeling rather disappointed.
The Intellij/maven integration is generally excellent - much faster and more stable than with Eclipse. However when running Java code from within the IDE, Intellij completely ignores any dependencies declared in the Maven pom with scope=provided. This particularly bites people who (like me) are trying to use Spring Boot, which provides tools that generate maven poms with all necessary dependencies declared. The resulting code compiles fine from the Maven commandline, and can be started via Spring-boot-specific commands. But running the code from the IDE doesn’t work - some required dependencies are not loaded.
This has been reported but is not being taken at all seriously at JetBrains.
It’s a rather tricky problem to work around; a few useful suggestions are made in the above issue-report, but none are perfect.
I haven’t posted much recently, but not because I’ve run out of topics - quite the opposite, it’s been a busy few months. Among other things, I’ve been working on a project involving Elasticsearch. As a side-effect, here is an overview of Elasticsearch.
However there is a nasty bug in the above: Files.list(baseDir) returns a stream object that must be explicitly closed. Not doing so leaks a file-handle to the directory being listed! Sadly, the bugfree version does not look quite so elegant:
And by the way, the “toString” is necessary too, as Path.endsWith() and String.endsWith() are not the same thing.
Designing good library APIs is an art - and IMO whoever at Sun approved Files.list and Path.endsWith screwed up. If only they had read Chapter 5, “Candy Machine Interfaces” from “Writing Solid Code” by Steve Maguire - an old book now, but that chapter has some great and still-relevant advice.
Update 2016-10-22: And Hive 2.1 is already available, and looking impressive - average of 25x speedup for queries from a standard test-suite (by internally using the new LLAP framework)! It is included as a “technical preview” in Hortonworks HDP2.5 - ie not yet considered production-ready.
I’ve recently been doing some maintenance work on an existing Java application (a server providing REST APIs to clients, and talking to a database). Two of the libraries used there (Dropwizard, Hystrix) were new to me, and interesting - worth a brief post at least.