Skip to content

Instantly share code, notes, and snippets.

@tmcw
tmcw / comprehensive_documentation.md
Created March 25, 2015 14:46
Comprehensive Documentation

Software is layered.

Documentation is not. If your documentation states

Run npm install foo to install this module

It is really saying

Abridged History of Tech & Related Reads

Way back in the day devseed did Drupal. We saw two main problems with it:

  • It tried to hit lots of different usecases and handled this by growing ever-larger instead of becoming modular
  • It was slow

We couldn't respond to #2 because it was the 'essential quality' of Drupal being built on PHP/MySQL and having 'make everything dynamic' as an essential property.

We responded to #1 with the 'smallcore idea': http://developmentseed.org/blog/2009/oct/28/smallcore-manifesto-help-us-build-better-teddy-bear/ This was semi-successful but was a hard sell because Drupal's module infrastructure was brittle and had the impossible goal of making programming-like tasks available as configuration.

@mbostock
mbostock / .block
Last active November 20, 2016 23:20
Dynamic Simplification IV
license: gpl-3.0
@eyeseast
eyeseast / chart.html
Created September 1, 2013 21:01
Code from my post on responsive bar charts.
<div id="chart">
<h4>Percent of adults over 25 with at least a bachelor's degree:</h4>
<p><strong>Median:</strong> <span class="median"></span></p>
<small>Source: <cite><a href="http://census.gov">U.S. Census Bureau</a></cite>, via <cite><a href="http://beta.censusreporter.org/compare/01000US/040/table/?release=acs2011_1yr&table=B15003">Census Reporter</a></cite></small>
</div>
@mbostock
mbostock / .block
Last active February 1, 2020 08:57 — forked from mbostock/.block
New York Population Density
license: gpl-3.0
@jsvine
jsvine / draft.md
Created August 8, 2012 14:56
Why I love Tabletop.js but don't use it in production

Tabletop.js is a fantastic, open-source JavaScript library that lets developers easily integrate data from Google Spreadsheets into their online projects. I've used it, even contributed a minor feature, and love it for prototyping. Non-programmers love being able to update a project via Google Spreadsheets' hyper-intuitive interface.

That said, I'm extraordinarily wary of using Tabletop in production. Instead, at the Wall Street Journal, we use a bit of middleware to "prune" our Google Spreadsheets-based data and then cache it on our own servers. A few brief reasons:

@jeffrafter
jeffrafter / server.js
Created August 28, 2010 21:37
Twitter OAuth with node-oauth for node.js+express
var express = require('express');
var sys = require('sys');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY";
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET";
function consumer() {
@mbostock
mbostock / README.md
Last active June 7, 2023 18:33
Underscore’s Equivalents in D3

Collections

each(array)

Underscore example:

_.each([1, 2, 3], function(num) { alert(num); });
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}