circular-buffer: Clarify overwrite#892
Merged
tleen merged 2 commits intoexercism:masterfrom Sep 7, 2017
Merged
Conversation
added 2 commits
September 7, 2017 11:12
Overwrite replaces the oldest item in the buffer if the buffer is empty. Otherwise it is just like write. This commit documents what overwrite on a buffer with available space looks like and clarifies what the oldest element is after an overwrite operation succeeds. Closes: 889
As discussed in exercism#889, the documentation for the overwrite operation was vague. overwrite replaces the oldest element in the buffer if the buffer is full and is just a normal write if there is space available.
Author
|
Ah, thanks. Sorry about that. |
Author
|
A CI check which complains about such minor things could save some hassle. |
Member
|
NP, I fixed it in the commit message. GitHub specific Git takes some getting used to! |
Author
|
At various employers I have seen it work well. It really depends on if the over head from the commits is high enough to offload the problem on the submitters instead of the committers. |
shaleh
pushed a commit
to shaleh/exercism-problem-specifications
that referenced
this pull request
Sep 21, 2017
As discussed in exercism#889, the documentation for the overwrite operation was vague. overwrite replaces the oldest element in the buffer if the buffer is full and is just a normal write if there is space available. Overwrite replaces the oldest item in the buffer if the buffer is empty. Otherwise it is just like write. This commit documents what overwrite on a buffer with available space looks like and clarifies what the oldest element is after an overwrite operation succeeds. Closes exercism#889
petertseng
added a commit
to exercism/rust
that referenced
this pull request
Nov 18, 2018
The tests are the same as the initial unversioned version of canonical-data: exercism/problem-specifications#488 This is because all subsequent changes did not change test content: 1.0.0 (formatting change only): exercism/problem-specifications#681 1.0.1 (clarify overwrite): exercism/problem-specifications#892 1.1.0 (move inputs to `input` object): exercism/problem-specifications#1186 The Rust track already had most of the tests; these mostly add some clarity around `clear` and addds a test for an `overwrite` following a `read`.
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.
This pull request is in two pieces in case the change to the test cases is controversial.
The description change is to make overwrite clear for the reader. To this end another example is added and that there is a difference in behaviour when the buffer is not full.
In the test cases descriptions I exchanged the word "replace" for the word "remove". This should add clarity especially for the readers who are not native English speakers.