I used MongoDB for a project in 2010 and I had great experience with it. Unfortunately I didn’t get the chance to work with this agile and scalable document-oriented database again until now. But my current assignment has brought the opportunity to use it in production In this post I want to show you a [...]
Getting Started with Spring Data – MongoDB in Scala
October 24th, 2011 by Amir Moulavi — Java
Tags: mongodb, scala, spring data, tutorial
Scala LiftOff London 2011
October 18th, 2011 by Björn Antonsson — Uncategorized
Last week I attended Scala LiftOff London 2011 at the Skills Matters Exchange, and being very new to the community aspect of Scala i didn’t know what to expect. One thing is for sure, I could never have imagined the kind of sharing and positive atmosphere that I got from the people there. There where lots of interesting talks [...]
Tags: scala
Experimenting with Scala Parallel Collections (contd.)
October 18th, 2011 by Amir Moulavi — Java
In the previous post we went through Scala parallel collections and you saw how you can convert a sequential collection into a parallel one by using method par on that collection. In this post I want to show you how you can write your own parallel collection in Scala. The example I use for this [...]
Tags: collection, parallel, scala
Injectors and Extractors in Scala
October 11th, 2011 by Amir Moulavi — Java
If you have used case classes in Scala, you can not neglect the power they bring to your applications. They provide a recursive decomposition mechanism via pattern matching. In this post I go through injectors and mostly extractors. You will see that how extractors can be employed for pattern matching. Consider that we need to [...]
Tags: case, extractor, injector, scala
Scala Type Variances – Part three
October 5th, 2011 by Amir Moulavi — Java
So far we have seen how to define covariant and contravariant subtypes in Scala. In this post we will study lower bounds and upper bounds and see how they can be of great help when designing your application. Lower bounds Consider the class I defined in the first post: Company is covariant in type T [...]
Tags: lower-bound, scala, subtyping, type, upper-bound, variance
Scala Type Variances – Part two
October 4th, 2011 by Amir Moulavi — Java
In the previous post, I went through what covariant subtyping is. In this post we will study contravariant subtyping with a small example. Contravariant Subtyping Do you remember the definition of covariant? Contravariant is the other way around. I will clarify this by the following example (example is adopted from [1]). Consider we have a [...]
Tags: contravariant, scala, subtyping, type, variance
Scala Type Variances – Part one
October 3rd, 2011 by Amir Moulavi — Java
I remember when I started to learn Scala, I usually come up with brackets in the Scala API doc that have plus and minus characters inside. Honestly that scared me a little bit! But after I learned a bit about Scala type system, I know the purpose of theses type declarations and I appreciate their [...]
Tags: covariant, scala, subtyping, type, variance
Experimenting with Scala Parallel Collections
October 2nd, 2011 by Amir Moulavi — Java
In this short post, I want to show you how you can avail from Scala parallel collections in your application and under which conditions it makes sense to use it. Parallel Collections were introduced in Scala 2.9 release which are built on the same abstractions and provide the same interfaces as existing collection implementation. It [...]
Tags: collection, parallel, scala
Intercepting Scala trait constructors
April 28th, 2010 by Michael Kober — Java
Today I was writing an AspectJ aspect for a Scala trait and was wondering why my constructor pointcut definition didn’t work. Having a closer look at the Scala byte code together with my colleague Johan solved the puzzle. Here is what I did (using AspectJ 1.6.8 and Scala 2.8.Beta1): To start with here’s a simplified [...]
Extending the JDT
April 20th, 2010 by Michael Kober — Android
A couple of weeks ago I had a look at the Motodevstudio for Android developers and I think it has some quite nice features like code snippets or wizards for Android activities, services and more. Actually it’s is quite easy to extend the eclipse JDT and provide such useful plugins. This blog post is about [...]
Tags: Android, eclipse, programming, scala, tutorial
Building OSGi Bundles with Scala and Gradle
February 9th, 2010 by Michael Kober — Java
There already some good blog posts about how to build OSGi bundles in Scala, among others “An OSGi Bundle… built in Scala” of Neil Bartlett and “OSGi, Maven and Scala” of Gavin Bong using pax-construct. Here is another alternative using Gradle. Gradle is an open-source build system providing the expressiveness of a Groovy based DSL [...]
Tags: build systems, programming, scala
Getting around static typing in Scala
January 23rd, 2010 by Jan Kronquist — Java
I really like static typing, but sometimes it can get in your way. For instance if you have a collection of objects and you want to perform an operation on the objects of a certain subclass you can run into problems.
Tags: collections, programming, scala
The Golden Ratio
October 24th, 2009 by Ulrik Sandberg — Tips & Tricks
Also known as the “Divine Quotient”, the Golden Ratio was given an almost magical meaning during the renaissance, but it’s actually much older than that. Leonardo DaVinci used it. Euclid used it. It was supposedly discovered by Pythagoras. So, what is it? It’s very simple. Take a length and divide it into two parts: a [...]
Tags: goldenratio, mathematics, programming, scala, scripting
Scala IDE support
March 12th, 2009 by Michael Kober — Java
Today we wanted to test the scala java interoperabilty in different IDEs. We used the Scala plugin for Eclipse, Netbeans and IntelliJ. The intellij plugin worked out of the box. We managed to get the eclipse plugin working after some trouble as well. Although the netbeans plugin seems promising the interoperability between java and scala [...]
Tags: ide, programming, scala
Azul
October 20th, 2008 by Jan Kronquist — Architecture
We have got the privilege to borrow an Azul Vega 1 which is the smallest of Azul‘s monster machines. This evening a bunch of us Jaywayers gathered to try it out. Installing the Azul JVM was painless and all of us were up and running very quickly. Read more…
Tags: concurrency, hardware, programming, scala
