Skip to content

Instantly share code, notes, and snippets.

View pdsphil's full-sized avatar

Phil Ripperger pdsphil

View GitHub Profile

Machete design

Create a single, general-purpose tool which is simple to understand but can be applied to many problems. It's like the product version of occam's razor.

The value of a product is the number of problems it can solve divided by the amount of complexity the user needs to keep in their head to use it. Consider an iPhone vs a standard TV remove: an iPhone touchscreen can be used for countless different functions, but there's very little to remember about how it works (tap, drag, swipe, pinch). With a TV remove you have to remember what every button does; the more things you can use the remote for, the more buttons it has. We want to create iPhones, not TV remotes.

Small sharp tools

Composability. Simple tools which do one thing well and can be composed with other tools to create a nearly infinite number of results. For example, the unix methodology (stdin/stdout and pipes), see The Art of Unix Programming. Heroku examples include the add-ons

#######################################################
# Fog Credentials File
#
# Key-value pairs should look like:
# :aws_access_key_id: 022QF06E7MXBSAMPLE
:console:
:aws_access_key_id:
:aws_secret_access_key:
:bluebox_api_key:
:bluebox_customer_id:
#!/usr/bin/ruby
# must place in dir containing the wukong code
$: << File.dirname(__FILE__)+'/wukong/lib'
require 'wukong'
module WordCount
class Mapper < Wukong::Streamer::LineStreamer
# Emit each word in the line.