Skip to content

Instantly share code, notes, and snippets.

View bigeasy's full-sized avatar

Alan Gutierrez bigeasy

  • New Orleans, LA
View GitHub Profile
@bigeasy
bigeasy / versions.md
Last active January 1, 2016 16:49
Thoughts on designing interfaces to algorithms.

TL;DR

An interface to an algorithm is not an abstraction of a problem domain. It is an implementation. Understanding the algorithm is a requirement for applying it. It should expose the meaningful properties of the algorithm. If you black box it at too low a level, you frustrate the developer who understands the algorithm, forcing them to write their own.

  • Leak all the abstractions. Arrays, sets, maps and graphs are a valid level of abstraction.
  • Make decisions and turn them into rules. Fear not commitment.

The Problem In Need of Interface

I don't like to write about software, that is the first thought. The second

@bigeasy
bigeasy / id_rsa.pub
Created April 12, 2014 00:01
Public Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8MFjTKBo8r+bEVSHP12kHxe88ec9Nuk0YaTzoh+du9ZxytuZsjsA/1vxkA4w3gJbNJbrv20CRPChietSpTFMEVrbpbNjNDTYUwJxn+cIEwuA8xGFbURb0Ukq2jDlBBYqUv0WyQHTjTRK+jTVhodE1EB536r6bW4sNP2wKA7TtxQmGHalXAf+OhLtsgfGVvGQl0fHyYrDdPl04G6maGHDP3dtOKgr/UYgcj+ga4K/YCo8AjQovRE0fy/qqovYHvRhfrFA8GO5zQ/n0dIb+AdjMI2JYjsMVKgOprdZ3tDO1b6XYNfU2Mq3FmRoc8purItVbj2+XQ0vmLU6wN8Hs7uih alan
@bigeasy
bigeasy / profiling.irc
Last active August 29, 2015 14:07
Profiling discussion.
[12:38:59] <prettyrobots> Any nice blog posts on profiling Node.js?
[12:39:10] <prettyrobots> I've run a program with `--prof`, but I can't find a way to visualize it.
[12:40:40] kessler ([email protected]) left IRC. (Ping timeout: 246 seconds)
[12:42:08] joates ([email protected]) left IRC. (Quit: Leaving)
[12:43:15] Maciek416 (~Maciek@2601:7:2100:2c1:e4b2:2ee:277d:28d1) left IRC. (Ping timeout: 272 seconds)
[12:50:33] peutetre ([email protected]) left IRC. (Quit: peutetre)
[12:51:03] toddself_zz is now known as toddself
[12:56:17] kessler ([email protected]) joined the channel.
[13:02:04] phated ([email protected]) joined the channel.
[13:03:43] kumavis ([email protected]) joined the channel.
@bigeasy
bigeasy / this.js
Created October 6, 2014 19:34
`this` manipulation in JavaScript
var slice = [].slice
var array = []
console.log(array.push)
var object = {
f: function (x, y) {
var vargs = slice.call(arguments)
console.log(this.i, x, y)
},