-
-
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
reverse-string: string with newline #2073
Comments
Whilst I like it, this would make the exercise harder in many languages. Even though we can now pick and choose our test cases, perhaps this would be better suited in a |
Introducing a second exercise would mean two very, very similar exercises and may render one redundant. The problem specs do have a handful of exercises which are marked deprecated/redundant. |
I also think this should be a new exercise. What I like about the current version of the exercise is that it is simple. As a mentor allows me to focus the mentoring discussions on the best way to reverse a string in the language I'm mentoring in without "noise". I don't see a new exercise with this as redundant, because the handling of new lines makes it a very different exercise for me. It stops being an exercise about possibly reversing a slice/list (I'm thinking mainly about Go and Python) and it becomes an exercise that should consider the string as having different parts, reversing some of them and organizing them back together. The function made in the first exercise can be useful for this new one, but it will only be a part of it and I like the idea of exercises building on each other. Like this DJ said, I also think this new exercise could be interesting to try new concepts like how to handle other special characters such as Another "fun" special case is to consider strings that use the Left Double Quotation Mark Original string: |
Chiming in to agree with @SleeplessByte and @andrerfcsantos here. Spacing/indenting in many text scenarios is considered special, so I don't know that having it in the simple reverse exercise makes conceptual sense. Since we've also discussed unicode reverse string in #1661 and long strings in #1983, perhaps we should talk about a reverse string "series"? Have the simple case, the case that handles various whitespace/spacing and quote characters, one that focuses on unicode reversal, and then one for performance? |
My vote is also for keeping the existing exercise simple. Especially with the concept trees in V3 it is important to have exercises that can be unlocked early in the learning process. |
Seems to be a clear consensus. Thanks for the opinions folks. I don't currently have the gumption to carry this forward. |
This came up in the bash track: what to do with strings containing newlines?
A common solution in shell would be to pipe the input into
rev
which would treat the input as lines and not a single string.Suggest a new case:
The text was updated successfully, but these errors were encountered: