Monday, October 23, 2006

Worst marketing ever?

Quite often, while introducing quality assurance, testing and TDD with our customer or colleagues, I get some weird responses… something like: “Yes, we tried JUnit, but it can only do unit tests, and we need integration test as well” or “we started using JUnit, but we dropped it, cause we didn’t have the time to write the test for every single method in every class of the system”.
Hmmm, clearly somebody got it quite wrong, ‘cause JUnit is a testing framework and it just takes the right entry point (a fa├žade, a web service, a main method) to have it run integration tests as well. Half of the people are misled by the name (but I never heard anybody saying that JBoss is only for smuggling applications…), the other half by the on line documentation, which does nothing to prevent new readers from getting it wrong.

For many, the starting point is simply no test at all. So the best possible choice would be to start implementing the most useful tests, like those that catch the highest number of errors. This means putting the interception point at the surface of the application (be it a presentation tier or a public API), while starting from the small, maybe testing all the getters too, provides very little value, and doesn’t focus on the way components interact together to provide the application behaviour.

Unit test provide a value too, because they help in the problem determination phase, but when you have only a few resources on testing (as it is sadly often the case) you want them to check the overall application before shipping, and not only some random component.

Tags: , ,

Sunday, October 15, 2006

Plea of a Together Orphan

Despite all the criticism surrounding it at JAOO, I am still working with UML sometimes (not that often, I am currently stuck between Excel, MsProject and – if I am lucky – PowerPoint). When asked about which UML tool to use, I used to answer “Together is the best choice, if you can afford it”. But in the last couple of years I simply tried to evade the answer.
In the recent past, Together proved itself the best for mainly 3 reasons:
  1. Full roundtrip – despite some “not pure UML” tricks roundtrip really worked, so you could really keep in sync the model and the implementation code. You needed an OOP aware modeller to get all the benefits from it, but that’s what I used to be. Rose’s reverse engineering procedure really seemed terrible compared to this.

  2. Code inspection features – the audit section was pretty interesting and made together a great tool for inspecting an unknown big project. As a consultant I used it proficiently every time I had to explore somebody else’s code (I am not a zealot in applying all of the rules, but you get quite a good outlook of the coding practices, or malpractices, the team used to adopt) in a CSI fashion.

  3. Keyboard shortcuts – after a while, it really took me seconds to come out with a small domain model, almost without using the mouse. Adding classes, attributes, methods and interfaces was all done via keystrokes. Given that the classes’ source code was actually created at the same time, creating domain classes was faster than with an IDE. I ended up using it as a whiteboard, while discussing the model with the colleagues, cause it was faster than the whiteboard.
Clearly there were things that you couldn’t really do, even if they were available, like designing a GUI (Swing or Web), debugging, and so on. There were also a lot of annoying small bugs in generating PDF documentation, cutting and pasting images and so on.

Standing the test of time
Unfortunately, things never remain the same – panta rei – so did CASE tools as well. Well, Rose didn’t change that much in a few years, showing the same inconsistencies in the user interfaces over and over again. Together, meanwhile, blew it completely. They started a new version from scratch on the Eclipse platform. This was not a bad idea per se, given the weight of the original user interface, but they dropped all the keyboard shortcuts, and even if the GUI looks a bit nicer, it takes more and more time to come up with a model, cause you’re always selecting-dragging-dropping, exactly the things that made a lot of developers hate CASE tools in first place. Auditing tools are not such an advantage anymore, when you can include Checkstyle or PMD checks both in the IDE and in the build script, so you end up only with the roundtrip… but at the same price (

The only tool that really took modellers’ productivity seriously so far is Magic Draw UML, which added some nice features to the user interface that actually made drawing a model pretty faster. Still I can’t help myself… I don’t like it, it looks like a toy to me. It’s just a look and feel stuff… The guys at Visual Paradigm tried to replicate the solution, but they got it from the wrong side, and everything there looks counterintuitive, but shiny (they have plenty of colours and gradients, I guess it’s UML in Colors 2.0). Sparx’s Enterprise Architect looks promising, with an interesting price, but it’s not yet what I would like to have.

Back to basics
Given the new landscape, I’ll have to find another tool… I don’t need (and honestly I hate it) any code generation tool. I need only a fast modelling tool, so I am switching back to the whiteboard, and I’ll be using a camera to take pictures of it. Hope it’ll be readable.

Tags: , ,

Saturday, October 07, 2006

Back from JAOO conference

Just came back from Aarhus - Denmark, where the JAOO conference was, and spent the day trying to catch up (recover) from all the things (mess) happened while I was away.
Conference was great! And I had the pleasure to listen some very cool speeches and meet some nice folks as well. There’s plenty of things to blog about, but I’ll start making brief summary of the overall trends I smelled from jumping from one track to another.
  • UML (down): there’s been no hype at all, and notably some sarcasm about the latest evolutions of UML. The idea that UML is the way to design software via cool tools, looks definitely doomed. UML should be used only as away to communicate between humans, possibly on a whiteboard.

  • XP (down): though everybody was pretty happy about agile practices in general, there were no XP advocates as speakers, and no hype about XP practices, probably because too many have been touched by the chaotic dark side of a not-so-well-defined XP development process, or simply because XP doesn’t fit all needs.

  • SCRUM (up): despite the somehow BORGish attitude of Jeff Sutherland, he indeed made an impressive speech. It looks like that SCRUM might be the mainstream agile methodology, possibly because it can scale up better than XP.

  • Domain Specific Languages (up): they deserved a track on their own. As a general trend more and more attention is put on the core domain of software application, and expressing the domain logic in the most suitable mean – such as a specific language that catches and leverages the domain peculiarities – is one way to enhance development productivity and increase the delivered value.

  • Agile Software Development (stable): there was nothing pretty new on that area, even if speeches from Alistaire Cockburn and Kevlin Henney have been simply great. The main important fact is that, when polled, 80% of the audience answered that they were on Agile methodologies. Which is pretty high, even if some of them weren’t fully compliant to the agile manifesto.

  • Domain Driven Design (up): The book from Eric Evans is really getting mainstream. Eric himself is a great communicator, and his slides were the best presented overall. The main idea is that the real asset of a complex software project it’s in the model, not in the technology, and that you should make your best to come up with the best possible model. In a certain way also Rod Johnson’s speech draw the line on putting the real OOP back in the centre of the operations.

  • CASE Tools (down): nobody really uses them any more, they sound more harmful than useless.

  • MDA (down): same problem. Though MDA could be part of the “back to the model” trend, everybody was very keen in specifying that they were not talking about MDA. The overall feeling is that all the specification is too vendor oriented, and generally far from the needs of the average projects.

  • AOP (stable): good news are that AspectJ definitely works. But apart from massive adoption in c and in a couple of other tools looks like Spring 2.0 it won’t really make it to the mainstream development.

  • Ruby (up): a lot of interest about the language, which has been pretty carefully designed to meet developer’s taste. Everybody wants give it a try.

  • AJAX (up): it’s getting a compulsory mainstream, for both enterprise and web2.0 applications. Google toolkit made an big impact, and we’re probably going to see something really astonishing in the way applications are built pretty soon.

  • ORM (down): everybody looked so bored by the term. The same applies to XML as well.
An Italian version of this post has been published on the online Java magazine Mokabyte. You can read it here.

Tags: , ,