Latest Content

Safe Publication Of Transient Members

A very common (and quite dangerous) tripping point I find in concurrent Java code is that of unsafe member publication of otherwise safely-published objects. Of course, concurrent code is difficult to get right and I occasionally find myself identifying the same mistake in my own code---but usually only after a ... read more

Redirecting "derby.log" To An SLF4J Logger

More and more, I find myself using Apache Derby as an embedded database for personal projects. One inconvenience, however, is the persistent derby.log file than inevitably gets created at startup. It can, of course, be disabled entirely, but I'd like Derby errors to be put into my application logs, currently ... read more

Tracing Servlet Requests

Tracing through Servlet-based web application log files isn't always as convenient as one may hope. Sure, when using Tomcat, we may rely on the thread names (such as http-8080-2), but sometimes they seem to bleed into each other resulting in a difficult structure to grep. Compounding this, an ... read more

Suppressing An Appender For A Log4J Logger

Occasionally, a third-party library will balk the log-or-throw exception handling convention. Most recently, I came across this issue with Hibernate's Work API: an org.hibernate.exception.ConstraintViolationException was being logged and thrown when a unique key constraint was violated. To be exact, Hibernate's JDBCExceptionHelper logged exceptions through JDBCExceptionReporter. The flow was similar ... read more

A Case Of Leaky State

Leaky state is among the most common artifacts I find in existing applications. It's a symptom of poor encapsulation and/or abstraction and typically tends to unmaintainable code. Such symptoms are typically, but by no means exclusively, seen in an anemic domain model. Controlling state by means of encapsulation and ... read more

Running Firefox As An Isolated Linux User

A few years back, I decided that the risks of running some Internet-connected programs on my workstation containing personal data was a bigger risk than necessary. After discussing this topic with several colleagues, the general consensus was that I'm too paranoid. ... read more

An Experiment

This website exists as a personal and professional experiment. I intend to establish the best use for this website, be it professional, personal, both, or neither. ... read more
8 9 10 11