Skip to content

Instantly share code, notes, and snippets.

@RobertFischer
RobertFischer / Description.md
Last active October 14, 2023 16:47
Benchmarking is Hard, Yo.

So, I was reading Why You shouldn’t use lodash anymore and use pure JavaScript instead, because once upon a time, I shifted from Underscore to Lodash, and I'm always on the lookout for the bestest JavaScript stdlib. At the same time, there was recently an interesting conversation on Twitter about how some of React's functionality can be easily implemented in modern vanilla JS. The code that came out of that was elegant and impressive, and so I have taken that as a message to ask if we really need the framework.

Unfortunately, it didn't start out well. After copy-pasting the ~100 lines of code that Lodash executes to perform a find, there was then this shocking claim: Lodash takes 140ms, and native find takes 0ms.

@baptistemanson
baptistemanson / fast-json-packing.js
Created February 10, 2017 21:22
JS fast packing with JSON
/**
* FAST PACKING / UNPACKING JSON
*
* If all objects in a collection follows a similar schema,
* then there is gain in changing the representation from a dictionary to a simple array.
*
* It is known results used in database, protocols, in v8 itself with shadow maps and IRL.
*
* In this example, we expect our final exchange to be equivalent to this literal representation:
* [
@mikermcneil
mikermcneil / do-stuff.js
Created June 21, 2015 01:03
example of reporting progress using machines + lamda inputs
// A machine definition
// (e.g. `machines/do-stuff.js`)
module.exports = {
friendlyName: 'Do stuff',
// ...
inputs: {
@mikermcneil
mikermcneil / outcome-oriented-programming.md
Last active July 13, 2017 14:34
Outcome Oriented Programming - Software as a plan

Outcome-Oriented Programming

Mike McNeil, Aug 2014

Humans are not very good at planning. We have no problem running scenarios, thinking through possibilities, and pondering "what if?" questions. I might plan to not eat my cousin's birthday cake before she gets home, for instance. If I'm very serious, I might write down my commitment; or if I'm unsure about the pros and cons, use some organizational tool like a T-chart.

But when it comes to making a decision in the moment, all bets are off. The cake is a goner.

Predictive Analysis vs. Process Design

Below, I've included a figure containing a decision tree diagram.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: