We often encounter nested loops, like for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { doSomething(i, j); } } This can be nested to a few more levels without too much pain, as long as we observe that the number of iterations for each level need …
Kategorie-Archive: JVM-languages
Java Properties Files and UTF-8
Java uses a nice pragmatic file format for simple configuration tasks and for internationalization of applications. It is called Java properties file or simply „.properties file“. It contains simple key value pairs. For most configuration task this is useful and easy to read and edit. Nested configurations can be expressed by simple using dots („.“) …
Scala Exchange 2017
I have visited Scala Exchange („#ScalaX“) in London on 2017-12-14 and 2017-12-15. It was great, better than 2015 in my opinion. In 2016 I missed Scala Exchange in favor of Clojure Exchange. This time there were really many talks about category theory and of course its application to Scala. Spark, Big Data and Slick were …
Lazy Collections, Strings or Numbers
The idea is, that we have data that is obtained or calculated to give us on demand as much of it as we request. But it is not necessarily initially present. This concept is quite common in the functional world, where we in a way hide the deprecated concept of state in such structures, by …
Is Java becoming non-free?
We are kind of used to the fact that Java is „free“. It has been free in the sense of „free beer“ pretty much forever. And more recently also „free“ in the sense of „free speech“. In spite of the fact that we read that „Oracle is going to monetize on Java“, as can be …
JMS
Java has always not just been a language, but it brought us libraries and frameworks. Some of them proved to be bad ideas, some become hyped without having any obvious advantages, but some were really good. In the JEE-stack, messaging (JMS) was included pretty much from the beginning. In those days, when Java belonged to …
Clojure Exchange 2016
I have just visited Clojure Exchange. Since it had only one track, there is no point in listing which talks I have attended, since this can easily be seen on the web page of the conference. It was interesting and there were many great talks and I also met great people among the other participants.
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 …
Laziness
In conservative circles, laziness has a slightly negative connotation, but in IT it should be seen positive, if we understand it right. If we as humans get our job done in a more efficient way, by working less, this laziness is a good thing. So let’s be lazy by becoming more efficient. For now, just …
Clojure
Functional programming languages have become a bit of a hype. But the ideas are not really so new. The first languages beyond Assembly language that have maintained some relevance up to today were FORTRAN, COBOL and Lisp. Indirectly also Algol, because it inspired pretty much any modern mainstream programming language in some way through some …