From a9ebac29616677630ab2161f2ec1c7566fbaef3f Mon Sep 17 00:00:00 2001 From: Philippe Bourgau Date: Fri, 13 Sep 2024 10:54:54 +0200 Subject: [PATCH] [#674] Add a section about the introspective variants in doc To document what this new variant does - add a section - add a description of the variant - also add an extract from T Deniffel's post to explain what the other variants are --- variants-doc/tcr_variants.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/variants-doc/tcr_variants.md b/variants-doc/tcr_variants.md index 7f6f6aec..77ccf95f 100644 --- a/variants-doc/tcr_variants.md +++ b/variants-doc/tcr_variants.md @@ -1,7 +1,6 @@ # TCR Variants -TCR tool can run several variants of TCR, as described in -[this blog post](https://medium.com/@tdeniffel/tcr-variants-test-commit-revert-bf6bd84b17d3) +TCR tool can run several variants of TCR, inspired by [this blog post](https://medium.com/@tdeniffel/tcr-variants-test-commit-revert-bf6bd84b17d3) by Thomas Deniffel. We encourage you to read through Thomas's blog post for a deeper understanding of how these @@ -12,9 +11,10 @@ TCR's tool `--variant` (or `-r`) command-line option. The variants currently supported by TCR tool are the following: -- The Original +- The Original (not yet supported) - BTCR - The Relaxed (default) +- The introspective The state diagrams below summarize the behavior of each variant. @@ -28,6 +28,9 @@ tcr --variant=original ## BTCR - Build && Test && Commit || Revert +> This version tries to build the software first. If it fails, nothing is +> executed — no commit, no revert. Compilation-Issue solved. + ```shell tcr --variant=btcr ``` @@ -36,6 +39,9 @@ tcr --variant=btcr ## The Relaxed +> The second issue of the original suggestion is that your unit-tests get deleted all the time. +> The idea is, not to reset the ‘test’ folder but only the ‘src’ folder. + ```shell tcr --variant=relaxed ``` @@ -43,3 +49,16 @@ tcr --variant=relaxed The above option `--variant=relaxed` may be omitted as this is the default variant. ![TCR Relaxed variant](../webapp/src/assets/images/variant-relaxed.png) + +## The Introspective + +This is an extension to the BTCR variant. Instead of simply reverting changes locally, it commits the failing +changes, and straightaway commits a revert commit to get back to a green state. The goal is to be able to +retrospect on one's progress through a task. It's useful during deliberate practice sessions, but could also +serve in day to day coding. + +```shell +tcr --variant=introspective +``` + +![TCR Introspective variant](../webapp/src/assets/images/variant-introspective.png)