fsteeg.com | notes | tags

Literate string matching programs
Date: 2008-01-12 | Tagged: algorithms, programming

Cross-posted to: https://fsteeg.wordpress.com/2008/01/12/literate-string-matching-programs/

I've added two little implementations to the literate programs wiki: string matching using the Boyer-Moore algorithm and a DP-based computation of the Levenshtein distance.

I really like literate programs and think they are very useful, especially as they are working programs, opposed to the usual pseudocode found in many wikipedia articles and elsewhere. However, to create these, a lot of manual work has to be done, which is not up to todays development standards (when you're used to an IDE like Eclipse). This stuff really could use some nice tools support.

Another problem to tackle is that the documentation actually gets lost in the generated code. Its still in the literate version, but having both code and documentation in one place is a crucial aspect of literate programming. It seems to me that there is a gap here to be filled somehow: the literate version won't run, and the running version ain't literate.