Slide 1

Slide 1 text

From test && commit || revert to LIMBO

Slide 2

Slide 2 text

From test && commit || revert to LIMBO

Slide 3

Slide 3 text

From test && commit || revert to

Slide 4

Slide 4 text

From test && commit || revert to

Slide 5

Slide 5 text

From test && commit || revert

Slide 6

Slide 6 text

From test && commit || revert

Slide 7

Slide 7 text

test && commit || revert

Slide 8

Slide 8 text

Patterns test && commit || revert

Slide 9

Slide 9 text

On patterns and test && commit || revert

Slide 10

Slide 10 text

On patterns and test && commit || revert

Slide 11

Slide 11 text

Shane Becker

Slide 12

Slide 12 text

@veganstraightedge

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Cascadia Ruby Co-organized with Ben Bleything

Slide 19

Slide 19 text

Farmhouse Conf And one Barn Talk

Slide 20

Slide 20 text

Open Source Cheerleader

Slide 21

Slide 21 text

Rubinius

Slide 22

Slide 22 text

JRuby

Slide 23

Slide 23 text

San Francisco, California

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

We’re Hiring!

Slide 29

Slide 29 text

mode.com

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

SQL

Slide 32

Slide 32 text

We’re Hiring!

Slide 33

Slide 33 text

Heather Rivers Chief Technical Officer

Slide 34

Slide 34 text

This slide intentionally left blank

Slide 35

Slide 35 text

On patterns and test && commit || revert

Slide 36

Slide 36 text

Brief technical overview A historical interlude Deeper technical exploration

Slide 37

Slide 37 text

tl;dr too long; didn’t read

Slide 38

Slide 38 text

test

Slide 39

Slide 39 text

and

Slide 40

Slide 40 text

commit

Slide 41

Slide 41 text

or

Slide 42

Slide 42 text

revert

Slide 43

Slide 43 text

test && commit || revert

Slide 44

Slide 44 text

test && commit || revert

Slide 45

Slide 45 text

test

Slide 46

Slide 46 text

rake test

Slide 47

Slide 47 text

rspec

Slide 48

Slide 48 text

bundle exec rspec

Slide 49

Slide 49 text

be rspec

Slide 50

Slide 50 text

commit

Slide 51

Slide 51 text

COMMIT

Slide 52

Slide 52 text

git commit -am "ALL OF THE THINGS"

Slide 53

Slide 53 text

git commit -am working

Slide 54

Slide 54 text

git commit -am [TCR]

Slide 55

Slide 55 text

git add .

Slide 56

Slide 56 text

git add . && git commit -am [TCR]

Slide 57

Slide 57 text

revert

Slide 58

Slide 58 text

git revert

Slide 59

Slide 59 text

git reset --hard

Slide 60

Slide 60 text

git add . && git stash

Slide 61

Slide 61 text

test && commit || revert

Slide 62

Slide 62 text

be rspec && git add . && git commit -am [TCR] || git reset --hard

Slide 63

Slide 63 text

alias tcr = " be rspec && git add . && git commit -am [TCR] || git reset --hard"

Slide 64

Slide 64 text

> tcr

Slide 65

Slide 65 text

> tcr

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

mental_alias tcr = "test && commit || revert"

Slide 68

Slide 68 text

What is TCR, even?

Slide 69

Slide 69 text

1.“Just” an idea

Slide 70

Slide 70 text

2.Combination of 3 existing tools

Slide 71

Slide 71 text

3.Automation of that combination

Slide 72

Slide 72 text

4.Naming that pattern

Slide 73

Slide 73 text

5.Software development process

Slide 74

Slide 74 text

Why now?

Slide 75

Slide 75 text

The history of TCR

Slide 76

Slide 76 text

The history of TCR

Slide 77

Slide 77 text

A history of TCR

Slide 78

Slide 78 text

#truefacts

Slide 79

Slide 79 text

No history is objective No history is unbiased No history is complete

Slide 80

Slide 80 text

No history is objective No history is unbiased No history is complete

Slide 81

Slide 81 text

No history is objective No history is unbiased No history is complete

Slide 82

Slide 82 text

A brief and incomplete history of people, events, and ideas that predate the idea of TCR which when swirled together in a stew and looked at from a certain perspective can be seen as related around a particular theme, or something…

Slide 83

Slide 83 text

A brief and incomplete history of people, events, and ideas that predate the idea of TCR which when swirled together in a stew and looked at from a certain perspective can be seen as related around a particular theme, or something…

