-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Inconsistencies & lies in linked list problem #36
Comments
Consistency and correctness would be very nice, and I would welcome a pull request that fixes these things. The README (in the exercism/x-common repository) might be a special case of just removing the bit about what will or will not be tested, since this problem varies from language to language. |
Roger that - I'll give it a look tomorrow |
I'm looking over the tests, and I've got a question: Is a I'd simply remove those tests, but I figured I'd ask first, since it changes the problem. As for the tests being weird:
|
From earlier:
I think that's probably fine. |
Overall, there's the question of whether this problem is about a linked list implementation or (more specifically) a deque implementation based on a doubly-link list. The problem is mixing the two terms a little willy-nilly.
But somewhat more worrisome: The first test is for a property named
count
(specifically that it's zero for an empty deque). But there are also tests for acountNodes()
function. Either one would make sense on its own, but having both is strange, IMO. The function implies implementing something that walks the list, while the property implies that the deque's length should be tracked "manually".(Okay, you could implement a dynamic
count
property usingObject.defineProperty
, or just return the property incountNodes
, but the former that seems out-of-scope for the task, and the latter seems very redundant.)And then there's this:
Lies! There's a test specifically for that, actually.
The tests also seem to follow a different style than others: It's got 4 spaces of indentation, and could use some blank lines to breathe. The file you have to create is also (so far) the only camelCased filename I've come across, which made me raise an eyebrow - but I won't claim that's necessarily wrong. Just weird.
All in all, it just seems kinda messy.
I'd be happy to fix the stuff (don't know about the file name) - just let me know.
The text was updated successfully, but these errors were encountered: