There seems to be a consensus in the Java community that the Scala programming language is already on the decline. I consider this a pity because I always enjoyed programming in Scala. Actually, I even started this blog to support alternative JVM languages like Scala. But the market has decided differently. Moshe Kranc has written […]
Consider this TypeScript snippet. It’s a very simple Angular2 component. It looks almost like a Java class, doesn’t it? In particular, the @Component looks like a Java annotation. In fact, it plays the some role as a Java annotation. It tells the Angular2 framework that this class is not an ordinary POJO, but something special. […]
WebServices and REST services have come a long way in Java. Nowadays, it’s very easy to create a webservice. Basically, it’s adding an annotation to a method. All you need is a servlet container, such as Tomcat. But then, configuring and running a servlet container isn’t really simple. Chances are you think it’s simple, but […]
You can’t beat type erasure, they say. Information about generic Java data types is lost during compilation, and there’s no way to get it back. While that’s absolutely true, Mahmoud Ben Hassine and I found a tiny loophole which allowed us to improve Mahmoud’s jPopulator framework tremendously. Under certain circumstances, it’s possible to find about […]
I was very surprised when I read Adam Bien’s blog post on named parameters in Java 8. Named parameters? Well… not quite. At least not the kind of named parameters we know from languages such as Visual Basic, Groovy and many others. But it turned out to be an interesting read nonetheless. The article is […]
Nowadays everybody seems to pull their libraries from Maven Central, which encourages to upload both the binaries and the source code of a library. Most developers follow the guidelines, so nowadays it has become painless to read the source code of the open source libraries you use. Debugging such a library usually is pretty simple. […]
Three days ago, I wrote an article about Strings in Java 8. I claimed they’d rewritten java.lang.String from scratch, supporting a 64 bit encoding that can be processed by the processor’s FPU. Of course, it was an April prank. So I was pretty surprised to learn there really are improvements of Java’s string implementation. They […]
April 1st, 20141 2 Java 8 is out for a week or two now, and we all have been puzzled by the tremendous speed improvements of Oracle’s newest coup. String operations in particular have improved a lot. It’s time to look into the guts of Java and to analyze what’s going on. Along the way, […]
Yesterday the lambda revolution has been released: Java 8 is there. Java programmers can finally benefit from closures, function pointers and multiple inheritance. Or rather, limited versions of these features that are almost as useful. BeyondJava.net has a series of articles on the topics (see method references, lambda expressions, functional programming and closures vs. lambdas). […]
I’m pretty excited about Java 8 most important feature: lambda expressions. I can think of so many ways to utilize them I can hardly wait until I can use Java 8 in vocational life. Lambdas stem from the world of functional programming languages, so obviously Java 8 is a functional programming language. It’s in the […]
This morning Adam Bien has a surprising story: While the majority of the Java world is impatiently waiting for Java 8’s closures, JSF programmers can use lambda even today. All you need is EL 3.0. Even more, every Java 7 programmer can use lambda expressions by simply including the class EL library to the classpath: […]
Did you ever wonder why the Java 8 programmers chose to implement simple lambda expressions instead of full-blown closures? What’s so difficult about simple programs like this one? Let’s have a close look at closure scope.
Google’s Go language offers a nice idea how to run processes concurrently. They called it “goroutine” – clearly an allusion to coroutine, but they felt they made something new, so they gave it a new name. The idea is very simple. Every method preceded by the word “go” is run concurrently. The Go language adds […]
I just got aware how much Java 8’s lambda expressions differ from closures. Traditionally, closures are very short pieces of code. In many aspects closures are a short-hand notation for methods (plus the extended variable scope). Java 8 lambdas are full-blown classes – including inheritance, methods and everything else.
Sooner or later every Java programmer is maddened by the notorious NullPointerException. Not only Java programmers, by the way. Probably every JVM programmer is suffering from the problem, and many other languages know similar problems. What makes the NullPointerException so annoying is the fact is essentially a NotImplementedYetException in disguise.
These days I’ve read two language-related stories at Lavalobby. The first story I read matched my own experience on the topic. It has also an refreshingly optimistic air. Obviously, the author believes in progress. The second article also had a lot of ideas matching my experience. Thing is, both articles contradict each other. While the […]
One of the nice things about Java 8 is the end of the OutOfMemoryError caused by depleted PermGen Space. These errors are especially nasty, and you can’t avoid them. Once your using one of the more interesting libraries – be it a database driver or Log4J – your program is infested (see me article on […]
What could you achieve if you had a thousand CPU cores at hand? Actually, you probably have. All you need a dedicated graphics accelerator card. For example, my Radeon™ 6870 GPU has 1120 stream processors and delivers up to 2.000 GFlops of single precision floating point performance. That’s at least 10 times the performance of […]
Like most Java programmers I’ve gradually become a web developer during the last years. In a way, that’s strange: most projects don’t deal with the internet. It’s a pity, too. Browsers used to be dedicated tools for the internet, so it’s hard to meet the demands of a full-blown desktop application. It’s a real pain […]