From Patterns to `test && commit || revert`

From Patterns to `test && commit || revert`

Kent Beck (TDD, eXtreme Programming, Agile Manifesto) has a couple new ideas. They both sound so terrible and impossible that they just might be totally amazing.

1. test && commit || revert If tests pass, commit everything. If they fail, revert everything. Automatically. Wild.

2. LIMBO. Anything that's committed is pushed. Anything that's committed by teammates is automatically pulled in while you work. So wild.

Does this work? Does it scale? Will I always be losing important progress because of a typo? Will this make me a better / faster / happier programmer?

We'll cover tools, process, deficiencies, mental models, and experiences. Show up and see what happens.

---

Shane Becker
Shane (he/him) is a developer, designer, and an anarchist. He was once the open source cheerleader for Rubinius. He co-organized Cascadia Ruby, Farmhouse Conf and Barn Talks. Currently, he’s a senior software engineer at Mode.com and coordinator of development on crimethinc.com (an anti-fascist anarchist publishing collective). He's exploring these wild-sounding new ways software development to see if another world is possible.

317259b800623d76bba3e7a4fbbbf70a?s=128

Shane Becker

April 30, 2019
Tweet

Transcript

  1. 13.
  2. 14.
  3. 15.
  4. 16.
  5. 17.
  6. 21.
  7. 22.
  8. 24.
  9. 25.
  10. 26.
  11. 27.
  12. 29.
  13. 30.
  14. 31.

    SQL

  15. 38.
  16. 39.

    and

  17. 40.
  18. 41.

    or

  19. 42.
  20. 45.
  21. 46.
  22. 47.
  23. 49.
  24. 50.
  25. 51.
  26. 55.
  27. 57.
  28. 62.

    be rspec && git add . && git commit -am

    [TCR] || git reset --hard
  29. 63.

    alias tcr = " be rspec && git add .

    && git commit -am [TCR] || git reset --hard"
  30. 64.
  31. 65.
  32. 66.
  33. 74.
  34. 82.

    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…
  35. 83.

    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…
  36. 84.

    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…
  37. 85.

    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…
  38. 86.

    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…
  39. 87.
  40. 92.
  41. 93.
  42. 94.
  43. 95.
  44. 98.
  45. 99.
  46. 101.
  47. 102.
  48. 105.
  49. 106.
  50. 107.
  51. 108.
  52. 109.
  53. 110.
  54. 111.
  55. 112.
  56. 114.
  57. 115.
  58. 116.
  59. 117.
  60. 118.
  61. 123.

    Organic Order Planning and construction will be guided by a

    process which allows the whole to emerge gradually from local acts.
  62. 124.

    Participation All decision about what to build, and how to

    build it, will be in the hands of the users.
  63. 125.

    Piecemeal Growth The construction undertaken in each period will be

    weighed overwhelmingly toward small projects.
  64. 126.

    Patterns All design and construction will be guided by a

    collection of communally adopted planning principles called patterns.
  65. 127.

    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.
  66. 128.

    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.
  67. 138.

  68. 140.
  69. 143.
  70. 144.
  71. 146.
  72. 148.
  73. 149.
  74. 150.
  75. 153.
  76. 154.
  77. 158.
  78. 159.
  79. 162.
  80. 164.

    TDD

  81. 166.
  82. 167.
  83. 180.
  84. 182.
  85. 184.
  86. 185.
  87. 187.
  88. 188.
  89. 190.
  90. 192.
  91. 193.
  92. 194.
  93. 195.
  94. 198.
  95. 206.
  96. 209.
  97. 210.
  98. 211.
  99. 212.
  100. 216.
  101. 224.
  102. 227.
  103. 239.
  104. 240.
  105. 241.
  106. 242.
  107. 246.

    Refactoring Refactoring is a disciplined technique for restructuring an existing

    body of code, altering its internal structure without changing its external behavior.
  108. 248.
  109. 251.
  110. 254.
  111. 261.
  112. 263.
  113. 270.
  114. 273.
  115. 275.
  116. 276.
  117. 277.
  118. 278.
  119. 283.
  120. 288.
  121. 294.
  122. 295.
  123. 297.

    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
  124. 300.
  125. 303.
  126. 305.
  127. 306.
  128. 320.
  129. 322.
  130. 323.

    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
  131. 324.

    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
  132. 325.

    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
  133. 326.

    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
  134. 327.

    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
  135. 328.

    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
  136. 329.

    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
  137. 330.

    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
  138. 331.

    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
  139. 332.

    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
  140. 333.

    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
  141. 334.

    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
  142. 335.

    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
  143. 336.

    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
  144. 337.

    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
  145. 338.

    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
  146. 340.
  147. 341.
  148. 342.
  149. 344.
  150. 351.
  151. 352.
  152. 353.
  153. 354.
  154. 355.
  155. 356.
  156. 365.
  157. 367.
  158. 368.
  159. 371.
  160. 374.
  161. 377.
  162. 379.
  163. 381.
  164. 398.
  165. 399.
  166. 400.
  167. 402.

    *

  168. 404.
  169. 406.
  170. 409.