Slide 84

Slide 84 text

A brief and incomplete history of people, events, and ideas that predate the idea of TCR which when swirled together in a stew and looked at from a certain perspective can be seen as related around a particular theme, or something…

Slide 85

Slide 85 text

A brief and incomplete history of people, events, and ideas that predate the idea of TCR which when swirled together in a stew and looked at from a certain perspective can be seen as related around a particular theme, or something…

Slide 86

Slide 86 text

A brief and incomplete history of people, events, and ideas that predate the idea of TCR which when swirled together in a stew and looked at from a certain perspective can be seen as related around a particular theme, or something…

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

On patterns and test && commit || revert

Slide 89

Slide 89 text

First things first

Slide 90

Slide 90 text

Eugene, Oregon

Slide 91

Slide 91 text

University of Oregon

Slide 92

Slide 92 text

1961

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

1968

Slide 96

Slide 96 text

Klamath Hall

Slide 97

Slide 97 text

Brutalist architecture

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

No content

Slide 100

Slide 100 text

The Jetsons

Slide 101

Slide 101 text

Bulgaria

Slide 102

Slide 102 text

No content

Slide 103

Slide 103 text

Бузлуджа Buzludzha

Slide 104

Slide 104 text

Turkish for “icy”

Slide 105

Slide 105 text

No content

Slide 106

Slide 106 text

No content

Slide 107

Slide 107 text

No content

Slide 108

Slide 108 text

No content

Slide 109

Slide 109 text

No content

Slide 110

Slide 110 text

No content

Slide 111

Slide 111 text

No content

Slide 112

Slide 112 text

No content

Slide 113

Slide 113 text

Klamath Hall

Slide 114

Slide 114 text

No content

Slide 115

Slide 115 text

No content

Slide 116

Slide 116 text

No content

Slide 117

Slide 117 text

1970

Slide 118

Slide 118 text

No content

Slide 119

Slide 119 text

President of the University

Slide 120

Slide 120 text

University of California, Berkeley

Slide 121

Slide 121 text

Christopher Alexander Sara Ishikawa Murray Silverstein Shlomo Angel Denny Abrams Ingrid Fiksdahl-King

Slide 122

Slide 122 text

The Oregon Experiment

Slide 123

Slide 123 text

Organic Order Planning and construction will be guided by a process which allows the whole to emerge gradually from local acts.

Slide 124

Slide 124 text

Participation All decision about what to build, and how to build it, will be in the hands of the users.

Slide 125

Slide 125 text

Piecemeal Growth The construction undertaken in each period will be weighed overwhelmingly toward small projects.

Slide 126

Slide 126 text

Patterns All design and construction will be guided by a collection of communally adopted planning principles called patterns.

Slide 127

Slide 127 text

Diagnosis The well being of the whole will be protected by an annual diagnosis which explains, in detail, which spaces are alive and which ones are dead, at any given moment in the history of the community.

Slide 128

Slide 128 text

Coordination Finally, the slow emergence of organic order in the whole will be assured by a funding process which regulates the stream of individual projects put forward by users.

Slide 129

Slide 129 text

The Oregon Experiment

Slide 130

Slide 130 text

The Timeless Way of Building

Slide 131

Slide 131 text

A Pattern Language

Slide 132

Slide 132 text

Identifiable Neighborhood

Slide 133

Slide 133 text

Eccentric Nucleus

Slide 134

Slide 134 text

Web of Public Transportation

Slide 135

Slide 135 text

Sitting Wall

Slide 136

Slide 136 text

Small Window Panes

Slide 137

Slide 137 text

Pools of Light

Slide 138

Slide 138 text

Slide 139

Slide 139 text

Isaac Newton & Gottfried Wilhelm Leibniz

Slide 140

Slide 140 text

1979

Slide 141

Slide 141 text

A Pattern Language

Slide 142

Slide 142 text

Ward Cunningham

Slide 143

Slide 143 text

Kent Beck

Slide 144

Slide 144 text

1985

Slide 145

Slide 145 text

Pair Programming

Slide 146

Slide 146 text

Patterns

Slide 147

Slide 147 text

Portland Pattern Repository

Slide 148

Slide 148 text

C2.com

Slide 149

Slide 149 text

First wiki

Slide 150

Slide 150 text

1994

Slide 151

Slide 151 text

Design Patterns

Slide 152

Slide 152 text

Gang of Four

Slide 153

Slide 153 text

1997

Slide 154

