Version 0 of Tcl as Sanity Check

Updated 2004-09-28 20:25:59

Sometimes you need a sanity checker.

I've got over 3GB of binary data files to trudge through. The original code is in C++ -- there is an error somewhere in the code. Or, is the data just corrupted?

A surprising (for me) use for Tcl: Sanity checking existing C++ code.

The approach is simple and can go two different ways:

  • Cleanroom re-implementation of the code (based on understood data file format) to check correctness of original code and data file integrity
  • A re-implementation using the original code as a guideline --- additional introspection and stepwise tweaks to check correctness of original code and data file integrity

The really interesting end result: A reference implementation of the binary data file reader. (Change the file format or the C++ code and you need to validate it with the Tcl implementation).

Ah, the many uses...

-- Todd Coram