I hereby claim:
- I am cades on github.
- I am cadeskao (https://keybase.io/cadeskao) on keybase.
- I have a public key ASAx0YvoGBzahnrUBRq7XyWOQLT1JV3Y3h7pYaXjl5L0EQo
To claim this, I am signing this object:
describe('App.login()', () => { | |
it('should give token if success', sync(function*() { | |
var subject = Object.create(App), result | |
subject.init({ authVerifier: fakeAuthVerifier }) | |
result = yield subject.login('user', 'pass', resume()) | |
assert(typeof result.token === 'string') | |
})) |
For my own sanity ;) Scraped from a variety of places, including: http://stackoverflow.com/questions/14130560/nodejs-udp-multicast-how-to?utm_medium=twitter&utm_source=twitterfeed | |
!Server | |
var news = [ | |
"Borussia Dortmund wins German championship", | |
"Tornado warning for the Bay Area", | |
"More rain for the weekend", | |
"Android tablets take over the world", | |
"iPad2 sold out", |
export default function(WrappedComponent) { | |
const mixinProps = (WrappedComponent.mixins || []) | |
.filter((mixin) => mixin.props) | |
.map((mixin) => mixin.props); | |
const allProps = mixinProps.concat(WrappedComponent.props); | |
const mergedProps = allProps.reduce((merged, props) => Object.assign(merged, props), {}); | |
return { | |
props: mergedProps, | |
render(createElement) { |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
http://www.infoq.com/presentations/Simple-Made-Easy | |
http://www.infoq.com/presentations/integration-tests-scam | |
http://blog.thecodewhisperer.com/2010/09/14/when-is-it-safe-to-introduce-test-doubles | |
http://youtu.be/yTkzNHF6rMs | |
http://pyvideo.org/video/1670/boundaries | |
http://skillsmatter.com/podcast/ajax-ria/enumerators | |
http://alistair.cockburn.us/Hexagonal+architecture | |
http://c2.com/cgi/wiki?PortsAndAdaptersArchitecture | |
http://www.confreaks.com/videos/977-goruco2012-hexagonal-rails | |
http://www.confreaks.com/videos/1255-rockymtnruby2012-to-mock-or-not-to-mock |
Quite a lot of different people have been on the same trail of thought. Gary Bernhardt's formulation of a "functional core, imperative shell" seems to be the most voiced.
"Imperative shell" that wraps and uses your "functional core".. The result of this is that the shell has fewer paths, but more dependencies. The core contains no dependencies, but encapsulates the different logic paths. So we’re encapsulating dependencies on one side, and business logic on the other side. Or put another way, the way to figure out the separation is by doing as much as you can without mutation, and then encapsulating the mutation separately. Functional core — Many fast unit tests. Imperative shell — Few integration tests
#! /usr/bin/python | |
# | |
# join | |
# Joing pages from a a collection of PDF files into a single PDF file. | |
# | |
# join [--output <file>] [--shuffle] [--verbose]" | |
# | |
# Parameter: | |
# | |
# --shuffle |