Skip to main content

Posts

2018

2017

Java: Unstrung

·452 words·3 mins
So Strings are built for optimisation, but are you using it in an optimised way? If you understand interning and immutability, you can start looking at ways to use those features to your advantage.

Java: The Unchangeable String

·526 words·3 mins
One of the fundamental data types in Java is the String. In fact, it’s used so often that most people don’t even think much about what a String is or how it works. But a String Object works like no other object in Java in two important ways; immutability and internment.

Thread Safety Dance

·611 words·3 mins
Another blast from the past. If you’re working with Servlets or in a Threaded environment, you need to be thinking about thread safety. Thread Bare # Java has built in support for multiple threads in all its objects. The way it handles this, is each thread can get a handle on the object and run its methods at the same time which, for something like a servlet, cuts down on the amount of memory needed to load the servlets and the amount of time needed to instantiate multiple objects. This can be a huge improvement in performance for web-based applications.

Programming to Interfaces

·439 words·3 mins
Yet another article from the archives. Hope it’s useful. There is a common Object Oriented axiom that says “Program to the Interface and not to the Implementation”. But what does that mean and why is it useful?

A Couple Pointers

·375 words·2 mins
This is an article I wrote a while ago, but is still relevant to many languages still in use. Figured I’d repost it to this blog. Many of you may have learned the following in Java 101, but I thought I’d repeat it just in case.

2016

Being a Craftsperson

·673 words·4 mins
I used to play role playing games in High School. Namely, the Teenage Mutant Ninja Turtles Role Playing game. I was the GM. I played almost every weekend with my brother and my best friend–the center of the football team. I loved those games. I think we ignored half the rules, but the stories we created are still some of my best memories from that time.