Thursday, January 27, 2011

A06. BerkeleyDB code katas

REST as I know it now: After reading (and re-reading) some articles on REST, this is what I've gathered. From the first article, I finally understand that REST allows us to do away with static html pages. Instead, resources are given addresses and the representation (displaying or giving information from the server to client) that is chosen is based on the address requested. This address in the case of the WWW is the URI.

From the second article I gleaned that

Kata 1
The example system provides a single key for retrieval of a Contact: it's unique ID. For this Kata, you will first implement a secondary key for Contacts that consists of a timestamp represented as a long value. For example, (new Date()).getValue() returns the current time as a long value. This timestamp could mean a variety of things in practice, such as the time the contact was created, or the contact's birthday, etc., but we won't worry about that for now.

Write unit tests to make sure that your secondary index works correctly, and that in particular you can retrieve a set of Contacts whose timestamps fall within a specified range.

Once you have implemented the secondary index, extend the ContactClient system with two new commands:
get-timestamp: returns the Contact with the given timestamp, if such a Contact exists.
get-range: returns the set of Contacts with timestamps between two specified values.

The journey: --

Kata 2

The journey:

Kata 1 Duration:
Kata 2 Duration:

Total Duration:

No comments:

Post a Comment