Conversation
Rewrite and clarify chapter-4-algorithms.md: improve prose, reorganize examples, and expand the discussion of loop invariants, termination and postconditions. Add a generic Swift halfStablePartition implementation and update removeAllSelected to use it; include usage example and additional notes on rotations, slide/gather composition, and algorithmic tradeoffs. Minor formatting and comment cleanup throughout the file and append extra efficiency bullets. Also add "Subrange" to the VS Code spelling/settings list in .vscode/settings.json.
Clean up chapter-4-algorithms.md by removing an inline partition comment and a short usage example for halfStablePartition. This trims redundant explanatory lines while leaving the function implementation unchanged.
| "problemMatcher": [] | ||
| } | ||
| ] | ||
| } No newline at end of file |
There was a problem hiding this comment.
Personal VS Code task file accidentally committed
Low Severity
A .vscode/tasks.json file defining an "Open in Notepad" shell task was added to the repository. This appears to be a personal developer configuration rather than a project-level resource. The .gitignore does not exclude .vscode/, so this file will be tracked for all contributors.
| https://link.springer.com/chapter/10.1007/11786160_8 | ||
| link.springer.com | ||
|
|
||
| https://lamport.azurewebsites.net/pubs/abadi-composing.pdf |
There was a problem hiding this comment.
Unformatted draft notes committed in safety appendix
Low Severity
The safety appendix contains raw, unformatted reference notes after the horizontal rule — bare URLs, document titles, and domain names (lines 68–82) that appear to be research scratch notes rather than finished content. These will render as visible plaintext in the published book.
| imageFont: null | ||
| } | ||
| }); | ||
| } |
There was a problem hiding this comment.
MathJax config file is unused and never loaded
Low Severity
mathjax-config.js configures MathJax v2 (MathJax.Hub), but the project uses mdbook-katex for math rendering, and book.toml has no additional-js entry to load this file. It will never execute. Having a MathJax config in a KaTeX-based project could mislead future contributors about which math renderer is in use.
Rename footnote identifier from [^operation costs] to [^operation-costs] to match the reference and ensure the footnote link resolves correctly in the algorithms chapter.
| - time | ||
| - space (memory) | ||
| - energy | ||
| - computational (number of ALUs in use) |
There was a problem hiding this comment.
Draft notes and AI-generated content accidentally included
High Severity
Everything from line 304 onwards is explicitly marked as # From here down are notes and experiments, followed by rough outlines and an HTML comment stating This is my outline with AI generated wording. Its generally horrible. This draft content, including duplicate headings, skeletal notes, and unfinished sections, would render visibly in the published book.
Insert an HTML TODO-style note calling out the need to discuss strict-weak vs total-preorder from the contracts chapter, and remove an inline "// lower bound?" comment from the Swift example to keep the code example clean. Changes are limited to chapter-4-algorithms.md to flag the conceptual discussion and tidy the sample code.
| - [Introduction](./chapter-1-introduction.md) | ||
| - [Contracts](./chapter-2-contracts.md) | ||
| - [Errors](./chapter-3-errors.md) | ||
| - [Algorithms](./chapter-4-algorithms.md) |
There was a problem hiding this comment.
New chapter duplicates existing chapter-4 numbering in filename
Medium Severity
The new Algorithms entry links to chapter-4-algorithms.md while the existing Types entry still links to chapter-4-types.md. The sequential chapter numbering scheme (1-introduction, 2-contracts, 3-errors) is broken — Types is now effectively chapter 5 in order but still named chapter 4, which creates a confusing inconsistency. The edit-url-template in book.toml relies on file paths, so references to the Types chapter by its old number will also be misleading.


Note
Low Risk
Primarily documentation/content and developer tooling changes; minimal impact outside mdBook rendering and edit-link behavior.
Overview
Adds a new Algorithms chapter to the
better-codemdBook, and wires it into the table of contents viabetter-code/src/SUMMARY.md.Updates book configuration by fixing the HTML
edit-url-templatepath, and adds a MathJax pre-config (better-code/js/mathjax-config.js) to force TeX webfonts.Also includes new editor-only repo config: expanded VS Code settings (cSpell dictionary + CMake ignore) and a VS Code task to open the current file in Notepad.
Written by Cursor Bugbot for commit cd58714. This will update automatically on new commits. Configure here.