Slide 154 text

Kent Beck

Slide 155

Slide 155 text

Smalltalk Best Practice Patterns

Slide 156

Slide 156 text

Josh Susser

Slide 157

Slide 157 text

A Pattern Language

Slide 158

Slide 158 text

Web design

Slide 159

Slide 159 text

Tiny house

Slide 160

Slide 160 text

A Pattern Language

Slide 161

Slide 161 text

Smalltalk Best Practice Patterns

Slide 162

Slide 162 text

Kent Beck

Slide 163

Slide 163 text

Test Driven Development

Slide 164

Slide 164 text

TDD

Slide 165

Slide 165 text

Rediscovered TDD

Slide 166

Slide 166 text

1960s

Slide 167

Slide 167 text

No content

Slide 168

Slide 168 text

Mercury missions

Slide 169

Slide 169 text

eXtreme Programming

Slide 170

Slide 170 text

Pair Programming

Slide 171

Slide 171 text

Test Driven Development

Slide 172

Slide 172 text

Story cards

Slide 173

Slide 173 text

Agile Manifesto

Slide 174

Slide 174 text

A Pattern Language

Slide 175

Slide 175 text

The Timeless Way of Building

Slide 176

Slide 176 text

The Oregon Experiment

Slide 177

Slide 177 text

Organic Order Participation Piecemeal Growth Patterns Diagnosis Coordination

Slide 178

Slide 178 text

Organic Order Participation Piecemeal Growth Patterns Diagnosis Coordination

Slide 179

Slide 179 text

Agile development

Slide 180

Slide 180 text

No content

Slide 181

Slide 181 text

Architecture design principles

Slide 182

Slide 182 text

1970s

Slide 183

Slide 183 text

test && commit || revert

Slide 184

Slide 184 text

2018

Slide 185

Slide 185 text

Kent Beck

Slide 186

Slide 186 text

test && commit

Slide 187

Slide 187 text

2012

Slide 188

Slide 188 text

Sandi Metz

Slide 189

Slide 189 text

Practical Object Oriented Design with Ruby

Slide 190

Slide 190 text

POODR

Slide 191

Slide 191 text

Refactoring

Slide 192

Slide 192 text

Patterns

Slide 193

Slide 193 text

Design

Slide 194

Slide 194 text

Testing

Slide 195

Slide 195 text

2017

Slide 196

Slide 196 text

Sandi Metz & Katrina Owen

Slide 197

Slide 197 text

99 Bottles of OOP

Slide 198

Slide 198 text

Manual TCR

Slide 199

Slide 199 text

Make a tiny change

Slide 200

Slide 200 text

Run the tests

Slide 201

Slide 201 text

If they pass, commit

Slide 202

Slide 202 text

If they fail, undo your change…

Slide 203

Slide 203 text

…and make a better change

Slide 204

Slide 204 text

TCR sounds like 99 Bottles of OOP!

Slide 205

Slide 205 text

In Oslo at Code Camp

Slide 206

Slide 206 text

|| revert

Slide 207

Slide 207 text

test && commit

Slide 208

Slide 208 text

Oddmund Strømmer

Slide 209

Slide 209 text

Absurd

Slide 210

Slide 210 text

Cheap

Slide 211

Slide 211 text

Safe

Slide 212

Slide 212 text

MUST TRY

Slide 213

Slide 213 text

Who invented TCR?

Slide 214

Slide 214 text

Who discovered TCR?

Slide 215

Slide 215 text

Katrina Owen

Slide 216

Slide 216 text

Kent Beck

Slide 217

Slide 217 text

Oddmund Strømmer

Slide 218

Slide 218 text

Ideas don’t exist in a vacuum

Slide 219

Slide 219 text

Stands on the shoulders of giants

Slide 220

Slide 220 text

Everything is a Remix

Slide 221

Slide 221 text

The adjacent possible

Slide 222

Slide 222 text

An idea’s time has come

Slide 223

Slide 223 text

The idea for TCR

Slide 224

Slide 224 text

In the air

Slide 225

Slide 225 text

Sandi Metz, Kent Beck, Katrina Owen, or Oddmund Strømmer

Slide 226

Slide 226 text

Someone else would have

Slide 227

Slide 227 text

No content

Slide 228

Slide 228 text

TCR exploration

Slide 229

Slide 229 text

Misadventures into TCR

Slide 230

Slide 230 text

Improving tests

Slide 231

Slide 231 text

Didn’t run all of the tests

Slide 232

