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.

Literate Programming

Lately I’ve been doing a lot of coding in CoffeeScript, which is a very elegant language, but my favorite feature is actually just a workflow. Instead of first coding and then later annotating the code, with “literate mode” you first write out descriptions of your logical structures, and then inside that framework you start to embed the executable code. It’s a very interesting way of working, so a few days ago I put together a small shell script which allows me to apply a “literate” workflow to any other kind of code.

New Yorker Projects

I’ve completely neglected to post my recent projects for The New Yorker:
  • “What You Look Like to a Social Network” – essentially dumping all the data fields shared about your user accounts by the major social network APIs into a single zoomable D3 chart for chilling comparison.
  • The November 7th Twitter IPO captured in an interactive infographic which lets you compare the revenues and valuations of major tech companies both against each other and against themselves over time. Written with D3, and with an unreasonable amount of attention paid to the “bounce” option among the easing function selectors.
  • Mapping the failed attempts to defund Obamacare so Ryan Lizza could proceed with a characteristically astute political analysis.
  • Restaurant review map, with a particularly lovely introduction by Amelia Lester.
  • An interactive jQuery timeline of women in the Senate to accompany the Kristen Gillibrand profile by Evan Osnos.
  • Introducing Premise, a new company that creates “offline” financial indices by having overseas workers manually enter vegetable prices into their smartphone app. Written entirely using old-fashioned journalism – no programming whatsoever!
  • Breaking Bad‘s various meth money plot points in a jQuery bar chart.
  • Corporate fines compared in a D3 bar chart.
  • Evolution of the Dow Jones, simple mouseover effects built with jQuery.
  • a number of short music items for the print issues which appeared in the anonymous critics’ notebook section under “Goings On About Town,” the event listings section.

New Yorker

An update: I’ve started working at The New Yorker doing a mix of writing and programming – tech projects for the editorial division, basically. I’m still not quite sure which dog I’d be in this scenario.

Apple Employees on Steve Jobs Film

The much-hyped Steve Jobs biopic starring Ashton Kutcher comes out today, and over at Slashdot I have an interview with Daniel Kottke and Bill Fernandez, two of the earliest Apple employees, about the creative liberties taken by the filmmakers.

Vijith Assar: Let’s talk about that pivotal scene at the the West Coast Computer Faire.
Daniel Kottke: It’s really kind of the really big scene in the movie. They spent several days shooting it, but they did an unbelievable job recreating the West Coast Computer Faire. There’s fifty different booths selling stuff relating to computers. Huge room. They did an unbelievable job reproducing it based on photographs that had been taken. It really blew me away. But anyway, that speech that Ashton does: “Ladies and gentlemen, I am Steve Jobs, and I’m going to introduce you to the Apple II, blah blah blah.” That speech that he gives never happened, for sure. [laughs] It was just a booth at a computer show.
Bill Fernandez: There’s a whole other aspect that wasn’t even touched: the personal computing environment. The Commodore PET computer came out, and we were concerned that we might lose to them. And the Radio Shack TRS-80 came out. And from what I gathered, there’s nothing in the movie that sets the context; a lot of people were doing personal computing at the same time. more

Get Off My Lawn

For Slashdot, a complaint cheekily titled “How DRM Won” which explains why current business practices at streaming media companies like Spotify are culturally destructive:

In 2009, when Apple dropped the Digital Rights Management (DRM) restrictions from songs sold through the iTunes Store, it seemed like a huge victory for consumers, one that would usher in a more customer-friendly economy for digital media. But four years later, DRM is still alive and well—it just lives in the cloud now.

more

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

Blink Blink Blink

I wrote an article for the New Yorker about the evolution of web browsers, the impending demise of the infamous blink element, and Google Chrome’s new HTML rendering engine.

Chrome’s recent move to Blink undercuts the primary olive branch it promised to Web developers upon Chrome’s release in 2008; those developers now need to test their Web sites in an additional rendering engine. But there is an argument in favor of the change: WebKit is now very widely used, especially in mobile devices, in much the same way that Internet Explorer 6 dominated the market and brought a near-halt to real innovation in the look and feel of the Web a decade ago.

more

Maura Magazine

Goodness, I can’t believe I’ve neglected to mention this for so long. We’re already four issues in, but I’m the main geek behind the web presence for Maura Magazine, a new digital weekly for iOS devices helmed by the amazing writer and editor Maura Johnston. She fielded my pitches at the Village Voice for a while, and you may have also read her work at a number of other wonderful publications.

This is her new experiment in small-scale direct journalism. Using an infrastructure provided by my fellow geeks at 29th Street Publishing, she publishes a handful of long-form stories each week which are pushed to a custom app loaded on the iPads and iPhones of her eager subscribers, each of whom pays a buck or less per issue, with payments automated via iTunes. Writers get paid, readers don’t have to deal with ads, everybody wins.

There’s been more coverage of this than I’d care to outdo here, so let me just refer you to some of the other guys:

As for the site, a lot of the heavy lifting is being effortlessly handled by WordPress, but I’m still really excited about a lot of the things happening in the custom functions I wrote — these are among the coolest WordPress ideas I’ve ever come up with. I don’t want to go into too much detail since we’re not openly sharing the plugins yet, but in a nutshell, the paywalls are dynamic, and you will start to see them move and react as we continue to charge along here. For example, this past weekend one of the articles was temporarily unlocked to match the HBO schedule.

And, as with my last attempt to merge tech with editorial, a hearty shout out to my good friend Buster Bylander, who jumped in with his amazing visual design sense once I was done fiddling around with the code for generating the content loops. We are both very proud of this. Please subscribe!

See you there, Mayor Bloomberg

It’s time once again for the Blip Festival, about which I have written far too many times already, so this year I took a step back and used it as a way to more generally discuss the ongoing conversion of music into a heavily technical endeavor.

When his predecessor first took office, even basic familiarity with a Web browser was considered the exclusive domain of geeks, but Mayor Bloomberg kicked off his 2012 with a tweet resolving to learn programming. Facebook built an empire from thumbs-up clicks, as evidenced by last week’s IPO. The march toward the future might be relentless and inescapable, but sometimes it’s still easy to overlook the largest strides. Music is likewise an increasingly technical game, from creation to promotion to distribution. Which brings us to this weekend’s Blip Festival, the annual celebration of retro video games and one of New York’s geekiest music events.

more