UTF-16 Strings in Java

Deutsch Strings in Java and many other JVM-languages consist of Unicode content and are encoded as utf-16. It was fantastic to already consider Unicode when introducing Java in the 90es and to make it the only reasonable way to use strings, so there is no temptation to start with a „US-ASCII“-version of a software that …

Share Button

Will Java, C, C++ and C# be the new Cobols?

A few decades ago most programming was performed in Cobol (I do not want to shout it), Fortran, Rexx and some typical main frame languages, that hardly made it to the Linux-, Unix- or MS-Windows-world. They are still present, but mostly used for maintenance and extension of existing software, but less often for writing new …

Share Button

Frameworks for Unit Testing and Mocking

Unit testing has fortunately become an important issue in many software projects. The idea of automatic software based unit and integration tests is actually quite old. The typical Linux software that is downloaded as source code and then built with steps like tar xfzvv «software-name-with-version».tar.gz cd «software-name-with-version» ./configure make sudo make install often allows a …

Share Button

How to create ISO Date String

It is a more and more common task that we need to have a date or maybe date with time as String. There are two reasonable ways to do this: * We may want the date formatted in the users Locale, whatever that is. * We want to use a generic date format, that is …

Share Button

What do +, – and * with Integer do?

When using integers in C, Java or Scala, we often use what is called int. It is presented to us as the default. And it is extremely fast. Ruby uses by default arbitrary length integers. But what do +, – and * mean? We can rebuild them, in Ruby, kind of artificially restrict the integers …

Share Button

Devoxx 2015

This year I have had the pleasure to visit the Devoxx-Conference in Antwerp in Belgium. I have visited the following talks: Day 1: Opening Keynote Session about Java 9 modules Keynote Session about the beginning of the Universe Asynchronous programming in Java 8: how to use CompletableFuture by José Paumard Ignite Sessions I JRuby 9000 …

Share Button

Java: Using Enums for Singletons

This singleton pattern is not really a big deal, but overused because it gives us the coolness of knowing about design patters without learning too much stuff for that… It does have its uses in some programming languages, while more or less implicit or obsolete in others, depending on the point of view. I have …

Share Button

Design Patterns: Singleton

Deutsch This Singleton Pattern has the advantage to be easy to memorize. The only really interesting aspect of it is the issue of initialization („lazy or „eager“) and maybe the dependencies between multiple singletons. But I would like to mention two generalizations. A Singleton exists once in the whole program. Generalizations can address the uniqueness …

Share Button

Using Collections

When Java came out about 20 years, it was great to have a decent and quite extensive collection library available as part of the standard setup and ready to use. Before that we often had to develop our own or find one of many interesting collection libraries and when writing and using APIs it was …

Share Button

Find the next entry in a sequence

In Facebook, Xing, Google+, Vk.com, Linkedin and other of these social media networks we are often encountered with a trivial question like this: 1->2 2->8 3->18 4->32 5->50 6->72 7->? There are some easy patterns. Either it is some polynomial formula or some trick with the digits. But the point is, that any such sequence …

Share Button