This blog has moved to http://richard.dallaway.com/ or http://richard.dallaway.com/rss.xml if want the feed URL. Sorry. Thanks.
Richard's technical notes
Sunday, February 28, 2010
Friday, January 29, 2010
Scala in London in 2010
There's plenty of Scala and Lift events in London this year....
The London Scala User Group (which you can learn about at lsug.org) is running a free event every month of the year. Last night Miles gave an introduction to Scala for Java developers, and the slides are available as a PDF. Next month on Feb 8th, Colin is giving examples of re-writing Java classes in Scala and making your code lovely.
On 8th March I'll be doing a "Getting Started with Lift" session, which you can sign up for at the Skillsmatter site.
There's also...
If you want a peek at what the other LSUG events are being planned for the year, get a Google Wave account and search for the LSUG wave, but join the London Scala User meetup.com group to be emailed the announcements.
The London Scala User Group (which you can learn about at lsug.org) is running a free event every month of the year. Last night Miles gave an introduction to Scala for Java developers, and the slides are available as a PDF. Next month on Feb 8th, Colin is giving examples of re-writing Java classes in Scala and making your code lovely.
On 8th March I'll be doing a "Getting Started with Lift" session, which you can sign up for at the Skillsmatter site.
There's also...
- a Scala day at JAX (22 Feb, with a LSUG.org pub meet after)
- Martin Odersky will be giving a class in June
- A Scala Lift-off event in September
- ...and there will probably be a London Java User Group Unconference at some point which will have a Scala element.
If you want a peek at what the other LSUG events are being planned for the year, get a Google Wave account and search for the LSUG wave, but join the London Scala User meetup.com group to be emailed the announcements.
Thursday, December 03, 2009
Functional Programming Events
Next week I'll be heading up to the Skillsmatter Functional Programming Exchange event (Mon 7 December 2009). I hoping to learn some good stuff there. The following day there's a BrightArray event where we're going to discuss the paper Why Functional Programming Matters.
Sunday, November 29, 2009
London Java Community Unconference 1

Congratulations to the organizers of the London Java Community: the first unconference was a success.
IBM kindly hosted the event at their Southbank building, and it's a great location for an unconference. It has a set of rooms that are just the right size, but also has a central mingling point where you can meet and chat with people. Possibly for the first time at a conference for me the gaps between the sessions were as useful as the sessions themselves.
I ran a session to discuss what's stopping anyone from using Scala, especially in existing Java projects. Kind of a negative title in some ways, but the point is that I don't see any technical reasons not too as the tool chain is there. I was interested to hear other's experiences. The slides from my session are online, but they were really just put up to help kick start a discussion between the 19 people who were in the room.
It tuns out there's a detailed Google Wave covering this and other sessions, but I'll list the main points that were discussed here:
- Learning: there seemed to be a reluctance to use Scala until you know "the Scala way" or understand functional styles. It does seem fair to say you'll get more benefit from adopting more of Scala, but I feel that you need to at least start using Scala to understand how it can improve what you do. The point was made that you can start using Scala in a Java-like way (there's absolutely nothing wrong with that), and get some benefits today.
- What are the benefits? Aside from less code, code that is easier to understand (IMHO), increased developer joy or passion, I pointed to the previous session which covered The Bug of the Month which was a hairy threading-related issue: if you're doing anything with threads, you've probably got it wrong. The actors library in Scala can simplify concurrency.
- Commercial support: There's no named organization backing Scala. So where does the warm Sun, IBM, Oracle feeling come from for management?
- What areas is Scala best applied to? That is, what areas of Java would you prefer to use Scala for? The honest answer is all areas. There's no place where you'd prefer Java over Scala.
- Selling to management: why take the risk? I think it's a case of why miss the opportunity, if you can deliver more reliable results faster, and keep developers happy and engaged.
I suggested—and it's not an original idea—that unit testing might be a place to start as you can improve tests and gain experience. I put an example of that in my slides that I ripped out of some production code just before the presentation.
There were requests for more Scala resources (damn...perhaps I should have done an intro to Scala session too) so here are the resources I've found useful:
- scala-lang.org - for downloads of Scala and a list of the published books.
- http://daily-scala.blogspot.com/ - short examples of idiomatic Scala.
- Scala Users mailing lis, where you can ask questions.
In the pub afterwards, there was a Scala corner where the London Scala User Group was reinvigorated. The lsug.org has been recovered and Skillsmatter have kindly offered to host a monthly event, probably on a Wednesday, starting in Jan 2010. Keep an eye on the LJC mailing list for news.
You'll find my photos of the event on Flickr and the hash tag on Twitter is #ljcuc1.
Monday, November 09, 2009
Great functional programming lectures
A few weeks back Miles emailed the BrightArray group with a link to Erik Meijer's Functional Programming Fundamentals lectures. You can find them listed at channel9 tagged as C9 Lectures.
I'm not planning to use Haskell for real, but I wanted to pass the links on because I'm finding the lectures really helpful for thinking about software. Possibly for thinking in general.
Two practical points about the series: you don't have to install silverlight to watch them as there are links to other formats over on the right of the page. And the slides can be found over at Graham Hutton's Programming in Haskell page.
Oh, and don't forget to do the homework.
I'm not planning to use Haskell for real, but I wanted to pass the links on because I'm finding the lectures really helpful for thinking about software. Possibly for thinking in general.
Two practical points about the series: you don't have to install silverlight to watch them as there are links to other formats over on the right of the page. And the slides can be found over at Graham Hutton's Programming in Haskell page.
Oh, and don't forget to do the homework.
Friday, October 30, 2009
Nov 28: London Java Unconference
On Sat Nov 28th 2009, I'll be at the London Java Community's Unconference at the IBM south bank building. Not exactly sure what I'll contribute, but my current thinking is something around the area of approaches to adding Scala into existing Java projects.
Check out the details on the Upcoming page or read more on the LJC's blog post. It's £20 to cover costs (any left-over money is put behind the bar :-), but hurry... when I last checked there were only 11 places left out of 50.
Check out the details on the Upcoming page or read more on the LJC's blog post. It's £20 to cover costs (any left-over money is put behind the bar :-), but hurry... when I last checked there were only 11 places left out of 50.
Monday, September 21, 2009
Setting the character encoding in Scala
The only reliable way we've found for setting the default character encoding for Scala is to set
$ JAVA_OPTS="-Dfile.encoding=utf8" scala
Welcome to Scala version 2.7.5.final [...]
Type in expressions to have them evaluated.
Type :help for more information.
scala> val x = "garçon"
x: java.lang.String = garçon
Just trying to set
You'll also want to make sure your terminal is set to UTF-8 encoding, which on the Mac is Terminal -> Preferences -> Settings -> Advanced -> International.
$JAVA_OPTS before running your application:$ JAVA_OPTS="-Dfile.encoding=utf8" scala
Welcome to Scala version 2.7.5.final [...]
Type in expressions to have them evaluated.
Type :help for more information.
scala> val x = "garçon"
x: java.lang.String = garçon
Just trying to set
scala -Dfile.encoding=utf8 doesn't seem to do it. Of course, you may not need this if your OS defaults to a sensible character encoding. I'm lumbered with something called "MacRoman"...You'll also want to make sure your terminal is set to UTF-8 encoding, which on the Mac is Terminal -> Preferences -> Settings -> Advanced -> International.
