| August 2008 | ||||||
|---|---|---|---|---|---|---|
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 | ||||||
Test-DefectiveTrue story: In a system that had recently been through a forced "big bang" rollout and had only been live for a couple of weeks, one of the daily financial processes failed one day due to some sort of rounding error. It later happened that one of the developers mentioned that he saw this error in test but hoped it was related to bad test data.
If wishes were fishes...
On Check Constraints and Whole ValueWhen a business object has setters for attributes that are interdependent, one way of ensuring that those attributes maintain the required relationship is to use check constraints on the setters. But there is a better way, using Whole Value.
An example first. Suppose the attributes are startDate and endDate, where the rule is that startDate must always be before or the same as endDate. A naive implementation, the kind that usually comes to mind for developers used to breaking things up into itty-bitty pices for primitives and database columns, is to have the two separate properties on the larger object. The setters for each attribute each check the new values against the constraint on the other value, to ensure the business object's state is always sane.
A better way to handle this is to code the properties in a way that eliminates the possibility of the business object ever being in an inconsistent state. An immutable Value Object can be the solution.
A Duration object can encapsulate the startDate and endDate into a single object with no setters, only a constructor that takes two arguments, for the start and end dates, and does the check in the constructor, throwing an exception if the required relationship is violated by the supplied values. The business object that formerly had both attributes instead has the single attribute with stters and getters for an immutable Duration.
Why Code Reviews Aren't PopularCode reviews are almost universally recognized as the most effective way to improve the product. Why are they done so rarely? Short answer: the participants don't get sufficient immediate, concrete payback proportional to the cost and effort involved. Sure, the system, the team benefits, but the individuals involved calculate the equation as a net negative.
Harnessing the value of code reviews will take developing new practices that balance the cost to the developer with greater individual benefits.
Fit For Developing Software ReleasedThe new book on Fit, titled, appropriately enough, Fit for Developing Software: Framework for Integrated Tests and written by Rick Mugridge with Ward Cunningham, has been released. It's available at Amazon, ISBN 0321269349
My software-developer's appreciation for Fit comes from three areas of importance to me:This book has been called "two books in one", and I definitely agree. The first two parts are for customers and other non-programming team members. The latter parts are aimed at developers and have the technical topics. Ward said that as he and Rick were working on the book it started to get confusing, switching back and forth between the business-facing discussions and the technical discussions. Ward felt it best to cover the basics first, so they agreed to separate the book to speak to the two audiences one at a time. The resulting organization allows the book plenty of breathing room to address the needs of both audiences.
The "Questions & Answers" sections scattered throughout the book contain some of the most valuable gems. Here are a couple of examples related to ActionFixture:
fit.Fixture?For my part, I am hoping to bring my own Objective-C implementation up to compliance with the 1.1 specification before the start of Agile 2005, where the community of Fit implementors is planning to congregate for a FIT Unification Summit on the last day of the conference.
Compensation FallacyIf the going rate for the average developer with skill in the technology is N, it doesn't follow that offering 2/3N will get you a developer 2/3rds as good as average. Experience and anecdotal evidence suggests to me that you're not going to hire anyone who has any ability in the technology at a rate below some floor. If that floor is 3/4N, paying 2/3N will get you no skill at all.
From a practical standpoint, as a project manager you can't expect to complete on time with a product of lesser quality with a team of underpaid developers. You can simply expect the project to fail. If you happen to be the one well-compensated developer on a team of cheap programmers? You're not going to do just a larger share of the work, you're going to do all the work. If you're unlucky, you'll get to re-do the work of the other team members as well.
New & Worth ReadingIn something of a discourse on code smells, Donn Seeley of Wind River Systems writes about How Not to Write FORTRAN in Any Language.
Those of you who are struggling independent consultants, or considering going independent, Steve Friedl has tips on what it takes in his article, So you want to be a consultant...?
Finally, there's a concept I've been considering lately that needs a word for it. What is a good word to use for the Opposite of Yagni? Most recently I've been leaning towards "chaos", "disorder", or just "mess". What else?