149
We're Justin & Dave (a.k.a @searls & @dmosher) Say [email protected]

We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

We're Justin & Dave (a.k.a @searls & @dmosher) Say [email protected]

Page 2: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

testdouble/real-world-testing-video

go forth and github clone:

Page 3: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## background

Page 4: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## background

* ~~purposes of each type of test~~

Page 5: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## background

* ~~purposes of each type of test~~* ~~integration tests~~

Page 6: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## background

* ~~purposes of each type of test~~* ~~integration tests~~* ~~frameworks vs. TDD~~

Page 7: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## background

* ~~purposes of each type of test~~* ~~integration tests~~* ~~frameworks vs. TDD~~* a handful of situational tactics

Page 8: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## background

* ~~purposes of each type of test~~* ~~integration tests~~* ~~frameworks vs. TDD~~* a handful of situational tactics* using Jasmine

Page 9: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## background

* ~~purposes of each type of test~~* ~~integration tests~~* ~~frameworks vs. TDD~~* a handful of situational tactics* using Jasmine* generally applicable

Page 10: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## background

* ~~purposes of each type of test~~* ~~integration tests~~* ~~frameworks vs. TDD~~* a handful of situational tactics* using Jasmine* generally applicable

-ish

Page 11: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## background

* ~~purposes of each type of test~~* ~~integration tests~~* ~~frameworks vs. TDD~~* a handful of situational tactics* using Jasmine* generally applicable

-ish *ymmv*

Page 12: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

Page 13: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What we don't do

Page 14: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What we don't do

* use Jasmine's (RSpec-like) DSL

Page 15: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1
Page 16: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe("Math", function(){ });

Page 17: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe("Math", function(){ var subject, result; });

Page 18: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe("Math", function(){ var subject, result; beforeEach(function(){ }); });

Page 19: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe("Math", function(){ var subject, result; beforeEach(function(){ subject = new Math(); }); });

Page 20: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe("Math", function(){ var subject, result; beforeEach(function(){ subject = new Math(); }); describe("#add", function(){ }); });

Page 21: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe("Math", function(){ var subject, result; beforeEach(function(){ subject = new Math(); }); describe("#add", function(){ beforeEach(function(){ }); }); });

Page 22: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe("Math", function(){ var subject, result; beforeEach(function(){ subject = new Math(); }); describe("#add", function(){ beforeEach(function(){ result = subject.add(4,5); }); }); });

Page 23: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe("Math", function(){ var subject, result; beforeEach(function(){ subject = new Math(); }); describe("#add", function(){ beforeEach(function(){ result = subject.add(4,5); }); it("adds", function(){ }); }); });

Page 24: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe("Math", function(){ var subject, result; beforeEach(function(){ subject = new Math(); }); describe("#add", function(){ beforeEach(function(){ result = subject.add(4,5); }); it("adds", function(){ expect(result).toEqual(9); }); }); });

Page 25: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What we don't do

* use Jasmine's (RSpec-like) DSL * test my JavaScript with JavaScript

Page 26: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1
Page 27: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1
Page 28: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What's the problem?

Page 29: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What's the problem?

* Jasmine DSL is not obvious

Page 30: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1
Page 31: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe('thing', function(){});

Page 32: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe('thing', function(){});

beforeEach(function(){});

Page 33: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe('thing', function(){});

beforeEach(function(){});

afterEach(function(){});

Page 34: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe('thing', function(){});

beforeEach(function(){});

afterEach(function(){});

it('does stuff', function(){});

Page 35: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe('thing', function(){});

beforeEach(function(){});

afterEach(function(){});

it('does stuff', function(){});

expect(true).toBeTruthy();

Page 36: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe('thing', function(){});

beforeEach(function(){});

afterEach(function(){});

it('does stuff', function(){});

expect(true).toBeTruthy();

this.addMatchers({});

Page 37: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe('thing', function(){});

beforeEach(function(){});

afterEach(function(){});

it('does stuff', function(){});

expect(true).toBeTruthy();

this.addMatchers({});

jasmine.createSpy().andCallThrough();

Page 38: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What's the problem?

* Jasmine DSL is not obvious * test code can be verbose, unwieldy

Page 39: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

... expect(spec).toFinallyEnd(); }); }); }); }); }); });

Page 40: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What's the problem?

* Jasmine DSL is not obvious * test code can be verbose, unwieldy * those crying mustaches

Page 41: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What's the problem?

* Jasmine DSL is not obvious * test code can be verbose, unwieldy * those crying mustaches });

