Skip to content
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

x/tour: the Exercise: Slices misses the mark #12284

Closed
rboa opened this issue Aug 23, 2015 · 9 comments
Closed

x/tour: the Exercise: Slices misses the mark #12284

rboa opened this issue Aug 23, 2015 · 9 comments

Comments

@rboa
Copy link

rboa commented Aug 23, 2015

Context: http://tour.golang.org/moretypes/14

at this point in the tutorial, we have not seen 2d arrays. absolutely no idea of how to make them.

also from the problem description, we have no idea of what you are meaning with the function examples.

this is just far too advanced for what a newbie knows

@mikioh mikioh changed the title tour: the Exercise: Slices misses the mark x/tour: the Exercise: Slices misses the mark Aug 23, 2015
@nsajko
Copy link
Contributor

nsajko commented Aug 23, 2015

You have input and output types of a function (its type
signature), and simply need to implement one that satisfies
these given types. After that you can play with it and learn
more.

@robpike
Copy link
Contributor

robpike commented Aug 24, 2015

The text does give a huge hint. I think it's fine but I know how to do it.

@adg adg self-assigned this Aug 24, 2015
@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Aug 25, 2015
@lizrice
Copy link
Contributor

lizrice commented Sep 19, 2015

For me, I could only make sense of this by looking at the code for x/tour/pic to figure out where dx & dy were coming from. Got to agree, this seems quite a leap for a beginner.

Also, the description suggests you'll get to see the image as, y'know, a picture, but it seems it just outputs it as data?

@kytrinyx
Copy link
Contributor

@lizrice I'm seeing the actual image.

pic

@kytrinyx
Copy link
Contributor

@adg I can take a look at this one.

@kytrinyx
Copy link
Contributor

@adg How about adding a slide that creates a tic tac toe game before we get to the Pic exercise?

That would let us show a slice of slices in a slightly different setting. It's close enough to provide a good hint, but they'll still have to work out the looping for themselves.

http://play.golang.org/p/LnZ06-353y

@adg
Copy link
Contributor

adg commented Oct 19, 2015

@kytrinyx I like it!

@adg adg assigned kytrinyx and unassigned adg Oct 19, 2015
@kytrinyx
Copy link
Contributor

Alright, I gave it a shot. I wasn't sure where to put it, so I added it immediately after the place where slices are introduced and described as []T slice of type T.

@gopherbot
Copy link

CL https://golang.org/cl/16028 mentions this issue.

@golang golang locked and limited conversation to collaborators Oct 24, 2016
gopherbot pushed a commit to golang/website that referenced this issue May 26, 2021
The `Pic` exercise throws people a bit, since they've not seen
the syntax for slices of slice.

This shows syntax that is similar enough to provide a hint, without
giving away the answer. They still have to figure out the assignment in
the loop on their own.

Fixes golang/go#12284

Change-Id: I9f12e97c4ca0ac37d08898f8a898c78b2f983ef4
Reviewed-on: https://go-review.googlesource.com/16028
Reviewed-by: Andrew Gerrand <adg@golang.org>
X-Tour-Commit: b9bdbaad7b966081ff67733f07d12f5777c8048e
passionSeven added a commit to passionSeven/website that referenced this issue Oct 18, 2022
The `Pic` exercise throws people a bit, since they've not seen
the syntax for slices of slice.

This shows syntax that is similar enough to provide a hint, without
giving away the answer. They still have to figure out the assignment in
the loop on their own.

Fixes golang/go#12284

Change-Id: I9f12e97c4ca0ac37d08898f8a898c78b2f983ef4
Reviewed-on: https://go-review.googlesource.com/16028
Reviewed-by: Andrew Gerrand <adg@golang.org>
X-Tour-Commit: b9bdbaad7b966081ff67733f07d12f5777c8048e
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants