Pro Yearly is on sale from $80 to $50! »

Reimagining Android Productivity with TCR

Reimagining Android Productivity with TCR

What slows us down? Bad code. Code that won't compile, code that breaks the functionality, code that doesn't do what it is supposed to do. What if someone waved a magic wand and made bad code disappear in a snap? Imagine a world where everyone checks-in only good code. Now, that opens up a lot of possibilities.

TCR (test && commit || revert) is a relatively new workflow invented by Kent Beck (the person behind Test-Driven Development). The idea is simple – write tests and production code. If the tests pass, the code gets checked-in automatically. If it fails, then the tooling performs a "git reset --hard", thereby discarding any code that was written (both test and production). You may have a lot of mixed feelings about this and so did I, but it works!

TCR on the surface starts off with a lot of mixed feelings but is surprisingly fast and effective. In this talk, I’ll demonstrate how we can use TCR to build a mobile app in Kotlin using Android Studio.

A8ee6ea52b89dfa1388b592a260c60a6?s=128

Ragunath Jawahar

November 02, 2019
Tweet

Transcript

  1. test && commit || revert Ragunath Jawahar / @ragunathjawahar

  2. ? How long have you been programming professionally

  3. Skill Time Beginner Intermediate Expert

  4. Skill Time Beginner Intermediate Expert

  5. Skill Time Beginner Intermediate Expert

  6. Skill Time Beginner Intermediate Expert

  7. Skill Time Beginner Intermediate Expert Even if we show up

    EVERYDAY and work really HARD!
  8. Skill Time Beginner Intermediate Expert

  9. Skill Time Beginner Intermediate Expert

  10. None
  11. None
  12. Deliberate Practice • Identify the skill that you want to

    build • Break it down to individual sub-skills • Spend 45-90 minutes and a maximum of 3 session practice sessions • Get brutal feedback • Work on the feedback and repeat
  13. TCR

  14. TCR is a technique to, • Train yourself to break

    a large problem into smaller manageable pieces • Engage in deliberate practice that warrants focus and concentration • Practice writing good tests and production code
  15. TCR is NOT • A successor to TDD • For

    writing production code
  16. ./gradlew app:test && git commit -am [Yay!] || git reset

    --hard
  17. ./gradlew app:test && git commit -am [Yay!] || git reset

    --hard
  18. ./gradlew app:test && git commit -am [Yay!] || git reset

    --hard
  19. ./gradlew app:test && git commit -am [Yay!] || git reset

    --hard
  20. ./gradlew app:test && git commit -am [Yay!] || git reset

    --hard
  21. Android Studio Configuration

  22. 1/2

  23. 2/2

  24. –Kent Beck “I hated the idea so I had to

    try it.”
  25. <LiveCode>

  26. </LiveCode>

  27. None
  28. • test && commit || revert
 https://medium.com/@kentbeck_7670/test-commit-revert-870bbd756864 • Kent Beck’s

    Substring Problem, TCR Style
 https://www.youtube.com/watch?v=ZrHBVTCbcE0 • Kent Beck — Explore, Expand, Extract; TCR and Limbo!
 https://sourcediving.com/kent-beck-explore-expand-extract-tcr-and-limbo-b007b397c12e Making Badass Developers - Kathy Sierra (Serious Pony) keynote • Making Badass Developers - Kathy Sierra (Serious Pony) Keynote
 https://www.youtube.com/watch?v=FKTxC9pl-WM&t=1004s • TCR (test && commit || revert). How to use? Alternative to TDD?
 https://medium.com/@tdeniffel/tcr-test-commit-revert-a-test-alternative-to-tdd-6e6b03c22bec • How to Learn Anything... Fast - Josh Kaufman
 https://www.youtube.com/watch?v=EtJy69cEOtQ • Bench Press (Shameless plug)
 https://github.com/ragunathjawahar/bench-press
  29. –Ira Glass “I feel like your problem is that you’re

    trying to judge all the things in the abstract before you do them. That’s your tragic mistake.”
  30. @ragunathjawahar Twitter / Medium / GitHub The End