-
-
Notifications
You must be signed in to change notification settings - Fork 672
Add welcome-to-tech-palace exercise #1680
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
Conversation
8818996
to
8ca735e
Compare
@@ -0,0 +1,37 @@ | |||
# About | |||
|
|||
A `string` in Go is an immutable sequence of bytes, which don't necessarily have to represent characters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not certain if we want to specifically mention runes here. Perhaps not because you added another concept for runes
that is supposed to be taught by logs-logs-logs
.
Any preference @ekingery?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, as long as it is covered elsewhere, let's leave them out. In addition to the go101 link you recommend for the links.json below, I would defer to @ErikSchierboom as to whether this link is also appropriate: https://go.dev/blog/strings
It is much more comprehensive and does cover runes, which might be nice if people want to take a deeper dive with this concept.
exercises/concept/welcome-to-tech-palace/welcome_to_tech_palace.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall! I chimed in on a couple of comments, but didn't scrutinize the whole PR.
@@ -0,0 +1,37 @@ | |||
# About | |||
|
|||
A `string` in Go is an immutable sequence of bytes, which don't necessarily have to represent characters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, as long as it is covered elsewhere, let's leave them out. In addition to the go101 link you recommend for the links.json below, I would defer to @ErikSchierboom as to whether this link is also appropriate: https://go.dev/blog/strings
It is much more comprehensive and does cover runes, which might be nice if people want to take a deeper dive with this concept.
import "strings" | ||
|
||
strings.ToLower("TEST") // Output: "test" | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ErikSchierboom Without a list of more functions or a link to where to find more functions, the info in the introduction is currently not sufficient to solve the exercise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree with this statement for the following reason. One of the core ideas of Concept Exercises was to have students figure things out by themselves as much as possible. The way I intended this to work is to provide just enough context to allow the student to Google things by themselves, but to always provide the hints as a fallback should the student not manage to figure things out. Applying that to this example, we've explained that there is a strings
package (letting the student learn its exact name, useful for Googling), shown how to import it and how to use one example function (purposefully not one of the functions the student requires).
I know not everyone is comfortable with the above approach, but it is the original idea for how to introduce concepts in Concept Exercises. If you as Go maintainers would prefer to use a different approach, I'm okay with that, but I think there's great value in the above approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am ok either way, I was just a little confused because I had the feeling you were pushing a lot for providing all the needed info in other exercises. I got the wrong impression from that. Just ignore the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem. I will get this wrong from time to time too, so 🤷
9c36ce5
to
b918ec9
Compare
@ErikSchierboom Not sure whether this should be part of this PR or not but at some point we need to go through all exercises that currently have "string-formatting" as prerequisite and check whether they need that one or the new "strings". If you dont want to include this here maybe create a ticket so we dont forget about it. |
a9311b5
to
e9b71ee
Compare
Co-authored-by: Jeremy Walker <jez.walker@gmail.com>
Co-authored-by: Jason Runkle <jmrunkle@google.com>
574594f
to
f38828e
Compare
I'm merging this. Thanks all! |
Closes #1613
@junedev I haven't gotten around to adding the tests, but I can do that later. Could you review this PR?