Archive for September, 2008

Comparison of Continuous Integration Servers

A Short Background
Continuous integration is a practice the grew out of the extreme programming community, and was written about by Martin Fowler and Kent Beck. Martin Fowler’s paper provides a very nice definition of the term
Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person [...]

Little Endian Input Stream

As everybody probably knows, Java only supports Big Endian streams but every once and a while you find yourself in the predicament of wanting to interface with a legacy system that wants to use little endian encoding. So I’m attaching a class that will allow you to use the nice DataInputStream API but that [...]

Testing with Live Devices

In a lot of the projects I work on the software we write must communicate with other live devices that speak a variety of protocols and testing using mock objects will only get you so far. That is why I like to capture actual data that is coming out of these devices and include [...]

Tivo Detection: Network Discovery

I’m sure that you know if you have a Tivo or not, but I’m providing a class based on the “Tivo Connect Automatic Machine Discovery Protocol Specification” that will listen for the Tivo UDP heartbeat and provide a notification when the heartbeat is detected.
Usage:

1
2
3
4
5
6
7
TivoLocator.getInstance().addListener(new TivoLocatorListener() {
 
public void processTivoHeartbeat(TivoInformation [...]

Computing Levenshtein Distance in Java

The Levenshtein distance between two strings is given by the minimum number of operations needed to transform one string into the other, where an operation is an insertion, deletion, or substitution of a single character.

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
public class LevenshteinDistance {
 
private static int minOfThree(int a, int b, int c) {
return Math.min(a, Math.min(b, c));
}
 
private static [...]