JAOO, Day 3.
Wednesday, 1. October 2008, 11:20:15
The keynote of the day was with Richard Gabriel and Guy Steele and the talk, or rather show, was called "50 in 50." These two anecdotal gentlemen were reading 50 "poems" of 50 words each in 50 minutes, all about programming languages and their history. It was an entertaining potpourri of programming language history presented in a novel way. Green card.
Yesterday I decided not to go to the agile architecture talk, but that talk was apparently so popular that James Coplien held a rerun. So I went to that instead of the Master or Jack-of-all-traits talk by Roman Pichler. This turned out to be a good choice. His main point was that object-oriented programming had been done all wrong and nobody had got it right, until "two months ago." His idea of object-orientation is explicitly distinct from the class-oriented programming that Java is doing. He introduces the notion of Roles. A role is a concept that the user has for what an object is suppose to do. When a user interacts with the system as a whole, the objects takes different roles and behaves in accord. So roles is behavior - it is not interfaces because interfaces themselves cannot have behavior, and it is not like classes because classes are the forms that produce concrete things, like objects, and concepts are not concrete things. So he highlights that there's something missing in object-oriented languages like Java. Something that is able to embody the notion of roles and the algorithms they participate in. This is what traits are in Scala, and John also has an implementation for this concept in C++ and Smalltalk. Traits are like interfaces that can have methods, but they cannot have state. They can access the member methods of the objects that mixes in the trait, and this allows them to be the implementation and embodiment of concepts such as MoneyTransfer. Examples of objects that would mix in such a trait, include InvestmentAccount and LoansAccount. Among the audience for this talk was the author of Qi4J, which is an framework-like implementation of this trait concept in Java. I gave this talk a very green card.
Then I rushed to Reviewing, Refactoring and Regaining Control of Code with Kevlin Henney. In his talk, Henney presented 13 generally applicable good advice, primarily for Java programmers. All the classics were there; what good naming was (turns out hungarian notation wasn't it - who'd'a thunk?), law of demeter and a bunch of other things (11, to be precise) I can't remember right now. He also presented the visitor pattern and polymorphism as a good thing, even though John Coplien had just highlighted that as a thing to get rid of in the previous talk. I had to agree with Coplien on that point. Polymorphism introduces non-determinism. Only sad that Java, as previously shown, isn't really suitable to completely avoid polymorphism, but such is life I guess. Also, I've heard that HotSpot (the JIT) really likes monomorphic call sites as they are much easier to inline, so avoid polymorphism can also be a performance boon - and on that note, I think that you can still have multiple implementations of a virtual method and it will still be monomorphic as long as only one implementation is in active use, and the others aren't loaded. But that's a tangent. I think I gave Henney a green card.
Then I went to the real-world refactoring talk with Neal Ford. That wasn't such a great success. The points he quoted from other people were good and relevant on their own, but his examples were really bad. He worked through the points by presenting some "bad" code and then showed how he could apply some refactoring to turn it into "good" code. This was in and off itself a novel approach, except that the end result of his refactorings were only marginally better - no, actually I'd say that he ended up with worse code in these examples than he started out with, and in one case even introduced a possible concurrency bug by simultaneously introducing and hiding some state in the object he was refactoring - a possible concurrency bug. His resulting code also had a lot of temporal coupling between the "refactored" methods. The points he made were good, but he executed very badly on the examples he showed. I was very close to giving him a red card, but ended up giving him just a yellow card. The points were still good and the presentation wasn't dull, so there.
Then I decided on another change of plan and went to see Erik Meijer talk about JavaScript as an assembly language instead of hearing Martin Fowler talk about patterns of internal DSLs (which, on a second thought, did sound pretty dull anyway). The JavaScript talk was about a compiler called Volta that Meijer was working on, that took MSIL as input and then split the application in two, so that one part was running on a server and the interface part was running either in Silverlight in a such enabled browser, or in any browser through JavaScript. Meijer is always entertaining it seems, but the technology didn't really strike any chords with me. I suppose you could describe it as GWT, but for .NET and better. GWT doesn't interest me either. Even so, I think I ended up giving him a green card. I guess I just like the guy.
The final talk of the day was Erik Doernenburg on Test Driven Development, Take 2. This talk wasn't terribly exciting, but it wasn't too dull either. The most interesting bit, to me, was that he was showing how he was using the Mockito mocking library. I've only tried using jMock and Mockito looked to be much less cumbersome or verbose to use. Apart from that, he was just re-iterating standard testing practices and JUnit. In other words, it was pretty old news, at least to me. Still, it's an important topic and he managed to get many good points across, even though he was running out of time at the end. Green card.
And that pretty much concludes my experience with this years JAOO.
Yesterday I decided not to go to the agile architecture talk, but that talk was apparently so popular that James Coplien held a rerun. So I went to that instead of the Master or Jack-of-all-traits talk by Roman Pichler. This turned out to be a good choice. His main point was that object-oriented programming had been done all wrong and nobody had got it right, until "two months ago." His idea of object-orientation is explicitly distinct from the class-oriented programming that Java is doing. He introduces the notion of Roles. A role is a concept that the user has for what an object is suppose to do. When a user interacts with the system as a whole, the objects takes different roles and behaves in accord. So roles is behavior - it is not interfaces because interfaces themselves cannot have behavior, and it is not like classes because classes are the forms that produce concrete things, like objects, and concepts are not concrete things. So he highlights that there's something missing in object-oriented languages like Java. Something that is able to embody the notion of roles and the algorithms they participate in. This is what traits are in Scala, and John also has an implementation for this concept in C++ and Smalltalk. Traits are like interfaces that can have methods, but they cannot have state. They can access the member methods of the objects that mixes in the trait, and this allows them to be the implementation and embodiment of concepts such as MoneyTransfer. Examples of objects that would mix in such a trait, include InvestmentAccount and LoansAccount. Among the audience for this talk was the author of Qi4J, which is an framework-like implementation of this trait concept in Java. I gave this talk a very green card.
Then I rushed to Reviewing, Refactoring and Regaining Control of Code with Kevlin Henney. In his talk, Henney presented 13 generally applicable good advice, primarily for Java programmers. All the classics were there; what good naming was (turns out hungarian notation wasn't it - who'd'a thunk?), law of demeter and a bunch of other things (11, to be precise) I can't remember right now. He also presented the visitor pattern and polymorphism as a good thing, even though John Coplien had just highlighted that as a thing to get rid of in the previous talk. I had to agree with Coplien on that point. Polymorphism introduces non-determinism. Only sad that Java, as previously shown, isn't really suitable to completely avoid polymorphism, but such is life I guess. Also, I've heard that HotSpot (the JIT) really likes monomorphic call sites as they are much easier to inline, so avoid polymorphism can also be a performance boon - and on that note, I think that you can still have multiple implementations of a virtual method and it will still be monomorphic as long as only one implementation is in active use, and the others aren't loaded. But that's a tangent. I think I gave Henney a green card.
Then I went to the real-world refactoring talk with Neal Ford. That wasn't such a great success. The points he quoted from other people were good and relevant on their own, but his examples were really bad. He worked through the points by presenting some "bad" code and then showed how he could apply some refactoring to turn it into "good" code. This was in and off itself a novel approach, except that the end result of his refactorings were only marginally better - no, actually I'd say that he ended up with worse code in these examples than he started out with, and in one case even introduced a possible concurrency bug by simultaneously introducing and hiding some state in the object he was refactoring - a possible concurrency bug. His resulting code also had a lot of temporal coupling between the "refactored" methods. The points he made were good, but he executed very badly on the examples he showed. I was very close to giving him a red card, but ended up giving him just a yellow card. The points were still good and the presentation wasn't dull, so there.
Then I decided on another change of plan and went to see Erik Meijer talk about JavaScript as an assembly language instead of hearing Martin Fowler talk about patterns of internal DSLs (which, on a second thought, did sound pretty dull anyway). The JavaScript talk was about a compiler called Volta that Meijer was working on, that took MSIL as input and then split the application in two, so that one part was running on a server and the interface part was running either in Silverlight in a such enabled browser, or in any browser through JavaScript. Meijer is always entertaining it seems, but the technology didn't really strike any chords with me. I suppose you could describe it as GWT, but for .NET and better. GWT doesn't interest me either. Even so, I think I ended up giving him a green card. I guess I just like the guy.
The final talk of the day was Erik Doernenburg on Test Driven Development, Take 2. This talk wasn't terribly exciting, but it wasn't too dull either. The most interesting bit, to me, was that he was showing how he was using the Mockito mocking library. I've only tried using jMock and Mockito looked to be much less cumbersome or verbose to use. Apart from that, he was just re-iterating standard testing practices and JUnit. In other words, it was pretty old news, at least to me. Still, it's an important topic and he managed to get many good points across, even though he was running out of time at the end. Green card.
And that pretty much concludes my experience with this years JAOO.


