fix: correct Legacy Code examples, a curriculum link, and the index page title - #56
Merged
Conversation
This was referenced Aug 16, 2026
megabyde
force-pushed
the
fix/legacy-code-examples
branch
from
August 16, 2026 05:54
b7e3257 to
a28ed7d
Compare
megabyde
force-pushed
the
fix/legacy-code-examples
branch
from
August 16, 2026 05:57
a28ed7d to
7d058be
Compare
Wrap Class demonstrated inheritance rather than wrapping. Hold the legacy Engine in the wrapper and delegate to it, and correct the comparison table row that described the technique as subclassing. The sprouting kata told readers not to modify the original method, which sprouting cannot satisfy; ask for the minimal call site change instead. The C++ singleton compared a pointer against `null`. The invoice characterization test expected 1850.95 where the shown calculator returns 2132.10. The tax characterization test asserted against values it had just computed from the same calculator, which passes whatever the behaviour is; record the expected outputs instead. Point the Advanced TDD C++ Mars Rover link at the C++ repository.
megabyde
force-pushed
the
fix/legacy-code-examples
branch
from
August 16, 2026 07:16
7d058be to
8cbc205
Compare
The template hardcoded the title element, so pandoc saw no title metadata and warned on every build while defaulting to the source filename. Pass the title as metadata and read it in the template.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third of three stacked PRs, replacing #53. #54 and #55 are merged, so this targets
maindirectly.Two commits. The first corrects what the Legacy Code decks teach; the second silences a pandoc warning in the index build. Squash-merging collapses them, so the title above covers both.
8cbc205— what the decks teachWrap Class demonstrated inheritance, not wrapping
05-safe-changes.mdillustrated the Wrap Class technique withclass LoggingEngine(Engine)callingsuper().calculate_torque(...). That is subclassing. The wrapper now holds an injectedEngineand delegates to it, and the comparison table row that described the technique's location of change asSubclassis corrected toWrapper.The sprouting kata asked for something sprouting cannot do
06-kata-sprouting-wrapping.mdinstructed readers to add new authentication logic and "do not modify the original method". Sprouting requires a minimal change at the call site, so the task as written was unsatisfiable. Reworded to ask for exactly that minimal change, and the corresponding testing task now refers to the original entry point rather than a "legacy method" that no longer exists as described.The invoice characterization test expected the wrong number
03-safety-net.mdassertedApprox(1850.95). Walking the calculator shown on the same slide over its three line items gives 500, then 1368, then 2132.1. Corrected toApprox(2132.10).The tax characterization test was a tautology
The Python example built a
resultsdict by callingcalc.calculate_tax(*case), then asserted thatcalc.calculate_tax(*case)equalled it. That passes for any implementation, including a broken one, which is the opposite of the lesson on the slide. It now records the six expected outputs directly. All six were checked against theTaxCalculatorshown above them: NY 30k -> 1200, NY 60k -> 3600, NY 120k -> 10800, CA 50k -> 1500, CA 80k -> 5600, TX 45k -> 450.nullin C++02-kata-identifying.mdcompared a pointer againstnullin the singleton example. Nownullptr.Curriculum link
The Advanced TDD row 4 C++ Mars Rover link pointed at
mars-rover-python-kata. Row 5 already had it right, so the two rows disagreed.7b3d53d— pandoc title metadataindex.template.htmlhardcoded the<title>element, so pandoc saw no title metadata and warned on every build:The page was always correct; pandoc just had no way to know. The title now comes from
--metadata title="Clean Code Slides"and the template reads$pagetitle$, so there is one source for it. Generated output is byte-identical to before.