Slide 232 text

Only the changed test

Slide 233

Slide 233 text

Much faster feedback loop

Slide 234

Slide 234 text

> a few seconds

Slide 235

Slide 235 text

Make your tests fasts

Slide 236

Slide 236 text

Run isolated tests, manually

Slide 237

Slide 237 text

Run isolated tests, automatically

Slide 238

Slide 238 text

Do the Right Thing™

Slide 239

Slide 239 text

RSpec

Slide 240

Slide 240 text

Minitest

Slide 241

Slide 241 text

Guard

Slide 242

Slide 242 text

Fast tests

Slide 243

Slide 243 text

Obviously Good Idea™

Slide 244

Slide 244 text

Refactoring

Slide 245

Slide 245 text

Refactoring

Slide 246

Slide 246 text

Refactoring Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.

Slide 247

Slide 247 text

Make tiny change

Slide 248

Slide 248 text

Run tests

Slide 249

Slide 249 text

If pass, commit

Slide 250

Slide 250 text

If fail, undo

Slide 251

Slide 251 text

Repeat

Slide 252

Slide 252 text

TCR pairing sessions

Slide 253

Slide 253 text

Morgan Fogarty

Slide 254

Slide 254 text

Fibonacci

Slide 255

Slide 255 text

Commit history is not useful

Slide 256

Slide 256 text

[tcr] [tcr] [tcr] [tcr] [tcr] [tcr] [tcr]

Slide 257

Slide 257 text

Does this matter?

Slide 258

Slide 258 text

Always work on a branch

Slide 259

Slide 259 text

Never on master

Slide 260

Slide 260 text

Squash commit

Slide 261

Slide 261 text

UNDO ⌘Z

Slide 262

Slide 262 text

Restore the changes

Slide 263

Slide 263 text

|| revert

Slide 264

Slide 264 text

Is that cheating?

Slide 265

Slide 265 text

Confusing when code disappears

Slide 266

Slide 266 text

TCR tooling

Slide 267

Slide 267 text

Test and implementation

Slide 268

Slide 268 text

Write a test

Slide 269

Slide 269 text

Hardcode the implementation

Slide 270

Slide 270 text

> tcr

Slide 271

Slide 271 text

Test gets locked in

Slide 272

Slide 272 text

TCR just the implementation

Slide 273

Slide 273 text

No content

Slide 274

Slide 274 text

Evan Phoenix

Slide 275

Slide 275 text

No content

Slide 276

Slide 276 text

No content

Slide 277

Slide 277 text

6 commits

Slide 278

Slide 278 text

2 files

Slide 279

Slide 279 text

~12 reverts

Slide 280

Slide 280 text

Exploring an interface

Slide 281

Slide 281 text

@e.stdout.string

Slide 282

Slide 282 text

@e.stdout.to_s

Slide 283

Slide 283 text

No content

Slide 284

Slide 284 text

Isolated tests, for speed

Slide 285

Slide 285 text

Pre-pull request

Slide 286

Slide 286 text

Entire test suite

Slide 287

Slide 287 text

Again, in CI

Slide 288

Slide 288 text

No content

Slide 289

Slide 289 text

Bookis Worthy

Slide 290

Slide 290 text

Rails + React

Slide 291

Slide 291 text

Kids on 45th

Slide 292

Slide 292 text

kidson45th.com

Slide 293

Slide 293 text

Fast tests!

Slide 294

Slide 294 text

53 commits

Slide 295

Slide 295 text

86 minutes

Slide 296

Slide 296 text

TCR commit log as a timetracker

Slide 297

Slide 297 text

