Harold Thimbleby
h.thimbleby@swansea.ac.uk
Swansea University
Warp is a system for helping write reliable explanations for algorithms, programs and code. Warp is available as a Java application (see below), and works with C, C++, Java or similar programs. It generates ASCII, HTML, LaTeX, XHTML or XML output.
Explaining
code for publication
Harold Thimbleby
previously at UCLIC
University College London Interaction Centre, London
Abstract: The computer science literature discusses code and algorithms extensively, but not always reliably. Tool support can help ensure integrity between code and explanation so that published papers are more reliable.
A versatile, light-weight tool to support explaining code for publication is justified, described and compared with alternatives. The tool works with Java, C and similar languages, and provides support for publishing explanations of real code in LaTeX, XML, HTML, etc.)
Keywords: Documentation, Java, Javadoc, LaTeX, Literate programming, Publishing code, Warp, XML.
An improved insert sort algorithm
O. Nevalainen, T. Raita
Department of Computer Science
University of Turku, Turku, FinlandH. Thimbleby
previously at UCLIC
University College London Interaction Centre, LondonAbstract: A simple and efficient insert sort algorithm is presented in Java, and is presented in stable and unstable variants. The usual double test of insert sort can be avoided by using a sentinel, but sentinels create minor problems - such as choosing an appropriate value and requiring extra memory. The insert sort here avoids both problems.
Keywords: Insert sort, Java, Quicksort, Sentinels, Warp.
This paper uses warping (automatic code inclusion from actual program source) to ensure reliability of the published code; the code extracts in this paper are guaranteed compiled, run and tested. The preceding paper discusses both the tool warp and its rationale.
- PostScript
- HTML (a stripped-down version of the paper, showing warp using HTML)
An improved insert sort algorithm: Source code
O. Nevalainen, T. Raita
Department of Computer Science
University of Turku, Turku, FinlandH. Thimbleby
previously at UCLIC
University College London Interaction Centre, LondonAbstract: This brief note provides the source code quoted in the paper, "An improved insert sort algorithm."
Keywords: Insert sort, Java, Quicksort, Sentinels, Warp.
- PostScript
- HTML (a stripped-down version of the paper, using HTML)
See my review of Journal of Machine Learning Research.
See also: Cargo Cult Science by Richard Feynman.Constantine's claim to fame was his computer calculation ... but there was a rumour going around that Constantine did not translate the problem to the computer in an honest way.
"What's the big deal?" Constantine said. "I used what I knew to improve my computer model. Everybody does that."
...I told Richard Feynman...
He just shrugged. I thought he'd say, "What a louse! He did it because he thought what was important was success, not discovery."
Feynman replied,
"Hell no. I'm not going to psychoanalyze the guy. But what should bother you as much as whether or not your friend fudged his work is that a lot of people read it and couldn't tell the difference. There are so many people out there not being skeptical, or not understanding what they are doing. They're all just following along. That's what we have - too many followers, too few leaders."
Warp runnable Warp.jar
Script to compile and run warp and the examples
Example code: InsertSort.java, Test.java, Test.jar
Or using warp, you can see its typical output in HTML or ASCII, and this is the sort code in HTML (also produced by warp).
All source code jar
Latex papers jar
Note that jar can be used as a general purpose archiving tool; if you've got Java, you've got jar, and can therefore extract all the necessary files.
Web pages last updated 16 March 2006.
Warp Version 1.02 adds XML DTDs.
Warp Version 1.03 adds JavaScript.