Skip to content

Commit

Permalink
[#674] Add a section about the introspective variants in doc
Browse files Browse the repository at this point in the history
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
  • Loading branch information
philou authored and mengdaming committed Oct 1, 2024
1 parent 0a5864a commit a9ebac2
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions variants-doc/tcr_variants.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.

Expand All @@ -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
```
Expand All @@ -36,10 +39,26 @@ 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
```

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)

0 comments on commit a9ebac2

Please sign in to comment.