Skip to content

Instantly share code, notes, and snippets.

View broerjuang's full-sized avatar
🏠
Working from home

Juang Wiantoro broerjuang

🏠
Working from home
View GitHub Profile
@gaearon
gaearon / slim-redux.js
Last active December 3, 2024 06:34
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {

Effective ML (and F#)

24 Jun 2012

This is a summary of Yaron Minsky’s nine pieces of advice from the Effective ML video. Since ML is a predecessor of F#, most of the advice applies to F# as well.


Favor readers over writers (10:20). There’re systematic differences in opinion between those who spent their time reading code and those who spent it writing code. Whenever there’s a difference in opinion between these two groups, the readers are always right and the writers are always wrong. The readers will always push in the direction of clarity and simplicity and the ability to change behavior easily. At least if you’re building software that’s going to last.