Bookis Worthy 3 minutes ago: Working 4121ab0 Bookis Worthy 3 minutes ago: Working dfa242a Bookis Worthy 8 minutes ago: Working 1267372 Bookis Worthy 9 minutes ago: Working d873303 Bookis Worthy 10 minutes ago: Working 1b9a472 Bookis Worthy 12 minutes ago: Working f2517fa Bookis Worthy 12 minutes ago: Working 5ac2c2d Bookis Worthy 13 minutes ago: Working 292aedc Bookis Worthy 14 minutes ago: Working a7ca016 Bookis Worthy 14 minutes ago: Working 1aacf64 Bookis Worthy 14 minutes ago: Working af9396e Bookis Worthy 19 minutes ago: Working a9a3d4a Bookis Worthy 19 minutes ago: Working 2690a93 Bookis Worthy 27 minutes ago: Working 53f8ae7 Bookis Worthy 29 minutes ago: Working 69e6aee Bookis Worthy 30 minutes ago: Working 80e9ade Bookis Worthy 31 minutes ago: Working c0d4e04 Bookis Worthy 31 minutes ago: Working c33ad17 Bookis Worthy 34 minutes ago: Working 61162c8 Bookis Worthy 34 minutes ago: Working c09eb74 Bookis Worthy 35 minutes ago: Working 51346ed Bookis Worthy 38 minutes ago: Working 589a813 Bookis Worthy 39 minutes ago: Working 77d0320 Bookis Worthy 41 minutes ago: Working 93e2c21 Bookis Worthy 41 minutes ago: Working c23e1c4 Bookis Worthy 41 minutes ago: Working 2c78c63 Bookis Worthy 44 minutes ago: Working e35da95 Bookis Worthy 46 minutes ago: Working 384a9ee Bookis Worthy 49 minutes ago: Working dd65bd0 Bookis Worthy 51 minutes ago: Working c71c605 Bookis Worthy 52 minutes ago: Working 3c9a425 Bookis Worthy 52 minutes ago: Working 9ec1327 Bookis Worthy 53 minutes ago: Working b30bbfa Bookis Worthy 57 minutes ago: Working a154824 Bookis Worthy 63 minutes ago: Working 8bc157f Bookis Worthy 65 minutes ago: Working f657d30 Bookis Worthy 66 minutes ago: Working e5fb094 Bookis Worthy 67 minutes ago: Working 4f0c7cf Bookis Worthy 68 minutes ago: Working 230e17b Bookis Worthy 69 minutes ago: Working 29f1932 Bookis Worthy 69 minutes ago: Working 9802c3a Bookis Worthy 70 minutes ago: Working 0f81873 Bookis Worthy 72 minutes ago: Working 443cd08 Bookis Worthy 73 minutes ago: Working 1c447a3 Bookis Worthy 74 minutes ago: Working 93a6840 Bookis Worthy 75 minutes ago: Working 41057b8 Bookis Worthy 82 minutes ago: Working 183c82c Bookis Worthy 83 minutes ago: Working 61ab629 Bookis Worthy 84 minutes ago: Working 5ccc45d Bookis Worthy 86 minutes ago: Working fab43fc Bookis Worthy 86 minutes ago: Working d2982cd

Slide 298

Slide 298 text

Smaller moves

Slide 299

Slide 299 text

foo.update bar: 'baz'

Slide 300

Slide 300 text

> tcr

Slide 301

Slide 301 text

foo.update! bar: 'baz'

Slide 302

Slide 302 text

By being careful

Slide 303

Slide 303 text

Be risky

Slide 304

Slide 304 text

Small moves

Slide 305

Slide 305 text

Safe

Slide 306

Slide 306 text

Easy

Slide 307

Slide 307 text

Cheap to try

Slide 308

Slide 308 text

Cheap to fail

Slide 309

Slide 309 text

Trust the process

Slide 310

Slide 310 text

Be pedantic

Slide 311

Slide 311 text

Feel the pain

Slide 312

Slide 312 text

Find the benefits

Slide 313

Slide 313 text

Make small moves

Slide 314

Slide 314 text

Single words

Slide 315

Slide 315 text

Single characters

Slide 316

Slide 316 text

Lean on || revert

Slide 317

Slide 317 text

Clean up our exploratory demolition

Slide 318

Slide 318 text

SomeClass. strange_method

Slide 319

Slide 319 text

class Foo def bar SomeClass.strange_method end end

Slide 320

Slide 320 text

Outside in

Slide 321

Slide 321 text

One step at a time

Slide 322

Slide 322 text

No content

Slide 323

Slide 323 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 324

Slide 324 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 325

Slide 325 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 326

Slide 326 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 327

Slide 327 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 328

Slide 328 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 329

Slide 329 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 330

Slide 330 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 331

Slide 331 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 332

Slide 332 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 333

Slide 333 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 334

Slide 334 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 335

Slide 335 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 336

Slide 336 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 337

Slide 337 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 338

Slide 338 text

