Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Literate CoffeeScript

The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. ~ Donald Knuth. "Literate Programming (1984)"

CoffeeScript is just JavaScript
Literate CS is just Markdown

# Markdown #

Body of documented code

....# CoffeeScript Code
....class Code

Markdown First

# Class Definition #

As a markdown document you can establish a dialog with *yourself* and other
coders regarding design, thought process, and gotchas well before the
implementation takes places.

Inline Documentation

# Class Definition #

As a markdown document you can establish a dialog with *yourself* and other
coders regarding design, thought process, and gotchas well before the
implementation takes places.

## Implementation ##

This class describes how this problem could be solved.

    class Implementation
      constructor: -> @init()

Organize teh codez

## Implementation ##

This class describes how this problem could be solved.

    class Implementation
      constructor: -> @init()

### init ###

A initialization method. _This is probubly not the best way to do this._

      init: -> doSomethingAmazing()

### Singleton ###

This implementation should be a singleton object.

      instance = null
      @getInstance: -> instance ?= new Implementation()

What I've Learned

  • Externalizes thought processes
  • Good documentation before code
  • Organizes code for easier refactoring
  • Allows others to review easier
  • I feel like a I code better

An Example

Use a spacebar or arrow keys to navigate