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? to the rescue. It’s a port of a popular Ruby GEM; this is not the only implementation, but it serves.
  • User Anthaas offered this gem: “You’ll find most of the people who waste a large amount of time on something simple do so because they are fixated on fixing their solution, rather than finding a solution that works.”
  • User liste pointed out JSimpleDB, a project that says it is a “a better persistence layer for Java.” Basically, it provides a transactional access layer for various data stores (SQL databases, NoSQL data stores) as key/value stores, with quite a laundry list of features copied from the project home page:
    • Encoding/decoding of field values
    • Enforcing referential integrity; forward/reverse delete cascades
    • Field indexes (simple and composite)
    • Query views
    • Schema management
    • Change notification
    • Validation queues
    • Command line interface
    • Designed from the ground up to be Java-centric; 100% type-safe at all times.
    • Works on top of any database that can function as a key/value store (SQL, NoSQL, etc.)
    • Scales gracefully to large data sets; no “whole database” operation is ever required
    • Configured entirely via Java annotations (only one is required)
    • Queries are regular Java code – there is no “query language” needed
    • Change notifications from arbitrarily distant objects
    • Built-in support for rolling schema changes across multiple nodes with no downtime
    • Supports simple and composite indexes, including on user-defined custom types
    • Extensible command line interface (CLI) including Java 8 expression parser
    • Built-in Java-aware graphical user interface (GUI) based on Vaadin

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, I need to change the message on my last commit!
    • Oh shit, I accidentally committed something to master that should have been on a brand new branch!
    • Oh shit, I accidentally committed to the wrong branch!
    • Oh shit, I tried to run a diff but nothing happened?!
    • F*ck this noise, I give up.
      It’s worth noting that your editor has used at least a variant of all of these statements, most of them even in recent memory.
  • User whaley, in a moment when he wasn’t accompanied by roosters, cows, and goats, pointed out “Suffering-oriented programming“, saying that it convinced him that “make it work, make it pretty, make it fast” is the right approach, as compared to “make it work, make it fast, make it pretty.” Good read.
  • From Reddit: “Recaf is an open-source framework for authoring extensions (dialects) as libraries for Java. You can redefine every major syntactic element of the language, either add new ones or create your own flavor of Java that matches your needs. It can be used to give syntactic support to libraries, to generate and instrument code. Last but not least you can experiment with the design and implementation of Java extensions in plain Java.” Seems like another tool to compete (sort of) with Lombok and Autovalue.

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 whatever terrible world you happen to live in, you definitely want to test against it instead of a good database, to help you work out what awful bugs you need to avoid.
  • User yawkat also pointed out something that your humble author was unaware of: the hash code of Java Strings isn’t calculated until hashCode() is called. That makes perfect sense, actually. The javadoc for String’s hashCode() points out how the hashcode is calculated, but not when.
  • User cheeser pointed out O’Reilly’s (legal and free) Data Ebook Archive: “An archive of all O’Reilly data ebooks is available below for free download. Dive deep into the latest in data science and big data, compiled by O’Reilly editors, authors, and Strata speakers.”
  • The channel has mentioned tries (pronounced “trees”) as a form of data structure a few times lately; in case you don’t know what a trie is, or how it differs from a tree, see The Trie: A Neglected Data Structure.
  • Using NPM (Node.js‘ package manager) as part of a Java build came up one morning. Without any further context, here are a few references show up to integrating NPM into a maven build, none of which has been tried and tested by the person writing this up for you:

Interesting Links, 2016 Sep 13

  • Technical Itch: JVM guaranteed safepoints, Safepoints in HotSpot JVM, and Dynamic Deoptimization came up in conversation.
  • – 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 Proposal suggests a migration of NetBeans (possibly a fork?) from Oracle to Apache, opening up NetBeans to Apache’s governance model and a wider community. Considering the noises Oracle’s made around NetBeans being deprecated (and therefore likely abandoned), this sounds like a great idea.