Scala Developer’s Level

Martin Odersky wrote the leveling of Scala developers: Level A1: Beginning application programmer Java-like statements and expressions: standard operators, method calls, conditionals, loops, try/catch class, object, def, val, var, import, package Infix notation for method calls Simple closures Collections with map, filter, etc for-expressions Level A2: Intermediate application programmer Pattern matching Trait composition Recursion, in …

Documenting Jersey REST API

Documentation is error-prone. So the best documentation should be the code itself… or automatically generated from the code. I haven’t found any open source project that can do this so I created one. As I’m currently learning Scala, I decided to write the code with Scala. You can find the code in Bitbucket: https://bitbucket.org/enefem/restdoc It’s …

State of Scala IDE on Eclipse

Even thought Scala is now among the trendy programming languages, it still misses a lot before it is considered as one of the major players. Most Scala programmers are they who are not satisfied with Java, so it’s natural that most of them were before programming with Java. One of the things Java programmers miss …

Deployment parameter for REST resource

When you are creating resource in a REST application, it will only be automatically created if you have an empty parameter. The problem is, sometime we need a resource that is configurable, so it can be reused by other applications. We can solve this problem by defining init parameter in our web.xml like this: Or …

Fresh look for your Eclipse editor

The default theme of Eclipse is good, but I must admit that with some configuration, Vim can show code better. And this is pretty easy, just go to Google and search for ‘vim color’. I know from a long time ago that Eclipse allows us to change the color preference of our editor. Hence I …

Representation of class in Scala

Seems very simple but can be source of frustration. So, how to represent class in Scala? In Java, you refer to a class by adding .class at the end of the class name. In Scala, you get the equivalent of that by using classOf[]. An example for referring String class is as follow: You can …