A Readable Conway's Game of Life
blog.gsabo.com
blog.gsabo.com
A very basic explanation would be: literate programming is the result of writing a program in a sort of psuedo-code that explains the program in the order of the programmer's thoughts, and then running it through a compiler of sorts which "untangles" the literate program and outputs machine-readable code.
The linked post is nicely formatted and well-documented "regular" code.
Another thing I find a lot these days are an abundance of comments that explain what the code already explains. Some of the comments are good in this example, but many of them explain what I would know if I just read the code.
However, I do like the use of color! A great demonstration. Good work. :)
[1] http://wollw.github.com/automaton-avr/
And the live version: http://www.jastanton.com/experiments/conways-game-of-life/
Mine acts more like a game, you can start and stop with 's' and enter draw mode with 'd' and draw on the cells.
I notice that you separate your "views" (this.cells) from your "models" (this.grid). This seems like a good idea from an MVC perspective, but I would worry that I'm forgetting to keep them in-sync in all cases.
And the "live" code: http://jlarocco.com/life_js/index.html
Seems Conway's Game of Life has been popular lately.
I see we both went with variable names like 'up' and 'left' for the subscripts in the "neighbor count" code. I'm always looking for ways to sidestep numerical array indexing because it's such a fertile ground for bugs. For example, I find it really hard to look at:
var up = i-1>0 ? -1 + i : -1 + h;
...and tell if it's correct. I used a mod_wrap function instead, which is an implementation of Python-like modulo, which 'wraps' negative numbers to the top of the range.