-
-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bracket-push: curious: why do you suppose it's called bracket-PUSH? #693
Comments
I do not need a response. Have a nice day. (Or give your guess as to why it's called bracket-push) |
I have just found out that such a state machine might be called... a pushdown automaton...!!! This lends its credence to the name of the exercise! |
The name makes sense, but it kind of suggests a solution instead of posing a problem. See: exercism/discussions#124. |
I rehash my prior allegations of #693 below: I contend that having the word `push` in the name unnecessarily biases the solution space toward solutions that use a stack data structure (has a *push* operation) or a *push*-down automaton, rather than other solutions not using either of these two. We have heard a principle that we want to name exercises by their story, not by what they teach: #1451 (comment) The story here is about matching brackets, so I posit that that serves as the name we want. I have changed the major version number, as was done in the retree->satellite rename, even though I do not feel strongly about whether that should be necessary: #1478 As we have gained experience in the rename of retree, we see that problem-specifications is free to rename exercises at any point, without waiting for all tracks to follow suit. Of course, this operation should not be performed lightly since it causes churn in the 31 (*thirty-one*) tracks implementing this exercise.
The bracket-push exercise is about determining whether the brackets in a given string are balanced.
So, one asks, why is the word "push" in the slug? I didn't see an explanation in exercism/DEPRECATED.javascript#31 where the exercise was added. Why is the exercise not called
bracket-matching
orbrackets
or something similar?Well, okay, I can guess why: The name is meant to hint to the students that we can use a stack, because stacks have the "push" operation in the traditional literature. Aside: I wonder why that is so? I found http://stackoverflow.com/questions/420315/stacks-why-push-and-pop that may explain it - it's a spring-loaded stack of dishes.
In that case, I will half-jokingly note that this exercise name unfairly biases the solution space toward solutions that explicitly use a stack data structure and away from solutions using:
Now, remember that it is our policy that our exercises should not drive students toward any particular implementation and our exercises should not be over-prescriptive.
Since the name bracket-push does so, I considered proposing that we rename it.
Unfortunately, this is not my battle to fight today. But hey, if anyone ever comes along and makes the same proposal, you could let the proposer know that I agree, yeah?
The text was updated successfully, but these errors were encountered: