a story about my journey in the land of programming practices

32

Upload: raphael-meyer

Post on 15-Jul-2015

193 views

Category:

Software


0 download

TRANSCRIPT

Page 1: A story about my journey in the land of programming practices
Page 2: A story about my journey in the land of programming practices
Page 3: A story about my journey in the land of programming practices
Page 4: A story about my journey in the land of programming practices
Page 5: A story about my journey in the land of programming practices
Page 6: A story about my journey in the land of programming practices
Page 7: A story about my journey in the land of programming practices
Page 8: A story about my journey in the land of programming practices

Given (/^I have entered (\d+) into the calculator$/)do |n| calculator - Calculator.new calculator.push(n.to_i)end

class Calculator def push(n) @args ||= [] @args << n endend

Feature: Addition In order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers

Scenario: Add two numbers Given I have entered 23 into the calculator And I have entered 41 into the calculator When I press add Then the result should be 64 on the screen

Page 9: A story about my journey in the land of programming practices

Feature: Addition In order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers

Scenario: Add two numbers Given I have entered 23 into the calculator And I have entered 41 into the calculator When I press add Then the result should be 64 on the screen

using cucumber::ScenarioScope;

struct CalcCtx { Calculator calc; double result;};

GIVEN("^I have entered (\\d+) into the calculator$") { REGEX_PARAM(double, n); ScenarioScope<CalcCtx> context;

context->calc.push(n);}

class Calculator { public: void push(int n) { stack.push_back(n); }

private: std::vector<int> stack;};

Page 10: A story about my journey in the land of programming practices
Page 11: A story about my journey in the land of programming practices
Page 12: A story about my journey in the land of programming practices
Page 13: A story about my journey in the land of programming practices
Page 14: A story about my journey in the land of programming practices
Page 15: A story about my journey in the land of programming practices
Page 16: A story about my journey in the land of programming practices

https://github.com/

Page 17: A story about my journey in the land of programming practices

https://travis-ci.org/

Page 18: A story about my journey in the land of programming practices

https://coveralls.io/

Page 19: A story about my journey in the land of programming practices

https://godoc.org/

Page 20: A story about my journey in the land of programming practices
Page 21: A story about my journey in the land of programming practices
Page 22: A story about my journey in the land of programming practices
Page 23: A story about my journey in the land of programming practices
Page 24: A story about my journey in the land of programming practices
Page 25: A story about my journey in the land of programming practices
Page 26: A story about my journey in the land of programming practices
Page 27: A story about my journey in the land of programming practices
Page 28: A story about my journey in the land of programming practices
Page 29: A story about my journey in the land of programming practices
Page 30: A story about my journey in the land of programming practices
Page 32: A story about my journey in the land of programming practices

Test Driven Development: By ExampleKent Beck

Growing object-oriented software guided by testsSteve Freeman, Nat Pryce

Modern C++ Programming with Test-Driven Development: Code Better, Sleep BetterJeff Langr

The Pragmatic Programmer: From Journeyman to MasterAndrew Hunt, David Thomas

Becoming a Better Programmer: A Handbook for People Who Care About CodePete Goodliffe