Month: September 2017

Running a Standalone HTTP Server

When developing and testing a new HTML page, it can be accessed locally by opening it as a file from a browser. But Chrome and Firefox will issue an error if the Javascript in the page tries to make an AJAX call (due to enforcement of browser sandbox security). To work around this there are

Java Immutability for Collection-Typed Properties

Immutability is an important tool for writing more reliable code. Several of the core classes in Java are immutable (String, Integer, etc). But the principle of immutability can also be applied to specific areas of application code to improve the reliability and predictability there. An immutable object can be trusted to carry unchanging data between

Writing-Style Checkers for the WordPress Blogger

With the start of this blog I became interested in writing style. I don’t think I’ll be alone in saying that writing in a clear and direct way can be difficult to achieve. There have been metrics around for years for judging the clarity and structure of writing, so I became curious about what might

Counting Words in Java with a Mutable Counter

One of the hallmark features of the Java programming language is the immutability of basic “wrapper” data types like String and Integer. Immutable types are inherently concurrency safe and have other properties that can improve code quality, but sometimes immutable types can be costly because of their inherent unchangeability. Immutable types are safe for concurrent