Tuesday, June 3, 2008

JAOO Sydney 2008

The message from JAOO 2008 is: Software development is in crisis. To get over it, we're all going to be programming in functional languages and deploying in the Cloud. Maybe fundamentalist functional languages.

Dave Thomas is thought-provoking. But he can't make up his mind whether shiny things are the new one-true-path or the spawn of the devil. He's a great devil's advocate. He'll tell you that he'd rather maintain a legacy COBOL application than a legacy Java app. Then he'll tell you that the "new SQL" is to be found in the query features in LINQ. Then he'll say OO is the best technology for product development, but a terrible thing for enterprise software. He thinks the computer scientists have been running the asylum.

Martin Fowler is an opinionated grump but I like him more and more. It's probably just because he agrees with many of the things I believe. XSLT was a bad technology for writing user interfaces (or whole applications). OO is still a good way to write complex domain logic. You cannot write serious applications with Doodleware. It's better to evolve a framework out of a working application
than to start with the framework before writing the application.

There was a video clip of him claiming that it isn't "significantly" harder to design a DSL than to design an API. I have tended to disagree with this, but I am probably confusing DSLs with full-blown languages. If he's talking about the special-purpose "DSL"s such as Grails' GORM DSL, or Ruby-on-Rails, then of course he's right. These are DSLs. They're also glorified APIs in a way. Don't get me wrong: they're great. I'm looking forward to his new book on the subject, though I'm sad to hear that PEAA2 is on the back-burner.

Fowler presented Kent Beck's four features of well-designed software:
  1. Passes the tests
  2. Code shows the intent
  3. No duplication
  4. "Less stuff"
Fair enough. I am interested in whether people feel that tests should be factored the same as production code. These days I am inclined to "show everything" in the test, to make each test easy to understand in isolation. Erik Dörnenburg seems to agree with this. Robert Martin says to factor the tests just the same as production code.

Gregor Hohpe is always fun to watch. He really ought to have a TV show or something. He told us about the "new" ACID properties, for distributed systems:
  • Asynchronous
  • Concurrent
  • Internet-Scale
  • Distributed
And he hoped he got them 50% right...

SOA seems to be "out", according to many on the Enterprise Systems Panel. I guess that means it isn't shiny any more and the only people pushing it now are the out-of-date vendors who haven't caught on yet. I hope they catch on soon. Like most shiny IT technologies, SOA has probably been very useful to some organisations, been a complete failure for others, and is not particularly significant for the rest of us.

I am very skeptical about the "new SQL" of LINQ. It is very cool and neato and so forth, and a small part of me is kind of envious of the .NET camp for this nice stuff coming out of Microsoft. But application data access technologies come and go nearly every year, and SQL is still with us. None of these conference speakers or other "leading edge" developers at the conference seem to think that ad-hoc queries are important, both for users and developers. I make dozens of them every day. I wonder where these people work.

I talked to a rather drunk ThoughWorker (at the party) who suggested my enterprise app of 100-odd relational tables would be better factored as two or three smaller apps using hash maps for persistence. I think he was serious. He also claimed that the performance of the Cloud was so great that it could substitute one kind of index for another without you knowing or caring. Maybe so. But why bother with an index at all then? You only use indexes when you care about performance, and even then you need to understand the performance characteristics of the index you are using, if you want to get any
benefit from it.

The second day we had Robert Martin. He's also very entertaining. I asked him if his (new) book was as much fun as his talk and he said yes, so I think I will buy it. I didn't expect a talk to change my thinking about functions and clean code, but he may have. For example, he thinks functions should be between one and five lines long. I have a lot that are a bit longer than that, and now I think maybe they are not as good as I thought. He showed that by having really small functions, named very carefully for what they do, the code is really self-documenting. Much more so than if you have, say, 20-30 line functions.

He has these rules for Good Functions:
  • Small
  • Do one thing
  • Use descriptive names
  • No more than three arguments
  • No side-effects

I met Rod Johnson (again), and expressed commiseration that he has to explain the licensing for SpringSource Application Platform so much, over and over again. Even many of the Spring people don't understand it. I have been told by two different Spring guys that companies won't be able to run SSAP without paying for it. I guess I'd better go figure out whom I'm supposed to be paying for this copy of Linux on my laptop then, since it's the same license (GPL). (Of course I understand Spring has a commercial license as well as GPL. It's much the same as MySQL in that respect.)

1 comment:

objectbusiness said...

About time you had a blog, this is meat for several posts but estimated blog output/year = 5/(#children under 12 + 3*#chldren under 5).

From the title I look forward to hearing about the true heros in software, namely the solvers of business problems.

The computer scientists just think they run the asylum, the inmates only visit the asylum for the free lunches (hold the caviar, just the burger thanks).

Doesn't having hundreds of tiny functions in a class make code harder to read? By default, only extract code that is shared - otherwise you break modularity. The code you extract into a new function is potentially callable from other code (even if only in the same class if private) - it makes code harder to understand. Spaghetti code? Scope is your friend. In Delphi you could create functions local only to functions which helps. I swear if I read one more person say 'your functions must be too big' I will slap somebody.

GPL is not your friend if you write software that you want to distribute as non-GPL (e.g. sell). FSF and others claim that dynamic linking to GPL counts as a derivative work. Does using SSAP involve linking to it? What matters is what the license says, not what Mr Johnson says. Having an alternate commercial license ($) is fine but be aware that you may need to buy one on a future project (subscription based). The freebie is just the hook.

Cheers,
-Mat