Sunday, October 17, 2010

Unconference at Mejsla

We've had another unconference day, this time at Mejsla and arranged by yours truly. Participants were me, Sven Johansson, Thomas Podal, Fredrik Rubensson, Mårten Gustafson and Henrik Engström.


Topics explored during the day included:


A slow wireless network and the time it took to get to a "Hello World" state usually meant that we only had time to do a quick spike for each topic. The day was still very interesting, and we learned enough to see what might be worth to pursue further, but for the next unconference I think we will create a Wiki or similar so we can collect topic suggestions in advance. Then we can see which topics have the most interest in, and people who are sure they are going to spend time on a topic can download tools and libraries in advance. That way they can make sure they have passed the 1st compile and "hello world" steps, and maybe even have prepared a few questions or demos if they feel like it.


Two topics I participated in but which were examples of these "high overhead" tasks, were node.js and Lift. For Lift, I started downloading and installing the Scala language, but then discovered that the easiest way to get started was instead to download the sbt - the Simple Build Tool jar from Google, create a shell script on path to execute the jar, and then run
sbt update ~jetty-run
on an empty Lift project. This will download Scala, Lift, and all the dependent jars from the nearest Maven repository, then start the small Jetty server. Lift detected file changes live, which enabled a quick cycle of modifications and then reloading pages to instantly see the changes. Unfortunately Lift crashed with an OutOfMemoryError:PermGen exception after just a few changes to a html page in the "static" directory. PermGen problems is an annoyance for most alternative languages on the JVM, but this didn't give a very stable impression. After a restart things were much more stable and we couldn't reproduce the error, so it may have been an effect of the large number of initial downloads to get the system started the first time.


A lot of the time was spent on building node.js itself with "make", so we didn't get very far. But at least we got the "asynchronous web server in 10 lines" up and running. Again I was impressed with IntelliJ though, which had nice support for JavaScript editing. If I'm going to continue using fully featured IDEs, I feel I really should learn to use IntelliJ, and purchase it.


Mirah is a very interesting language. We got it up and running very quickly (though if we hadn't had a working JRuby and Git set up it might have been a different story). Syntactically the language resembles Ruby very much, but it turns out it is actually statically typed and compiled. The types are generally inferred (like in Scala) for uncluttered code and a minimal amount of typing. We only created a few Java classes which can be imported and used in Java projects, but apparently you should be able to plug in different compiler backends so that you can emit... anything you may like. Source for other languages, Dalvik bytecode, or whatever. The mappings to Java bytecode seemed to work fine, we only had trouble with creating a "void" method. I'm going to experiment a lot more with this language, expect blog posts and hopefully a lightning speech together with Peter Lind at JFokus 2011.


This was a revelation for me. I had heard it mentioned in passing before, on a presentation by Enno Runne for instance, but it was one in an ever growing list of "things I ought to spend some time on". It turned out that these libraries are something that will help me enormously in my day-to-day Java programming:
  • A @VisibleForTesting annotation is helpful for documentation, as I very often relax visibilities on helper methods to enable unit testing on them, this will eliminate a lot of boilerplate javadocs.
  • Classes that add functional style methods for manipulating collections (given the syntactical and semantical restrictions of the Java language and platform of course).
  • Helper methods for primitives and arrays, which will be extremely helpful for me to clean up a library which is written in C style and does nothing but manipulate bytes and byte arrays.
  • Additions to the java.util.concurrent package, including a ListenableFuture that you can chain together for asynchronous workflows.
These libraries every Java developer should be aware of. Big thanks to Henrik who had prepared some demos on this in advance. This was not expected of the participants, but it was very helpful.

Ruby, Rails and Heroku

A quick introduction to the Ruby language to those who were unfamiliar with it. We then generated a Rails project and I explained the structure of it, what could be done with the scripts, and so on. We then went on to what we thought would be the meat of the session, Heroku. Only, it took less than 5 minutes to integrate Git and Heroku. Pushing changes to Git made Heroku update, autodetect that it was a Rails project, download dependencies and start up an instance of our application in their cloud. Jaw-droppingly simple, as is often the case with Ruby. We then went back and did some more Ruby and Rails programming. Sven, whom I've had a hard time convincing about the excellence of Ruby, seemed to be on the way to becoming a convert.

The future, and books about it

Towards the end of the day we were mentally exhausted and instead of doing another programming session we sat together and talked about good books, fictional and not. The only titles I remember were Kent Beck's Implementation Patterns, The Human Body 2.0, Charles Stross' Accelerando, and Vernor Vinge's Rainbow's End.

What we didn't have time for

Topics that remained on the board, but which we hopefully will be able to do on another day:


Big thanks to all the participants for making this an excellent day, it was a privilege to learn from and with you.


Olle K said...

Great post, very well written. Too bad I couldn't be there. That Mirah stuff seems interesting indeed. Hope you could do a follow up on that one.

Fredrik Rubensson said...

Thanks for the write up! A good summary of a truly great day. I'll add some comments of my own here instead of forcing people over to my own blog.

I think the best thing with a day like this is to be inspired. To meet really experienced and skilled developers is truly a good experience. It gives hope for a business that feels hopeless most days. Lars started the day with a great exercise for getting focus - it worked very well for me. I then started the day with a group trying to grasp a bit of Clojure. We did a fair bit of explorations and got some preliminary insights into a truly remarkable language. I hope I will get time to learn more of it later. I then moved on to some node.js fiddling. Got a 5 line web server up and running but didn't do anything more with it. Also a great start that can be elaborated at some later point. Mårten told and showed me lots of interesting things about distributed key-value rest database Riak. I teamed up for some jQuery investigation and had a great exploratory neo4j session with Sven. 5 great kick starts into technologies that are more or less new to me. The hard stuff was good but not to be forgotten is the many conversations that were held through-out the day.

Thanks to Mejsla for hosting, Lars for organising and Sven, Mårten, Tomas, Henrik and Lars for making it into a great way to spend a saturday. Highly recommended if you want to follow Chad Fowlers (or rather Pat Methenys) advice from The Passionate Programmer: "Be the worst guy in every band you're in" - then you will learn the most.