Better Literate Programming

First, several big updates recently to the original version of lit, my agnostic tool for literate programming.

  1. It can now preserve correct line numbers for debugging, which is the killer feature I’ve been trying to figure out; this is the only reason I haven’t written all my source code in this format for the past couple years.
  2. You can pipe the processed content over stdin/stdout instead of just writing files to disk, which should enable any shenanigans you want to wire up that I have not anticipated.
  3. Best of all, thanks to some logging tricks it also lets you actually execute Markdown documents. Usage would be something like this:
    
    # use Python to execute the fenced code blocks inside script.py.md
    $ python $(./lit.sh --input "script.py.md" --before "#")
    

In addition, I’ve reimplemented the same core logic as a Rollup plugin. This is optimized for JavaScript, supports sourcemaps for debugging, and can be delivered via npm with semantic versioning for dependency management.

Object Iteration

New on GitHub and npm: I rebuilt the ES5 array methods from JavaScript and made them work with objects/hashmaps.

d3-xray

I made a new gizmo! d3-xray is a bookmarklet which lets you debug data binding in D3.js by mousing over the graphical elements instead of editing the project code.

Software Naming Conventions

A strange piece for the Message which attempts to illuminate the absurdity of our current approach to naming software.

If you can’t Google your way to something, it’s almost as though it doesn’t even exist, but luckily the filename suffixes used for coding scripts, such as .js and .py, are linguistic (linguistic.js) anomalies which all but create their own SEO (seo.js). Businesses strategize based on their Google rankings relative to competitors for the same reason that tweets are usually weighed in favorites and retweets — on an impersonal internet, visibility (visibility.js) is almost synonymous with value. Publishing any code at (at.js) all creates an instant presence which would be hard to build in other ways. The tech industry is our modern gold rush, drawing swarms of opportunists westward (westward.js), and memorable terminology is one of its new land grabs.

more

BrooklynJS and Multiverse JSON

Belatedly, I gave a short talk last week at BrooklynJS, New York’s nerdiest JavaScript event. I unveiled Multiverse JSON, a lightweight new specification for configurable editorial projects which are stored as structured data and compiled with Python before reading or publishing. More importantly, I gave the entire presentation using a sock puppet.

Facepalm Pilot

I’ve somehow ended up with a new column for McSweeney’s called Facepalm Pilot, in which I’ll fiddle around with “the intersections of technology and stupidity.” There are many of these! So, data-driven satire, I guess?

First up, an interactive graphic exploring scientific and ethical conclusions based on zombie sociology.

Full Stack Javascript

I love Wired, The Verge, and Ars Technica as much as anybody, but there’s really no debate that Slashdot is easily the nerdiest of the various tech industry news sites. In fact, it’s primarily how I learned about technology and programming myself. That’s why I am thrilled to have started writing for them.

My first article, for their Business Intelligence section, is about JavaScript, specifically how software packages like Node.js and MongoDB are using it in new contexts and turning it into a full-stack language that works at every stage of the development process.

It’s effectively impossible to launch a sophisticated Web project without making extensive use of JavaScript and AJAX dynamic loading. That’s precisely why recent projects that move JavaScript beyond its usual boring domain of defining in-browser interactivity are so interesting—because it’s already dominant, and growing even more so.

more