Feeds
The Register Columnists

Kevlin Henney

Contact Mail Follow RSS feed
ABC childrens blocks

One programmer's unit test is another's integration test

The question of what units you are working with is one that will at one time or other have plagued anyone who studied a science or a branch of physical engineering. Teachers go to great lengths to make sure students remember to specify their units. It is not enough to say that the answer is 42. Forty-two what? 42 metres? 42 …
Kevlin Henney, 28 Jul 2007
The Register breaking news

Driving on the right side of the code

Perhaps one of the most interesting things about TDD is not the specification-oriented and design-centred role in which testing is employed, but the amount of explanation it requires as a term. And I don't just mean expanding the abbreviation to Test-Driven Development or Test-Driven Design, as opposed to, say, …
Kevlin Henney, 09 Mar 2007
The Register breaking news

To iterate is human

In the previous article, I made the following observation: A collection that holds its elements but doesn't allow you to traverse them is unlikely to prove popular. There are many ways to offer traversal, but if the caller needs to be able to know the position of elements in some way there are essentially only three general …
Kevlin Henney, 16 Sep 2006
The Register breaking news

To iterate is human

In the previous article, I made the following observation: A collection that holds its elements but doesn't allow you to traverse them is unlikely to prove popular. There are many ways to offer traversal, but if the caller needs to be able to know the position of elements in some way there are essentially only three general …
Kevlin Henney, 04 Sep 2006
The Register breaking news

Up with cohesion, down with coupling

The standard advice on cohesion and coupling is that a design should strive to maximise cohesion and minimise coupling. This is a fine mantra, but, as is so often the case, without a good understanding of what is really intended, it becomes either misguidance or perceived as academic and irrelevant. A simple characterisation is …
Kevlin Henney, 31 Aug 2006
The Register breaking news

Long argument lists - who needs 'em?

Long argument lists are a pain. Using them can be a test of memory or an exercise in guess work. In recent years, attention has increasingly been paid to the usability of user interfaces, exploring how users actually use — or work around — user interfaces in practice, tracking how long certain tasks take or how many errors are …
Kevlin Henney, 28 Jun 2006
The Register breaking news

Building cohesion into programming

There are many reasons for getting cohesive. The principle of locality, which is normally considered with respect to locality of reference when using resources such as memory, can also apply to the organisation of APIs and classes and the partitioning of packages, components and header files. This criterion for cohesion is …
Kevlin Henney, 27 Jun 2006
The Register breaking news

Driven to test-action

Test-Driven Development (TDD) has increased in popularity both as a practice and as a term. Although there is a strong association with Extreme Programming, more generally there is a certain set of practices that can be honed in on and applied across various development models. headshot_Kevlin_Henney (large teaser) …
Kevlin Henney, 01 Mar 2006
The Register breaking news

Of software bugs and learning curves

A bug is no more and no less than a software defect. However, the less harsh and less direct name "bug" masks the nature of the beast and helps to ease the conscience of programmers and the organisations around them. The term also helps play down the frustrations of software users, to the point that defects have become accepted …
Kevlin Henney, 03 Feb 2006
The Register breaking news

Unequal equivalence

kevlin henney headshot In my previous column I put the contract for object equality under the microscope in most detail for Object.equals in Java but also with a brief look at Object.Equals in C#. The idea that equality can also be assessed by relational comparison between two objects was also examined, looking again in most …
Kevlin Henney, 16 Jan 2006
The Register breaking news

First among equals

Kevlin Henney Whether formal or informal, a contract defines an (in principle) enforceable agreement between two or more parties with respect to a specific undertaking. The same is also true in code. The contract metaphor is an effective way of approaching API design and use [1]: "A contract is effectively an agreement on the …
Kevlin Henney, 29 Dec 2005
The Register breaking news

Let's get cohesive

It is entirely possible to write applications as a monolithic slab of undifferentiated code. Indeed, for some this appears to approach an art form, with a stream-of-consciousness code style not dissimilar to Jack Kerouac's spontaneous, amphetamine-fuelled writing style. Caffeine is the more likely the drug of choice in …
Kevlin Henney, 11 Dec 2005