First of all, the conference was a blast. I really enjoyed it. Now lets get to it. The attendees were years behind Intelliware. They're all trying to figure out how to pair, test, and figure out what agile is all about. The presenters, on the other hand, are way ahead of us...they're living the dream. They no longer live with (i.e. write) legacy code. I was really surprised about how much I didn't know. I expected to learn a couple new tools and techniques, but even fundamentals, like how to write a method, implement equals, and use inheritance, have changed in the last five years.
The first presentation I attended at the conference was Linday Hayes talking about how her thinking on test automation has evolved over the last twelve years while working in the test automation industry. Hayes showed how testing has moved from record/playback to data-driven to key/action word frameworks to, eventually, fixture libraries. With fixture libraries, customers can write their own tests, and no code needs to be written to test new functionality. FitNesse is the open source tool for this approach to testing.
The standard stack for Java development is now CruiseControl, JUnit, FitNesse, and Clover.
There was a uniform pattern from the presenters I came across. They aim for 100% test coverage and are getting high nineties. About 50% of code are tests. Methods are small (i.e. 7 lines). A 13-line method is a code smell. Methods should take a short-time (on the order of seconds) to understand. These guys are doing test-first, only test public methods, and create interfaces for mocks in tests. They are using Model View Presenter pattern to test applications without their GUI. Robert Martin discussed how to do this.
Allen Holub showed how to write Java without setters and getters and why that was a good thing: maintainability is inversely proportional to data flow. Holub also discussed how to write code so the UI is extremely thin and have objects generate their own view code via an AbstractFactory pattern using Builders.
Something else I found interesting: Behaviour-Driven Design (BDD). There is a movement in test-first away from "tests". Instead of "tests" and "units", BDD speaks of "context" and "specification". The latest version of JUnit has moved in this direction, but there are new BDD test frameworks that are written from scratch to support a change in vocabulary and attitude. The idea is to remove any focus from "methods" and "classes", which are just arbitrary details of the implementation. Instead, the focus shifts to behaviour, which is specified, in a given context. A test class/file in BDD does not have a one-to-one correspondence with a production class/file. And a method is explicitly not the unit under test. Rubyists will be pleased to hear there is a BDD library for Ruby called 'RSpec', which also includes a mocking API based on SchMock.
Jeff Johnson had some interesting things to say about UI responsiveness. Johnson stated that UI must respond to user-driven events in 0.1 seconds. Within one second, the UI must do something else. He states that a one second pause is a strong psychological signal for conversational turn-taking. At ten second mark, UI must respond again with something appropriate (e.g. progress bar).
Alistair Cockburn (what a name...he insists the "ck" is silent) presented Crystal, the lightest of the agile methodologies. Cockburn studied data on tens of thousands of projects to find those characteristics that correlate with success. He found that 3 practices are most essential to software development project success:
- Frequent delivery. 2-month delivery period is recommended, but successful projects were found up to 3-month delivery cycle. Anything beyond that, projects tended to fail.
- Face-to-face communication. No cubicle dwelling. He found that projects tended to fail when there were fewer than 2 hours/week of the customer's time with the development team.
- Reflective improvement. Project teams need to spend at least once a month identifying what works, what are problems, and selecting process changes for subsequent work.
Amazon presented Mechanical Turk, a Web Services API that sends work to a pool of tens of thousands of workers (the human kind). This was definately the crazziest thing I saw at the conference.
While in San Clara, I read Eliyahu Goldratt's 'The Goal' and 'Critical Chain'. These are fiction novels that teach Theory of Constraints (TOC), an idea that has been very successful in manufacturing industries. Mary Poppendieck (not sure what's silent in this name) discussed how TOC applies to software development. For example, TOC shows that systems that attempt to utilize 100% of their resources result in a highly inefficient system. Poppendieck says that one of the factors underlying the success of pairing is related to the TOC idea that efficient systems have resource buffers. I very much recommend reading one of Goldratt's books. I'd take 'Critical Chain' over 'The Goal', since it's shorter and a little bit more engaging than 'The Goal'.
I read 'The Kite Runner' on the way to San Francisco. A wonderful story of guilt, and atonement. Highly recommended.
'The World is Flat' by Thomas Friedman is all the rage. Haven't read it, but it came up a couple times at the conference. Something about technology resulting in economic focus shifting from nation to corporation to individual.
Oh, I managed to get some running in for a few days on the hotel treadmill. So I mowed my dad down in the pool last Sunday. Very satisfying.
Further Reading
- Model View Presenter, Martin Fowler
- Build user interfaces without getters and setters, Allen Holub
- Defining Comparison Methods for Value Objects in Java, Kevlin Henney
- Test Automation Maturity Curve, Linda Hayes
- Why extends is evil, Allen Holub
- Why getter and setter methods are evil, Allen Holub
- RSpec
- Fit
- Mechanical Turk