A simple example

In literate programming you can reverse the relationship between code
and documentation. Usually you write comments in your source code (you
comment your code, right?); with literate programming you write
documentation and, inside the documentation, in the order that your
brain use, you can write code.

For example let's suppose you want to write a simple C program to say
hello to the world. You could start with something like this: