Home » Author Archives: Dustin Marx (page 4)

Author Archives: Dustin Marx

Easy and Consistent Log4j2 Logger Naming

java-logo

In the post Portable Logger Names with Java 7 Method Handles, I wrote about using Java 7‘s method handles to name classes’ loggers. I stated in that post that advantages of that approach included consistency in logger naming and avoiding accidental copying and pasting of code that might lead to a different class’s name being used for the logger name. ...

Read More »

Single Quotes in Oracle Database Index Column Specification

software-development-2-logo

In my previous post, I mentioned that a downside of using double quotes to explicitly specify case in Oracle identifiers is the potential for being confused with the use of single quotes for string literals. Although I don’t personally think this is sufficient reason to avoid use of double quotes for identifiers in Oracle, it is worth being aware of ...

Read More »

Downsides of Mixed Identifiers When Porting Between Oracle and PostgreSQL Databases

postgresql-logo

Both the Oracle database and the PostgreSQL database use the presence or absence of double quotes to indicate case sensitive or case insensitive identifiers. Each of these databases allows identifiers to be named without quotes (generally case insensitive) or with double quotes (case sensitive). This blog post discusses some of the potential negative consequences of mixing quoted (or delimited) identifiers ...

Read More »

JDK 9: Highlights from The State of the Module System

java-logo

Mark Reinhold‘s The State of the Module System (SOMS) was published earlier this month and provides an information-packed readable “informal overview of enhancements to the Java SE Platform prototyped in Project Jigsaw and proposed as the starting point for JSR 376.” In this post, I summarize and highlight some of concepts and terms I found interesting while reading the document. ...

Read More »

JAR Manifest Class-Path is Not for Java Application Launcher Only

java-logo

I’ve known almost since I started learning about Java that the Class-Path header field in a Manifest file specifies the relative runtime classpath for executable JARs (JARs with application starting point specified by another manifest called Main-Class). A colleague recently ran into an issue that surprised me because it proved that a JAR file’s Manifest’s Class-Path entry also influences the ...

Read More »

Passing Arrays to a PostgreSQL PL/pgSQL Function

postgresql-logo

It can be handy to pass a collection of strings to a PL/pgSQL stored function via a PostgreSQL array. This is generally a very easy thing to accomplish, but this post demonstrates a couple of nuances to be aware of when passing an array to a PL/pgSQL function from JDBC or psql. The next code listing is for a contrived ...

Read More »

The Latest Twist in the Java IDE Wars: Subscription-based IntelliJ IDEA

jetbrains-intellijidea-logo

I’ve been watching with some interest the discussion surrounding this past week’s announcement that JetBrains is moving to an Adobe-like and Microsoft Office-like software subscription licensing model. The feedback has been fast and furious and JetBrains has responded with a very brief follow-up post We are listening that is entirely reproduced in this quote: “We announced a new subscription licensing ...

Read More »

Setting PostgreSQL psql Variable Based Upon Query Result

postgresql-logo

When using PostgreSQL‘s psql command-line tool to interact with a PostgreSQL database via operator interaction or script, it is not uncommon to want to set psql variables based on the results of a particular query. While PostgreSQL’s procedural language PL/pgSQL supports approaches such as SELECT INTO and assignment (:=) to set PL/pgSQL variables based on a query result, these approaches ...

Read More »

Procedure-Like Functions in PostgreSQL PL/pgSQL

postgresql-logo

PostgreSQL does not support stored procedures in the sense that a database such as Oracle does, but it does support stored functions. In this post, I look at a few tactics that can make the use of a stored function in PostgreSQL (stored function and its calling code both written in PL/pgSQL) feel like using a stored procedure. These simple ...

Read More »

Java Numeric Formatting: DecimalFormat

java-logo

In the post Java Numeric Formatting, I described and demonstrated some of the useful instances provided by NumberFormat static methods such as NumberFormat.getNumberInstance(Locale), NumberFormat.getPercentInstance(Locale), NumberFormat.getCurrencyInstance(Locale), and NumberFormat.getIntegerInstance(Locale). It turns out that all of these instances of abstract NumberFormat are actually instances of DecimalFormat, which extends NumberFormat. The next code listing and the associated output demonstrate that all instances returned by ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials