February 2012
Sun Mon Tue Wed Thu Fri Sat
     
     

Sat, 27 Aug 2005

Test-Defective

True 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...

permanent link

Mon, 01 Aug 2005

On Check Constraints and Whole Value

When 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.

permanent link

Sun, 31 Jul 2005

Why Code Reviews Aren't Popular

Code 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.

permanent link

Tue, 19 Jul 2005

Fit For Developing Software Released

The 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:
  1. Fit tests express business logic, as guided, or even written, by the business experts. They lay out the functionality as seen by the customers.
  2. The test fixture code itself belongs to the developers. By that I mean, they are not QC, integration or system tests. Developer ownership is a big win because in the process of writing fixture to pass the tests, developers come to understand the system better.
  3. Fit tests are larger in scope in than unit tests. While unit tests are critical in software development, they are not sufficient to ensure that the business functionality is implemented in ways that satisfy the users of the system.

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:

You'll have to buy the book to see the answers, though!

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.

permanent link

Sun, 17 Apr 2005

Compensation Fallacy

If 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.

permanent link

Sun, 30 Jan 2005

New & Worth Reading

In 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?

permanent link