Custom String Hashing – Part II

In this post, the second of two, we will discuss the re-implementation of all necessary classes to provide “internal” Java support for custom hashing. In all, five classes (java.util.HashMap, java.util.HashSet, java.util.AbstractMap, java.util.LinkedHashMap, and java.util.LinkedHashSet) must be handled. The benefit of this approach is minimal alterations to existing code. That is, instead of importing from java.util.HashMap,

Custom String Hashing – Part II Read More »

Logging

In this post, I’m going to share my custom logging class. It can be seen as a scaled down version of log4j, which is a comprehensive logging application. While log4j is great, it is not easily added to ones program. I’ve used log4j before and found it very helpful in large applications, but when I’m

Logging Read More »

JNI Basics

JNI stands for Java Native Interface (detailed Oracle documentation). It allows Java to execute code written in other languages such as C/C++ and assembly. So, why would you want to do this? While Java is quite comprehensive, it is by design generic. That is, it must operate seamlessly across all supported architectures (and there are

JNI Basics Read More »

Combinations

A quick Google search for Java combination generators produces many results; nearly all focus on recursion (for more on recursion, see this post). While suitable for smaller sets, deep recursion quickly saturates the recursive stack, crashing Java. Thus, an iterative approach is warranted. In this post, both recursive and iterative approaches are shown.

Combinations Read More »

Recursion

Recursion is a programming technique that deconstructs a large process into a series of small, identical steps. Thus, a single method is created that continually calls itself to solve the next iteration by altering the parameters. This continues until some termination criterion is reached. While recursion is a useful tool, it requires additional memory to

Recursion Read More »