Category Archives: common practice

Continuous Updating

What is Continuous Updating? Continuous Updating means the regular update of your software projects.¬†Mainly it focuses on libraries used. Like guava, Spring, Java. But it also means in my opinion to regularly question your already made design decisions, architecture or … Continue reading

Posted in common practice | Tagged , , , | Leave a comment

Unknown Java Features Part 2: TimeUnit

Simple Way to use different time units TimeUnit is the simplest way to work with different time units since Java 5. Aren’t you annoyed about writing all the time how to convert e.g. minutes to milliseconds? Like “5 * 60 … Continue reading

Posted in common practice, Java, Unknown feature | Tagged , | Leave a comment

Singleton Pattern

The singleton pattern is one every developer must know. It is a class which has only one instance, which is handled inside it. You can only get the instance, but never (reflection¬†etc excluded) create a new instance. Advantages It can … Continue reading

Posted in common practice, Java, tips | Tagged , , | Leave a comment

Autoboxing: Traps and Advantages

What is ‘autoboxing’ some people might ask? Autoboxing is a feature, which was added in Java 5. Autoboxing is the automatic conversion of primitive data types like int, double, long, boolean to its wrapper Object Integer, Double… and vice versa. … Continue reading

Posted in common practice, Java, Performance, Uncategorized | Tagged , , , , | Leave a comment

The costs of String concatenation (+) or what String appending really does

String concatenation (e.g. “fu” + “bar”) are for most developers a mystery what it really does. The simple case Something like will usually be appended at compile time. So if you decompile this you see: The final case What happens … Continue reading

Posted in common practice, Formatting, Java, Performance | Tagged , , , , | Leave a comment

Java Performance Tuning with maximizing Integer.valueOf(int)

With http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#valueOf%28int%29 or auto boxing(uses internal a valueOf too) the cached Integer values will be used if they are between -127 and +128. Now I found coincidentally(by looking at the source) on a Java feature or more exactly on a … Continue reading

Posted in common practice, Performance | Tagged , , , | 1 Comment

The book “Clean Code” from Robert C. Martin

Some weeks ago I read “Clean Code” from Robert C. Martin. General speaking, I think its guidelines are too extreme, but the approach of the problems are good. For example, he made an 10 line method to a 3 line … Continue reading

Posted in Books, common practice | Tagged , | 3 Comments