This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Earlier this week a couple of colleagues and I attended a mini gathering of likeminded fellows to learn a little about Scala. It was hosted at a local software house and provided a crash course introduction into the language. There was plenty of beer and plenty of craic. It was a good job allround and I learnt a lot.
Having worked in various sized teams of Java developers, working on substantial enterprise level applications, over the years I must say that I'm a little on the fence with whether Scala would be right for that type of environment. I certainly see the advantage of the collection libraries, lambda expressions, built in support for file i/o, various markup parsing, and all the other semantic changes that can make your code more beautiful. But I see some danger signs too. The language seems very loose, in that you can do a lot of cool stuff with it but you can very easily make a dogs dinner out of it too. I'm not saying you can't do that with any other language but with Scala it seems all too easy.
Given that a lot of larger companies, traditionally using Java, have teams made up of maybe one or two senior experienced developers and then a complement of mid to junior devs, I wonder if a change to Scala would just be giving us a little too much rope with which to hang ourselves.
I'm looking for some real life stories from you good folks. Have you, or are you, working with Scala in a team of mixed abilities? Small team? Large team? Success stories? Horror stories? I'd love to hear them.
I've posted this before but there are a couple of online talks describing how The Guardian newspaper moved part of its systems over from Java to Scala and how they feel this simplified development. Both talks include comments on the process of moving a medium-sized team of Java developers onto a different language and paradigm. The Guardian is still using Scala successfully, according to one of their techies I spoke to recently, so it sounds like they feel the benefits were worth the pain.
I haven't watched them myself, but a colleague here told me this morning about the keynotes from Scala Days 2013 by Martin Odersky and Rod Johnson. He said that Rod Johnson was critisizing people for writing ugly (too clever, too compact) Scala code.
Without having seen it, I agree that the syntax and features of Scala are so flexible that they sometimes seem to give developers too much freedom. You can use Scala to program in vastly different styles, from fully functional to fully object oriented. I can imagine that if you for example want to combine libraries by different authors which have been written using different styles and standards, it could become a mess. The more powerful the tool, the more discipline you need to use it properly.
I finally got round to watching the videos you linked to Chris. Very practical feedback from the guy so thanks very much for those.
Jesper, Even during the demo's that the guys were giving during the talk I attended they were demonstrating some serious syntactic gymnastics to create perfectly valid Scala code that made no sense whatsoever to anyone. These, of course, did come with a heavy disclaimer that we, as professionals, should not do things like this but it did show just how much rope we have available for hanging ourselves with. I'll be checking out your video links soon enough so will report back once I have.
I think a lot of people agree that Scala can give you "enough rope to hang yourself", in contrast to more opinionated languages which tend to aim for providing just one idiomatic way to do something. Rod Johnson specifically discusses this issue in the video (thanks for the tip, Jesper), and recommends that the Scala community should aim to create better coding standards to ensure people don't hang themselves too easily.
I found the Rod Johnson video very interesting and encouraging, and I think he offers a valuable perspective. He's coming from a C/C++/Java/enterprise background, and of course he's also the guy who was so disgusted at the complexity of Java EE that he went and created Spring to provide an IOC/DI-based alternative. He seems very positive about Scala's prospects as a mainstream language, and he says he's unlikely ever to program in Java again (of course, as a Typesafe board member, he would say that, wouldn't he?). But he also takes a sensibly pragmatic approach to the Scala vs. Java debate e.g. he recommends taking advantage of Java's mature libraries instead of re-inventing the wheel in Scala, and he thinks Scala needs to slow down and make more effort to welcome and integrate newcomers to the language. He endorses the approach suggested by Martin Odersky (also followed in Cay Horstmann's book "Scala for the Impatient") of recognising the different needs of various "levels" of developers e.g. some people will be developing complex library code or pushing the academic boundaries of the language, while others will be trying to build robust and maintainable practical applications. This seems like a sensible approach, especially for a language which still has such a heavy academic bias and which offers the potential for generating a lot of complex "rope"!
He also makes some interesting criticism of certain aspects of the Scala community and its perceived tendency to emphasise cleverness over clarity, which I think is a fair comment, and he contrasts the attitudes of some people in the Scala community with the more welcoming and pragmatic Java or Ruby communities, which is perhaps a little harsh (Odersky's Coursera Scala class was full of helpful and supportive Scala enthusiasts) but not entirely unwarranted. Ironically, many of the comments below the line on the video are from Scala people who seem to object to this criticism while displaying precisely the tendency towards defensive cliqueishness that he criticises in Scala-land.
Anyway, it's an interesting talk from somebody with a foot in both camps, and it's definitely encouraged me to make more effort to build up my Scala skills for the future.