In a Nutshell

The skill of writing is to create a context in which other people can think.

Edwin Schlossberg

We write code primarily to communicate. Code without documentation is a perilous thing, hardly communicative. It is a high-maintenance problem. Bad documentation is no better, either misleading the reader or resulting in a flimsy program that relies on external explanation.

Often the only documentation we have for a piece of code is that code itself. Making the code self-documenting and clear to read goes some way to remedy this situation. Self-documenting code doesn’t happen magically, you have to carefully think about it. The result is code that looks like it was easy to write.

Literate programming is one (quite extreme) method of writing ...

Get Code Craft now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.