I am interested by Literate Programming, in which both human-readable
discussion and compiler-readable code are combined. Not only does such a system
allow a document to be unit-tested, it generally allows code samples to be more
expressive, because you can re-order code sections to fit the discussion. I’ve
written a literate
programming system for Word and .NET, but this is even cooler: a Wiki whose
markup supports literate programming. Every page has a “download
code” button that generates both a listing and even a .ZIP file!