Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fb7839d
Begin Errors.
dabrahams Sep 17, 2025
252e110
Errors WIP
dabrahams Sep 23, 2025
661e6cf
WIP
dabrahams Sep 30, 2025
81f3f44
WIP
dabrahams Sep 30, 2025
919822e
Errors WIP
dabrahams Nov 5, 2025
2ad2aef
Recoverd talk notes
dabrahams Nov 12, 2025
d105bc6
Merge remote-tracking branch 'origin/main' into errors
dabrahams Nov 13, 2025
0a366a8
WIP
dabrahams Nov 14, 2025
aed127c
More WIP
dabrahams Dec 1, 2025
ab2f6b5
WIPPITY WIP WIP WOW
dabrahams Dec 2, 2025
333b81e
X
dabrahams Dec 11, 2025
32a543b
Progress
dabrahams Dec 15, 2025
0dbc6b3
End section on bugs.
dabrahams Dec 17, 2025
1904312
Fix levels
dabrahams Dec 17, 2025
1c53ffa
Whitespace
dabrahams Dec 17, 2025
797f128
Bugfix
dabrahams Dec 17, 2025
85c9686
X
dabrahams Dec 18, 2025
21feed2
Merge origin/errors2 into errors (using imerge)
dabrahams Dec 18, 2025
cc1b758
Checkpoint
dabrahams Dec 18, 2025
4f5d481
Remove treatment of emergency shutdown measures.
dabrahams Dec 18, 2025
642a4e5
Preface caveat
dabrahams Dec 18, 2025
bb19270
Checkpoint
dabrahams Dec 18, 2025
ce7e1e6
Checkpoint
dabrahams Dec 18, 2025
cf5a223
checkpt
dabrahams Dec 23, 2025
91c80db
Tweekz
dabrahams Jan 4, 2026
cca0e8a
Edits
dabrahams Jan 6, 2026
66303f0
Checkpoindexter
dabrahams Jan 7, 2026
a3abe80
Copy-pasta
dabrahams Jan 7, 2026
b7b3d42
X
dabrahams Dec 18, 2025
1ab7851
Simplicity!
dabrahams Jan 7, 2026
79c426c
Examples and language cleanup
dabrahams Jan 7, 2026
f52541e
Progress on throw vs. Result
dabrahams Jan 7, 2026
15c810d
Progress.
dabrahams Jan 10, 2026
896dc1d
Terminology + massaging
dabrahams Jan 22, 2026
842b853
Onward
dabrahams Jan 22, 2026
9fb694f
Finish 1st draft
dabrahams Jan 24, 2026
8cbdf6a
typo
dabrahams Jan 29, 2026
8147eb3
Consistent terminology.
dabrahams Jan 29, 2026
25249da
Intro tweaks
dabrahams Jan 26, 2026
9ab6665
Conclusion + fleshing out.
dabrahams Jan 27, 2026
d8c1a43
Remove flotsam
dabrahams Jan 27, 2026
08fa18e
Edits based on David Sankel's feedback.
dabrahams Jan 29, 2026
e7e7879
Let it flow.
dabrahams Jan 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions better-code/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

- [Introduction](./chapter-1-introduction.md)
- [Contracts](./chapter-2-contracts.md)
- [Errors](./chapter-3-errors.md)
7 changes: 4 additions & 3 deletions better-code/src/chapter-2-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ It's an invariant of your program that a manager ID can't just be
random; it has to identify an employee that's in the database—that's
part of what it means for the program to be in a good state, and all
through the program you have code to ensure that invariant is upheld.

#### Encapsulating invariants

It would be a good idea to identify and document that whole-program
Expand Down Expand Up @@ -814,9 +815,9 @@ the array has an element. OK, so what about postconditions?

The postconditions are the effects of the method plus any returned
result. If the preconditions are met, but the postconditions are not,
and the function does not report an error, we'd say the method has a
bug. The bug could be in the documentation of course, *which is a
part of the method*.
and the function does not report a runtime error, we'd say the method
has a bug. The bug could be in the documentation of course, *which is
a part of the method*.

```swift
/// Removes and returns the last element.
Expand Down
Loading