John Shepard

Large Language Model (LLM) Coding Assistance

With all the hype surrounding Generative AI/LLM, and all the hallucinations mentioned in the news, what are these actually good for? As it turns out LLMs trained for code generation are helpful. But what if you don’t want your code going to some cloud provider? The following is a great solution for that. Here is … Read More

Making a Java SafeString that works with all unicode characters

In Java, there is an issue with String when using characters that take up more than 2 bytes in UTF-16. substring() and similar methods can split the character in the middle. I was thinking switching Strings to UTF-8 might be good, and there are currently two JEPs for Java 9 somewhat related to this. 226: UTF-8 Property Files and 254: Compact Strings. But thinking about this a little more, I don’t necessarily want a UTF-8 String class, but a String class that works with all unicode characters. Here’s how I did it.

Changing Java 8 – handling nulls with the AST

One aspect of Java 8 that would be nice to change is the handling of nulls. Can testName.getName() be changed so that a NullPointerException is never thrown, even if testName is null? Is it possible to modify java to support this directly? Java does provide an interface to read the Abstract Syntax Tree (AST) in … Read More

Java One 2015

See what John Shepard noted from the 2015 Java One conference sessions he attended.

Converting a Java Spring application to Scala

Supposedly Scala requires a completely different programming style. But what happens when you just want a Spring application? Is it possible to program in Scala without jumping in the deep end? Chariot’s John Shepard illustrates the difference in approach in this quick tutorial.

Top Five Reasons to Try Java 8

Java 8 is a substantial improvement over Java 7. Here are Java developer John Shepard’s top five favorite features.