Scala + Android just got easy
(For real this time!)

Anyone who has tried it knows that Scala programming for android has quite a bit more complexity to it than doing a standard Java development. This link shows a nice and easy way (through an apparently new proguard plugin) to create and deploy a scala app + shrunken library with the Eclipse Scala IDE.

What are you waiting for? I know I was just waiting for Scala+Android maturity before starting a nice new android project :) Go go go!

Grid computing using Scala

There have been some nice additions to the Scala collections with the parallel versions of standard data structures. These work fine for shared memory architectures, however, means for distributed memory parallelization seem to be very scarce and fragmented.
During a course at my university, I worked on the development of a general framework for distributed parallelization using Scala and MPJ-Express. Continue reading Grid computing using Scala


This week I sumbled upon Flood-It on google+. It’s a nice little game where you try to flood a grid with a single color by swapping colors until all neighbours are consumed. After playing it for a while, i figured it was more fun to implement a strategy than to apply it manually and thus I began coding.

I completed the code with a niftly little interface to support dynamic loading of new strategies.

When I get some feedback I’ll upload the program with source code to this blog. In the mean time, you can follow me on g+.

A Tetris Game in Scala

The Why?

My brother is working on a small game project during this summer, so I wanted to test out Slick2D to help him a little. I decided to do a small Tetris game and ended up having 5 essential classes, some medium sized, and some small. Here I will share a few of the tricks used in the game.

Instead of explaining the boring logic of the game, I will present to you some handy Scala functionality that I was using for the code. These are things I deem to be highly relevant for Scala programmers.
Continue reading A Tetris Game in Scala

Learning Scala in 5 parts: Part 5


This part will focus on solving a few mathematical problems posed at Scala is particularly suited for these kinds of problems because it can be used as a scripting language. This means that you can put a piece of code inside a file without context and run it with the command

Furthermore, Scala being a functional language allows problems to be solved in a short concise manner. Notice that you should probably spend some time looking at/thinking about/trying to solve the problems before you show the answers below.
I chose the problems according to their difficulty and nature, i.e. the problems are easily solvable in Scala and do not require any big mathematical insight.

You can click on the title for the description of the problem, and I will only present and explain the solution.
Continue reading Learning Scala in 5 parts: Part 5

Learning Scala in 5 parts: Part 4


Today we are going to learn about types. This is something we only barely touched so far. More specifically, all functions that we defined so far that take arguments have had the types specified for the respective arguments. Furthermore, every class you have defined in the previous parts were types themselves. You can more or less think of types as being “what a class describes“. The only thing keeping it from being this simple is the fact that there are different types of classes and even some types that aren’t really classes.
Continue reading Learning Scala in 5 parts: Part 4