Thursday, January 28, 2010

jfokus 2010 day 2 summary

Day 2 of jfokus started with a content free keynote on the future of Java. Cameron Purdy from Oracle couldn't say much due to the snorcle press conference later today on the acquisition of Sun. Still it was not the worst keynote ever. I think it grabbed a second place far ahead of javafx and robots and far behind first years nice talk on java as open source by Simon Phipps.

Then off to the thought challenging talk on unconscious taylorism by Marcus Ahnve. He traced a lot of our problems with software back to the early days of industrialism and its emphasis on an effective overall system. Every task was specialized and performed in batches leading to skills oriented organisations. You know . system architects in one group and developers in another, usability experts in one group and system analysts in another, maintenance in one place, operations in another and development in a dependency position to the former two. This is the way most organisations do their work. It is like a big engineering practice. Marcus emphasized the need for individuals quoting the agile manifesto: "Individuals and interactions over processes and tools". It was not clear from the speech why this emphasis is good. My answer is that software development is a creative process where the individual must be given a good environment to be creative in. The talk reminded me a lot of Richard Durnalls splendid JAOO talk on "The IT division. Refactored" (review here). They both cited Matsushita on the western failure and while Richard talked more about the alternative (process oriented organisations), Marcus talked more about the cause. Another reference that popped into my head was the programmers stone. Marcus referenced some non technical guy that talked about them and us, evil and good - it sounded a lot like the mapper - packer thing in the programmers stone. I liked this talk a lot and afterwards I've been thinking that there may be similar causes for the use of the "architecture" metaphor - bashed here.

Next I went to the pair programming show where Niclas Nilsson and Hans Brattberg illustrated problems and possibilities with pair programming by actually playing a number of typcial scenarios. Nothing new here but great fun and a good reminder.

After lunch I felt obliged to go enterprise. (Ok - I know I told everyone that I counted out all sessions mentioning enterprise and performance..... I'm sorry - I let you down.) This was the talk about Java EE 6 - a really good talk by Alexis Moussine-Pouchkine about a really boring subject. Seems like the new stuff in Java EE 6 is really nice and useful and will make life better for the developer. I don't particularly like the heavy use of annotations but it sure is powerful. The new Schedule annotation is still very verbose compared to a cron job definition but to be an enterprise solution is looks really smooth.

To outweigh the bad influence of the enterprise I went to the JRuby session with Charles Nutter. This was perhaps the best talk at jfokus this year. Entertaining and technically brilliant. The nicest part was how to transform a Java program to a Ruby one. A great way to show the unnecessary verbosity of Java. I knew most of the stuff in this talk since before but since I like ruby it was great anyway. As for the benefits of Ruby on the JVM I think it is a great selling point to enterprises that already invested in a J2EE infrastructure. No need to change that if you want to use Rails for you applications. (What they don't know is that it would probably be even easier to set up a pure Rails installation using apache....) Arguments for JRuby instead of standard Ruby is mostly around performance. For example - JRuby takes advantage of Javas threading model which makes it easier to scale an application. JRuby also runs faster in general. Another big selling point is access to Java libraries. I am not sure how often you really need something that is only Java but it may make lots of sense in a Java enterprise environment where other in-house apps and libraries are built with Java.

I ended the conference with two fluffy lightning talks about feedback and leadership. The content of the conference was good and I had a lot of networking going on. 5 year celebration next year!

Wednesday, January 27, 2010

jfokus 2010 day 1 summary

It is hard to top the exotic blog posts from my argentinian coblogger. Nevertheless it may make sense to write up a summary of jfokus - the yearly Java conference in Stockholm. Yet again the venue is Filmstaden Sergel and I won't report anymore on this as compared to last years report.

The day started badly with a 40 minute delay on the commuter trains from the northern suburbs. This made me late to the first tutorial. The first day of two is tutorial day - one before and one after lunch. 4 to choose from. I started with a nice talk on Good Object-Oriented Development by Kevlin Henney. Kevlin went through a lot of basic stuff related to object oriented development. Nothing new really but it is good to get this kind of confirmation know and then. He made some nice examples on encapsulation and showed us some real life code that was just not very good. I see similar stuff often in the systems I work with. One reason for this kind of code is that many developers learn a set of have-tos that they stick to. Some of them should probably be considered harmful. One example: always provide a default constructor. This may be useful if there is such thing as a default state for instances of the class but in many cases it results in objects with undefined state and leads to error prone code. Later on Kevlin removed 'get' from some code with a bunch of getters and I felt like FINALLY. I have never understood the point with the JavaBeans standard (ok - tooling but what else?) getters and setters really suck. (Ruby has a much nicer way to go about it. No big surprise there.....) He also talked for a while about unit testing and a feeling I have had lately that writing tests per method is darn wrong was firmly confirmed. It is much better to name methods after what they test. A method is often tested with several test cases while other simpler methods can be tested indirectly without a dedicated test case. The readability of tests is often low and I know I have failed with this on several occasions but it is not hard to argue that test code should be as readable as the main code. It will all live for a while and it will all be maintained so it should all be in as good shape as possible.

After lunch Anders Hammar delved into the depths of maven. Not the funniest subject but since I have some maven skills and don't work with it currently I felt that it was the best choice of the afternoon. (A kind of attempt to refresh a fading skill set.) Anders mixed slides and live demonstrations which is a very nice way to go about it. He started with lots of examples of the eclipse maven plugin m2eclipse. Looks really nice and I have tried it on a side project also. I didn't realize that m2eclipse runs on maven 3 but apparently it is compatible with maven 2 so you can use m2eclipse and maven 2 on the command line with the same configuration files. The part on dependency management didn't add anything new. More interesting then was the next part on life cycle customization. This is perhaps the area where maven has some serious problems. There are 3 built in lifecycles: default, clean and site. They are built up from phases where each phase has its default plugin that is executed. A problem with this is that this lifecycle view of a system build doesn't always fit all systems. If your plugin doesn't fit nicely into the phases you can run into all sorts of problems. A possiple way out of this problem is to create your own lifecycle. I am not sure whether this is good or not. Maybe Hardy knows more about it? The tutorial was labelled "advanced" but to me it was closer to basics. My needs for repetition of forgotten knowledge were thus satisfactorily filled!

The day ended nicely with dinner at texas longhorn kungsholmen and then some more beverages at bishops arms centralen. Expect a second report after tomorrow!

Tuesday, January 12, 2010

Not always right

In my travel guide of Buneos Aires I got warned that January and February might be bad months for visiting Buenos Aires (at least culture wise), since many museums and entertainment venues close down during these months. It turns out this is only partly true. Some museums are indeed closed which I experienced first hand while visiting the Basílica de Nuestra Señora de Luján (the cathedral was open, but the surrounding museums were not) last weekend. However, what my guide did not tell me is that the city compensates with a yearly open air festival - aires buenos aires - with  more than 300 events. I must say I prefer these type of events than dusty old museums. I just returned from a tango theater preformance "Amores the tango". Probably the best performance I have seen to far in Buenos Aires. Ahh, and there is so much "dolor" in tango. Unbelievable ;-)

Enjoy,
Hardy