Page 42: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What we do

Page 43: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What we do

* write specs in CoffeeScript

Page 44: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1
Page 45: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1
Page 46: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe("Math", function(){ var subject, result; beforeEach(function(){ subject = new Math(); }); describe("#add", function(){ beforeEach(function(){ result = subject.add(4,5); }); it("adds", function(){ expect(result).toEqual(9); }); }); });

Page 47: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe "Math", -> beforeEach -> @subject = new Math()

describe "#add", -> beforeEach -> @result = @subject.add(4,5)

it "adds", -> expect(@result).toEqual(9)

Page 48: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

CoffeeScript basics*

Page 49: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

CoffeeScript basics*

*Fear not, it's just JS.

Page 50: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

var add = function(a,b) { return a + b; };

Page 51: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

add = (a,b) -> a + b

Page 52: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

this.save();

Page 53: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

@save()

Page 54: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

var self = this; save(function(){ self.display("Yay!"); });

Page 55: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

save => @display("Yay!")

Page 56: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What we do

* write specs in CoffeeScript * use the *-given DSL

Page 57: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe "Math", -> beforeEach -> @subject = new Math()

describe "#add", -> beforeEach -> @result = @subject.add(4,5)

it "adds", -> expect(@result).toEqual(9)

Page 58: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe "Math", -> Given -> @subject = new Math()

describe "#add", -> When -> @result = @subject.add(4,5) Then -> @result == 9

Page 59: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe("Math", function(){ var subject, result; beforeEach(function(){ subject = new Math(); }); describe("#add", function(){ beforeEach(function(){ result = subject.add(4,5); }); it("adds", function(){ expect(result).toEqual(9); }); }); });

Page 60: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

describe "Math", -> Given -> @subject = new Math()

describe "#add", -> When -> @result = @subject.add(4,5) Then -> @result == 9

Page 61: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What we do

* write specs in CoffeeScript * use the *-given DSL * jasmine-given is a port of rspec-given

Page 62: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1
Page 63: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What we do

* write specs in CoffeeScript * use the *-given DSL * jasmine-given is a port of rspec-given * mocha-given is a port of jasmine-given

Page 64: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## syntax

### What we do

* write specs in CoffeeScript * use the *-given DSL * jasmine-given is a port of rspec-given * mocha-given is a port of jasmine-given * mocha-gwt is a rewrite of mocha-given

Page 65: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

demo

Page 66: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Roman Numerals

Page 67: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

1-standalone

Page 68: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

how'd that go?

Page 69: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

break

Page 70: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1
Page 71: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

discovery testing

Page 72: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Discovery Tests

</>

Page 73: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

I ❤ test doubles

Page 74: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

I ❤ mocks

Page 75: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

I 💔 other people's mocks

Page 76: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Hypothetical feature:

Page 77: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Hypothetical feature:

• Generate a random arithmetic problem (e.g. 5+3)

Page 78: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Hypothetical feature:

• Generate a random arithmetic problem (e.g. 5+3)

• Store it so that a subsequent request can find it

Page 79: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Hypothetical feature:

• Generate a random arithmetic problem (e.g. 5+3)

• Store it so that a subsequent request can find it

• Accept attempted solutions to problems and respond

Page 80: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1
Page 81: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{

Page 82: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ id: 1,

Page 83: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ id: 1, operands: {

Page 84: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ id: 1, operands: { left: 5,

Page 85: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ id: 1, operands: { left: 5, right: 8

Page 86: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ id: 1, operands: { left: 5, right: 8 },

Page 87: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ id: 1, operands: { left: 5, right: 8 }, operator: '+',

Page 88: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ id: 1, operands: { left: 5, right: 8 }, operator: '+', description: '5 * 8'

Page 89: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ id: 1, operands: { left: 5, right: 8 }, operator: '+', description: '5 * 8'}

Page 90: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ id: 1, operands: { left: 5, right: 8 }, operator: '+', description: '5 * 8'}

Page 91: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ id: 1, operands: { left: 5, right: 8 }, operator: '+', description: '5 * 8'}

Page 92: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ id: 1, operands: { left: 5, right: 8 }, operator: '+', description: '5 * 8'}

Page 93: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

GET /problemGets

Random Problem

Page 94: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

GET /problemGets

Random Problem

Page 95: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

GET /problemGets

Random Problem

Saves Problem

Page 96: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Page 97: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

let's play

Page 98: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Page 99: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Page 100: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Page 101: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Gives Random Integer

Page 102: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Gives Random Integer

Focus

Page 103: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Gives Random Integer

Page 104: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Gives Random Integer

Leaf Nodes

Page 105: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Gives Random Integer

Page 106: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Gives Random Integer

No mocks, only logic!

Page 107: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Gives Random Integer

Page 108: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Gives Random Integer

Collaborators

Page 109: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Gives Random Integer

Page 110: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Gives Random Integer

No logic, only mocks!

Page 111: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Generates Random Problem

Describes Problem

GET /problemGets

Random Problem

Saves Problem

Gives Random Character

Gives Random Integer

Page 112: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

too many things! cognitive overhead!

Page 113: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

units so small they're disposable

Page 114: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Responding to changing requirements:

Page 115: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Have some side effect

GET /hypothetical_featureDo hard thing

Transform stuff

Query for stuff

Join Things

Build query

Filter Results

Contact Server

Paginate Stuff

Fetch stuff

Page 116: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Have some side effect

GET /hypothetical_featureDo hard thing

Transform stuff

Query for stuff

Join Things

Build query

Filter Results

Contact Server

Paginate Stuff

Fetch stuff1. Identify smallest sub-tree

affected by change

Page 117: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Have some side effect

GET /hypothetical_featureDo hard thing

Transform stuff

Query for stuff

Join Things

Build query

Filter Results

Contact Server

Paginate Stuff

Fetch stuff1. Identify smallest sub-tree

affected by change

Page 118: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Have some side effect

GET /hypothetical_featureDo hard thing

Transform stuff

Query for stuff

Join Things

Build query

Filter Results

Contact Server

Paginate Stuff

Fetch stuff1. Identify smallest sub-tree

affected by change

2. Delete sub-tree if change is non-trivial

Page 119: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Have some side effect

GET /hypothetical_featureDo hard thing

Transform stuff

Query for stuff

Join Things

Build query

Filter Results

1. Identify smallest sub-tree affected by change

2. Delete sub-tree if change is non-trivial

Page 120: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Have some side effect

GET /hypothetical_featureDo hard thing

Transform stuff

Query for stuff

Join Things

Build query

Filter Results

1. Identify smallest sub-tree affected by change

2. Delete sub-tree if change is non-trivial

3. Drive out a new solution

Page 121: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Have some side effect

GET /hypothetical_featureDo hard thing

Transform stuff

Query for stuff

Join Things

Build query

Filter Results

1. Identify smallest sub-tree affected by change

2. Delete sub-tree if change is non-trivial

3. Drive out a new solutionContact Server

Paginate better

Fetch stuff better

Page 122: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Have some side effect

GET /hypothetical_featureDo hard thing

Transform stuff

Query for stuff

Join Things

Build query

Filter Results

1. Identify smallest sub-tree affected by change

2. Delete sub-tree if change is non-trivial

3. Drive out a new solution

4. Pay technical debt by trusting future-us to know better

Contact Server

Paginate better

Fetch stuff better

Page 123: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Changing code is hard.

Page 124: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Changing code is hard.big

Page 125: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Changing code is hard.

Page 126: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Changing code is hard.long

Page 127: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Changing code is hard.

Page 128: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Changing code is hard.old

Page 129: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Changing code is hard.

Page 130: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Changing code is hard.ALL

Page 131: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Changing code is hard.

Page 132: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

Consider a workflow that disposes, rather than changes, existing code

Page 133: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

2-node

Page 134: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{

Page 135: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ operator: '+',

Page 136: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ operator: '+', operands: {

Page 137: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ operator: '+', operands: { left: 84,

Page 138: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ operator: '+', operands: { left: 84, right: 92

Page 139: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ operator: '+', operands: { left: 84, right: 92 },

Page 140: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ operator: '+', operands: { left: 84, right: 92 }, description: '84 + 92',

Page 141: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ operator: '+', operands: { left: 84, right: 92 }, description: '84 + 92', id: 9222

Page 142: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

{ operator: '+', operands: { left: 84, right: 92 }, description: '84 + 92', id: 9222}

Page 143: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1
Page 144: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

GET /problem

Page 145: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

GET /problemGET /problem/:id

Page 146: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

GET /problemGET /problem/:idPOST /solution

Page 147: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

3-lineman

Page 148: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

## Lineman

Get up and running in minutes!

* [Docs](http://linemanjs.com)

Page 149: We're Justin Dave @searls · 2015-05-01 · Have some side effect GET /hypothetical_feature Do hard thing Transform stuff Query for stuff Join Things Build query Filter Results 1

4-testium