Akka: Change an actor's behavior using context.become

Earlier, I've looked at the basics of Akka actors by creating a simple chatroom. Today I'm going to continue by looking at how we could change an actor's behavior using context.become by introducing the concept of a closed and open chatroom. Let's start by introducing a simplified version of…


Java 8: Replace traditional for loops with IntStreams

I've previously looked at how to work on a higher level by replacing loops with streams. In this post I want to continue this by looking at IntStream and how it could replace the traditional for (int i=0;... loop. IntStream is a stream of primitive int values. It's part…


Inject dependencies into your filters using DelegatingFilterProxy

In this post, we’re going to look at how to inject dependencies into your web application filters. To achieve this, we’re going to use Spring’s DelegatingFilterProxy. Now consider the following. Say we got an AuditHandler that takes care of the audit of incoming requests in our web…


Clojure basics: Dealing with maps

This is the first post in a series on Clojure basics. In this first post I'm going to take a look at the map collection and how to interact with it. So, what is a map in Clojure? A map is an immutable collection of key and value pairs. Consider…


Dead Code Rising changing RSS link

This is just a post informing that the Dead Code Rising RSS feed link has changed. So make sure to update your RSS reader with this link, to get fresh posts!…


SparkJava: Separating routing and resources

You know how a lot of the tutorials out there always look so clean and neat, but when using it to other things than hello world, it just gets messed up? When playing around with Spark, we didn't want to lose that cleanness, because a clean Spark application sure is…


Java 8: Take your abstractions to the next level

One of the many reasons I enjoy working with functional programming, is the high level of abstraction. You'll end up with more readable and concise code that is closer to the business logic. In this post I'll look at four things that will help you get your abstractions to the…