require 'test_helper' class SwapRequestCreditorTest < ActiveSupport::TestCase fixtures :swap_requests, :basic_orders, :order_items, :skus, :order_skus test "#credit_amount_cents sums out of stock sku price" do order = basic_orders(:complete) swap_request = swap_requests(:one) swap_request.update!(order: order, state: SwapRequest::INITIATED) out_of_stock_sku = skus(:one) out_of_stock_sku.update!(in_stock: 0) out_of_stock_order_sku = order_skus(:one).tap { |os| os.update!(sku: out_of_stock_sku, order: order) } out_of_stock_order_item = order_items(:shirt).tap do |oi| oi.update!(order_sku: out_of_stock_order_sku, price_cents: 100, quantity: 3) end order.order_items << out_of_stock_order_item cents = SwapRequestCreditor.new(id: swap_request.id).credit_amount_cents assert_equal(cents, 300) end end

Slide 339

Slide 339 text

assert_equal(cents, 300)

Slide 340

Slide 340 text

No content

Slide 341

Slide 341 text

No content

Slide 342

Slide 342 text

No content

Slide 343

Slide 343 text

TCR Lessons Learned

Slide 344

Slide 344 text

Fast tests

Slide 345

Slide 345 text

Fast tests Fast tests

Slide 346

Slide 346 text

Fast tests Fast tests Fast tests

Slide 347

Slide 347 text

Small moves

Slide 348

Slide 348 text

Iterative growth

Slide 349

Slide 349 text

Trust the process

Slide 350

Slide 350 text

The Oregon Experiment

Slide 351

Slide 351 text

No content

Slide 352

Slide 352 text

Weird

Slide 353

Slide 353 text

Wild

Slide 354

Slide 354 text

Wonderful

Slide 355

Slide 355 text

No content

Slide 356

Slide 356 text

# TODO:

Slide 357

Slide 357 text

Books to read

Slide 358

Slide 358 text

The Oregon Experiment

Slide 359

Slide 359 text

The Timeless Way of Building

Slide 360

Slide 360 text

A Pattern Language

Slide 361

Slide 361 text

Practical Object Oriented Design with Ruby

Slide 362

Slide 362 text

99 Bottles of OOP

Slide 363

Slide 363 text

The Uninhabitable Earth Life After Warming by David Wallace-Wells

Slide 364

Slide 364 text

Station Eleven by Emily St. John Mandel

Slide 365

Slide 365 text

Try TCR

Slide 366

Slide 366 text

Toy project

Slide 367

Slide 367 text

Fibonacci

Slide 368

Slide 368 text

Fizz buzz

Slide 369

Slide 369 text

Production codebase

Slide 370

Slide 370 text

Make a new branch

Slide 371

Slide 371 text

Run TCR

Slide 372

Slide 372 text

Refactor something

Slide 373

Slide 373 text

Improve tests / coverage

Slide 374

Slide 374 text

Fix a bug

Slide 375

Slide 375 text

Add a feature

Slide 376

Slide 376 text

Make small moves

Slide 377

Slide 377 text

Go smaller

Slide 378

Slide 378 text

My offer to you

Slide 379

Slide 379 text

sidekick

Slide 380

Slide 380 text

cheerleader

Slide 381

Slide 381 text

pair buddy

Slide 382

Slide 382 text

I will pair with you

Slide 383

Slide 383 text

~30 minutes

Slide 384

Slide 384 text

My request of you

Slide 385

Slide 385 text

Tweet about your TCR experience

Slide 386

Slide 386 text

@veganstraightedge

Slide 387

Slide 387 text

What works?

Slide 388

Slide 388 text

What doesn’t?

Slide 389

Slide 389 text

What did you learn?

Slide 390

Slide 390 text

Was it fun?

Slide 391

Slide 391 text

Will you keep using TCR?

Slide 392

Slide 392 text

Extra credit bonus!!!

Slide 393

Slide 393 text

Bash function

Slide 394

Slide 394 text

IDE integration

Slide 395

Slide 395 text

IDE integration

Slide 396

Slide 396 text

Text editor plugin

Slide 397

Slide 397 text

Text editor plugin

Slide 398

Slide 398 text

VS Code

Slide 399

Slide 399 text

Atom

Slide 400

Slide 400 text

Sublime

Slide 401

Slide 401 text

TCR CLI Rubygem

Slide 402

Slide 402 text

*

Slide 403

Slide 403 text

Shane Becker THANK YOU! @veganstraightedge

Slide 404

Slide 404 text

No content

Slide 405

Slide 405 text

One more thing…

Slide 406

Slide 406 text

LIMBO

Slide 407

Slide 407 text

while(true); do git pull --rebase; git push; done;

Slide 408

Slide 408 text

Shane Becker THANK YOU! @veganstraightedge

Slide 409

Slide 409 text

No content